/* Detective Speaking — site styles. Dark only: the brand is a room at night.
   url(font:…) references are rewritten to hashed font files at build time. */

@font-face { font-family: "Gloock"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/gloock-latin-400-normal.9389ada8d3.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/assets/newsreader-latin-wght-normal.62981321d9.woff2) format("woff2-variations"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url(/assets/newsreader-latin-wght-italic.48bc8861b9.woff2) format("woff2-variations"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/ibm-plex-mono-latin-400-normal.08949f728d.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/ibm-plex-mono-latin-500-normal.01d2854474.woff2) format("woff2"); }

:root {
  --ink: #0a0c10;
  --ink-2: #0f1319;
  --ink-3: #151a22;
  --paper: #ece3d2;
  --paper-2: #c9c0b0;
  --muted: #9a968e;
  --line: rgba(236, 227, 210, 0.13);
  --amber: #e4a54c;
  --amber-hot: #ffc774;
  --amber-dim: rgba(228, 165, 76, 0.55);
  --accent: var(--amber);

  --display: "Gloock", "Bodoni 72", Didot, serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: max(16px, min(4vw, 56px), env(safe-area-inset-left));
  --max: 1280px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --voice: 0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 clamp(17px, 1.15vw, 19px)/1.6 var(--body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 12px 16px; background: var(--paper); color: var(--ink);
  font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- atmosphere: film grain ---------- */
.grain {
  position: fixed; inset: -10%; z-index: 60; pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(3) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 33% { transform: translate(-3%, 2%) } 66% { transform: translate(2%, -3%) } }

/* ---------- shared ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.label.amber { color: var(--amber); }
.label.accent { color: var(--accent); }
.rule-label { display: flex; align-items: center; gap: 16px; }
.rule-label::after { content: ""; height: 1px; flex: 0 1 120px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.section-head h2 { font: 400 clamp(34px, 3.6vw, 52px)/1.05 var(--display); margin: 16px 0 0; }
.section-head .intro { max-width: 46ch; color: var(--paper-2); margin: 20px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 14px 24px;
  background: var(--amber); color: #1a1206;
  font: 500 13px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
}
.btn:hover { background: var(--amber-hot); box-shadow: 0 0 40px 0 rgba(228, 165, 76, 0.28); }
.btn .arrow { transition: transform 0.25s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-small { min-height: 40px; padding: 10px 16px; font-size: 11px; }
.link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); text-decoration: none;
  padding: 0 4px; border-bottom: 1px solid var(--line);
  transition: border-color 0.25s, color 0.25s;
}
.link:hover { border-color: var(--amber); color: var(--amber-hot); }

/* Scroll reveals only apply when scripts run, so nothing stays hidden without JavaScript. */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: 0.12s } .reveal.d2 { transition-delay: 0.24s } .reveal.d3 { transition-delay: 0.36s }
}

