/* Man and Machine.co, static site v3.
   Layout and motion patterns follow the Inspace site (bottom glass dock, develop hero, hover service cards, pinned stage,
   tile grid, two themes on every page). Colours, type, words, photos and icons are Man and Machine.co's own:
   BRAND_SPEC.md colours only (Machine Red, Garage Dark, Ink, Off-white) plus the named tints below.
   Machine Red never carries text: it is used for the mark, thin rules, ticks, progress fills, icon accents and focus rings. */
@font-face { font-family: "Libre Caslon Text"; src: url("../fonts/libre-caslon-text.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* brand */
  --ink: #141414;          /* Ink */
  --dark: #332C2B;         /* Garage Dark */
  --paper: #F4F1EC;        /* Off-white */
  --red: #FF1F47;          /* Machine Red: never text */
  /* named tints (flattened so contrast is exact) */
  --ink-raised: #1D1B1B;   /* Ink 70% + Garage Dark 30%: cards on the dark theme */
  --ink-line: #2A2626;     /* Ink 45% + Garage Dark 55%: card edges on the dark theme */
  --paper-70: #B1AFAB;     /* Off-white 70% on Ink: secondary text, dark theme (8.6:1) */
  --paper-deep: #E8E5E0;   /* Garage Dark 6% on Off-white: cards, light theme */
  --paper-deeper: #D9D5D1; /* Garage Dark 14% on Off-white */
  --dark-72: #69635F;      /* Garage Dark 72% on Off-white: secondary text, light theme (5.4:1) */

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Jost", Arial, Helvetica, sans-serif;
  --step--1: .75rem;
  --step-0: 1rem;
  --step-1: clamp(1.15rem, 1.05rem + .4vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.45rem + 2vw, 3rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem);
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --dock-h: 52px;

  /* theme tokens: dark is the default */
  --bg: var(--ink);
  --text: var(--paper);
  --muted: var(--paper-70);
  --heading: var(--paper);
  --rule: rgba(244, 241, 236, .16);
  --card: var(--ink-raised);
  --card-edge: rgba(244, 241, 236, .1);
}
:root[data-theme="light"] {
  --bg: var(--paper);
  --text: var(--dark);
  --muted: var(--dark-72);
  --heading: var(--ink);
  --rule: rgba(51, 44, 43, .18);
  --card: var(--paper-deep);
  --card-edge: rgba(51, 44, 43, .14);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--step-0)/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; margin: 0; color: var(--heading); text-wrap: balance; }
