/* ════════════════════════════════════════════════════════════
   OTM · FOLLOW THE ORDER — interactive documentary
   Design tokens from the OTM design system (dark, border-and-
   surface, four brand colors, Archivo Black + Inter).
════════════════════════════════════════════════════════════ */

:root {
  --black: #0A0A0A;
  --ink: #050505;
  --white: #FFFFFF;
  --gold: #FFE600;
  --blue: #1E47E6;
  --blue-bright: #7B96F5;
  --surface-1: #0d0d0d;
  --surface-2: #131313;
  --border: #1e1e1e;
  --dim: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.3);

  --display: "Archivo Black", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;

  --chrome-pad: clamp(16px, 3vw, 32px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; overflow-x: clip; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.locked { overflow: hidden; }

::selection { background: var(--gold); color: var(--black); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Type primitives ─────────────────────────────────────── */

.label {
  font-family: var(--body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-feature-settings: "tnum";
}
.label.dim { color: var(--dim); }
.gold { color: var(--gold); }

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-size: clamp(26px, 3.6vw, 46px);
  text-wrap: balance;
}
.display.xl { font-size: clamp(36px, 6.4vw, 80px); }
.display .line { display: block; }
.display mark {
  background: linear-gradient(0deg, var(--gold) 0 100%);
  color: var(--black);
  padding: 0.02em 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ══════════ ENTER GATE ══════════ */

.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; text-align: center;
  background:
    radial-gradient(60% 45% at 50% 38%, rgba(30, 71, 230, 0.14), transparent 70%),
    var(--ink);
  cursor: pointer;
  transition: opacity 0.9s ease, visibility 0.9s;
  padding: 24px;
}
.gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-logo { width: clamp(200px, 28vw, 300px); height: auto; }

.gate-enter {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  letter-spacing: 0.04em;
  animation: gate-pulse 2.6s ease-in-out infinite;
}
.gate-enter span { color: var(--gold); }
@keyframes gate-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.gate-sub { color: var(--dim); }
.gate-meta { color: var(--faint); }

/* ══════════ CHROME ══════════ */

.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--chrome-pad);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.72), transparent);
  pointer-events: none;
}
.chrome-logo { height: 34px; width: auto; }

.hud { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hud-order { color: var(--dim); }
.hud-clock { display: inline-flex; align-items: center; gap: 7px; }
.hud-clock b { color: var(--gold); font-weight: 800; min-width: 15ch; text-align: right; }
.hud-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--gold);
  animation: otm-pulse 1.6s ease-in-out infinite;
}
@keyframes otm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Progress rail (desktop) ── */

/* Table of contents — always visible, current chapter highlighted */
.rail {
  position: fixed; right: var(--chrome-pad); top: 50%; transform: translateY(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 16px; align-items: flex-end;
}
.rail-line {
  position: absolute; top: 6px; bottom: 6px; right: 6px; width: 1px;
  background: var(--border); z-index: -1;
}
.rail-fill { width: 100%; height: 0%; background: var(--gold); transition: height 0.15s linear; }

.rail-dot {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 2px 0;
}
.rail-dot::after {
  content: ""; order: 2; width: 9px; height: 9px; border-radius: 999px; flex: none;
  background: var(--ink); border: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: all 0.25s ease;
  margin-right: 2px;
}
.rail-dot.active::after { background: var(--gold); border-color: var(--gold); transform: scale(1.35); }
.rail-dot:disabled { cursor: default; opacity: 0.35; }
.rail-dot span {
  order: 1;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); white-space: nowrap;
  text-shadow: 0 1px 8px rgba(5, 5, 5, 0.9);
  transition: color 0.25s ease, font-size 0.25s ease;
}
.rail-dot:hover span { color: var(--white); }
.rail-dot.active span { color: var(--gold); font-size: 13.5px; font-weight: 800; }

/* Short laptop screens: shrink the video frame so the intro slab
   still fits inside one pinned viewport */
@media (min-width: 901px) and (max-height: 880px) {
  .intro-media { width: min(940px, 74vw); }
  .intro-content { gap: 10px; }
  .intro-play { width: 52px; height: 52px; }
  .slab { padding: clamp(18px, 2.2vw, 28px); gap: 12px; }
  .bene { padding: 14px; }
  .bene p { font-size: 13px; }
}