/* ---------- nav ---------- */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
}
.nav.is-stuck {
  position: fixed; height: 64px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transform: translateY(0); transition: transform 0.4s var(--ease);
}
.nav.is-stuck.is-hidden { transform: translateY(-110%); }
.nav.is-entering { transform: translateY(-110%); }
.wordmark {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.3em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.lamp {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber-hot);
  box-shadow: 0 0 10px 2px rgba(255, 199, 116, 0.7);
  animation: ring 4s infinite;
}
/* double-ring cadence: ring-ring … pause */
@keyframes ring {
  0%, 18%, 36%, 100% { opacity: 0.25; box-shadow: 0 0 4px 0 rgba(255, 199, 116, 0.3); }
  6%, 12%, 24%, 30% { opacity: 1; box-shadow: 0 0 14px 3px rgba(255, 199, 116, 0.75); }
}
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 16px; text-decoration: none; color: var(--paper-2); transition: color 0.2s; padding: 10px 0; }
.nav-links a:hover { color: var(--paper); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.signin {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  padding: 0 16px; border: 1px solid var(--line); transition: border-color 0.2s;
}
.signin:hover { border-color: var(--amber); }
.nav-play { display: none; }
.nav.is-stuck .nav-play { display: inline-flex; }
.nav.is-stuck .signin { border-color: transparent; }

.sound {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper-2); background: transparent; border: 1px solid transparent; padding: 0 12px; cursor: pointer;
}
.sound:hover { color: var(--paper); border-color: var(--line); }
.sound .bars { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.sound .bars i { width: 2px; height: 3px; background: currentColor; transition: height 0.3s; }
.sound[aria-pressed="true"] { color: var(--amber-hot); }
.sound[aria-pressed="true"] .bars i { animation: eq 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -0.4s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -0.7s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.menu-btn { display: none; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); cursor: pointer; place-items: center; }
.menu-btn span, .menu-btn span::before { display: block; width: 18px; height: 1px; background: var(--paper); position: relative; }
.menu-btn span::before { content: ""; position: absolute; top: 6px; }
.menu-btn span { transform: translateY(-3px); }
.menu {
  inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
  padding: calc(var(--nav-h) + 24px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper);
  flex-direction: column; justify-content: space-between; gap: 32px;
  opacity: 0; transition: opacity 0.3s var(--ease), display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}
.menu:popover-open { display: flex; opacity: 1; }
@starting-style { .menu:popover-open { opacity: 0; } }
.menu nav a { opacity: 1; translate: 0 0; transition: opacity 0.5s var(--ease), translate 0.5s var(--ease); }
@starting-style { .menu:popover-open nav a { opacity: 0; translate: 0 12px; } }
.menu nav a:nth-child(2) { transition-delay: 0.04s } .menu nav a:nth-child(3) { transition-delay: 0.08s } .menu nav a:nth-child(4) { transition-delay: 0.12s } .menu nav a:nth-child(5) { transition-delay: 0.16s }
.menu nav { display: grid; }
.menu nav a { font: 400 38px/1.1 var(--display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.menu .menu-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: var(--gutter); background: none; border: 1px solid var(--line); color: var(--paper); min-height: 44px; padding: 0 16px; cursor: pointer; }
.menu::backdrop { background: transparent; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: grid; align-items: center;
  isolation: isolate;
  overflow-x: clip;
}
.hero-scene {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: -1;
  aspect-ratio: 1 / 1;
  max-width: 72vw;
  /* The phone lamp's position in hero.jpg. Used as the crop anchor too, so the glow stays on the lamp at any size. */
  --lamp-x: 74.4%; --lamp-y: 50.8%;
}
.hero-scene img, .hero-scene video {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--lamp-x) var(--lamp-y);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%), linear-gradient(180deg, #000 62%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  animation: scene-in 2.4s var(--ease) both;
}
.hero-scene .hero-motion {
  position: absolute;
  inset: 0;
}
@keyframes scene-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-scene .hero-motion { display: none; }
}
.glow {
  position: absolute; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 100, 0.55) 0%, rgba(255, 160, 60, 0.15) 30%, transparent 65%);
  mix-blend-mode: screen; pointer-events: none;
  animation: glow-ring 4s infinite;
}
@keyframes glow-ring {
  0%, 18%, 36%, 100% { opacity: 0.15; transform: scale(0.8); }
  6%, 12%, 24%, 30% { opacity: 1; transform: scale(1); }
}
.hero-scene .glow, .final-scene .glow { left: var(--lamp-x); top: var(--lamp-y); }

.hero-copy { padding-top: 90px; position: relative; }
.hero h1 {
  font: 400 clamp(64px, 10.5vw, 168px)/0.86 var(--display);
  letter-spacing: -0.02em;
  margin: 26px 0 30px;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}
.hero h1 span { display: block; }
.hero .lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; max-width: 25ch; color: var(--paper-2); margin: 0 0 40px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.load { animation: load-in 1.3s var(--ease) both; }
.load.l1 { animation-delay: 0.3s } .load.l2 { animation-delay: 0.5s } .load.l3 { animation-delay: 0.75s } .load.l4 { animation-delay: 1s }
@keyframes load-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-caption {
  margin: 28px 0 0; max-width: 34ch; min-height: 3.2em;
  font-size: 19px; line-height: 1.5; color: var(--paper-2);
  opacity: 0; transition: opacity 0.5s;
}
.hero-caption.show { opacity: 1; }
.hero-caption .who { font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-right: 10px; }
.hero-caption.you .line { font-style: italic; }