h3 { line-height: 1.25; }
p { margin: 0 0 1em; max-width: 62ch; }
ul, ol { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 12px 16px; font-weight: 500; }
.skip:focus { left: 8px; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 1.2rem; font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; flex: none; width: 28px; height: 2px; background: var(--red); }
.mono { font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- dock: bottom glass menu + call to action (Inspace pattern) ---------- */
.dock { position: fixed; inset: auto 0 0 0; z-index: 60; pointer-events: none; }
.dock-scrim { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); opacity: 0; visibility: hidden; pointer-events: auto; transition: opacity .35s var(--ease), visibility 0s .35s; }
.dock.is-open .dock-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
.dock-wrap { position: relative; width: min(26rem, 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.dock-glass { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(244,241,236,.14), rgba(244,241,236,.03) 55%, rgba(244,241,236,.07)), rgba(20, 20, 20, .66);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(244,241,236,.28), inset 0 0 0 1px rgba(244,241,236,.12), inset 0 -8px 16px rgba(0,0,0,.16), 0 10px 30px rgba(0,0,0,.36); }
.dock-bar { display: flex; gap: 8px; align-items: stretch; height: var(--dock-h); pointer-events: auto; }
.dock-badge { position: relative; flex: 0 0 var(--dock-h); display: grid; place-items: center; border-radius: 50%; transition: transform .4s var(--ease); }
.dock-badge img { position: relative; z-index: 1; width: 24px; height: auto; transition: transform .5s var(--ease); }
.dock-badge:hover { transform: scale(1.06); }
.dock-pill { position: relative; flex: 1; min-width: 0; display: flex; align-items: stretch; justify-content: space-between; padding: 4px; border-radius: 999px; color: var(--paper); }
.dock-menu { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 16px; border: 0; border-radius: 999px; background: none; color: inherit; font: 500 var(--step-0)/1 var(--sans); cursor: pointer; }
.dock-menu:hover { background: rgba(244,241,236,.08); }
.dock-burger { position: relative; width: 18px; height: 10px; }
.dock-burger i { position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.dock-burger i:first-child { top: 0; }
.dock-burger i:last-child { top: 8.5px; }
.dock.is-open .dock-burger i:first-child { top: 4.25px; transform: rotate(45deg); }
.dock.is-open .dock-burger i:last-child { top: 4.25px; transform: rotate(-45deg); }
.dock-cta { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 0 5px 0 18px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font: 500 var(--step-0)/1 var(--sans); white-space: nowrap; transition: background .3s var(--ease); }
.dock-cta:hover { background: #FFFFFF; }
.dock-cta-text { display: block; height: 1.15em; overflow: hidden; }
.dock-cta-text > span { display: block; height: 1.15em; line-height: 1.15; transition: transform .45s var(--ease); }
.dock-cta:hover .dock-cta-text > span, .dock-cta:focus-visible .dock-cta-text > span { transform: translateY(-100%); }
.dock-cta-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); transition: transform .45s var(--ease); }
.dock-cta:hover .dock-cta-icon { transform: translateX(2px) rotate(-45deg); }
.dock-panel { position: relative; order: -1; border-radius: 28px; padding: 22px 24px 18px; color: var(--paper); pointer-events: auto;
  background: linear-gradient(180deg, rgba(244,241,236,.12), rgba(244,241,236,.02) 60%), rgba(20, 20, 20, .8);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(244,241,236,.26), inset 0 0 0 1px rgba(244,241,236,.12), 0 18px 48px rgba(0,0,0,.42);
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: 50% 100%; visibility: hidden; transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s .45s; }
.dock.is-open .dock-panel { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.dock-panel a { text-decoration: none; display: flex; align-items: center; }
.dock-primary li, .dock-secondary li { opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .5s var(--ease); }
.dock.is-open .dock-primary li, .dock.is-open .dock-secondary li { opacity: 1; transform: none; transition-delay: calc(var(--i) * 50ms + 90ms); }
.dock-primary a { min-height: 44px; font: 500 var(--step-2)/1.15 var(--serif); padding: 2px 0; transition: transform .35s var(--ease); }
.dock-primary a::after { content: ""; width: 0; height: 2px; margin-left: 12px; background: var(--red); transition: width .35s var(--ease); }
.dock-primary a:hover, .dock-primary a[aria-current="page"] { transform: translateX(4px); }
.dock-primary a:hover::after, .dock-primary a[aria-current="page"]::after { width: 28px; }
.dock-secondary { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 12px; padding-top: 8px; border-top: 1px solid rgba(244,241,236,.16); }
.dock-secondary a { min-height: 44px; font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-70); }
.dock-secondary a:hover { color: var(--paper); }
@media (max-width: 420px) { .dock-menu { padding: 0 12px; gap: 10px; } .dock-cta { padding-left: 14px; font-size: .9375rem; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .dock-glass, .dock-panel { background: rgba(20, 20, 20, .95); } }

/* light theme dock: pale glass, dark text, the mark stays red */
:root[data-theme="light"] .dock-glass { background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.22) 55%, rgba(255,255,255,.36)), rgba(244,241,236,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(51,44,43,.14), inset 0 -8px 16px rgba(51,44,43,.06), 0 10px 30px rgba(51,44,43,.22); }
:root[data-theme="light"] .dock-pill, :root[data-theme="light"] .theme-fab { color: var(--ink); }
:root[data-theme="light"] .dock-menu:hover { background: rgba(51,44,43,.08); }
:root[data-theme="light"] .dock-cta { background: var(--ink); color: var(--paper); }
:root[data-theme="light"] .dock-cta:hover { background: var(--dark); }
:root[data-theme="light"] .dock-cta-icon { background: var(--paper); color: var(--ink); }
:root[data-theme="light"] .dock-panel { color: var(--ink); background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.4) 60%), rgba(244,241,236,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(51,44,43,.14), 0 18px 48px rgba(51,44,43,.26); }
:root[data-theme="light"] .dock-secondary { border-top-color: rgba(51,44,43,.16); }
:root[data-theme="light"] .dock-secondary a, :root[data-theme="light"] .theme-switch { color: var(--dark-72); }
:root[data-theme="light"] .dock-secondary a:hover, :root[data-theme="light"] .theme-switch:hover { color: var(--ink); }
:root[data-theme="light"] .dock-scrim { background: rgba(244,241,236,.55); }

/* theme switch: round glass button bottom right on wide screens; a row in the menu everywhere */
.theme-fab { position: fixed; right: var(--gutter); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 60; width: var(--dock-h); height: var(--dock-h); display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--paper); cursor: pointer; transition: transform .4s var(--ease); }
.theme-fab:hover { transform: scale(1.06); }
.theme-fab .ico { position: relative; z-index: 1; }
@media (max-width: 900px) { .theme-fab { display: none; } }
.theme-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-70); }
.theme-switch:hover { color: var(--paper); }
.ico-to-dark, :root[data-theme="light"] .ico-to-light { display: none; }
:root[data-theme="light"] .ico-to-dark { display: inline-block; }
.ico-accent { stroke: var(--red); }