/* Short viewports: compact the rail so it clears the HUD */
@media (max-height: 760px) {
  .rail { gap: 8px; }
  .rail-dot span { font-size: 9px; }
  .rail-dot.active span { font-size: 11px; }
  .rail-dot::after { width: 7px; height: 7px; }
}

/* ── Bottom bar (mobile) ── */

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  height: calc(30px + env(safe-area-inset-bottom));
  background: rgba(5, 5, 5, 0.82); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.bar-fill { position: absolute; top: -1px; left: 0; height: 2px; width: 0%; background: var(--gold); }
.bar-label {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  color: var(--dim); font-size: 10px;
}

/* ── Scroll cue ── */

.cue {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 55; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: opacity 0.6s ease;
}
.cue-line { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue-drop 1.8s ease-in-out infinite; }
@keyframes cue-drop { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.cue.hidden { opacity: 0; }

/* ══════════ SCENES ══════════ */

.scene { position: relative; height: 300vh; }
.scene#hero { height: 240vh; }

.sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}

.bg { position: absolute; inset: -4%; }
.para { position: absolute; inset: 0; }
.para img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Motion layer: the still underneath paints instantly (LCP), the clip
   fades in over it once it can play, and never appears at all on
   mobile / reduced-motion. */
video.vid {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.7s ease;
}
video.vid.on { opacity: 1; }

.bloom {
  position: absolute; inset: 0;
  background: radial-gradient(42% 34% at 50% 42%, rgba(255, 230, 0, 0.10), transparent 72%);
  mix-blend-mode: screen; pointer-events: none;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 50%, rgba(5, 5, 5, 0.62) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.4), transparent 22% 60%, rgba(5, 5, 5, 0.6));
}

/* Depth shade: the next chapter waits slightly darkened beneath
   the departing one (curtain-lift transition — no black frames);
   GSAP clears it as the chapter takes over. */
.dip { position: absolute; inset: 0; z-index: 20; background: var(--ink); opacity: 0.55; pointer-events: none; }
#hero .dip { opacity: 0; }

.marker .num { color: var(--blue-bright); }

/* ── Content ── */

.content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center;
  padding: 76px clamp(20px, 6vw, 96px) 40px;
  gap: 14px;
}
.content-center { align-items: center; text-align: center; }
.content-left { align-items: flex-start; }

/* Right-hand variant — same stack, mirrored, so slides alternate
   sides instead of always parking on the left. Extra right padding
   keeps text clear of the fixed table-of-contents rail. */
.content-right { align-items: flex-end; padding-right: clamp(150px, 14vw, 240px); }
.content-right .marker, .content-right .display { text-align: right; }
.content-right .explain {
  border-left: 0; padding-left: 0;
  border-right: 2px solid var(--gold); padding-right: 12px;
  text-align: right;
}
.content-right .explain-lg { border-right-width: 3px; padding-right: 16px; }
.hero-logo { width: clamp(280px, 38vw, 520px); height: auto; margin-bottom: 8px; filter: drop-shadow(0 12px 50px rgba(5, 5, 5, 0.8)); }
.marker { color: var(--white); }
.tagline { font-size: 13px; letter-spacing: 0.2em; }

/* ══════════ THE SANDBOX — kitchen side + what the team sees ══════════ */

.duo {
  margin-top: 16px;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}

