/* CoCo Research, direction D "Cinematic".
   One continuous shot. Wide-set Archivo reads like anamorphic title cards; the point of light
   carries the only saturated colour. Static layout is the default; `html.cine` layers the
   scroll-driven camera on top, so JS-off and reduced-motion get a calm, complete page. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/files/archivo-latin-wdth-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112%;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/@fontsource-variable/martian-mono@5.3.0/files/martian-mono-latin-wdth-normal.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #03050b;
  --ink: #eef2fb;
  --ink-2: #b4bed4;
  --ink-3: #8d98b2;
  --line: rgba(150, 178, 255, 0.16);
  --line-2: rgba(160, 188, 255, 0.3);
  --blue: #5b8dff;
  --blue-hi: #a9c4ff;
  --amber: #ffb66e;
  --f-sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
  --screens: 21.1;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #1f2a47 var(--bg);
  scrollbar-width: thin;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  font: 400 clamp(1rem, 0.95rem + 0.22vw, 1.125rem) / 1.6 var(--f-sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d2745; border-radius: 10px; border: 2px solid var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; user-select: none;
}
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100; padding: 12px 18px; border-radius: 999px;
  background: #f1f5ff; color: #05070d; font-weight: 500; text-decoration: none; transition: top 0.3s var(--out);
}
.skip:focus { top: 12px; }
html:not(.cine) .skip-plain { display: none; } /* only the scroll-driven film needs an escape hatch */

/* ------------------------------------------------------------ the shot */

.world {
  position: absolute; top: 0; left: 0; right: 0; height: 100svh;
  z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg);
}
.world canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: 100lvh;
  opacity: 0; transition: opacity 1.4s ease;
}
html:not(.cine) .world canvas { display: none; }
html.gl .world canvas { opacity: 1; }