.dock-pad { height: 96px; }

/* ---------- section dots (Inspace pattern) ---------- */
.dots { position: fixed; right: calc(var(--gutter) - 12px); top: 50%; transform: translateY(-50%); z-index: 40; display: grid; }
.dots a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 44px; min-height: 44px; padding: 0 12px; text-decoration: none; color: #FFFFFF; mix-blend-mode: difference; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.dots a span { opacity: 0; transform: translateX(6px); transition: .3s var(--ease); }
.dots a::after { content: ""; width: 18px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.dots a:hover span, .dots a:focus-visible span { opacity: 1; transform: none; }
.dots a[aria-current="true"]::after { width: 42px; }
@media (max-width: 900px), (max-height: 560px) { .dots { display: none; } }

/* ---------- hero: develop effect (hero-develop.js) ---------- */
.hero { position: relative; --reveal: 1; --mid: 0; --callout: 1; background: var(--bg); }
.hero.is-develop { height: 280vh; height: 280svh; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 46% 56% at 68% 44%, rgba(51,44,43,.85) 0%, rgba(51,44,43,.3) 55%, transparent 100%), var(--ink); }
.hero-media { position: absolute; inset: 0; opacity: var(--reveal); }
.hero-media figure { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-media figure.is-active { opacity: 1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.hero-media figure.is-active img { transform: scale(1); }
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: none; }
.is-develop .hero-dust { display: block; }
.hero-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
  linear-gradient(90deg, rgba(20,20,20,calc(.9 * var(--reveal) + .5 * var(--mid))) 0%, rgba(20,20,20,calc(.74 * var(--reveal) + .3 * var(--mid))) 38%, rgba(20,20,20,calc(.2 * var(--reveal))) 62%, rgba(20,20,20,0) 80%),
  linear-gradient(180deg, rgba(20,20,20,calc(.35 * var(--reveal))) 0%, rgba(20,20,20,0) 22%, rgba(20,20,20,0) 70%, var(--ink) 100%); }
.hero-copy { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: calc(var(--dock-h) + 52px); display: grid; gap: clamp(14px, 2.4vh, 24px); justify-items: start; max-width: 640px; color: var(--paper); }
.hero-logo { position: relative; display: block; width: clamp(180px, 17vw, 250px); aspect-ratio: 100 / 71.529; }
.hero-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-logo__light { display: none; }
.hero-copy .eyebrow { margin: 0; color: var(--paper); }
.hero-copy h1 { font-size: var(--step-4); max-width: 15ch; color: var(--paper); }
.hero-copy .lede { margin: 0; font-size: var(--step-1); line-height: 1.45; max-width: 40ch; color: var(--paper); }
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; color: var(--paper); text-decoration: none; font: 500 var(--step--1)/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.scroll-cue__line { position: relative; width: 1px; height: 44px; background: rgba(244,241,236,.3); overflow: hidden; }
.scroll-cue__line::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 50%; background: var(--red); animation: cue 2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(200%); } }
.hero-callout { width: min(520px, 100%); opacity: var(--callout); transform: translateY(calc((1 - var(--callout)) * 10px)); }
.hero-callout a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--paper); }
.hero[style*="--callout: 0"] .hero-callout a { pointer-events: none; }

/* dimension line: |---- label ----|, red ticks and rules, the label in text colour (Inspace signature, rebuilt) */
.dim { display: grid; grid-template-columns: auto 1fr auto; align-items: center; width: 100%; overflow: hidden; font: 500 var(--step--1)/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.dim::before, .dim::after { content: ""; width: 1px; height: 14px; background: var(--red); }
.dim > span { position: relative; text-align: center; padding: 0 12px; }
.dim > span::before, .dim > span::after { content: ""; position: absolute; top: 50%; height: 1px; width: 50vw; background: var(--red); }
.dim > span::before { right: 100%; }
.dim > span::after { left: 100%; }

@media (max-width: 700px) {
  .hero-copy { bottom: calc(var(--dock-h) + 40px); gap: 12px; }
  .hero-logo { width: 156px; }
  .hero-copy h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.6rem); }
  .hero-copy .lede { font-size: 1rem; }
  .hero-bg { background: radial-gradient(ellipse 70% 40% at 50% 25%, rgba(51,44,43,.85) 0%, rgba(51,44,43,.3) 55%, transparent 100%), var(--ink); }
  .hero-scrim { background:
    linear-gradient(0deg, rgba(20,20,20,calc(.92 * var(--reveal) + .6 * var(--mid))) 0%, rgba(20,20,20,calc(.84 * var(--reveal) + .45 * var(--mid))) 48%, rgba(20,20,20,calc(.2 * var(--reveal))) 72%, rgba(20,20,20,calc(.3 * var(--reveal))) 100%); }
}

