/* ==========================================================================
   Tokens. A dark room, off-white type. The crowd is grey; colour only shows
   up where somebody is actually being looked at.
   ========================================================================== */
:root {
  --ground: #0b0b0c;
  --ink: #edebe6;      /* 17:1 on ground */
  --muted: #a3a09a;    /* 7.5:1 on ground */
  --accent: #ff5c39;   /* pins + the notebook. 6.4:1 on ground */
  --story: var(--accent); /* the homepage's story light: Drake's red */
  --line: color-mix(in oklab, var(--ink) 16%, transparent);

  /* Headlines: Big Shoulders Display (Google Fonts, OFL), in capitals. Body and the light second voice that
     replaced the italic serif: TT Commons Pro (Drake's Adobe Fonts kit aed8hzo, linked in every page's head).
     Inter and JetBrains Mono stay self-hosted (SIL OFL): Inter for mockups, wordmarks and fallback; JetBrains for labels. */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "tt-commons-pro", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --voice: var(--body);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.2vw, 44px);
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
  color-scheme: dark;
}

@font-face { font-family: Inter; font-weight: 400 700; font-display: swap; src: url(assets/inter.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url(assets/jetbrains-mono.woff2) format("woff2"); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
.sprite { position: absolute; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: 8px; z-index: 50;
  padding: 8px 12px; background: var(--ink); color: var(--ground);
  transform: translateY(-160%); transition: transform 0.15s;
}
.skip:focus { transform: none; }

.label {
  margin: 0;
  font: 500 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
}
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.site-header ul { display: flex; gap: clamp(12px, 2.4vw, 28px); margin: 0; padding: 0; list-style: none; }
.site-header nav a { text-decoration: none; font-size: 0.9375rem; }
.site-header nav a:hover { text-decoration: underline; }
@media (max-width: 639px) {
  .site-header { padding-block: 14px; }
  .site-header nav { display: none; } /* ponytail: phones get the wordmark only; add a menu when the page grows */
}

/* ==========================================================================
   The homepage, in the case studies' language: a crowd in the dark under one
   lamp, a scroll act that finds the work, then the work as objects you step into.
   ========================================================================== */
.pill { /* the site's small mono buttons and links: hero controls, chips, the case studies' Pause / mode pills */
  display: inline-block; pointer-events: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgb(0 0 0 / 0.35); color: var(--muted); cursor: pointer; text-decoration: none;
  font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.pill:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- the hero: sticky inside the act, so scrolling plays the act ---------- */
.home-act { position: relative; height: 180vh; background: #000; }
.hero { position: sticky; top: 0; isolation: isolate; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 34% 62% at 50% -8%, rgb(237 235 230 / 0.08), transparent 72%); }
.home-floor { /* the floor glow, in the story light of whoever the act is showing */
  position: absolute; left: 50%; bottom: -6%; z-index: 0; width: min(80vw, 1100px); aspect-ratio: 4 / 1; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--story) 20%, transparent), color-mix(in oklab, var(--story) 5%, transparent) 60%, transparent);
  transition: background 0.8s; animation: breathe 9s ease-in-out infinite;
}
.paused .home-floor { animation-play-state: paused; }

.home-top { position: absolute; left: var(--gutter); top: 88px; z-index: 5; }
.home-top, .home-credit, .home-cue { pointer-events: none; } /* labels over the crowd: let presses reach the people under them */
.hero-copy { position: absolute; left: 50%; top: clamp(96px, 13vh, 132px); z-index: 3; translate: -50% 0; width: min(44rem, 88vw); text-align: center; transition: opacity 0.6s; }
.hero h1 {
  margin: 0;
  font: 800 clamp(2.2rem, 1.1rem + 3.4vw, 4.2rem)/0.92 var(--display);
  letter-spacing: 0.005em; text-transform: uppercase;
  text-wrap: balance;
}
:is(h1, h2, h3) em { font-family: var(--voice); font-style: normal; font-weight: 300; text-transform: none; letter-spacing: -0.02em; } /* the second voice: light and upright */
.hero-sub {
  margin: clamp(16px, 2.6vh, 28px) auto 0;
  max-width: 44ch;
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  color: var(--muted);
  text-wrap: pretty;
}