/* A CSS point of light: first paint, JS-off and reduced-motion. WebGL takes over from it. */
.hero-point { position: absolute; left: 50%; top: 33svh; width: 0; height: 0; transition: opacity 1.2s ease; }
.hero-point::before {
  content: ''; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 38%, #dbe7ff 62%, #8fb2ff 100%);
  box-shadow: 0 0 8px 3px rgba(190, 215, 255, 0.95), 0 0 34px 12px rgba(91, 141, 255, 0.7),
    0 0 110px 44px rgba(55, 95, 240, 0.34), 0 0 260px 110px rgba(36, 64, 200, 0.16);
  will-change: transform;
}
.hero-point::after {
  content: ''; position: absolute; left: -38vw; width: 76vw; top: -1px; height: 2px;
  background: radial-gradient(closest-side, rgba(190, 215, 255, 0.95), rgba(91, 141, 255, 0.4) 45%, transparent);
  opacity: 0.85;
}
html.gl .hero-point { opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s linear 1.2s; }

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(1, 2, 6, 0.62) 100%);
}
.grain {
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1 0 0 0 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html.cine .grain { animation: grain 1.1s steps(1) infinite; }
html.lite .grain { animation: none; opacity: 0.03; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.bars { display: none; }
html.cine .bars { display: block; }
.bars i { position: absolute; left: 0; right: 0; height: 7.5svh; background: #000; transform: scaleY(0); }
.bars i:first-child { top: 0; transform-origin: top; }
.bars i:last-child { bottom: 0; transform-origin: bottom; }
@media (max-aspect-ratio: 1/1) { .bars { display: none !important; } }

/* --------------------------------------------------------- nav + rail */

.nav {
  position: absolute; z-index: 60; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--pad) 0; pointer-events: none;
}
html.cine .nav { position: fixed; }
.nav > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; gap: 0.72em; text-decoration: none;
  min-height: 44px; font: 500 0.98rem / 1 var(--f-sans); font-stretch: 112%; letter-spacing: -0.01em; color: var(--ink);
  transition: opacity 0.3s;
}
/* the footer has its own lockup: the fixed nav one steps aside while the footer is on screen */
html.cine.in-foot .nav .brand { opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s linear 0.3s; }
.brand i {
  width: 9px; height: 9px; border-radius: 50%; background: #e4edff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 10px 3px rgba(91, 141, 255, 0.85), 0 0 26px 8px rgba(60, 100, 255, 0.45);
}
.nav-cta { transition: opacity 0.6s var(--out), transform 0.6s var(--out), background-color 0.3s; }
/* hidden = not focusable either, so keyboard focus never lands on an invisible button */
html.cine .nav-cta { opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden; transition: opacity 0.6s var(--out), transform 0.6s var(--out), background-color 0.3s, visibility 0s linear 0.6s; }
html.cine.show-cta .nav-cta { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.6s var(--out), transform 0.6s var(--out), background-color 0.3s, visibility 0s; }

.rail {
  position: fixed; z-index: 60; right: clamp(12px, 1.8vw, 26px); top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 2px;
}
html.cine .rail { display: flex; }
.rail a {
  display: flex; align-items: center; justify-content: flex-end; height: 28px; padding-left: 10px;
  text-decoration: none; color: var(--ink-3); font: 500 0.74rem / 1 var(--f-sans); font-stretch: 112%; letter-spacing: 0.02em;
}
.rail a span {
  margin-right: 12px; opacity: 0; transform: translateX(6px); white-space: nowrap;
  transition: opacity 0.4s var(--out), transform 0.4s var(--out), color 0.3s;
}
.rail a i {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8;
  transition: transform 0.4s var(--out), opacity 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.rail a:hover span, .rail a:focus-visible span, .rail a.on span { opacity: 1; transform: none; color: var(--ink); }
.rail a.on i { opacity: 1; transform: scale(1.7); background: var(--blue-hi); box-shadow: 0 0 10px 2px rgba(91, 141, 255, 0.7); }
@media (max-width: 899px) { html.cine .rail { display: none; } }

/* ------------------------------------------------------------- buttons */

.btn {
  --h: 3.1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; min-height: var(--h); padding: 0 1.55em;
  border-radius: 999px; border: 1px solid transparent; font: 500 0.98rem / 1 var(--f-sans); font-stretch: 112%;
  letter-spacing: -0.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.5s var(--out), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.btn svg { width: 1em; height: 1em; transition: transform 0.5s var(--out); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: #f1f5ff; color: #05070d; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: rgba(190, 210, 255, 0.58); background: rgba(120, 150, 255, 0.08); }
.btn-sm { --h: 2.6rem; padding: 0 1.2em; font-size: 0.9rem; }
@media (pointer: coarse), (max-width: 600px) { .btn-sm { --h: 2.75rem; } }
.btn-lg { --h: 3.7rem; padding: 0 2.1em; font-size: 1.06rem; }
.btn:active { transform: translateY(0) scale(0.985); }

/* ---------------------------------------------------------- typography */

.display {
  margin: 0; font-family: var(--f-sans); font-weight: 400; font-stretch: 125%;
  letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; color: var(--ink);
}
.d-hero { font-size: clamp(2.5rem, min(6.3vw, 10.4svh), 6.9rem); }
.d-stat { font-size: clamp(2.8rem, min(8.2vw, 14svh), 8.4rem); }
.d-rule { font-size: clamp(2.4rem, min(6.6vw, 12svh), 7rem); }
.d-sec { font-size: clamp(2.5rem, min(6.8vw, 11svh), 7rem); }
@media (max-width: 760px) { .display { font-stretch: 112%; } }

/* split text helpers (created by JS) */
.sw { display: inline-block; white-space: nowrap; }
.sw.m { overflow: hidden; vertical-align: top; padding: 0.08em 0.06em 0.16em; margin: -0.08em -0.06em -0.16em; }
.swi, .sc { display: inline-block; }
.num { display: inline-flex; font-variant-numeric: tabular-nums; vertical-align: baseline; }
.dg { display: inline-block; height: 1.04em; margin-block: -0.02em; overflow: hidden; line-height: 1.04; }
.dgi { display: flex; flex-direction: column; }
.dgi b { display: block; height: 1.04em; line-height: 1.04; font-weight: inherit; }

.lede {
  margin-top: clamp(14px, 2.6svh, 26px); max-width: 40em; color: var(--ink-2);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.32rem); line-height: 1.5; font-stretch: 106%; text-wrap: balance;
}
.meta { margin-top: clamp(14px, 2.6svh, 26px); font: 400 0.82rem / 1 var(--f-mono); letter-spacing: 0.02em; color: var(--ink-3); }
.statement {
  max-width: 20em; font-size: clamp(1.7rem, min(3.7vw, 6.4svh), 3.5rem); line-height: 1.12; font-stretch: 112%;
  letter-spacing: -0.03em; text-wrap: balance;
}
.statement mark { background: none; color: var(--amber); }
.rule-line {
  margin-top: clamp(16px, 3svh, 30px); max-width: 28em; color: var(--ink-2);
  font-size: clamp(1.05rem, 0.95rem + 0.55vw, 1.45rem); line-height: 1.45; font-stretch: 106%;
}
.credit { color: var(--ink-3); font-size: 0.95rem; letter-spacing: 0.01em; font-stretch: 108%; }
.inline { color: var(--blue-hi); text-decoration: underline; text-decoration-color: rgba(169, 196, 255, 0.4); text-underline-offset: 3px; transition: text-decoration-color 0.3s, color 0.3s; }
.inline:hover { color: #fff; text-decoration-color: #fff; }

/* ====================================================================
   STATIC LAYOUT (default: JS off, reduced motion, rescued)
   ==================================================================== */

.stage { position: relative; z-index: 10; }
.ch { position: relative; }
.ch:not(.ch-hero) { padding-block: clamp(88px, 15svh, 180px); }
.ch > .beat, .ch > .deck, .ch > .lab-wrap, .ch > .rules-title {
  width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--pad);
}

.ch-hero { min-height: 100svh; }
.b-hero {
  min-height: 100svh; display: flex; align-items: flex-end; justify-content: center; text-align: center;
  padding: 120px var(--pad) clamp(28px, 7svh, 80px);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-copy .display { max-width: 12.5em; }
.hero-sub { display: flex; flex-direction: column; align-items: center; width: 100%; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(18px, 3.4svh, 34px); }

.ch-flagship .beat + .beat { margin-top: clamp(28px, 6svh, 64px); }
.b-title .display { max-width: 11em; }
.b-argue .statement { max-width: 17em; }
.b-editor { margin-top: clamp(56px, 10svh, 110px); }

.win {
  width: min(640px, 100%); border-radius: 14px; background: linear-gradient(180deg, #0c1224, #080c19);
  border: 1px solid var(--line-2); overflow: hidden; position: relative; z-index: 2;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}
.win-bar {
  display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line);
  color: var(--ink-3); font: 500 0.8rem / 1 var(--f-sans); font-stretch: 112%;
}
.dots { display: flex; gap: 7px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #1c2540; }
.win-title { margin-inline: auto; padding-right: 52px; }
.win-body {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(22px, 4.4svh, 40px) clamp(18px, 3vw, 30px);
}
.code {
  margin: 0; min-width: 0; font: 400 clamp(0.8rem, 0.52rem + 1.05vw, 1.12rem) / 1.4 var(--f-mono); color: var(--ink);
  white-space: pre; overflow-x: auto; scrollbar-width: none;
}
.code::-webkit-scrollbar { display: none; }
.prompt { color: var(--ink-3); }
.cmd { color: var(--blue-hi); }
.caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: -0.2em; margin-left: 0.2em; background: var(--blue-hi); }
.copy {
  flex: none; min-height: 2.4rem; padding: 0 1.05em; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink); font: 500 0.82rem / 1 var(--f-sans); font-stretch: 112%; cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.copy:hover { border-color: rgba(190, 210, 255, 0.58); background: rgba(120, 150, 255, 0.08); }
.copy.is-copied { color: #05070d; background: var(--blue-hi); border-color: var(--blue-hi); }
@media (pointer: coarse), (max-width: 600px) { .copy { min-height: 2.75rem; } }

.ring { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.node > span {
  display: inline-flex; align-items: center; gap: 0.6em; padding: 0.55em 1em; border-radius: 999px;
  background: rgba(7, 11, 22, 0.86); border: 1px solid var(--line-2); color: var(--ink);
  font: 500 0.86rem / 1 var(--f-sans); font-stretch: 112%; white-space: nowrap;
}
.node > span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-hi); box-shadow: 0 0 8px 2px rgba(91, 141, 255, 0.8); }
.ring-cap { margin-top: 18px; color: var(--ink-2); font-stretch: 112%; }
.facts { margin-top: 6px; color: var(--ink-3); font: 400 0.84rem / 1.5 var(--f-mono); text-wrap: balance; }
.facts span { display: block; }
.facts .nw { display: inline; white-space: nowrap; }
.stat-sub {
  margin-top: clamp(14px, 2.6svh, 24px); max-width: 30em; color: var(--ink-2); line-height: 1.45; text-wrap: balance;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.32rem); font-stretch: 106%;
}
.tag { display: block; font: 500 0.78rem / 1.35 var(--f-mono); letter-spacing: 0.01em; color: var(--blue-hi); }
.card p.tag { color: var(--blue-hi); font-size: 0.78rem; line-height: 1.35; }
.rule-eyebrow { display: none; margin: 0 0 clamp(12px, 2.2svh, 22px); font: 500 0.78rem / 1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-hi); }
html.cine .rule-eyebrow { display: block; }

.rules-title { margin-bottom: 32px; font: 400 clamp(1.1rem, 1rem + 0.6vw, 1.5rem) / 1 var(--f-sans); font-stretch: 116%; color: var(--ink-2); }
.ch-rules .b-rule { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 20px 48px; align-items: end; padding-block: clamp(36px, 7svh, 72px); border-top: 1px solid var(--line); }
.ch-rules .b-rule .rule-line { margin-top: 0; padding-bottom: 0.6em; }
@media (max-width: 820px) { .ch-rules .b-rule { grid-template-columns: 1fr; } }

.b-shipped { margin-bottom: clamp(28px, 5svh, 48px); }
.deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: clamp(16px, 2vw, 28px); }

.card {
  position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #0b1021 0%, #070a15 100%); border: 1px solid var(--line);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 18px 40px -20px rgba(0, 0, 0, 0.6);
}
.card::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: var(--dim, 0); pointer-events: none; }
.card-art {
  position: relative; aspect-ratio: 320 / 190; display: grid; place-items: center; color: var(--blue-hi);
  background: radial-gradient(120% 100% at 50% 0%, rgba(70, 110, 255, 0.16), transparent 70%), #080c1a;
  border-bottom: 1px solid var(--line);
}
.card-art svg { width: 100%; height: 100%; }
.card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: clamp(20px, 2.4vw, 28px); }
.card h3 { margin: 0; font: 500 clamp(1.5rem, 1.2rem + 1vw, 1.95rem) / 1.05 var(--f-sans); font-stretch: 118%; letter-spacing: -0.03em; }
.card p { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }

