/* ==========================================================================
   eizil.me — "the film"
   html.cine  → scroll-driven scenes on a fixed stage (set by boot.js)
   otherwise  → plain, readable stacked layout (reduced motion / no JS / tiny screens)
   ========================================================================== */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-italic.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/martian-mono.woff2") format("woff2"); font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; }

:root {
  --bg: #0c0b09;
  --bg-2: #141210;
  --panel: #171512;
  --text: #efe9dd;
  --text-2: #a9a194;
  --text-3: #6f695e;
  --line: rgba(239, 233, 221, 0.13);
  --line-2: rgba(239, 233, 221, 0.32);
  --red: #ff5a2c;
  --red-2: #ff7a52;
  --red-soft: rgba(255, 90, 44, 0.14);
  --green: #6fc184;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(18px, 4vw, 48px);
  --max: 1240px;
  --r: 6px;
  --ease: cubic-bezier(.2, .75, .15, 1);
  --bump: 0;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }
::selection { background: var(--red); color: var(--bg); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.container { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 8px; }
.mono { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px;
  border: 1.5px solid var(--text); background: transparent; color: var(--text);
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--ghost { border-color: var(--line-2); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.875rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ==========================================================================
   HUD (header) + scene menu
   ========================================================================== */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 68px; padding-inline: var(--gutter);
  background: linear-gradient(to bottom, rgba(12,11,9,.92), rgba(12,11,9,.6) 60%, transparent);
}
.logo { font-weight: 850; font-stretch: 120%; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1; text-decoration: none; justify-self: start; }
.logo span { color: var(--red); }
.logo--lg { font-size: 3rem; }
.hud__scene { display: flex; gap: 14px; align-items: center; color: var(--text-2); white-space: nowrap; }
.hud__scene b { color: var(--red); font-weight: 500; }
.hud__tc { color: var(--text-3); font-variant-numeric: tabular-nums; }
.hud__right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.hud__menu {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  background: none; border: 1.5px solid var(--line-2); border-radius: 999px; cursor: pointer; color: var(--text);
}
.hud__menu:hover { border-color: var(--text); }
.hud__menu-icon { width: 14px; height: 10px; position: relative; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.hud__menu-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transform: translateY(-50%); }
html:not(.cine) .hud__scene { visibility: hidden; }
@media (max-width: 900px) {
  .hud { grid-template-columns: 1fr auto; }
  .hud__scene, .hud__cta { display: none; }
}

.chapters {
  position: fixed; inset: 0; z-index: 40; background: rgba(8,7,6,.97);
  display: grid; place-items: center; padding: 88px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.chapters.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.chapters__inner { width: min(760px, 100%); }
.chapters__label { color: var(--red); margin-bottom: 18px; }
.chapters li { border-top: 1px solid var(--line); }
.chapters li:last-child { border-bottom: 1px solid var(--line); }
.chapters a {
  display: flex; align-items: baseline; gap: 20px; padding: 12px 0; text-decoration: none;
  font-weight: 760; font-stretch: 115%; font-size: clamp(1.5rem, 4.6vh, 2.75rem); letter-spacing: -0.03em; line-height: 1.1;
  transition: color .2s ease, transform .3s var(--ease);
}
.chapters a .mono { color: var(--text-3); font-weight: 400; letter-spacing: .04em; }
.chapters a:hover { transform: translateX(10px); }
.chapters a.is-current { color: var(--red); }
.chapters.is-open li { animation: chapIn .5s var(--ease) backwards; }
.chapters.is-open li:nth-child(2) { animation-delay: .03s; } .chapters.is-open li:nth-child(3) { animation-delay: .06s; }
.chapters.is-open li:nth-child(4) { animation-delay: .09s; } .chapters.is-open li:nth-child(5) { animation-delay: .12s; }
.chapters.is-open li:nth-child(6) { animation-delay: .15s; } .chapters.is-open li:nth-child(7) { animation-delay: .18s; }
.chapters.is-open li:nth-child(8) { animation-delay: .21s; }
@keyframes chapIn { from { opacity: 0; transform: translateY(14px); } }

/* ==========================================================================
   Film effects
   ========================================================================== */
.fx { display: none; }
html.cine .fx { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0,0,0,.55) 100%); }
.fx__grain {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@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: fixed; left: 0; right: 0; z-index: 25; height: calc(var(--bump) * 9vh); background: #000; pointer-events: none; }
.bars i:first-child { top: 0; }
.bars i:last-child { bottom: 0; }

/* timeline scrubber */
.scrubber { display: none; }
html.cine .scrubber {
  display: flex; gap: 3px; position: fixed; left: var(--gutter); right: var(--gutter); bottom: 14px; z-index: 28;
  pointer-events: auto;
}
.scrub__seg {
  position: relative; flex-grow: var(--grow, 1); flex-basis: 0; height: 18px; padding: 0; border: 0; background: none; cursor: pointer;
}
.scrub__seg::before { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 2px; background: var(--line-2); transition: height .2s ease; }
.scrub__seg::after {
  content: ""; position: absolute; left: 0; bottom: 7px; height: 2px; width: calc(var(--fill, 0) * 100%); background: var(--red); transition: height .2s ease;
}
.scrub__seg:hover::before, .scrub__seg:hover::after { height: 4px; }
.scrub__seg span {
  position: absolute; left: 0; bottom: 16px; font-family: var(--mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-3); white-space: nowrap; opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.scrubber:hover .scrub__seg span, .scrub__seg.is-current span { opacity: 1; }
.scrub__seg.is-current span { color: var(--text); }
@media (max-width: 760px) { .scrub__seg span { display: none; } html.cine .scrubber { bottom: 8px; } }

/* ==========================================================================
   Frames — shared content styles (both modes)
   ========================================================================== */
main { position: relative; z-index: 1; }
.slate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 22px; font-family: var(--mono); font-stretch: 87.5%; font-size: 0.75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.slate b { color: var(--bg); background: var(--red); font-weight: 600; padding: 3px 7px 2px; border-radius: 3px; }
.slate span { color: var(--text-3); }
.f-center .slate { justify-content: center; }

.hero-title {
  font-weight: 820; font-stretch: 116%; letter-spacing: -0.045em; line-height: 0.95;
  font-size: clamp(2rem, min(8.4vw, 12.5vh), 7.5rem); text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.f-hero .lead { max-width: 34em; }
.hero-title .line { display: block; }
.ftitle-xl { font-weight: 780; font-stretch: 112%; letter-spacing: -0.04em; line-height: 1; font-size: clamp(2.3rem, min(6.4vw, 10vh), 5.5rem); text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.ftitle-l { font-weight: 770; font-stretch: 110%; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(2rem, min(4.8vw, 8vh), 4rem); text-wrap: balance; }
.ftitle-xl em, .ftitle-l em { font-weight: 380; font-stretch: 95%; color: var(--red); }
.ftitle { font-weight: 770; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1.02; font-size: clamp(2rem, min(4.6vw, 7.5vh), 3.75rem); margin-bottom: 14px; }
.bignum {
  display: block; font-family: var(--font); font-weight: 900; font-stretch: 125%; line-height: .8; letter-spacing: -0.05em;
  font-size: clamp(4rem, min(11vw, 17vh), 10rem); color: transparent; -webkit-text-stroke: 1.5px var(--red); margin-bottom: 10px;
}
.poster { font-weight: 900; font-stretch: 125%; letter-spacing: -0.055em; line-height: .85; font-size: clamp(3.4rem, min(10vw, 15vh), 9rem); margin-bottom: 14px; }
.lead { margin-top: 20px; font-size: clamp(1.0625rem, min(1.6vw, 2.6vh), 1.3125rem); line-height: 1.5; color: var(--text-2); max-width: 40em; }
.f-center .lead { margin-inline: auto; }
.lead strong { color: var(--text); font-weight: 650; }
.lead--big { font-size: clamp(1.125rem, min(2vw, 3vh), 1.5rem); color: var(--text); }
.when { color: var(--text-2); font-size: clamp(1rem, min(1.4vw, 2.3vh), 1.1875rem); margin-bottom: 18px; max-width: 34em; }
.hint { margin-top: 28px; color: var(--text-3); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.f-center .ctas, .ctas--center { justify-content: center; }

.ticks li { position: relative; padding: 9px 0 9px 30px; border-top: 1px solid var(--line); font-size: clamp(.9375rem, min(1.3vw, 2.2vh), 1.0625rem); }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 16px; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.6875rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.flink { display: inline-block; margin-top: 18px; color: var(--red); font-weight: 650; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.flink:hover { color: var(--text); }
.out { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--red); background: var(--red-soft); border-radius: 0 var(--r) var(--r) 0; max-width: 34em; }
.out .mono { display: block; color: var(--red); margin-bottom: 2px; }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .875rem; font-weight: 600; margin-bottom: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 10px var(--green); }
.dot--build { background: var(--red); box-shadow: 0 0 10px var(--red); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9375rem; max-width: 34em; }
.meta dt { color: var(--text-3); }

/* red-pen edit */
.strike { position: relative; color: var(--text-3); font-weight: 500; font-stretch: 100%; white-space: nowrap; }
.strike::after {
  content: ""; position: absolute; left: -0.04em; right: -0.04em; top: 54%; height: 0.08em; background: var(--red);
  transform-origin: left center; transform: scaleX(var(--s, 1)) rotate(-2deg); box-shadow: 0 0 18px rgba(255,90,44,.6);
}
.caret { display: inline-block; font-weight: 300; font-stretch: 100%; color: var(--red); margin-inline: 0.04em 0.08em; opacity: var(--f, 1); }
.fix { color: var(--red); white-space: nowrap; opacity: var(--f, 1); display: inline-block; transform: translateY(calc((1 - var(--f, 1)) * 0.2em)); }
.fix-line { opacity: var(--f2, 1); }
/* second correction ("more tools" → "a system that works") runs after the first */
.strike--2::after { transform: scaleX(var(--s2, 1)) rotate(-2deg); }
.caret--2 { opacity: var(--f2, 1); }
.fix--2 { opacity: var(--f2, 1); transform: translateY(calc((1 - var(--f2, 1)) * 0.2em)); }
.hero-after { opacity: var(--a, 1); transform: translateY(calc((1 - var(--a, 1)) * 24px)); }
.hero-after.is-off { pointer-events: none; }
.cue { display: none; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(28px, 6vh, 56px); border-top: 1px solid var(--line-2); text-align: left; }
.stat { padding: 22px 22px 6px 0; }
.stat + .stat { padding-left: 22px; border-left: 1px solid var(--line); }
.stat dt { font-weight: 830; font-stretch: 120%; letter-spacing: -0.04em; line-height: 1; font-size: clamp(2.4rem, min(5.6vw, 9vh), 4.75rem); font-variant-numeric: tabular-nums; }
.stat dt small { font-size: .32em; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--red); margin-left: .25em; }
.stat dd { margin-top: 8px; color: var(--text-2); font-size: .9375rem; line-height: 1.35; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* formats, kinds, route */
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: left; margin-top: 10px; }
.formats > div { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; background: rgba(23,21,18,.72); }
.formats dt { font-weight: 760; font-stretch: 110%; font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.formats dd { color: var(--text-2); font-size: .9375rem; }
@media (max-width: 900px) { .formats { grid-template-columns: 1fr 1fr; } }

.kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; text-align: left; margin-top: clamp(24px, 5vh, 44px); }
.kinds li { border-top: 2px solid var(--red); padding-top: 12px; }
.kinds .mono { color: var(--text-3); }
.kinds b { display: block; font-weight: 720; font-size: 1.0625rem; margin: 4px 0; line-height: 1.25; }
.kinds li > span:last-child { color: var(--text-2); font-size: .9375rem; }
@media (max-width: 900px) { .kinds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .kinds { grid-template-columns: 1fr; gap: 10px; } .kinds li > span:last-child { display: none; } }

.route { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-top: clamp(32px, 7vh, 64px); text-align: left; --fill: 1; }
.route::before, .route::after { content: ""; position: absolute; left: 20px; right: 20px; top: 20px; height: 2px; background: var(--line-2); }
.route::after { background: var(--red); right: auto; width: calc((100% - 40px) * var(--fill)); box-shadow: 0 0 14px rgba(255,90,44,.6); }
.route li { position: relative; z-index: 1; }
.route__n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line-2); margin-bottom: 16px; transition: background .3s ease, border-color .3s ease, color .3s ease; }
.route li.lit .route__n { background: var(--red); border-color: var(--red); color: #fff; }
.route b { display: block; font-weight: 740; font-stretch: 108%; font-size: 1.375rem; margin-bottom: 4px; }
.route li > span:last-child { color: var(--text-2); font-size: .9375rem; display: block; }
@media (max-width: 900px) {
  .route { grid-template-columns: 1fr; gap: 0; }
  .route::before, .route::after { left: 20px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .route::after { height: calc((100% - 40px) * var(--fill)); bottom: auto; }
  .route li { display: grid; grid-template-columns: 42px 1fr; gap: 0 16px; padding-bottom: 14px; }
  .route__n { grid-row: span 2; margin: 0; }
  .route b { font-size: 1.125rem; }
  .route li > span:last-child { font-size: .875rem; }
}

/* about */
.stamp {
  display: inline-block; margin: 0 0 22px 4px; transform: rotate(-4deg); border: 3px solid var(--red); color: var(--red);
  padding: 12px 18px 10px; font-family: var(--mono); font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; text-align: center;
}
.stamp b { display: block; font-family: var(--font); font-weight: 900; font-stretch: 125%; font-size: 2.25rem; line-height: .9; letter-spacing: -0.03em; border-block: 2px solid currentColor; padding: 6px 0 4px; margin: 6px 0; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.facts dt { color: var(--text-3); }

/* pager (inside a pinned scene) */
.pager { display: none; }

/* ==========================================================================
   PLAIN MODE (default): stacked, readable
   ========================================================================== */
html:not(.cine) .hud { background: rgba(12,11,9,.94); border-bottom: 1px solid var(--line); }
html:not(.cine) main { padding-top: 68px; }
html:not(.cine) .scene { border-bottom: 1px solid var(--line); }
html:not(.cine) .frame { max-width: var(--max); margin-inline: auto; padding: clamp(56px, 9vw, 96px) var(--gutter); }
html:not(.cine) .frame + .frame { border-top: 1px dashed var(--line); }
html:not(.cine) .f-center { text-align: center; }
html:not(.cine) .f-center .fbox { max-width: 980px; margin-inline: auto; }
html:not(.cine) .f-split .fbox { max-width: 720px; }
html:not(.cine) .hint { display: none; }

/* ==========================================================================
   CINE MODE: fixed stage, frames enter from depth and exit past the camera
   ========================================================================== */
html.cine { scrollbar-width: none; }
html.cine::-webkit-scrollbar { display: none; }
html.cine .scene { height: calc(var(--len, 3) * 100vh); height: calc(var(--len, 3) * 100lvh); }
html.cine .stage { position: fixed; inset: 0; pointer-events: none; }
html.cine .frame {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding: 92px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 64px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate3d(0, 6vh, 0) scale(.9); filter: blur(12px);
  transition: opacity .6s ease, transform 1s var(--ease), filter .7s ease, visibility 0s linear 1s;
}
html.cine .frame.is-past { transform: translate3d(0, -5vh, 0) scale(1.18); }
html.cine .frame.is-active {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none; filter: none;
  transition: opacity .8s ease .12s, transform 1.1s var(--ease) .05s, filter .8s ease .1s, visibility 0s;
}
html.cine .fbox { width: 100%; }
html.cine .f-center .fbox { max-width: 1040px; margin-inline: auto; text-align: center; }
html.cine .f-split .fbox { max-width: 600px; }
html.cine .frame.tight .fbox { zoom: .88; }
html.cine .frame.tighter .fbox { zoom: .76; }

/* staggered entrance of the frame's lines */
html.cine .fbox > * { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .5s ease, transform .8s var(--ease); }
html.cine .is-active .fbox > * { opacity: 1; transform: none; }
html.cine .is-active .fbox > :nth-child(2) { transition-delay: .08s; }
html.cine .is-active .fbox > :nth-child(3) { transition-delay: .16s; }
html.cine .is-active .fbox > :nth-child(4) { transition-delay: .24s; }
html.cine .is-active .fbox > :nth-child(5) { transition-delay: .32s; }
html.cine .is-active .fbox > :nth-child(6) { transition-delay: .4s; }
html.cine .is-active .fbox > :nth-child(7) { transition-delay: .48s; }
html.cine .is-active .fbox > :nth-child(8) { transition-delay: .56s; }

/* hero is scrubbed by scroll, so its lines don't stagger */
html.cine .f-hero { --s: 0; --f: 0; --s2: 0; --f2: 0; --a: 0; --c: 1; }
html.cine .f-hero .fbox { max-width: 1180px; }
html.cine .f-hero .fbox > * { opacity: 1; transform: none; transition: none; }
html.cine .f-hero .hero-after { opacity: var(--a); }
html.cine .cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  color: var(--text-2); opacity: var(--c);
}
html.cine .f-hero .fbox > .cue { transform: translateX(-50%); opacity: var(--c); }
.cue i { width: 1.5px; height: 44px; background: linear-gradient(var(--red), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* stats reveal one by one */
html.cine .stat { opacity: .12; transform: translateY(14px); transition: opacity .5s ease, transform .7s var(--ease); }
html.cine .stat.on { opacity: 1; transform: none; }

/* pager */
html.cine .pager {
  display: flex; gap: 18px; position: absolute; z-index: 2;
  right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: 92px;
  font-family: var(--mono); font-stretch: 87.5%; font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em;
  opacity: 0; transition: opacity .4s ease;
}
html.cine .pager.is-on { opacity: 1; }
.pager li { display: flex; flex-direction: column-reverse; gap: 8px; width: 92px; color: var(--text-3); transition: color .3s ease; }
.pager li::after { content: ""; width: 100%; height: 2px; background: var(--line-2); transition: background .4s ease; }
.pager li.is-on { color: var(--text); }
.pager li.is-on::after { background: var(--red); box-shadow: 0 0 10px rgba(255,90,44,.6); }

/* small screens */
@media (max-width: 760px) {
  html.cine .frame { padding: 78px 18px 52px; filter: none; transform: translate3d(0, 5vh, 0) scale(.96); }
  html.cine .frame.is-past { transform: translate3d(0, -4vh, 0) scale(1.06); }
  /* soft shade behind the words so the particles never compete with the text */
  html.cine .frame::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(130% 75% at 35% 50%, rgba(12,11,9,.86) 0%, rgba(12,11,9,.6) 55%, rgba(12,11,9,.15) 100%);
  }
  html.cine .frame { isolation: isolate; }
  html.cine .f-split .fbox, html.cine .f-center .fbox { max-width: none; }
  html.cine .pager { top: auto; bottom: 30px; right: 18px; left: 18px; gap: 8px; }
  .pager li { flex: 1; width: auto; gap: 4px; font-size: .5625rem; }
  .bignum { font-size: clamp(3rem, 12vh, 6rem); }
}

/* ==========================================================================
   Contact + credits (normal scroll, rises over the stage)
   ========================================================================== */
.contact-scene { position: relative; z-index: 3; }
html.cine .contact-scene { padding-top: 55vh; background: linear-gradient(to bottom, transparent 0, rgba(12,11,9,.75) 40vh, var(--bg) 75vh); }
html:not(.cine) .contact-scene { padding-top: clamp(56px, 9vw, 96px); }
.contact-head { text-align: center; max-width: 860px; margin: 0 auto clamp(36px, 6vw, 64px); }
.contact-head .slate { justify-content: center; }
.contact-head .lead { margin-inline: auto; }
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 34px); }
.panel h3 { font-weight: 740; font-stretch: 108%; font-size: 1.5rem; letter-spacing: -0.015em; }
.panel__sub { color: var(--text-2); margin: 4px 0 22px; font-size: .9375rem; }
.field { margin-bottom: 20px; }
.field > label, .field legend { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 8px; }
.field small { font-weight: 400; color: var(--text-3); }
fieldset.field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9375rem; cursor: pointer; user-select: none; transition: background .15s ease, border-color .15s ease; }
.chip span:hover { border-color: var(--text); }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font-size: 1rem; appearance: none; -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; cursor: pointer;
}
.select option { background: var(--panel); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.send { display: flex; flex-wrap: wrap; gap: 12px; }
.send .btn { flex: 1 1 200px; }
.form-err { color: var(--red); font-size: .9375rem; margin-top: 12px; }
.form-err:empty { display: none; }
.form-note { color: var(--text-3); font-size: .8125rem; margin-top: 14px; }
.channel { padding: 16px 0; border-top: 1px solid var(--line); }
.channel__label { font-weight: 600; font-size: .9375rem; }
.channel__val { display: block; margin: 4px 0 12px; font-weight: 700; font-size: 1.375rem; font-variant-numeric: tabular-nums; word-break: break-all; min-height: 1.6em; }
.channel__val[data-hidden] { color: var(--text-3); font-weight: 400; letter-spacing: .15em; font-size: 1rem; }
.channel__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.socials a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .875rem; text-decoration: none; }
.socials a:hover { border-color: var(--red); color: var(--red); }
.noscript-note { margin-top: 12px; color: var(--text-2); }

.credits { text-align: center; padding-block: clamp(80px, 14vw, 160px) 40px; }
.credits__label { color: var(--red); margin-bottom: 32px; }
.credits__list { display: grid; gap: 26px; }
.credits__list dt { font-family: var(--mono); font-stretch: 87.5%; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 4px; }
.credits__list dd { font-weight: 720; font-stretch: 110%; font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; }
.credits__end { margin: 56px auto 0; max-width: 30em; color: var(--text-2); font-style: italic; }
.credits__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; text-align: left;
  margin-top: clamp(64px, 10vw, 120px); padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3);
}
.credits__tag { color: var(--text-2); margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); opacity: 0; z-index: 99;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .875rem;
  pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 404 */
.notfound { min-height: 100vh; display: grid; align-content: center; padding: 100px var(--gutter); max-width: var(--max); margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .hud, .fx, .bars, .scrubber, .chapters, #brief { display: none !important; }
}