/* lamps follow the voice while a call plays */
html.voice .glow { animation: none; opacity: calc(0.12 + var(--voice) * 1.15); transform: scale(calc(0.8 + var(--voice) * 0.4)); transition: opacity 0.06s, transform 0.06s; }
html.voice .lamp { animation: none; opacity: calc(0.3 + var(--voice) * 1.2); box-shadow: 0 0 calc(4px + var(--voice) * 16px) calc(var(--voice) * 4px) rgba(255, 199, 116, 0.8); }

/* ---------- story ---------- */
.story { position: relative; padding: 40px 0 140px; }
.story-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px; align-items: start; }
.story blockquote {
  grid-column: 1 / span 8; margin: 0;
  font: 400 clamp(40px, 5.4vw, 80px)/1.02 var(--display);
  letter-spacing: -0.01em;
}
.story blockquote .q { color: var(--amber); }
.story .exhibit { grid-column: 9 / span 4; grid-row: 1 / span 2; margin: -120px 0 0; position: relative; }
.story .exhibit img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 45%;
  filter: contrast(1.05) saturate(0.85);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 80%, transparent 100%);
}
.story .exhibit figcaption { margin-top: 14px; }
.story .copy { grid-column: 2 / span 6; }
.story .copy p { margin: 0 0 1.1em; font-size: clamp(18px, 1.35vw, 21px); line-height: 1.65; color: var(--paper-2); }
.story .copy p:first-child::first-letter { font: 400 3.4em/0.8 var(--display); float: left; margin: 0.08em 0.1em 0 0; color: var(--paper); }