/* light theme hero: Off-white sky, Garage Dark dust, the Primary logo; the photo arrives under a pale paper veil */
:root[data-theme="light"] .hero-bg { background: radial-gradient(ellipse 46% 56% at 68% 44%, #FFFFFF 0%, rgba(255,255,255,.4) 55%, transparent 100%), var(--paper); }
:root[data-theme="light"] .hero-scrim { background:
  linear-gradient(90deg, rgba(244,241,236,calc(.92 * var(--reveal) + .5 * var(--mid))) 0%, rgba(244,241,236,calc(.82 * var(--reveal) + .3 * var(--mid))) 38%, rgba(244,241,236,calc(.25 * var(--reveal))) 62%, rgba(244,241,236,0) 80%),
  linear-gradient(180deg, rgba(244,241,236,0) 70%, var(--paper) 100%); }
:root[data-theme="light"] .hero-copy, :root[data-theme="light"] .hero-copy h1, :root[data-theme="light"] .hero-copy .lede,
:root[data-theme="light"] .hero-copy .eyebrow, :root[data-theme="light"] .scroll-cue, :root[data-theme="light"] .hero-callout a { color: var(--ink); }
:root[data-theme="light"] .scroll-cue__line { background: rgba(51,44,43,.3); }
:root[data-theme="light"] .hero-logo__dark { display: none; }
:root[data-theme="light"] .hero-logo__light { display: block; }
@media (max-width: 700px) {
  :root[data-theme="light"] .hero-bg { background: radial-gradient(ellipse 70% 40% at 50% 25%, #FFFFFF 0%, rgba(255,255,255,.4) 55%, transparent 100%), var(--paper); }
  :root[data-theme="light"] .hero-scrim { background:
    linear-gradient(0deg, rgba(244,241,236,calc(.94 * var(--reveal) + .6 * var(--mid))) 0%, rgba(244,241,236,calc(.88 * var(--reveal) + .45 * var(--mid))) 48%, rgba(244,241,236,calc(.2 * var(--reveal))) 70%, rgba(244,241,236,0) 100%); }
}

/* ---------- home slides ---------- */
.slide { position: relative; padding: clamp(72px, 12vh, 136px) var(--gutter) clamp(64px, 10vh, 120px); }
@media (min-width: 901px) and (min-height: 561px) { .slide { padding-right: calc(var(--gutter) + 110px); } }
.slide h2.big { font-size: var(--step-3); max-width: 20ch; }
.lead { font-size: var(--step-1); line-height: 1.5; }

/* story */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 88px); align-items: center; }
.split h2 { font-size: var(--step-4); margin-bottom: 1.4rem; max-width: 12ch; }
.split figure { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px; background: var(--card); }
.split figure img { width: 100%; height: 100%; object-fit: cover; }
.story-quote { margin-top: 2rem; padding-left: 20px; border-left: 2px solid var(--red); font: 500 var(--step-1)/1.35 var(--serif); color: var(--heading); max-width: 30ch; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split figure { aspect-ratio: 4 / 3; } }

/* services: hover cards that open into photo cards (Inspace pattern) */
.svc-hint { margin: 12px 0 0; font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.svcs { display: flex; gap: 12px; height: clamp(540px, 70vh, 660px); margin-top: clamp(24px, 4vh, 44px); }
.svc { position: relative; flex: 1 1 0; min-width: 0; border-radius: 22px; overflow: hidden; isolation: isolate; background: var(--ink-raised); box-shadow: inset 0 0 0 1px var(--card-edge); transition: flex-grow .65s var(--ease); }
.svc.is-open { flex-grow: 3.3; }
.svc-media { position: absolute; inset: 0; z-index: -2; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); filter: saturate(.6) brightness(.55); transition: transform 1s var(--ease), filter .6s var(--ease); }
.svc.is-open .svc-media img { transform: scale(1); filter: none; }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,20,20,.64) 0%, rgba(20,20,20,.28) 28%, rgba(20,20,20,.7) 50%, rgba(20,20,20,.92) 64%, rgba(20,20,20,.96) 100%); }
.svc:not(.is-open)::before { background: linear-gradient(180deg, rgba(20,20,20,.82), rgba(20,20,20,.9)); }
.svc-head { position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: block; width: 100%; padding: clamp(18px, 2vw, 26px); border: 0; background: none; color: var(--paper); cursor: pointer; text-align: left; font: inherit; }
.svc-num { display: block; margin-bottom: 8px; font: 500 var(--step--1)/1 var(--sans); letter-spacing: .12em; color: rgba(244,241,236,.86); }
.svc-head h3 { font-size: var(--step-2); padding-right: 52px; color: var(--paper); transition: font-size .4s var(--ease); }
.svc:not(.is-open) .svc-head h3 { font-size: var(--step-1); }
.svc-plus { position: absolute; top: clamp(18px, 2vw, 26px); right: clamp(18px, 2vw, 26px); width: 36px; height: 36px; border-radius: 50%; background: rgba(244,241,236,.14); box-shadow: inset 0 0 0 1px rgba(244,241,236,.22); transition: transform .5s var(--ease), background .3s; }
.svc-plus::before, .svc-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; margin: -.8px 0 0 -6px; background: var(--paper); transition: transform .5s var(--ease); }
.svc-plus::after { transform: rotate(90deg); }
.svc.is-open .svc-plus { transform: rotate(180deg); background: var(--paper); }
.svc.is-open .svc-plus::before, .svc.is-open .svc-plus::after { background: var(--ink); }
.svc.is-open .svc-plus::after { transform: rotate(0); }
.svc-head:focus-visible { outline-offset: -4px; border-radius: 22px; }
.svc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: clamp(12px, 2vh, 18px); padding: clamp(18px, 2vw, 26px); color: var(--paper); opacity: 0; transform: translateY(18px); visibility: hidden; transition: opacity .35s var(--ease), transform .5s var(--ease), visibility 0s .35s; }
.svc.is-open .svc-body { opacity: 1; transform: none; visibility: visible; transition-delay: .18s, .18s, 0s; }
.svc-body p { margin: 0; font-size: var(--step-0); max-width: 48ch; }
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.svc-list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid rgba(244,241,236,.2); font-size: .875rem; line-height: 1.35; }
.svc-list strong { font-weight: 500; }
.svc-list span { color: rgba(244,241,236,.84); }
.svc-foot { padding-top: 4px; }
.svc-foot .count { display: inline-flex; align-items: center; min-height: 44px; font: 500 var(--step--1)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 900px) {
  .svcs { flex-direction: column; height: auto; }
  .svc { flex: none; max-height: 92px; transition: max-height .6s var(--ease); }
  .svc.is-open { max-height: 900px; }
  .svc-head { position: relative; display: flex; align-items: center; gap: 14px; height: 92px; }
  .svc-num { margin: 0; }
  .svc-head h3, .svc:not(.is-open) .svc-head h3 { font-size: var(--step-1); padding-right: 0; }
  .svc-plus { position: relative; top: auto; right: auto; margin-left: auto; flex: none; }
  .svc.is-open .svc-head { height: auto; min-height: 92px; }
  .svc-body { position: relative; padding-top: clamp(120px, 34vw, 220px); }
  .svc.is-open::before { background: linear-gradient(180deg, rgba(20,20,20,.66) 0%, rgba(20,20,20,.3) 14%, rgba(20,20,20,.3) 22%, rgba(20,20,20,.86) 34%, rgba(20,20,20,.94) 50%, rgba(20,20,20,.96) 100%); }
}
@media (max-width: 520px) { .svc-list { grid-template-columns: 1fr; } }
/* light theme: the open card keeps its photo and dark veil; closed cards turn to paper */
:root[data-theme="light"] .svc { background: var(--paper-deep); box-shadow: inset 0 0 0 1px rgba(51,44,43,.14), 0 14px 32px -18px rgba(51,44,43,.45); }
:root[data-theme="light"] .svc::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s var(--ease); background: linear-gradient(180deg, rgba(232,229,224,.9), rgba(217,213,209,.95)); }
:root[data-theme="light"] .svc:not(.is-open)::after { opacity: 1; }
:root[data-theme="light"] .svc:not(.is-open)::before { opacity: 0; }
:root[data-theme="light"] .svc:not(.is-open) .svc-head, :root[data-theme="light"] .svc:not(.is-open) .svc-head h3 { color: var(--ink); }
:root[data-theme="light"] .svc:not(.is-open) .svc-num { color: var(--dark-72); }
:root[data-theme="light"] .svc:not(.is-open) .svc-plus { background: rgba(51,44,43,.08); box-shadow: inset 0 0 0 1px rgba(51,44,43,.22); }
:root[data-theme="light"] .svc:not(.is-open) .svc-plus::before, :root[data-theme="light"] .svc:not(.is-open) .svc-plus::after { background: var(--ink); }