.hero-meta {
  position: absolute; right: var(--gutter); top: 88px; z-index: 5;
  width: min(15rem, 40vw);
  display: grid; gap: 6px; justify-items: end; text-align: right;
}
.tally {
  margin: 0;
  font: 400 clamp(1.5rem, 2.4vw, 2rem)/1 var(--mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.tally-n { color: var(--ink); }
.tally [aria-hidden] { color: var(--muted); margin-inline: 0.08em; }
.tally-total { color: var(--muted); }
.hint, .how, .done, .gaze-caption { margin: 0; font-size: 0.8125rem; line-height: 1.45; }
.how, .gaze-caption { color: var(--muted); }
.how > span { display: none; }
.how > .how-hover { display: inline; }
@media (hover: none) { .how > .how-hover { display: none; } .how > .how-touch { display: inline; } }
.hero.needs-nudge .how > span { display: none; }
.hero.needs-nudge .how > .how-nudge { display: inline; }
.done, .gaze-caption { display: none; }
.done > span { display: none; }
.hero.is-complete .done { display: block; }
.hero.is-complete .reveal-all, .hero.is-complete .how { display: none; }
.hero.is-complete:not(.is-revealed) .done-found,
.hero.is-revealed .done-shown { display: inline; }
.done a { white-space: nowrap; font-weight: 600; }
.hero.has-gaze .gaze-caption { display: block; }

.home-credit { position: absolute; left: var(--gutter); bottom: 22px; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 0; }
.home-credit img { width: 112px; height: auto; }
.home-cue { position: absolute; left: 50%; bottom: 28px; z-index: 5; translate: -50% 0; transition: opacity 0.5s; }
.hero-controls { position: absolute; right: var(--gutter); bottom: 20px; z-index: 5; display: flex; gap: 8px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .pause { display: none; } } /* already still */

/* ---------- the crowd ---------- */
/* No z-index here on purpose: its layers interleave with the hero text. */
.crowd { position: absolute; inset: 0; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.crowd.can-grab { cursor: grab; }
.crowd.is-holding { cursor: grabbing; }
.crowd canvas, .gaze-layer { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.gaze-layer { z-index: 2; overflow: visible; }

/* your scanpath, drawn at the end */
.gaze-layer polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.85; }
.gaze-layer circle { fill: color-mix(in oklab, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.gaze-layer text { font: 600 11px var(--mono); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.gaze-dot { animation: appear 0.4s var(--ease) both; animation-delay: calc(var(--n) * 70ms); }
@keyframes appear { from { opacity: 0; } }

/* the lens */
.spot, .lens {
  position: absolute; left: 0; top: 0;
  width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  border-radius: 50%;
  pointer-events: none; opacity: 0; will-change: transform;
  transition: opacity 0.4s var(--ease);
}
.spot { z-index: 0; background: radial-gradient(closest-side, rgb(255 255 255 / 0.12), transparent); } /* a flashlight on the floor */
.lens {
  z-index: 2;
  border: 1px solid color-mix(in oklab, var(--ink) 40%, transparent);
  --tick: color-mix(in oklab, var(--ink) 65%, transparent);
  background:
    linear-gradient(var(--tick) 0 0) 50% 0 / 1px 8px,
    linear-gradient(var(--tick) 0 0) 50% 100% / 1px 8px,
    linear-gradient(var(--tick) 0 0) 0 50% / 8px 1px,
    linear-gradient(var(--tick) 0 0) 100% 50% / 8px 1px,
    linear-gradient(var(--tick) 0 0) 50% 50% / 1px 9px,
    linear-gradient(var(--tick) 0 0) 50% 50% / 9px 1px;
  background-repeat: no-repeat;
}
.crowd.is-looking .lens { opacity: 1; }
.crowd.is-looking .spot { opacity: 1; }

/* lock-on: corner brackets tighten around whoever you're on (also the keyboard focus indicator) */
.reticle {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  --c: var(--ink); --len: 11px; --t: 2px;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--len) var(--t), linear-gradient(var(--c) 0 0) 0 0 / var(--t) var(--len),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--len) var(--t), linear-gradient(var(--c) 0 0) 100% 0 / var(--t) var(--len),
    linear-gradient(var(--c) 0 0) 0 100% / var(--len) var(--t), linear-gradient(var(--c) 0 0) 0 100% / var(--t) var(--len),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--len) var(--t), linear-gradient(var(--c) 0 0) 100% 100% / var(--t) var(--len);
  background-repeat: no-repeat;
  opacity: 0; transform: scale(1.35);
  transition: opacity 0.18s, transform 0.3s var(--ease);
}
.reticle.is-on { opacity: 1; transform: none; }
.reticle-id, .tree-tag {
  position: absolute; left: 0; bottom: calc(100% + 5px);
  padding: 2px 5px;
  font: 600 10px/1.2 var(--mono); letter-spacing: 0.08em;
  background: var(--ink); color: var(--ground);
  white-space: nowrap;
}
.reticle.flip .reticle-id { left: auto; right: 0; }
/* the tree's name, over it while you hover or hold it */
.tree-tag { top: 0; bottom: auto; z-index: 2; pointer-events: none; transform: translate(-50%, -100%); opacity: 0; transition: opacity 0.18s; }
.tree-tag.is-on { opacity: 1; }

/* the hidden people: real buttons laid over the drawing */
.crowd-targets { position: absolute; inset: 0; pointer-events: none; }
.target {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: auto;
  padding: 0; border: 0; background: none; cursor: inherit;
  -webkit-tap-highlight-color: transparent;
}
.target:focus-visible { outline-color: transparent; } /* the reticle is the focus indicator; forced-colours mode repaints this outline */

/* the found-person chip: their mark, their name, and the way in */
.note {
  position: absolute; z-index: 6; pointer-events: auto;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: rgb(11 11 12 / 0.9); color: var(--ink);
  box-shadow: 0 14px 30px -12px #000;
  opacity: 0; visibility: hidden; translate: 0 6px;
  transition: opacity 0.18s var(--ease), translate 0.18s var(--ease), visibility 0s linear 0.18s;
}
.note.is-open { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
.note > * { margin: 0; }
.note-mark { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.note-mark svg { width: 100%; height: 100%; }
.note-mark i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); box-shadow: 0 0 10px var(--c); }
.note-mark b { width: 10px; height: 14px; border-radius: 2px; background: var(--accent); }
.note-meta { font: 600 0.6875rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.note-id { font-weight: 700; }
.note.is-demo .note-id::before { content: "Example · "; }
.note-link { display: inline-block; padding: 7px 11px; border-radius: 999px; background: var(--ink); color: var(--ground); font: 600 0.625rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.note-link:hover { background: #fff; }
.note [hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .gaze-dot { animation: none; }
  .note, .reticle, .spot, .lens { transition: none !important; }
  .home-floor { animation: none; }
}

/* ---------- the act: the first scroll reveals everyone, then the room dims for the closing line ---------- */
.act-dim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgb(0 0 0 / 0.55); opacity: 0; transition: opacity 0.6s; }
.home-act:not([data-step="0"]) .home-cue { opacity: 0; }
.home-act[data-step="2"] :is(.lens, .spot) { opacity: 0 !important; }
.home-act[data-step="2"] .crowd { pointer-events: none; }
.home-act[data-step="2"] :is(.act-dim, .act-enter) { opacity: 1; }
.act-enter { position: absolute; left: 50%; top: 50%; z-index: 7; translate: -50% -50%; width: max-content; max-width: calc(100vw - 2 * var(--gutter)); margin: 0; text-align: center; text-wrap: balance; font: 300 clamp(2rem, 5vw, 4rem)/1 var(--voice); letter-spacing: -0.02em; opacity: 0; transition: opacity 0.6s; pointer-events: none; }
.home-act[data-step="2"] :is(.home-top, .hero-copy, .hero-meta, .home-credit, .hero-controls, .note, .reticle) { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s; } /* visibility: their .pill buttons set pointer-events: auto */

/* ---------- the work: one object at a time, each in its own void, live ---------- */
.shelf { position: relative; height: 550vh; background: #000; }
.shelf-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.shelf-stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 34% 62% at 50% -8%, rgb(237 235 230 / 0.07), transparent 72%); }
.shelf-top { position: absolute; left: var(--gutter); top: 88px; margin: 0; }
.shelf-ghost { position: absolute; left: 50%; top: 45%; translate: -50% -50%; margin: 0; white-space: nowrap; pointer-events: none;
  font: 700 calc(min(150vw / var(--chars), 26rem)) / 1 var(--sans); letter-spacing: -0.05em; color: rgb(237 235 230 / 0.035); -webkit-text-stroke: 1.5px rgb(237 235 230 / 0.2); opacity: var(--o, 0); }
.shelf-floor { position: absolute; left: 50%; top: 72%; width: min(52vw, 680px); aspect-ratio: 5 / 1; translate: -50% 0; border-radius: 50%; pointer-events: none; opacity: var(--o, 0);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--c) 26%, transparent), color-mix(in oklab, var(--c) 6%, transparent) 60%, transparent); }
.obj { position: absolute; left: 50%; top: 45%; width: min(56vh, 62vw); aspect-ratio: 1; translate: -50% -50%; will-change: transform, opacity; }
.obj canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.obj[data-k="treetestai"] canvas { translate: 0 10%; } /* a planted tree: its roots reach into the floor glow */
.obj .view { position: absolute; inset: -15% -20%; width: 140%; height: 130%; max-width: none; object-fit: contain; opacity: 0; }
/* ShopGoodwill: the redesign in a plain browser window, turned a little toward the copy */
.sg-win { position: absolute; left: -6%; right: -6%; top: 50%; translate: 0 -50%; aspect-ratio: 1280 / 868; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgb(255 255 255 / 0.06); transform: perspective(1600px) rotateY(-12deg) rotateX(3deg); }
.sg-bar { display: flex; align-items: center; gap: 5px; height: 4.15%; margin: 0; padding: 0 1.4%; background: #e9eaee; }
.sg-bar i { height: 42%; aspect-ratio: 1; border-radius: 50%; background: #c4c7ce; }
.sg-bar span { margin: 0 auto; padding: 0 10px; border-radius: 999px; background: #fff; font: 500 clamp(6px, 0.7vw, 9px)/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #71717a; }
.sg-win .view { inset: 4.15% 0 auto; width: 100%; height: auto; object-fit: initial; }
.obj-cards { margin: 0; padding: 0; list-style: none; }
.obj-card { position: absolute; left: var(--gutter); bottom: clamp(72px, 12vh, 120px); width: min(34ch, 40vw); margin: 0; opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0.45s; text-shadow: 0 1px 12px #000; }
.obj-card.on { opacity: 1; visibility: visible; } /* visibility, not pointer-events: .pill sets pointer-events: auto, so hidden cards' buttons used to catch every click (AMBL, last, always won) */
.obj-card h3 { margin: 8px 0 0; font: 800 clamp(1.7rem, 2.8vw, 2.5rem)/0.95 var(--display); letter-spacing: 0.005em; text-transform: uppercase; }
.obj-card p:not(.label) { margin: 10px 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.obj-card .dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.obj-card .pill { margin-top: 16px; color: var(--ink); }
.shelf-index { position: absolute; right: var(--gutter); top: 50%; translate: 0 -50%; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; text-align: right; }
.shelf-index a { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.3s; }
.shelf-index a.on { color: var(--ink); }
.shelf-index a.on::after { content: ""; display: inline-block; width: 18px; height: 1px; margin-left: 10px; background: var(--ink); vertical-align: 3px; }
.shelf-cue { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; margin: 0; }

/* ---------- about: the one in the crowd who isn't hiding ---------- */
.about-void { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 5vw, 80px);
  padding: clamp(80px, 12vh, 140px) var(--gutter); background: #000; overflow: hidden; }
.about-void::before { content: ""; position: absolute; left: 0; top: 0; width: 46%; height: 100%; background: radial-gradient(ellipse 60% 70% at 50% -10%, rgb(237 235 230 / 0.09), transparent 70%); pointer-events: none; }
.about-obj { margin: 0; }
.about-obj img { display: block; width: 100%; height: auto; max-height: min(80vh, 760px); object-fit: cover; border: 1px solid var(--line); }
.about-copy { position: relative; }
.about-copy h2 { margin: 18px 0 0; font: 800 clamp(2rem, 1.1rem + 2.8vw, 3.5rem)/0.95 var(--display); letter-spacing: 0.005em; text-transform: uppercase; max-width: 22ch; }
.about-copy > p:not(.label) { margin: 16px 0 0; max-width: 52ch; color: var(--muted); }
.facts { display: grid; gap: 0; margin: 32px 0 0; max-width: 34rem; }
.facts > div { display: grid; grid-template-columns: 8rem 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { font: 500 0.6875rem/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.home-rest .section { background: #000; }
.talk { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.talk-photo { margin: 0; }
.talk-photo img { width: 100%; height: auto; border: 1px solid var(--line); }
.talk-photo figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }
.talk h3 { margin-top: 8px; }
.talk p:not(.label) { color: var(--muted); }
@media (max-width: 859px) { .talk { grid-template-columns: 1fr; } }

/* the way out of the carousel to everything else */
.more-work { padding: clamp(28px, 6vh, 56px) var(--gutter); background: #000; text-align: center; }
.more-work .pill { color: var(--ink); font-size: 0.75rem; padding: 12px 18px; }

/* ---------- work.html: every project ---------- */
.work-page { background: #000; }
.work-head { padding: clamp(110px, 18vh, 170px) var(--gutter) clamp(28px, 5vh, 48px); }
.work-head h1 { margin: 12px 0 0; max-width: 18ch; font: 800 clamp(2.4rem, 1.4rem + 3.8vw, 4.5rem)/0.92 var(--display); letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance; }
.work-group { padding: 0 var(--gutter) clamp(56px, 10vh, 110px); }
.work-group > .label { margin-bottom: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.work-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) clamp(16px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; }
.work-cards.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-cards.big > li:first-child { grid-column: 1 / -1; }
.work-cards.big > li:first-child img { aspect-ratio: 3; object-position: 50% 38%; } /* five case studies: TreeTestAi across the top, then two by two */
.work-cards a { display: block; text-decoration: none; }
.work-cards img { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; object-position: 50% 100%; border: 1px solid var(--line); transition: border-color 0.3s; } /* the link previews, cropped above their page header */
.work-cards a:hover img { border-color: var(--muted); }
.work-cards .label { margin-top: 14px; }
.work-cards h3 { margin: 6px 0 0; font: 700 clamp(1.4rem, 2vw, 1.75rem)/1 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.work-cards a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.work-cards p:not(.label) { margin: 6px 0 0; max-width: 52ch; color: var(--muted); font-size: 0.9375rem; }
.work-cards a:focus-visible { outline-offset: 6px; }
@media (max-width: 859px) { .work-cards, .work-cards.big { grid-template-columns: 1fr; } .work-cards.big > li:first-child img { aspect-ratio: 2.1; object-position: 50% 100%; } }

@media (max-width: 1100px) and (min-width: 640px) {
  .hero-meta > :is(.hint, .how) { display: none; }
  .hero-copy { top: 150px; width: min(40rem, 80vw); }
  .home-cue { display: none; }
  .home-credit { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-credit img { width: 84px; }
}
@media (max-width: 639px) {
  .home-top, .home-credit, .shelf-index { display: none; }
  .hero-copy { top: 72px; }
  .hero-meta { top: auto; bottom: 64px; right: auto; left: var(--gutter); width: auto; display: flex; align-items: baseline; gap: 10px; justify-items: start; text-align: left; }
  .hero-meta > :not(.tally) { display: none; }
  .home-cue { bottom: 70px; left: auto; right: var(--gutter); translate: none; }
  .hero-controls { left: var(--gutter); right: var(--gutter); justify-content: flex-end; }
  .obj { width: 80vw; top: 36%; }
  .obj-card { left: var(--gutter); right: var(--gutter); width: auto; bottom: 64px; }
  .about-void { grid-template-columns: 1fr; }
  .about-void::before { width: 100%; height: 60%; }
  .about-obj img { max-height: 70vh; }
  .facts > div { grid-template-columns: 6.5rem 1fr; }
}

/* ==========================================================================
   Page sections. Type does the work: one label style, hairlines, no boxes.
   ========================================================================== */
.section { padding: clamp(72px, 13vh, 150px) var(--gutter); border-top: 1px solid var(--line); }
.section h2 {
  margin: 10px 0 0; max-width: 22ch;
  font: 800 clamp(2rem, 1.2rem + 2.8vw, 3.5rem)/0.95 var(--display);
  letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance;
}
.section h3 { margin: 14px 0 0; font: 700 1.625rem/1.05 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.section p { max-width: 60ch; }
.section-head { margin-bottom: clamp(32px, 5vh, 56px); }

/* contact */
.contact h2 { max-width: 16ch; font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.5rem); line-height: 0.92; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 36px 0 0; padding: 0; list-style: none; font-size: clamp(1.125rem, 2vw, 1.5rem); }
.contact-links a { font-weight: 600; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--muted);
}
.site-footer p { margin: 0; }

/* ==========================================================================
   Case study template
   ========================================================================== */
.cs-header { position: static; }
.cs-hero { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); column-gap: var(--gutter); padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(40px, 6vh, 72px); }
.cs-hero > * { grid-column: 1; }
.cs-hero .cs-meta { grid-column: 1 / -1; }
.cs-cover img, .cs-visuals img { width: 100%; height: auto; border: 1px solid var(--line); }
.cs-visuals.phones { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.cs-visuals.phones img { border-radius: 14px; }
.cs-body ul { margin: 0; padding-left: 1.2em; }
.cs-body li + li { margin-top: 6px; }
.todo { background: none; color: var(--accent); font: 500 0.8125em/1.4 var(--mono); }
.cs-hero h1 { margin: 12px 0 0; max-width: 24ch; font: 800 clamp(2.6rem, 1.4rem + 4.6vw, 5.5rem)/0.92 var(--display); letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance; }
.cs-summary { margin: 20px 0 0; max-width: 46ch; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); color: var(--muted); }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 32px; margin: clamp(32px, 5vh, 56px) 0 0; }
.cs-meta > div { padding-top: 10px; border-top: 1px solid var(--line); }
.cs-meta dt { font: 500 0.6875rem/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cs-meta dd { margin: 4px 0 0; }
.cs-cover { margin: 0 var(--gutter) clamp(40px, 6vh, 72px); }
.cs-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(24px, 5vw, 80px); }
.cs-section h2 { margin-top: 10px; }
.cs-body { display: flex; flex-direction: column; gap: 18px; }
.cs-body p { margin: 0; }
.cs-findings { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.cs-finding { padding: 16px 18px; border: 1px solid var(--line); }
.cs-finding blockquote, .cs-finding .cs-obs, .cs-body > .cs-obs { margin: 8px 0 0; font: 300 1.25rem/1.35 var(--voice); }
.cs-finding p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 0.9375rem; }
.cs-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.cs-outcomes > div { padding-top: 10px; border-top: 1px solid var(--ink); }
.cs-outcomes dt { font: 800 clamp(2.1rem, 3.6vw, 3rem)/1 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.cs-outcomes dd { margin: 8px 0 0; color: var(--muted); font-size: 0.9375rem; }
.cs-visuals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.cs-visuals figure { margin: 0; }
.cs-visuals .wide { grid-column: 1 / -1; }
.cs-visuals figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }
.cs-next { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cs-next a { font: 800 clamp(1.8rem, 3.6vw, 2.75rem)/1 var(--display); letter-spacing: 0.005em; text-transform: uppercase; }
@media (max-width: 859px) {
  .cs-section { grid-template-columns: 1fr; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-outcomes { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .cs-visuals { grid-template-columns: 1fr; }
  .cs-hero { display: block; }
}

/* ==========================================================================
   Case studies: "Void + Step Inside". The pieces every case study shares
   (each page keeps its own object, story light and beats inline).
   ========================================================================== */
.void-top { left: var(--gutter); top: 88px; }
.void-pause { right: var(--gutter); bottom: 20px; }
.void-skip { left: var(--gutter); top: 120px; pointer-events: auto; padding: 8px 12px; background: var(--ink); color: var(--ground); transform: translateY(-400%); }
.void-skip:focus { transform: none; }
.callout { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.45s var(--ease); }
.callout.on { opacity: 1; }
@keyframes ping { 0% { opacity: 0.7; scale: 0.5; } 100% { opacity: 0; scale: 1.6; } }
.callout h2 { margin: 6px 0 0; font: 800 clamp(1.5rem, 2.2vw, 2rem)/1 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.callout p:not(.label) { margin: 8px 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
@keyframes breathe { 50% { scale: 1.08; filter: brightness(1.25); } }
.void-credit { left: var(--gutter); bottom: 26px; max-width: 46ch; }
.void:not([data-step="0"]) :is(.void-lede, .void-cue) { opacity: 0; }
.void[data-step="5"] .void-enter { opacity: 1; }
.void-top, .void-credit, .void-pause { transition: opacity 0.5s; }
.cs-section + .cs-section { border-top: 1px solid var(--line); }
@media (max-width: 639px) {
  .void .callout .leader { display: none; } /* .void: outranks each page's own .callout rules, which load after this file */
  .void .callout .card { position: fixed; left: var(--gutter) !important; right: var(--gutter); top: auto !important; bottom: 76px; width: auto; translate: none; padding: 14px 16px; background: rgb(11 11 12 / 0.86); border: 1px solid var(--line); }
}