.panel {
  background: rgba(9, 9, 9, 0.96);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.panel-team { border-color: rgba(30, 71, 230, 0.45); }

.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.panel-head .label { font-size: 11.5px; }

.live { color: var(--gold); display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 6px; height: 6px; border-radius: 999px; background: var(--gold); animation: otm-pulse 1.6s ease-in-out infinite; }

.chip { border-radius: 999px; padding: 4px 11px; font-size: 10px; }
.chip-blue { background: var(--blue); color: var(--white); }
.chip-gold { background: var(--gold); color: var(--black); }

.panel-foot { margin-top: 12px; font-size: 10px; line-height: 1.7; }
.sync { color: var(--blue-bright); }

/* Kitchen checklist — the running tally */
.checks { list-style: none; }
.checks li {
  display: flex; align-items: center; gap: 10px;
  padding: 7.5px 0; border-bottom: 1px solid rgba(30, 30, 30, 0.6);
  font-size: 14.5px; font-weight: 500; color: var(--faint);
  transition: color 0.3s ease;
}
.checks li:last-child { border-bottom: 0; }
.checks li.on { color: var(--white); }
.num-c { color: var(--faint); width: 2.2ch; font-size: 10px; }
.checks li em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--faint); }
.checks li.on em { color: var(--dim); }

.cbox {
  width: 16px; height: 16px; border-radius: 4px; flex: none;
  border: 1px solid var(--faint); position: relative;
  transition: all 0.3s ease;
}
.checks li.on .cbox { background: var(--gold); border-color: var(--gold); }
.cbox::after {
  content: ""; position: absolute; inset: 3.5px 3px 4.5px;
  border-left: 2px solid var(--black); border-bottom: 2px solid var(--black);
  transform: rotate(-45deg) scale(0); transition: transform 0.25s ease 0.05s;
}
.checks li.on .cbox::after { transform: rotate(-45deg) scale(1); }

.checks li.doing { color: var(--dim); }
.checks li.doing .cbox { border-color: var(--gold); animation: otm-pulse 1.6s ease-in-out infinite; }

.badge {
  background: rgba(255, 230, 0, 0.1); border: 1px solid rgba(255, 230, 0, 0.4);
  color: var(--gold); border-radius: 999px; padding: 2px 8px;
}
.badge.blue {
  background: rgba(30, 71, 230, 0.14); border-color: rgba(30, 71, 230, 0.55);
  color: var(--blue-bright);
}

/* Team tracker — passive status, mirrors the kitchen */
.track { list-style: none; }
.track li {
  display: flex; align-items: center; gap: 11px;
  padding: 10.5px 0; border-bottom: 1px solid rgba(30, 30, 30, 0.6);
  font-size: 14.5px; font-weight: 500; color: var(--faint);
  transition: color 0.3s ease;
}
.track li:last-child { border-bottom: 0; }
.track li em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--faint); }
.track li.on { color: var(--white); }
.track li.on em { color: var(--dim); }
.tdot {
  width: 10px; height: 10px; border-radius: 999px; flex: none;
  border: 1px solid var(--faint); transition: all 0.3s ease;
}
.track li.on .tdot { background: var(--blue); border-color: var(--blue); }
.track li.next .tdot { border-color: var(--gold); animation: otm-pulse 1.6s ease-in-out infinite; }

/* HUD running tally */
.hud-check { color: var(--dim); display: inline-flex; align-items: center; gap: 8px; }
.hud-check b { color: var(--white); font-weight: 800; }
.hud-bar { width: 56px; height: 3px; border-radius: 999px; background: var(--border); overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0%; background: var(--gold); transition: width 0.6s ease; }
.hud-bar, .hud-bar i { font-style: normal; }

/* Single spotlight panel */
.panel-solo { width: min(560px, 100%); margin-top: 16px; }
.panel-wide { width: min(680px, 100%); }

/* PREPARE — line card progress */
.step-track { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 16px; }
.step-fill { height: 100%; width: 20%; background: var(--gold); border-radius: 999px; transition: width 0.4s ease; }

/* VERIFY — allergen evidence */
.allergy-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 4px; }
.a-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px;
  color: var(--faint); font-size: 10px; transition: all 0.3s ease;
}
/* Blue = the players (allergen profiles); white = evidence/labels. */
.a-chip.on { border-color: rgba(30, 71, 230, 0.7); color: var(--white); background: rgba(30, 71, 230, 0.32); }
.evidence-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
#verify .evidence-row .badge {
  background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.42); color: var(--white);
}