/* how a job runs: pinned stage (Inspace "How we build" pattern) */
.process { position: relative; height: 420vh; height: 420svh; }
.process-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: 58fr 42fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(40px, 8vh, 80px) calc(var(--gutter) + 110px) calc(var(--dock-h) + 48px) var(--gutter); }
.process-media { position: relative; height: 100%; max-height: 720px; border-radius: 22px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.process-media figure { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.process-media figure.is-active { opacity: 1; }
.process-media img { width: 100%; height: 100%; object-fit: cover; }
.process-side h2 { font-size: var(--step-3); max-width: 14ch; margin-bottom: clamp(20px, 4vh, 40px); }
.step { position: relative; padding: 0 0 clamp(16px, 3.4vh, 30px) 28px; --fill: 0; }
.step:last-child { padding-bottom: 0; }
.step h3 { color: var(--muted); transition: color .4s var(--ease); }
.step[aria-current="step"] h3 { color: var(--heading); }
.step::before, .step::after { content: ""; position: absolute; left: 0; top: 7px; bottom: -7px; width: 2px; }
.step:last-child::before, .step:last-child::after { bottom: calc(100% - 21px); }
.step::before { background: var(--rule); }
.step::after { background: var(--red); transform: scaleY(var(--fill)); transform-origin: top; }
.step-tick { position: absolute; left: -4px; top: 7px; width: 10px; height: 2px; background: var(--muted); z-index: 1; }
.step.is-done .step-tick, .step[aria-current="step"] .step-tick { background: var(--red); }
.step h3 { display: flex; align-items: baseline; gap: 12px; font-size: var(--step-1); }
.step-num { font: 500 var(--step--1)/1 var(--sans); letter-spacing: .1em; color: var(--muted); }
.step p { margin: 8px 0 0; color: var(--muted); max-width: 36ch; }
@media (max-width: 900px) {
  .process { height: 380vh; height: 380svh; }
  .process-stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; padding: 24px var(--gutter) calc(var(--dock-h) + 40px); align-items: stretch; }
  .process-side h2 { display: none; }
  .process-side .eyebrow { margin-bottom: 12px; }
  .step { padding-bottom: 8px; }
  .step h3 { font-size: 1rem; }
  .step p { display: none; font-size: .9rem; }
  .step[aria-current="step"] p { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .process { height: auto; }
  .process-stage { position: static; height: auto; grid-template-rows: none; }
  .process-media { height: min(60vh, 460px); }
  .step, .step h3 { color: var(--muted); transition: color .4s var(--ease); }
.step[aria-current="step"] h3 { color: var(--heading); }
  .step p { display: block !important; }
  .step { --fill: 1 !important; }
}

/* work tiles: one lead tile + a grid (Inspace pattern); photo cards stay dark in both themes */
.work-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 5vh, 48px); }
.work-head h2 { margin: 0; }
.tile { position: relative; display: block; border-radius: 22px; overflow: hidden; background: var(--ink-raised); color: var(--paper); text-decoration: none; isolation: isolate; box-shadow: inset 0 0 0 1px rgba(244,241,236,.1); }
.tile figure { aspect-ratio: 4 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.045); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(20,20,20,0) 30%, rgba(20,20,20,.74) 60%, rgba(20,20,20,.95) 100%); }
.tile--lead figure { aspect-ratio: 21 / 9; }
.tile--lead::after { background: linear-gradient(180deg, rgba(20,20,20,0) 50%, rgba(20,20,20,.62) 100%); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 22px); margin-top: clamp(12px, 1.6vw, 22px); }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 6px; padding: clamp(16px, 2vw, 24px); padding-right: 68px; }
.tile-title { font: 500 var(--step-1)/1.2 var(--serif); }
.tile-meta { font: 500 var(--step--1)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(244,241,236,.86); }
.tile--lead .tile-meta { position: absolute; top: clamp(16px, 2vw, 24px); left: clamp(16px, 2vw, 24px); z-index: 2; padding: 9px 14px; border-radius: 999px; color: var(--paper); background: rgba(20,20,20,.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(244,241,236,.18); }
.tile-chip { position: absolute; left: clamp(16px, 2vw, 24px); bottom: clamp(16px, 2vw, 24px); z-index: 2; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 2 * clamp(16px, 2vw, 24px)); padding: 8px 8px 8px 22px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(244,241,236,.12), rgba(244,241,236,.02)), rgba(20,20,20,.78); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(244,241,236,.28), inset 0 0 0 1px rgba(244,241,236,.12); }
.tile-chip-title { font: 500 var(--step-1)/1.2 var(--serif); }
.tile-chip-arrow { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 18px; transition: transform .45s var(--ease); }
.tile > .tile-chip-arrow { position: absolute; right: clamp(14px, 1.6vw, 20px); bottom: clamp(14px, 1.6vw, 20px); z-index: 2; }
.tile:hover .tile-chip-arrow { transform: rotate(-45deg); }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } .tile--lead figure { aspect-ratio: 16 / 9; } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .tile--lead figure { aspect-ratio: 4 / 3; } .tile-chip-title { font-size: var(--step-0); } }