/* ---------- how it works ---------- */
.how { padding: 110px 0 120px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.how .section-head { margin-bottom: 64px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0; }
.step { padding: 8px 40px 8px 0; }
.step + .step { padding-left: 40px; border-left: 1px solid var(--line); }
.step .num { font: 400 64px/1 var(--display); color: var(--amber); display: flex; justify-content: space-between; align-items: center; }
.step .num svg { width: 30px; height: 30px; stroke: var(--paper-2); fill: none; stroke-width: 1.2; }
.step h3 { font: 400 26px/1.2 var(--display); margin: 34px 0 14px; }
.step p { margin: 0; color: var(--paper-2); font-size: 18px; line-height: 1.6; max-width: 32ch; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 0; list-style: none; margin: 64px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.facts li + li::before { content: "·"; margin: 0 16px; color: var(--amber); }

/* ---------- tape ---------- */
.tape { padding: 40px 0 140px; }
.deck {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(228, 165, 76, 0.07), transparent 50%), linear-gradient(180deg, var(--ink-3), var(--ink-2));
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.deck-side { padding: 48px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.deck h2 { font: 400 clamp(36px, 3.6vw, 54px)/1.02 var(--display); margin: 18px 0; }
.deck-side p { margin: 0; }
.deck-side p:not(.label) { color: var(--paper-2); max-width: 34ch; }
.deck-controls { display: flex; flex-direction: column; gap: 22px; }
.voice-switch { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.voice-switch .label { margin-right: 12px; }
.voice-switch button {
  min-height: 40px; padding: 0 14px; cursor: pointer;
  font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-2); background: transparent; border: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.voice-switch button:hover { color: var(--paper); border-color: var(--amber-dim); }
.voice-switch button[aria-pressed="true"] { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.counter { display: flex; align-items: center; gap: 14px; font: 500 13px/1 var(--mono); letter-spacing: 0.18em; color: var(--muted); }
.counter .led { width: 8px; height: 8px; border-radius: 50%; background: #3a2a14; box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.6); transition: background 0.2s, box-shadow 0.2s; }
.deck.playing .counter .led { background: var(--amber-hot); box-shadow: 0 0 calc(4px + var(--voice) * 14px) calc(1px + var(--voice) * 3px) rgba(255, 199, 116, 0.75); }
.counter .time { color: var(--paper); font-variant-numeric: tabular-nums; }
.deck-main { padding: 48px; display: flex; flex-direction: column; gap: 28px; }
.player { display: flex; align-items: center; gap: 24px; }
.play {
  flex: none; width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid var(--amber); background: transparent; color: var(--amber);
  display: grid; place-items: center; cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.play:hover { background: var(--amber); color: var(--ink); box-shadow: 0 0 40px rgba(228, 165, 76, 0.3); }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play .i-pause { display: none; }
.deck.playing .play .i-play { display: none; }
.deck.playing .play .i-pause { display: block; }
canvas.wave { flex: 1; min-width: 0; height: 76px; }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; flex: 1; align-content: start; }
.transcript li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; opacity: 0.38; transition: opacity 0.6s; }
.transcript li.said { opacity: 1; }
.transcript li.now .who { color: var(--amber); }
.transcript .who { font: 500 11px/1.8 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.transcript .line { font-size: 21px; line-height: 1.45; }
.transcript li.you .line { font-style: italic; color: var(--paper-2); }
.tape-end { display: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); }
.tape-end.show { display: flex; animation: load-in 0.8s var(--ease) both; }
.tape-end strong { font: 400 28px/1.1 var(--display); }
.tape-end.solved strong { color: var(--amber-hot); }
.demo { display: flex; align-items: center; gap: 20px; padding-top: 26px; border-top: 1px solid var(--line); }
.demo[hidden] { display: none; }
.mic {
  flex: none; width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--paper-2); background: transparent; color: var(--paper);
  display: grid; place-items: center; transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mic:hover { border-color: var(--amber); color: var(--amber-hot); }
.deck.listening .mic { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 0 0 0 8px rgba(236, 227, 210, 0.08), 0 0 0 16px rgba(236, 227, 210, 0.04); }
.mic:disabled { opacity: 0.4; cursor: default; }
.demo-text strong { display: block; font: 400 22px/1.2 var(--display); margin-bottom: 4px; }
.demo-text span { color: var(--muted); font-size: 16px; }

/* Without JavaScript the transcript still reads as a scene; the player controls are hidden. */
@media (scripting: none) { .player, .deck-controls, .demo, #hear { display: none; } .transcript li { opacity: 1; } }

/* ---------- season ---------- */
.season { padding: 120px 0 150px; border-top: 1px solid var(--line); }
.season .section-head { margin-bottom: 56px; }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case {
  position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4.6;
  color: inherit; text-decoration: none;
  outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color 0.4s;
}
.case:hover, .case:focus-visible { outline-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.case:focus-visible { outline-width: 2px; }
.case .img { position: absolute; inset: 0; overflow: hidden; }
.case .img::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.2) 0%, transparent 30%, rgba(10, 12, 16, 0.65) 58%, rgba(10, 12, 16, 0.97) 100%);
}
.case .img::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 0.8s;
}
.case:hover .img::after, .case:focus-visible .img::after { opacity: 1; }
.case img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease), filter 0.8s; filter: brightness(0.78) saturate(0.9); }
.case:hover img, .case:focus-visible img { scale: 1.04; filter: brightness(1) saturate(1.05); }
.case .corner { position: absolute; top: 22px; left: 24px; right: 24px; z-index: 2; display: flex; justify-content: space-between; align-items: start; }
.case .corner .n { font: 400 72px/0.8 var(--display); color: var(--accent); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.tag { font: 500 11px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; padding: 7px 9px; background: var(--amber); color: #1a1206; }
.case .body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 28px 24px 24px; display: grid; gap: 14px; }
.case .body h3 { font: 400 36px/1 var(--display); margin: 0; }
.case .kicker { margin-bottom: -4px; }
.case .hook { color: var(--paper-2); margin: 0; font-size: 18px; line-height: 1.5; }
.case .meta { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid rgba(236, 227, 210, 0.18); font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.case .meta .go { color: var(--accent); transition: transform 0.25s; font-size: 14px; }
.case:hover .meta .go { transform: translateX(4px); }

/* ---------- sealed cases: evidence envelopes ---------- */
.sealed { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.sealed-case {
  position: relative; aspect-ratio: 3 / 4; padding: 18px 16px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(160deg, transparent 49.5%, rgba(236, 227, 210, 0.08) 50%, transparent 50.5%) top / 100% 38% no-repeat,
    linear-gradient(20deg, transparent 49.5%, rgba(236, 227, 210, 0.08) 50%, transparent 50.5%) top / 100% 38% no-repeat,
    linear-gradient(180deg, #171b22, #11151b);
  outline: 1px solid var(--line); outline-offset: -1px;
}
.sealed-case .n { font: 400 40px/0.9 var(--display); color: #4a4d52; }
.sealed-case .stamp {
  position: absolute; top: 44%; left: 50%; translate: -50% -50%; rotate: -12deg;
  font: 500 11px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(214, 84, 64, 0.8); border: 1.5px solid rgba(214, 84, 64, 0.65); padding: 7px 10px;
}
.sealed-case h3 { font: 400 19px/1.1 var(--display); margin: 0 0 6px; color: var(--paper-2); }
.sealed-case p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ---------- yours to keep ---------- */
.own { padding: 120px 0 140px; border-top: 1px solid var(--line); }
.own-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.own .section-head h2 { font-size: clamp(40px, 4.6vw, 68px); line-height: 1; }
.own .intro { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.6; }
.own-points { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; border-top: 1px solid var(--line); padding-top: 32px; }
.own-points h3 { font: 400 22px/1.2 var(--display); margin: 0 0 10px; }
.own-points h3::before { content: ""; display: block; width: 18px; height: 1px; background: var(--amber); margin-bottom: 18px; }
.own-points p { margin: 0; color: var(--paper-2); font-size: 17px; line-height: 1.6; }
.buy { margin-top: 36px; }
.buy-note { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.buy-status { margin: 10px 0 0; min-height: 1.5em; color: var(--amber-hot); font-size: 16px; }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--amber-dim); }
.btn-ghost:hover { background: rgba(228, 165, 76, 0.12); box-shadow: inset 0 0 0 1px var(--amber); }
/* A claim ticket: the one object that says "paid for, and kept". */
.ticket {
  position: relative; justify-self: center; width: min(100%, 340px); padding: 34px 30px 26px;
  background: linear-gradient(180deg, #efe6d3, #e2d6bf); color: #1b1712;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.2);
  rotate: -3deg; text-align: center;
  --notch: radial-gradient(circle at 0 50%, transparent 12px, #000 12.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
  mask: var(--notch); -webkit-mask: var(--notch);
  transition: rotate 0.8s var(--ease);
}
.ticket:hover { rotate: -1deg; }
.ticket p { margin: 0; }
.ticket-brand { font: 500 11px/1 var(--mono); letter-spacing: 0.28em; text-transform: uppercase; color: #5b5044; }
.ticket .ticket-title { font: 400 44px/1 var(--display); margin: 22px 0 10px; }
.ticket-meta { font: 500 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #5b5044; padding-bottom: 26px; border-bottom: 1px dashed rgba(27, 23, 18, 0.35); }
.ticket .ticket-stamp {
  display: inline-block; margin: 26px 0; padding: 10px 16px;
  font: 500 15px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase;
  color: #9c2b1d; border: 2px solid #9c2b1d; rotate: -6deg; opacity: 0.9;
}
.ticket-foot { display: flex; justify-content: space-between; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: #5b5044; padding-top: 18px; border-top: 1px dashed rgba(27, 23, 18, 0.35); }

/* ---------- questions ---------- */
.faq { padding: 120px 0 140px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.faq-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.faq .section-head { grid-column: 1 / span 4; align-self: start; position: sticky; top: 110px; }
.faq-list { grid-column: 6 / span 7; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font: 400 clamp(22px, 1.9vw, 27px)/1.25 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--amber), var(--amber)) center / 14px 1px no-repeat, linear-gradient(var(--amber), var(--amber)) center / 1px 14px no-repeat;
  transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--amber-hot); }
.faq details p { margin: 0 0 28px; max-width: 58ch; color: var(--paper-2); font-size: 19px; line-height: 1.65; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
:root { interpolate-size: allow-keywords; }

/* ---------- final call ---------- */
.final { position: relative; min-height: 88svh; display: grid; align-items: center; isolation: isolate; border-top: 1px solid var(--line); overflow: hidden; }
.final-scene { position: absolute; left: 0; top: 0; bottom: 0; width: 58%; z-index: -1; --lamp-x: 36.25%; --lamp-y: 42.7%; }
.final-scene img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--lamp-x) var(--lamp-y);
  mask-image: linear-gradient(90deg, #000 40%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-composite: intersect; -webkit-mask-composite: source-in;
}
.final-copy { margin-left: auto; width: min(100%, 620px); }
.final h2 { font: 400 clamp(52px, 7.4vw, 118px)/0.92 var(--display); letter-spacing: -0.015em; margin: 22px 0 28px; }
.final p { color: var(--paper-2); max-width: 36ch; margin: 0 0 40px; font-size: 20px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 calc(56px + env(safe-area-inset-bottom)); }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px 40px; }
.footer-brand p { margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.footer nav { display: flex; gap: 8px 28px; flex-wrap: wrap; justify-content: end; }
.footer nav a { font-size: 16px; color: var(--paper-2); text-decoration: none; padding: 8px 0; }
.footer nav a:hover { color: var(--paper); }
.footer .label { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); margin: 0; }

/* ---------- case page ---------- */
.case-hero { position: relative; min-height: max(620px, 92svh); display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.case-hero-img { position: absolute; top: 0; right: 0; bottom: 0; width: min(64vw, 1100px); z-index: -1; }
.case-hero-img img {
  width: 100%; height: 100%; object-fit: cover; filter: brightness(0.82) saturate(0.95);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, #000 55%, transparent 100%);
  mask-composite: intersect; -webkit-mask-composite: source-in;
}
.case-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 78% 40%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); pointer-events: none; }
.case-hero-copy { padding: 140px 0 90px; }
.case-hero .back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; margin-bottom: 36px; }
.case-hero .back:hover { color: var(--paper); }
.case-hero .num { font: 400 clamp(80px, 10vw, 140px)/0.8 var(--display); color: var(--accent); margin: 18px 0 8px; }
.case-hero h1 { font: 400 clamp(60px, 9vw, 140px)/0.9 var(--display); letter-spacing: -0.015em; margin: 0 0 26px; }
.case-hero .lede { font-size: clamp(19px, 1.6vw, 23px); max-width: 32ch; color: var(--paper-2); margin: 0 0 40px; }
.case-body { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 90px 0 120px; }
.case-body .brief { grid-column: 1 / span 5; }
.case-body .brief p:not(.label) { color: var(--paper-2); font-size: 19px; line-height: 1.65; margin: 0 0 1.1em; }
.case-body .brief .rule-label { margin-bottom: 28px; }
.case-body .note { font-size: 17px; color: var(--muted); border-left: 1px solid var(--accent); padding-left: 16px; }
.levels-wrap { grid-column: 7 / span 6; }
.levels-wrap h2 { margin: 0 0 20px; }
.levels { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.levels li { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); }
.levels .n { font: 400 30px/1 var(--display); color: var(--muted); }
.levels .is-free .n { color: var(--accent); }
.levels h3 { font: 400 24px/1.15 var(--display); margin: 0 0 6px; }
.levels p { margin: 0; color: var(--muted); font-size: 17px; }
.levels .is-free .state { color: var(--accent); }
.next-case { border-top: 1px solid var(--line); }
.next-case a { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 56px 0; text-decoration: none; }
.next-case strong { font: 400 clamp(32px, 4vw, 56px)/1 var(--display); }
.next-case a:hover strong { color: var(--amber-hot); }

/* ---------- legal + 404 ---------- */
.legal { padding: 170px 0 120px; max-width: 760px; }
.legal h1 { font: 400 clamp(48px, 6vw, 84px)/1 var(--display); margin: 20px 0 16px; }
.draft { display: inline-block; color: var(--amber); border: 1px solid var(--amber-dim); padding: 8px 12px; }
.prose { margin-top: 56px; color: var(--paper-2); }
.prose h2 { font: 400 28px/1.2 var(--display); color: var(--paper); margin: 48px 0 14px; }
.prose p, .prose li { font-size: 19px; line-height: 1.7; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--amber); }
.prose strong { color: var(--paper); font-weight: 500; }
.lost { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 140px 0 100px; }
.lost h1 { font: 400 clamp(44px, 6.5vw, 96px)/1 var(--display); max-width: 16ch; margin: 24px 0; }
.lost .lede { color: var(--paper-2); font-size: 21px; max-width: 40ch; margin: 0 0 40px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .deck { grid-template-columns: 1fr; }
  .deck-side { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: end; }
}
@media (max-width: 1000px) {
  .story .exhibit { grid-column: 8 / span 5; }
  .story blockquote { grid-column: 1 / span 7; }
  .story .copy { grid-column: 1 / span 7; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0; border-left: 0; border-top: 1px solid var(--line); }
  .step h3 { margin-top: 20px; }
  /* Posters become a swipeable row rather than leaving one orphan on a second line. */
  .cases {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2.15);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  }
  .case { scroll-snap-align: start; }
  .faq-grid { display: block; }
  .own-grid { grid-template-columns: 1fr; gap: 56px; }
  .own-points { grid-template-columns: 1fr; gap: 24px; }
  .sealed { grid-template-columns: repeat(3, 1fr); }
  .faq .section-head { position: static; margin-bottom: 40px; }
  .case-body { display: block; }
  .case-body .brief { margin-bottom: 56px; }
}
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .wordmark { letter-spacing: 0.2em; font-size: 11px; }
  .sound .txt, .signin, .nav.is-stuck .nav-play { display: none; }
  .rule-label::after { display: none; }
  .hero { min-height: auto; display: block; }
  .hero-scene { position: relative; max-width: none; width: 100%; aspect-ratio: 1 / 1.05; }
  .hero-scene img, .hero-scene video { mask-image: linear-gradient(180deg, #000 50%, transparent 100%); }
  .hero-copy { padding-top: 0; margin-top: -34vw; }
  .hero .lede { max-width: none; }
  .actions .btn { flex: 1 1 100%; }
  .story { padding: 64px 0 96px; }
  .story-grid { display: block; }
  .story .exhibit { margin: 0 0 40px; }
  .story .exhibit img { aspect-ratio: 16 / 10; }
  .story blockquote { margin-bottom: 40px; }
  .how, .season, .faq, .own { padding: 88px 0 96px; }
  .facts { display: grid; gap: 10px; }
  .facts li + li::before { content: none; }
  .tape { padding-bottom: 96px; }
  .deck-side, .deck-main { padding: 28px 22px; }
  .transcript li { grid-template-columns: 1fr; gap: 4px; }
  .transcript .line { font-size: 19px; }
  .cases { grid-auto-flow: row; grid-template-columns: 1fr; grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding: 0; }
  .case { aspect-ratio: 2 / 2.7; }
  .sealed { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .case img { object-position: 50% 20%; }
  .deck-side { flex-direction: column; align-items: stretch; }
  .final { min-height: auto; display: block; padding-bottom: 80px; }
  .final-scene { position: relative; width: 100%; height: 70vw; }
  .final-scene img { mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 60%, transparent 100%); }
  .final-copy { margin-top: -8vw; }
  .footer .wrap { grid-template-columns: 1fr; }
  .footer nav { justify-content: start; }
  .case-hero { min-height: auto; display: block; }
  .case-hero-img { position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .case-hero-img img { mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
  .case-hero-copy { padding: 0 0 72px; margin-top: -30vw; }
  .levels li { grid-template-columns: 44px 1fr; }
  .levels .state { grid-column: 2; }
  .legal { padding-top: 120px; }
}

/* ---------- scroll-driven camera moves (progressive enhancement) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-scene { animation: dolly linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes dolly { to { scale: 1.14; translate: 0 6%; } }
    .story .exhibit img { animation: drift linear both; animation-timeline: view(); }
    @keyframes drift { from { translate: 0 40px; } to { translate: 0 -40px; } }
    .case .img img { height: 110%; margin-top: -5%; animation: poster-pan linear both; animation-timeline: view(); }
    @keyframes poster-pan { from { translate: 0 -4%; } to { translate: 0 4%; } }
    .final-scene img { animation: push-in linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
    @keyframes push-in { from { scale: 1; } to { scale: 1.14; } }
    .case-hero-img img { animation: dolly linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  }
}

/* ---------- page-to-page morph (cross-document view transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.75s; animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- generated from the catalogue ---------- */
[data-case="night-desk"] { --accent: #e4a54c; }
.vt-img-night-desk { view-transition-name: case-night-desk; }
.vt-title-night-desk { view-transition-name: title-night-desk; }
::view-transition-old(case-night-desk), ::view-transition-new(case-night-desk) { height: 100%; object-fit: cover; overflow: clip; }

[data-case="dead-air"] { --accent: #e0483c; }
.vt-img-dead-air { view-transition-name: case-dead-air; }
.vt-title-dead-air { view-transition-name: title-dead-air; }
::view-transition-old(case-dead-air), ::view-transition-new(case-dead-air) { height: 100%; object-fit: cover; overflow: clip; }

[data-case="last-train"] { --accent: #86b8de; }
.vt-img-last-train { view-transition-name: case-last-train; }
.vt-title-last-train { view-transition-name: title-last-train; }
::view-transition-old(case-last-train), ::view-transition-new(case-last-train) { height: 100%; object-fit: cover; overflow: clip; }