/* PACK — cold-chain readout */
.temp-wrap { display: flex; align-items: baseline; gap: 14px; padding: 14px 0 4px; flex-wrap: wrap; }
.temp-big {
  font-family: var(--display); font-size: clamp(44px, 5.4vw, 72px); line-height: 1;
  color: var(--blue-bright); font-feature-settings: "tnum";
}
.temp-log { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 12px; font-size: 10px; }
.temp-log span { opacity: 0.25; transition: opacity 0.35s ease; }
.temp-log span.on { opacity: 1; color: var(--blue-bright); }

/* MOVE — route strip */
.route { padding: 22px 4px 6px; }
.route-line { position: relative; height: 3px; border-radius: 999px; background: var(--border); }
.route-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--blue); border-radius: 999px; }
.route-dot {
  position: absolute; top: 50%; left: 0%; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 999px; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 230, 0, 0.2);
}
.route-ends { display: flex; justify-content: space-between; padding-top: 12px; font-size: 9px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 0 4px; }
.stat {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat .label { font-size: 9px; }
.stat b { font-size: 19px; font-weight: 800; font-feature-settings: "tnum"; }

/* Logistics thread — messaging is delivery-only, no ordering/payment */
.thread { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 2px; }
.bub {
  max-width: 88%; padding: 10px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; line-height: 1.45;
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0.25; transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bub.on { opacity: 1; transform: none; }
.bub .label { font-size: 8.5px; color: var(--dim); }
.bub.them { background: #191919; border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.bub.me { background: var(--blue); border-bottom-right-radius: 4px; align-self: flex-end; }
.bub.me .label { color: rgba(255, 255, 255, 0.65); }
.bub.sys {
  align-self: center; max-width: 100%; background: none;
  border: 1px dashed #2e2e2e; border-radius: 999px; padding: 6px 14px;
  color: var(--dim); transform: none;
}

/* ══════════ PERFORM + CLOSE ══════════ */

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }

/* One-line "who does this" captions — detail without noise */
.explain {
  max-width: 54ch;
  font-size: 13.5px; font-weight: 500; line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin-top: 4px;
}
.explain-lg {
  max-width: 46ch;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  border-left-width: 3px;
  padding-left: 16px;
}

/* ══════════ INTRO — what is OTM (video slot + pitch) ══════════ */

.explain.intro-copy { border: 0; padding: 0; text-align: center; max-width: 62ch; }

/* Intro: the video is the hero; the text below is a compact caption,
   deliberately smaller so it doesn't compete with the film. */
.intro-content { gap: 10px; }
.intro-slab {
  width: min(620px, 100%); align-items: center; text-align: center;
  padding: 12px 24px !important; gap: 7px !important;
}
#intro .slab .marker { font-size: 9.5px; }
#intro .slab .display { font-size: clamp(18px, 1.7vw, 22px); }
#intro .intro-copy { font-size: 13px; line-height: 1.45; max-width: 58ch; }

.intro-media {
  position: relative;
  width: min(1120px, 82vw);
  aspect-ratio: 16 / 9;
  flex: none;
  background:
    radial-gradient(60% 60% at 50% 42%, rgba(30, 71, 230, 0.14), transparent 75%),
    var(--surface-1);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.intro-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0;
}
/* The film is a fixed 1920×1080 stage — scaled into the 16:9 slot by JS */
.intro-media iframe {
  position: absolute; top: 0; left: 0;
  width: 1920px; height: 1080px; border: 0;
  transform-origin: 0 0;
}
.film-play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: rgba(5, 5, 5, 0.42);
  transition: opacity 0.4s ease, visibility 0.4s;
}
.film-play.hidden { opacity: 0; visibility: hidden; }

/* ── Demo device loop (DELIVER slide) ── */
.demo-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.demo-scale { width: 100%; transform-origin: 50% 0; }
.demo-cap { font-size: 9.5px; text-align: center; }
/* the component ships its own dark surface; drop its outer margins */
.otm-deviceloop { width: 100%; }

.legal { font-size: 9.5px; letter-spacing: 0.1em; opacity: 0.75; }
.intro-media-logo { width: clamp(140px, 20vw, 220px); height: auto; }
.intro-play {
  width: 58px; height: 58px; border-radius: 999px;
  border: 2px solid rgba(255, 230, 0, 0.7);
  display: grid; place-items: center;
  animation: otm-pulse 1.6s ease-in-out infinite;
}
.intro-play::after {
  content: ""; margin-left: 4px;
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--gold);
}