.lab-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.lab-list { list-style: none; margin: 0; padding: 0; }
.lab-item {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 20px; align-items: baseline;
  padding: clamp(16px, 2.8svh, 24px) 0; border-top: 1px solid var(--line);
}
.lab-item:last-child { border-bottom: 1px solid var(--line); }
.lab-sub { margin-top: 14px; max-width: 18em; color: var(--ink-2); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); line-height: 1.45; font-stretch: 106%; }
.lab-item .tag { margin-top: 8px; }
.lab-item h3 { margin: 0; font: 500 clamp(1.15rem, 1rem + 0.6vw, 1.5rem) / 1.15 var(--f-sans); font-stretch: 116%; letter-spacing: -0.02em; }
.lab-item p { color: var(--ink-2); font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.08rem); }
@media (max-width: 820px) {
  .lab-wrap { grid-template-columns: 1fr; }
  .lab-item { grid-template-columns: 1fr; gap: 4px; }
}
/* phones shorter than ~780px: tighten the lab list so it fits the fixed stage (nothing below the fold in the film) */
@media (max-width: 820px) and (max-height: 780px) {
  .lab-wrap { gap: 16px; }
  .lab-item { padding-block: 10px; gap: 2px; }
  .lab-item p { font-size: 0.9rem; line-height: 1.35; }
  .lab-item .tag { margin-top: 4px; font-size: 0.74rem; }
  .lab-sub { margin-top: 8px; font-size: 0.95rem; }
}