.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font: 500 var(--step--1)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; border: 0; transition: background .3s var(--ease); }
.btn:hover { background: #FFFFFF; }
:root[data-theme="light"] .btn { background: var(--ink); color: var(--paper); }
:root[data-theme="light"] .btn:hover { background: var(--dark); }

/* contact */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.contact h2 { font-size: var(--step-4); max-width: 12ch; margin-bottom: 1.4rem; }
.contact-body { color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 40ch; margin-bottom: 1.8rem; }
.contact-list { border-top: 1px solid var(--rule); }
.contact-list li { border-bottom: 1px solid var(--rule); }
.contact-list > li > a, .addr { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 0; text-decoration: none; }
.contact-list .ico { flex: none; color: var(--text); }
.contact-list > li > a span:first-of-type, .addr-label { flex: 0 0 6.6em; font: 500 var(--step--1)/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-list > li > a span:last-child { flex: 1; min-width: 0; text-align: right; font-size: var(--step-1); overflow-wrap: anywhere; }
.contact-list > li > a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; }
.addr { align-items: flex-start; }
.addr .ico { margin-top: 2px; }
.addr-label { margin-top: 4px; }
.addr-body { flex: 1; min-width: 0; display: grid; justify-items: end; text-align: right; gap: 4px; }
.addr-body address { font: 400 var(--step-0)/1.5 var(--serif); font-style: normal; color: var(--text); }
.addr-body address span { display: block; }
.addr-when { font-size: .9rem; color: var(--muted); }
.addr-map { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; font-size: .95rem; color: var(--text); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.contact-confirm { margin: clamp(28px, 5vh, 48px) 0 0; color: var(--muted); }
.legal { margin-top: clamp(40px, 8vh, 80px); padding-top: 24px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 28px; font: 500 11px/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.legal-logo { width: 210px; height: auto; }
.legal-logo--light, :root[data-theme="light"] .legal-logo--dark { display: none; }
:root[data-theme="light"] .legal-logo--light { display: block; }
#contact { padding-bottom: calc(clamp(28px, 6vh, 72px) + 96px); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .contact-list > li > a { flex-wrap: wrap; gap: 4px 12px; }
  .contact-list > li > a span:last-child { flex: 1 0 100%; text-align: left; padding-left: 36px; }
  .addr { flex-wrap: wrap; gap: 4px 12px; }
  .addr-body { flex: 1 0 100%; justify-items: start; text-align: left; padding-left: 36px; }
}

/* ---------- inner pages ---------- */
.page { padding: clamp(56px, 12vh, 120px) var(--gutter) 0; }
.page-title { font-size: var(--step-4); margin-bottom: 1rem; }
.page-lede { color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 52ch; margin-bottom: clamp(24px, 5vh, 44px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 5vh, 48px); }
.filters button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule); background: none; color: var(--text); font: 500 var(--step--1)/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.filters button:hover { border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
:root[data-theme="light"] .filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters sup { margin-left: 6px; font-size: .85em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px) clamp(16px, 2.4vw, 32px); }
.grid > .card[hidden] { display: none; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; color: inherit; }
.card figure { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: var(--card); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover img, .card:focus-visible img { transform: scale(1.035); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font: 500 var(--step--1)/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: var(--step-1); margin-top: 6px; }
.card-work { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.page-more { margin: clamp(48px, 9vh, 96px) 0 0; color: var(--muted); }
.page-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.project-hero { position: relative; height: 82vh; height: 82svh; min-height: 440px; display: flex; align-items: flex-end; background: var(--ink); color: var(--paper); }
.project-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,.45), rgba(20,20,20,0) 32%, rgba(20,20,20,.55) 60%, rgba(20,20,20,.94)); }
.project-hero .inner { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) clamp(32px, 7vh, 64px); display: grid; gap: 16px; justify-items: start; }
.project-hero .eyebrow { margin: 0; color: var(--paper); }
.project-hero h1 { font-size: var(--step-4); max-width: 16ch; color: var(--paper); }
.project-hero .dim { width: min(520px, 100%); color: var(--paper); }
.page--project { padding-top: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: clamp(32px, 6vh, 64px) 0; border-top: 1px solid var(--rule); }
.facts div { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 var(--step--1)/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: var(--step-1); }
.project-body { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 80px); }
.project-line { font: 500 var(--step-2)/1.3 var(--serif); color: var(--heading); max-width: 30ch; }
@media (max-width: 900px) { .project-body { grid-template-columns: 1fr; gap: 0; } }
/* before / after: two frames side by side, labelled (no slider: the frames are not aligned) */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.4vw, 18px); margin: clamp(32px, 6vh, 64px) 0 0; max-width: 980px; }
.ba-fig { position: relative; }
.ba-fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; background: var(--card); }
.ba-tag { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 8px 14px; border-radius: 999px; background: rgba(20,20,20,.86); color: var(--paper); font: 500 var(--step--1)/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.ba-fig figcaption, .gallery-item figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.h-seq { margin: clamp(40px, 8vh, 80px) 0 0; font-size: var(--step-2); }
/* gallery: a grid that reads left to right in date order; tiles are cropped 3:4, the lightbox shows the whole photo */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px) clamp(8px, 1.4vw, 18px); margin: clamp(20px, 4vh, 36px) 0 clamp(40px, 8vh, 88px); }
.gallery-item { margin: 0; }
.gallery-item a { display: block; overflow: hidden; border-radius: 18px; background: var(--card); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s var(--ease); }
.gallery-item a:hover img { transform: scale(1.03); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery-item:only-child { grid-column: 1 / -1; max-width: 560px; }
.work-group { padding-top: clamp(16px, 3vh, 32px); margin-bottom: clamp(36px, 7vh, 72px); }
.work-group[hidden] { display: none; }
.h-group { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); font-size: var(--step-2); }
.h-group-n { font: 500 var(--step--1)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.next { display: grid; gap: 10px; text-decoration: none; background: var(--card); color: var(--text); padding: clamp(40px, 10vh, 112px) var(--gutter); margin: 0 calc(var(--gutter) * -1); box-shadow: inset 0 1px 0 var(--card-edge); }
.next .mono { color: var(--muted); display: flex; align-items: center; gap: 12px; }
.next .mono::before { content: ""; width: 28px; height: 2px; background: var(--red); }
.next-title { font: 500 var(--step-3)/1.1 var(--serif); color: var(--heading); }
.next-work { color: var(--muted); }
.next:hover .next-title { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin: 0 calc(var(--gutter) * -1); padding: 28px var(--gutter) calc(28px + 96px); border-top: 1px solid var(--rule); font: 500 11px/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; }
.site-footer img { width: 210px; height: auto; }
.page--project .site-footer { margin-top: 0; }
.site-footer .legal-logo--light { display: none; }
:root[data-theme="light"] .site-footer .legal-logo--dark { display: none; }
:root[data-theme="light"] .site-footer .legal-logo--light { display: block; }

/* lightbox (dark in both themes) */
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--paper); }
.lb::backdrop { background: var(--ink); }
.lb[open] { display: grid; place-items: center; }
.lb-fig { display: grid; justify-items: center; gap: 4px; padding: 64px 16px 24px; max-width: 100%; }
.lb-img { max-width: min(100%, 1600px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; }
.lb-cap { display: grid; justify-items: center; gap: 6px; text-align: center; margin-top: 14px; }
.lb-title { font-size: 1rem; color: var(--paper-70); max-width: 60ch; }
.lb-car { font-weight: 500; color: var(--paper); }
.lb-meta { display: flex; gap: 12px; font: 500 var(--step--1)/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-70); }
.lb-tag::after { content: "/"; margin-left: 12px; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(244,241,236,.2); background: var(--ink); color: var(--paper); cursor: pointer; }
.lb-btn:hover { border-color: var(--paper); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 699px) { .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; } .lb-fig { padding-bottom: 76px; } .lb-img { max-height: calc(100dvh - 200px); } }

/* reveal on view */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.is-in [data-reveal], [data-reveal].is-in { opacity: 1; transform: none; }
.is-in [data-reveal]:nth-child(2) { transition-delay: .08s; }
.is-in [data-reveal]:nth-child(3) { transition-delay: .16s; }
.is-in [data-reveal]:nth-child(4) { transition-delay: .24s; }

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .scroll-cue__line::after { animation: none; height: 100%; }
  .hero-media img, .tile:hover img, .card:hover img, .gallery a:hover img { transform: none; }
  @view-transition { navigation: none; }
}

/* 404 */
.page-404 .page-title { max-width: 14ch; }
.nf-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 clamp(64px, 14vh, 160px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--rule); }
.btn-ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
:root[data-theme="light"] .btn-ghost { background: transparent; color: var(--text); }
:root[data-theme="light"] .btn-ghost:hover { background: transparent; }