/* ══════════ SLAB — the content box on intro / kitchen / team ══════════
   These three are ordinary .scene slides (sticky, camera push, dip
   transition, scrubbed reveal); the slab is just their content
   container, same family as .panel inside the film scenes. */

.slab {
  width: min(980px, 100%);
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  background: rgba(8, 8, 8, 0.84);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 38px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
#intro .slab { width: min(560px, 100%); align-items: center; text-align: center; }

/* The three pre-film slides run shorter than the 300vh chapters */
.scene#intro, .scene#kitchen, .scene#team { height: 220vh; }

/* Intro: left-edge falloff buries the corridor wall signage so its
   arrows stop pointing at the video */
#intro .vignette {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.96) 0, rgba(5, 5, 5, 0.8) 22%, rgba(5, 5, 5, 0.3) 40%, transparent 52%),
    radial-gradient(125% 95% at 50% 50%, transparent 54%, rgba(5, 5, 5, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.4), transparent 20% 70%, rgba(5, 5, 5, 0.5));
}
/* Kitchen + team keep their photos bright; the slab carries readability */
#kitchen .vignette, #team .vignette {
  background:
    radial-gradient(125% 95% at 50% 50%, transparent 58%, rgba(5, 5, 5, 0.5) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.34), transparent 20% 72%, rgba(5, 5, 5, 0.42));
}

.bene-close { margin-top: 14px; }

/* Team slab: center the marker / headline / copy / footer over the
   full-width comparison table so nothing is stranded at the left. */
#team .slab { align-items: center; text-align: center; }
#team .slab .explain { border: 0; padding: 0; max-width: 56ch; }