.b-close { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2.6svh, 26px); text-align: center; }

/* footer */
.foot { position: relative; z-index: 20; background: var(--bg); border-top: 1px solid var(--line); padding: clamp(72px, 12svh, 140px) var(--pad) 28px; }
.foot-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
.foot-brand p { margin-top: 16px; color: var(--ink-3); max-width: 24ch; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.foot h2 { margin: 0 0 14px; font: 500 0.82rem / 1 var(--f-sans); font-stretch: 112%; color: var(--ink-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: var(--ink-2); text-decoration: none; transition: color 0.3s; }
.foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-base {
  max-width: 1240px; margin: clamp(48px, 9svh, 96px) auto 0; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 0.86rem;
}
.motion-toggle {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ink-3); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(141, 152, 178, 0.4); text-underline-offset: 4px; transition: color 0.3s;
}
.motion-toggle:hover { color: #fff; }
@media (max-width: 820px) {
  .foot-inner { grid-template-columns: 1fr; gap: 36px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (pointer: coarse), (max-width: 820px) {
  .foot ul { gap: 0; }
  .foot ul a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ====================================================================
   CINEMATIC LAYOUT (html.cine): everything is one fixed stage, the page
   scrolls a spacer, and the camera + type are a function of scroll.
   ==================================================================== */

html.cine .world { position: fixed; height: auto; bottom: 0; }
html.cine .spacer { height: calc(var(--screens) * 100svh); }
html.cine .stage { position: fixed; inset: 0; height: 100svh; overflow: hidden; pointer-events: none; }
html.cine .stage a, html.cine .stage button, html.cine .stage .card { pointer-events: auto; }
html.cine .ch { position: absolute; inset: 0; padding: 0; }
html.cine .ch > .beat, html.cine .ch > .deck, html.cine .ch > .lab-wrap { width: auto; margin: 0; padding-inline: var(--pad); }
html.cine .rules-title {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
html.cine .beat {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding: var(--nav-h) var(--pad) 0; visibility: hidden; opacity: 0; margin: 0;
}
html.cine .ch-flagship .beat + .beat, html.cine .b-shipped { margin: 0; }

/* hero */
html.cine .b-hero { place-items: end center; padding: var(--nav-h) var(--pad) clamp(24px, 6.5svh, 76px); }
/* If the scripts are slow to arrive (hung CDN), the hero must not stay blank: fade it in after 2.5 s. The film takes over once ready. */
html.cine:not(.ready) .b-hero { animation: hero-rescue 0.6s ease 2.5s forwards; }
@keyframes hero-rescue { to { opacity: 1; visibility: visible; } }
html.cine .hero-copy { max-width: 1180px; }

/* flagship */
html.cine .b-title .display { max-width: 12em; }
html.cine .b-argue { place-items: end center; padding-bottom: clamp(64px, 16svh, 190px); }
html.cine .b-editor { place-items: center; }
html.cine .win { margin: 0; position: relative; z-index: 2; width: min(640px, 86vw); }
html.cine .ring { position: absolute; inset: 0; margin: 0; padding: 0; display: block; pointer-events: none; }
/* labels are placed by JS from the 3D ring; until that happens (or if it never does) they stay hidden */
html.cine .node { position: absolute; left: 0; top: 0; will-change: transform, opacity; visibility: hidden; }
/* no WebGL: the adapter names sit in a plain row under the window instead */
html.cine.nogl .ring { inset: auto; left: 0; right: 0; top: calc(50% + var(--nav-h) / 2 + 118px); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-inline: var(--pad); }
html.cine.nogl .node { position: static; visibility: visible !important; opacity: 1 !important; transform: none !important; }
html.cine .ring-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(24px, 8svh, 80px); margin: 0; padding-inline: var(--pad);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
html.cine .ring-cap, html.cine .facts { margin: 0; max-width: 46em; }
html.cine .facts { color: var(--ink-2); }
@media (min-aspect-ratio: 1/1) {
  html.cine .ring-foot { top: min(calc(50% + 262px), calc(100% - 120px)); bottom: auto; }
}

/* rules: text on the left, the shape on the right (stacked on portrait screens) */
html.cine .b-rule {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left;
  padding: var(--nav-h) var(--pad) 0;
}
html.cine .b-rule .display { max-width: min(62vw, 11em); }
html.cine .b-rule .rule-line { margin-top: clamp(16px, 3svh, 30px); }
@media (max-aspect-ratio: 1/1) {
  html.cine .b-rule { justify-content: flex-end; padding-bottom: 11svh; }
  html.cine .b-rule .display { max-width: 100%; }
}

/* shipped: a 3D carousel of posters */
html.cine .b-shipped { place-items: start center; padding-top: clamp(78px, 11svh, 120px); }
html.cine .deck { position: absolute; inset: 0; display: block; perspective: 1700px; perspective-origin: 50% 48%; padding: 0; }
html.cine .card {
  position: absolute; left: 50%; top: 52%; width: min(372px, 80vw); visibility: hidden; opacity: 0;
  transform-style: preserve-3d; backface-visibility: hidden;
}

/* lab */
html.cine .ch-lab { display: grid; place-items: center; padding: var(--nav-h) var(--pad) 0; }
html.cine .lab-wrap { width: min(1180px, 100%); padding: 0; align-items: center; visibility: hidden; opacity: 0; }

/* close */
html.cine .b-close { display: grid; place-content: end center; justify-items: center; gap: clamp(12px, 2.2svh, 22px); padding-bottom: clamp(40px, 9svh, 100px); }
html.cine .b-close .btn { margin-top: clamp(8px, 1.6svh, 18px); }

/* footer rises over the final shot */
html.cine .foot {
  background: linear-gradient(180deg, rgba(3, 5, 11, 0) 0, rgba(3, 5, 11, 0.9) 140px, var(--bg) 300px);
  border-top: 0; padding-top: clamp(150px, 26svh, 280px);
}

/* ------------------------------------------------------- card artwork */
.card-art .sweep { transform-origin: 160px 95px; }
.ping { transform-box: fill-box; transform-origin: center; opacity: 0.5; }
.wave rect { transform-box: fill-box; transform-origin: center; transform: scaleY(var(--h)); }
.play { transform-box: fill-box; transform-origin: center; }
.card-ads .head { transform: translateX(0); }
.caret-bar { opacity: 0.9; }

html.cine:not(.in-shipped) .card-art *, html.cine:not(.in-shipped) .card-art *::before { animation-play-state: paused !important; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.static) .card-art .sweep { animation: spin 6s linear infinite; }
  html:not(.static) .ping { animation: ping 6s linear infinite; animation-delay: var(--t); }
  html:not(.static) .wave rect { animation: wave 1.5s ease-in-out infinite alternate; animation-delay: var(--d); }
  html:not(.static) .card-ads .head { animation: scrub 7s linear infinite; }
  html:not(.static) .play { animation: breathe 3.2s ease-in-out infinite; }
  html:not(.static) .caret, html:not(.static) .caret-bar { animation: blink 1.1s steps(1) infinite; }
  html:not(.static) .hero-point::before { animation: breathe 5s ease-in-out infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { opacity: 1; transform: scale(2.4); } 10% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0.5; transform: scale(1); } }
@keyframes wave { from { transform: scaleY(var(--h)); } to { transform: scaleY(calc(var(--h) * 0.42 + 0.07)); } }
@keyframes scrub { from { transform: translateX(0); } to { transform: translateX(232px); } }
@keyframes breathe { 50% { transform: scale(1.14); } }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ mobile */
@media (max-width: 600px) {
  :root { --nav-h: 68px; }
  .btn { padding: 0 1.25em; }
  .win-body { flex-direction: column; align-items: flex-start; }
  .cta .btn { flex: 0 1 auto; }
  html.cine .ring-foot { bottom: clamp(18px, 5svh, 56px); padding-inline: 12px; }
  html.cine .ring-cap { font-size: 0.95rem; }
  html.cine .facts { font-size: 0.78rem; }
  .node > span { font-size: 0.78rem; padding: 0.5em 0.85em; }
  /* the biggest proof point stays big: numeral stacked over the word */
  .d-stat { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
  html.cine .d-stat { align-items: center; }
  .d-stat .num { font-size: 2.1em; }
}

/* Reduced motion, or the visitor turned motion off: no scroll-jacking, nothing moves on its own. */
html.static *, html.static *::before, html.static *::after { animation: none !important; }
html.static .grain { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .grain { display: none; }
  .btn:hover, .btn:hover svg { transform: none; }
}