.bene-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 14px; width: 100%;
}
.bene {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; gap: 11px; align-items: flex-start;
}
.bene p { font-size: 14px; font-weight: 500; line-height: 1.5; color: rgba(255, 255, 255, 0.75); }

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; width: 100%; align-items: stretch; }
.vs-col { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px 8px; }
.vs-col > .label { display: block; text-align: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.vs-col ul { list-style: none; margin-top: 4px; }
/* uniform row height keeps the two columns in lockstep if a line wraps */
.vs-col li {
  min-height: 40px; display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px; font-weight: 500; line-height: 1.3;
}
.vs-col li:last-child { border-bottom: 0; }
.vs-col li::before {
  content: ""; flex: none; width: 15px; height: 15px; border-radius: 999px;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
}
.vs-old li { color: var(--dim); }
.vs-old li::before { content: "✕"; color: #ff6b6b; background: rgba(255, 77, 77, 0.14); }
.vs-new { border-color: rgba(30, 71, 230, 0.5); }
.vs-new > .label { color: var(--blue-bright); border-bottom-color: rgba(30, 71, 230, 0.3); }
.vs-new li { color: var(--white); }
.vs-new li::before { content: "✓"; color: #fff; background: var(--blue); }

/* ── Slab content: cards read as the lit surfaces on the sheet ── */
.slab .bene, .slab .vs-col {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}
.slab .bene p { color: rgba(255, 255, 255, 0.9); }
.slab .explain { color: rgba(255, 255, 255, 0.95); }
.slab .vs-col li { border-bottom-color: rgba(255, 255, 255, 0.1); }
.slab .vs-old li { color: rgba(255, 255, 255, 0.72); }
.slab .vs-new { background: rgba(30, 71, 230, 0.18); border-color: rgba(123, 150, 245, 0.65); }

.close {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center;
  padding: 90px 24px 60px;
  background:
    radial-gradient(55% 40% at 50% 30%, rgba(30, 71, 230, 0.12), transparent 70%),
    var(--ink);
}
.close-logo { width: clamp(180px, 22vw, 250px); height: auto; }
.close-sub { color: var(--dim); }
.close-title { font-size: clamp(28px, 4.4vw, 54px); margin-top: 6px; }
.close-title mark { background: linear-gradient(0deg, var(--gold) 0 100%); color: var(--black); padding: 0.02em 0.12em; }

.join { width: min(560px, 100%); margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.join-roles { display: flex; justify-content: center; gap: 8px; }
.role-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px;
  color: var(--dim); transition: all 0.25s ease;
}
.role-chip:hover { border-color: var(--faint); }
.role-chip.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.join-row { display: flex; gap: 10px; }
.join-row input {
  flex: 1; min-width: 0;
  background: var(--surface-1); border: 1px solid #2a2a2a; border-radius: 8px;
  color: var(--white); font: 600 16px var(--body);
  padding: 15px 18px; outline: none;
  transition: border-color 0.25s ease;
}
.join-row input::placeholder { color: var(--faint); font-weight: 500; }
.join-row input:focus { border-color: var(--gold); }
.join-btn {
  background: var(--gold); color: var(--black);
  font: 800 13px var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 8px; padding: 15px 24px; white-space: nowrap;
  transition: opacity 0.2s ease;
}
.join-btn:hover { opacity: 0.9; }
.join-btn:disabled { opacity: 0.4; cursor: default; }
.note { min-height: 16px; color: var(--gold); }
.note.err { color: #ff4d4d; }

.contact-row { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.contact-row a { color: var(--white); text-decoration: none; }
.contact-row a:hover { text-decoration: underline; text-underline-offset: 4px; }
.close-foot { margin-top: 10px; }

/* ══════════ REDUCED MOTION / MOBILE ══════════ */

@media (prefers-reduced-motion: reduce) {
  .gate-enter, .cue-line, .hud-dot, .live i,
  .checks li.doing .cbox, .track li.next .tdot { animation: none; }
}

@media (pointer: coarse), (max-width: 900px) {
  .rail { display: none; }
  .bar { display: block; }
  .scene { height: 260vh; }
  .scene#hero { height: 200vh; }
  .hud-order { display: none; }
  .content { justify-content: flex-end; padding-bottom: 64px; gap: 10px; }
  .content-center { justify-content: center; padding-bottom: 0; }
  /* phones: everything returns to the bottom-left stack */
  .content-right { align-items: flex-start; padding-right: clamp(20px, 6vw, 96px); }
  .content-right .marker, .content-right .display { text-align: left; }
  .content-right .explain {
    border-right: 0; padding-right: 0;
    border-left: 2px solid var(--gold); padding-left: 12px;
    text-align: left;
  }
  .content-right .explain-lg { border-left-width: 3px; padding-left: 16px; }
  .display { font-size: clamp(24px, 6.4vw, 34px); }
  .display.xl { font-size: clamp(32px, 10vw, 48px); }
  .chrome-logo { height: 24px; }

  .duo { grid-template-columns: 1fr; gap: 10px; }
  .panel { padding: 14px 16px; border-radius: 12px; }
  .checks li { font-size: 12.5px; padding: 5px 0; }
  .duo .panel-team .track { display: none; } /* on phones the paired team panel condenses to its LATEST line */
  .panel-team .panel-head { padding-bottom: 8px; }
  .panel-foot { margin-top: 8px; }
  .stats { gap: 8px; padding-top: 12px; }
  .stat b { font-size: 15px; }
  .bub { font-size: 12.5px; }

  .join-row { flex-direction: column; }
  .join-btn { padding: 16px; }
  .close { padding-bottom: 90px; }
  .hud-check .hud-bar { width: 40px; }

  /* The three pre-film slides are pinned now, so their content has
     to fit one viewport — compact it rather than let it clip. */
  .slab { padding: 14px; border-radius: 14px; gap: 8px; }
  #intro .slab { width: 100%; }
  .bene-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bene { padding: 11px; gap: 7px; }
  .bene p { font-size: 11.5px; line-height: 1.4; }
  .bene .chip { font-size: 8.5px; padding: 3px 8px; }
  .vs { grid-template-columns: 1fr; gap: 8px; }
  .vs-col { padding: 12px; }
  .vs-col li { font-size: 12.5px; padding: 5px 0; }
  .slab .explain-lg { font-size: 13px; }
  .bene-close, .slab .panel-foot { font-size: 8.5px; }
  .intro-media { margin-bottom: 2px; }
}
