/* zeigarn.com — the night system ("03:00").
 * One pixel-art night finished like a CRT; the page is its HUD.
 * Brand book (brand/ZEIGARNBRAND.md): Barlow for the cinematic layer,
 * Silkscreen only at 8 / 16 / 24 px with whole-pixel tracking, red only in the
 * lenses and the 99 % mark, no radii, no soft shadows, no gradients but light.
 */

@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/SilkscreenZG-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --night-0: #06080f;
  --night-1: #0e1424;
  --night-2: #19233f;
  --moon: #c3cde5;
  --text: rgba(230, 235, 245, 0.85);
  --text-soft: rgba(230, 235, 245, 0.72);
  --text-dim: rgba(230, 235, 245, 0.62);
  --hair: rgba(230, 235, 245, 0.35);
  --lamp: #ffcf7a;
  --window: #d9a35a;
  --silver-hi: #f4f6fa;
  --lens-2: #a9433a;
  --f-cine: "Barlow", sans-serif;
  --f-pixel: "Silkscreen", monospace;
  --edge-x: 40px; /* HUD insets */
  --edge-y: 28px;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html { background: var(--night-0); color-scheme: dark; scrollbar-color: var(--night-2) var(--night-0); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--night-0);
  color: var(--text);
  font-family: var(--f-cine);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
::selection { background: var(--lens-2); color: var(--silver-hi); }
a { color: inherit; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; }

/* Silkscreen, the in-world layer: native sizes only. */
.px { font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-transform: uppercase; font-weight: 400; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 120;
  padding: 12px 14px;
  background: var(--moon); color: var(--night-0);
  font-family: var(--f-pixel); font-size: 16px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------- the HUD */

.hud-top {
  position: fixed; top: var(--edge-y); left: var(--edge-x); right: var(--edge-x); z-index: 80;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  pointer-events: none;
}
.hud-top a, .hud-top button { pointer-events: auto; }

.wordmark {
  justify-self: start;
  color: var(--text);
  font-family: var(--f-cine); font-weight: 300; font-size: 15px; line-height: 1;
  letter-spacing: 0.6em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}

.clock {
  margin: 0;
  color: var(--text-dim);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
html.hud-on .clock__colon { animation: blink 1s steps(1) infinite; }

.hud-top__end { justify-self: end; display: flex; align-items: center; gap: 22px; }

.links ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.links a {
  display: block; white-space: nowrap;
  color: var(--text-dim);
  font-family: var(--f-cine); font-weight: 400; font-size: 13px; line-height: 1;
  letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  transition: color 0.15s ease;
}
.links a:hover, .links a:focus-visible { color: var(--silver-hi); }
.links a:hover .m__in, .links a:focus-visible .m__in { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* A word in a mask: the only way type enters. */
.m, .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.m__in, .w__in { display: inline-block; will-change: transform; }

.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 8px;
  border: 1px solid var(--hair);
  color: var(--text-dim);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-decoration: none;
}
.chip:hover, .chip:focus-visible { color: var(--silver-hi); border-color: rgba(230, 235, 245, 0.9); }
button.chip { background: none; cursor: pointer; }
.lang { position: relative; }
.lang__list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 90; min-width: 200px; margin: 0; padding: 6px 0; list-style: none; background: var(--night-1); border: 1px solid rgba(230, 235, 245, 0.16); transform-origin: 50% 0; }
.lang__list a { display: flex; align-items: center; gap: 14px; padding: 10px 16px; color: var(--text-dim); text-decoration: none; font-family: var(--f-pixel); font-size: 16px; letter-spacing: 2px; }
.lang__list a .lang__name { font-family: var(--f-cine); font-size: 14px; letter-spacing: 0.04em; color: var(--text); }
.lang__list a:hover, .lang__list a:focus-visible { background: var(--lamp); color: var(--night-0); }
.lang__list a:hover .lang__name, .lang__list a:focus-visible .lang__name { color: var(--night-0); }
.lang__list a[aria-current] { color: var(--silver-hi); }
.menu-panel__langs { display: flex; flex-wrap: wrap; gap: 14px; margin: 40px 0 0; padding: 0; list-style: none; }
.menu-panel__langs a { color: var(--text-dim); text-decoration: none; }
.menu-panel__langs a[aria-current] { color: var(--silver-hi); }
.btn .narrow { display: none; }

/* Sound: off until asked. A pixel speaker: an X when off, two waves when on. */
.sound {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-dim);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
}
.sound:hover, .sound:focus-visible { color: var(--silver-hi); }
.sound__icon { display: block; flex: none; fill: currentColor; shape-rendering: crispEdges; }
.sound__w1, .sound__w2, .sound.is-on .sound__x { display: none; }
.sound.is-on .sound__w1, .sound.is-on .sound__w2 { display: inline; }
.sound.is-on .sound__w2 { animation: sound-wave 1.2s steps(1) infinite; }
@keyframes sound-wave { 0% { visibility: visible; } 66% { visibility: hidden; } }
.sound--menu { margin-top: 40px; align-self: flex-start; }
/* The top HUD keeps the clock centred: where a language runs long, the sound
 * label goes first, then the links move into the menu, then the language chip,
 * then Subscribe (the menu has them all; night.js fitHud). */
html.hud-tight .hud-top .sound__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.hud-compact .hud-top .links { display: none; }
html.hud-compact .hud-top .menu-btn { display: inline-block; }
html.hud-narrow .hud-top .lang, html.hud-min .hud-top .btn--small { display: none; }

.menu-btn {
  display: none;
  min-height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-dim);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-transform: uppercase;
}
.menu-btn:hover, .menu-btn:focus-visible { color: var(--silver-hi); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border: 0;
  font-family: var(--f-pixel); font-size: 16px; font-weight: 400; line-height: 1;
  letter-spacing: 2px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { color: var(--night-0); background: rgba(230, 235, 245, 0.92); box-shadow: 4px 4px 0 var(--night-2); }
.btn--primary:hover { background: var(--lamp); box-shadow: 2px 2px 0 var(--night-2); transform: translate(2px, 2px); }
.btn--primary:active { box-shadow: 0 0 0 var(--night-2); transform: translate(4px, 4px); }
.btn--secondary { color: var(--text); background: rgba(6, 8, 15, 0.35); border: 1px solid var(--hair); }
.btn--secondary:hover { border-color: rgba(230, 235, 245, 0.9); color: var(--silver-hi); }
.btn--secondary:active { transform: translate(2px, 2px); }
.btn--small { height: 32px; padding: 0 12px; box-shadow: 3px 3px 0 var(--night-2); }
.btn--small:hover { box-shadow: 1px 1px 0 var(--night-2); }

/* ---------------------------------------------------------------- hero */

.hero {
  --ledge: 60vh;
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

/* The stage: one CRT behind the whole page. */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--night-0); }
.stage__canvas { display: block; width: 100%; height: 100%; }
.stage__poster { position: absolute; inset: 0; }
.stage__poster img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
main { position: relative; z-index: 2; }

/* The keyword block, on the dark wall under the parapet (placed by hero.js). */
.hero__copy {
  --fit: 1;
  position: absolute; z-index: 5;
  left: 7vw; bottom: max(84px, 9vh);
  max-width: min(62vw, 980px);
}
.hero__title { margin: 0; font-weight: 400; color: rgba(255, 255, 255, 0.88); text-shadow: 0 0 18px rgba(0, 0, 0, 0.6); text-transform: uppercase; }
.hero__l1 { display: block; font-weight: 300; font-size: calc(clamp(16px, 2.3vw, 44px) * var(--fit)); line-height: 1.39; letter-spacing: 0.34em; }
.hero__l2 { display: block; font-weight: 400; font-size: calc(clamp(40px, 5.2vw, 100px) * var(--fit)); line-height: 1.25; letter-spacing: 0.16em; }
.hero__l1 .w, .hero__l2 .w { margin-right: 0.08em; }

.hero__lead-mask { overflow: hidden; margin-top: 14px; padding-bottom: 2px; }
.hero__lead {
  margin: 0; max-width: min(34em, 52vw);
  color: var(--text-soft);
  font-size: 17px; line-height: 1.6;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.55);
  text-wrap: pretty;
}
.hero__lead-line { padding-bottom: 1px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero__cta .btn { transform-origin: 50% 50%; }

.scroll-cue {
  position: absolute; right: var(--edge-x); bottom: var(--edge-y); z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 0;
  color: var(--text-dim);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-transform: uppercase;
  pointer-events: none;
}
.scroll-cue__caret { width: 4px; height: 8px; margin-right: 2px; background: var(--text-soft); animation: blink 1s steps(1) infinite; }
.scroll-cue.is-gone { visibility: hidden; }

@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ the 99 % bar */

.loadbar {
  position: fixed; left: var(--edge-x); bottom: var(--edge-y); z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  max-width: calc(100vw - 2 * var(--edge-x));
  color: var(--text);
  font-family: var(--f-pixel); font-size: 16px; line-height: 1; letter-spacing: 2px; text-transform: uppercase;
  pointer-events: none;
}
.loadbar__label { white-space: nowrap; min-height: 16px; }
.loadbar__cells { display: inline-flex; gap: 2px; }
.loadbar__cell { width: 6px; height: 12px; background: rgba(230, 235, 245, 0.14); }
.loadbar__cell.is-on { background: rgba(230, 235, 245, 0.85); }
.loadbar__num { min-width: 4ch; }
.loadbar.is-full .loadbar__num { display: none; }
.loadbar.is-full .loadbar__cell:last-child { background: var(--lens-2); animation: blink 0.8333s steps(1) infinite; }

/* ---------------------------------------------------------- placeholders */

.room {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--night-1);
}
.room p { margin: 0; color: var(--text-dim); font-family: var(--f-pixel); font-size: 16px; letter-spacing: 2px; text-transform: uppercase; }
.night-footer { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; height: 40vh; padding: 24px; background: var(--night-0); }
.night-footer__mark { color: rgba(230, 235, 245, 0.22); font-weight: 300; font-size: 11px; letter-spacing: 0.6em; text-transform: uppercase; }

/* --------------------------------------------------------------- menu */

.menu-panel {
  position: fixed; inset: 0; z-index: 95;
  display: flex; flex-direction: column;
  padding: 18px 16px 28px;
  background: var(--night-1);
  visibility: hidden;
  transform-origin: 50% 50%;
}
.menu-panel.is-open { visibility: visible; }
.menu-panel__top { display: flex; align-items: center; justify-content: space-between; }
.menu-btn--close { display: inline-block; }
.menu-panel__nav { display: flex; flex-direction: column; gap: 22px; margin-top: 72px; }
.menu-panel__nav a {
  color: var(--text);
  font-family: var(--f-cine); font-weight: 300; font-size: 28px; line-height: 1.2;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
}
.menu-panel__nav a:hover, .menu-panel__nav a:focus-visible { color: var(--silver-hi); }
.menu-panel__foot { margin: auto 0 0; color: rgba(230, 235, 245, 0.42); font-family: var(--f-pixel); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }

/* ------------------------------------------------------------ sections */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px-s { font-family: var(--f-pixel); font-size: 8px; line-height: 2; letter-spacing: 1px; text-transform: uppercase; }

.sec { position: relative; min-height: 100vh; padding: 20vh 7vw 16vh; }
.sec__head { max-width: 46rem; }
.sec__stamp { margin: 0 0 22px; color: var(--text-dim); }
.kw { margin: 0; font-weight: 400; color: rgba(255, 255, 255, 0.88); text-shadow: 0 0 18px rgba(0, 0, 0, 0.6); text-transform: uppercase; }
.kw__l1 { display: block; font-weight: 300; font-size: clamp(14px, 1.8vw, 34px); line-height: 1.39; letter-spacing: 0.34em; }
.kw__l2 { display: block; font-weight: 400; font-size: clamp(34px, 4.4vw, 84px); line-height: 1.25; letter-spacing: 0.16em; }
.kw .w { margin-right: 0.08em; }
.sec__lead { margin: 18px 0 0; max-width: 34em; color: var(--text-soft); font-size: 17px; line-height: 1.6; text-shadow: 0 0 14px rgba(0, 0, 0, 0.6); text-wrap: pretty; }
.sec__lead a, .idea__care a, .foot a, .programs__help a { color: var(--text); text-underline-offset: 3px; }
.panel, .film, .series__item a, .poll, .idea, .formats li, .tile, .programs, .foot { background: rgba(6, 8, 15, 0.72); border: 1px solid rgba(230, 235, 245, 0.12); }
[data-panel] { transform-origin: 50% 50%; }

/* 01 · the name: three beats on one pinned screen */
.sec--name { height: 100vh; height: 100svh; min-height: 0; padding: 0; }
.beats { position: absolute; left: 7vw; bottom: 11vh; width: min(620px, 46vw); height: 60vh; }
.beat { position: absolute; left: 0; right: 0; bottom: 0; }
.beat__body p { margin: 16px 0 0; max-width: 34em; color: var(--text-soft); font-size: 17px; line-height: 1.6; text-shadow: 0 0 14px rgba(0, 0, 0, 0.7); }
.sources { display: flex; flex-direction: column; gap: 2px; margin: 18px 0 0; color: rgba(230, 235, 245, 0.55); }
.sources a { color: inherit; }

/* 02 · films */
.film { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; margin-top: 7vh; padding: 22px; max-width: 1320px; }
.film__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 10px; box-shadow: 0 0 0 6px #090b11, 0 0 0 7px rgba(230, 235, 245, 0.12); }
.film__screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.65); }
.film__screen.is-playing::after { display: none; }
.film__thumb, .film__frame { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.film__play { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 18px; border: 0; cursor: pointer; color: var(--night-0); background: rgba(230, 235, 245, 0.92); box-shadow: 4px 4px 0 var(--night-2); }
.film__play::before { content: ""; width: 12px; height: 14px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.film__play:hover { background: var(--lamp); }
.film__info { min-width: 0; }
.film__meta { margin: 4px 0 14px; color: var(--text-dim); }
.film__title { margin: 0; font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.3; color: var(--silver-hi); }
.film__facts { margin: 22px 0 0; display: grid; gap: 16px; }
.film__facts dt { color: var(--text-dim); margin-bottom: 8px; }
.film__facts dd { margin: 0; font-weight: 300; font-size: 19px; line-height: 1.45; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag { padding: 7px 8px; border: 1px solid var(--hair); color: var(--text-soft); }
.chapters { columns: 2; column-gap: 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.chapters li { break-inside: avoid; margin-bottom: 8px; }
.chapters a { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: baseline; color: var(--text-soft); text-decoration: none; font-size: 14px; line-height: 1.35; }
.chapters a .px { color: var(--text-dim); }
.chapters a:hover, .chapters a:focus-visible { color: var(--silver-hi); }
.film__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.drawer { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--hair); background: rgba(6, 8, 15, 0.6); max-height: 280px; overflow: auto; }
.drawer__list { margin: 0; padding-left: 22px; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.drawer__list li { margin-bottom: 8px; }
.drawer__list a { color: var(--text); }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; max-width: 1320px; }
.channel a, .channel > div { display: grid; gap: 8px; color: var(--text-soft); text-decoration: none; }
.channel img, .channel .noise { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid rgba(230, 235, 245, 0.12); image-rendering: pixelated; background: #000; }
.channel__ch { color: var(--text-dim); }
.channel__title { font-size: 14px; line-height: 1.35; }
.channel a:hover .channel__title { color: var(--silver-hi); }

/* 03 · series */
.series { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 8vh 0 0; padding: 0; list-style: none; max-width: 1320px; }
.series__item a { display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 24px; color: var(--text); text-decoration: none; transition: border-color 0.15s ease; }
.series__item a:hover, .series__item a:focus-visible { border-color: rgba(255, 207, 122, 0.6); }
.series__n { color: var(--text-dim); }
.series__title { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.3; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-hi); }
.series__about { font-size: 15px; line-height: 1.55; color: var(--text-soft); }

/* 04 · the vocabulary: a pinned screen, the gallery travels right */
.sec--vocab { height: 100vh; height: 100svh; min-height: 0; padding: 14vh 7vw 0; overflow: hidden; }
.vocab { position: absolute; left: 0; right: 0; bottom: 10vh; padding-left: 7vw; overflow: hidden; }
.vocab__track { display: flex; gap: 16px; margin: 0; padding: 0 7vw 0 0; list-style: none; width: max-content; will-change: transform; }
.tile { display: grid; gap: 10px; width: 280px; padding: 12px 12px 16px; outline-offset: 3px; }
/* Without the gallery (reduced motion, no script) the vocabulary is a plain list in the flow. */
.sec--vocab:not(:has(.tile__screen)) { height: auto; min-height: 100vh; padding-bottom: 16vh; overflow: visible; }
.vocab:not(:has(.tile__screen)) { position: relative; bottom: auto; margin-top: 36px; padding: 0; overflow: visible; }
.vocab__track:not(:has(.tile__screen)) { flex-wrap: wrap; width: auto; padding: 0; gap: 12px; }
.vocab__track:not(:has(.tile__screen)) .tile { width: 220px; }
@media (max-width: 759px) { .vocab__track:not(:has(.tile__screen)) .tile { width: calc(50% - 6px); } }
.tile__screen { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; background: #05070c; overflow: hidden; }
.tile__code { position: absolute; left: 10px; top: 10px; z-index: 2; color: var(--text-dim); }
.tile__screen img, .tile__screen video, .series__screen img, .series__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__screen video, .series__screen video { visibility: hidden; }
.tile__screen.is-on video, .series__screen.is-on video { visibility: visible; }
.tile__screen::after, .series__screen::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.7); }
.tile__screen img, .series__screen img { filter: saturate(0.7) brightness(0.75); transition: filter 0.2s steps(3); }
.tile__screen.is-on img { filter: none; }
.series__screen { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #05070c; }
.tile__name { font-size: 16px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver-hi); }
.tile__means { color: var(--text-soft); font-family: var(--f-cine); font-size: 14px; letter-spacing: 0; text-transform: none; }
.tile:hover, .tile:focus-visible { border-color: rgba(255, 207, 122, 0.6); }
/* below the plaza's 99 STUDIES board, which sinks to about a quarter of the screen as the camera pulls out */
.shorts { position: absolute; right: 7vw; top: 28vh; }
/* narrower screens frame the plaza closer: the board sinks lower */
@media (max-aspect-ratio: 3 / 2) { .shorts { top: 38vh; } }
.shorts__list { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }
.short a { display: grid; gap: 6px; width: 120px; color: var(--text-soft); text-decoration: none; font-size: 13px; }
.short img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; }
/* laptop heights: the newest Short beside its title, clear of the vocabulary track */
@media (max-height: 940px) {
  .short:nth-child(n + 2) { display: none; }
  .short a { grid-template-columns: 54px 150px; column-gap: 12px; align-content: start; width: auto; }
  .short img { grid-row: span 2; }
}

/* 05 · next loop */
.loop { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 6vh; max-width: 620px; }
.sec--loop .sec__head { max-width: 34rem; }
.poll, .idea { margin: 0; padding: 22px; }
.poll__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.poll__btn { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 12px 14px; text-align: left; cursor: pointer; border: 1px solid var(--hair); background: rgba(6, 8, 15, 0.5); color: var(--text); font-family: var(--f-cine); font-size: 16px; line-height: 1.35; transition: border-color 0.15s ease, transform 0.15s cubic-bezier(0.34, 1.6, 0.64, 1); }
.poll__btn:not(:disabled):hover { border-color: var(--lamp); }
.poll__btn:not(:disabled):active, .poll__btn.is-pressed { transform: scale(0.98); }
.poll__btn:disabled { cursor: default; }
.poll__item.is-mine .poll__btn { border-color: rgba(255, 207, 122, 0.7); }
.poll__pct { min-width: 4ch; text-align: right; color: var(--text-dim); }
.pbar { display: inline-flex; gap: 2px; }
.pbar__cell { width: 5px; height: 12px; background: rgba(230, 235, 245, 0.12); }
.pbar__cell.is-on { background: rgba(230, 235, 245, 0.8); }
.poll__item.is-lead .pbar__cell.is-on:last-of-type { background: var(--lens-2); }
.poll__note { margin: 16px 0 0; color: var(--text-dim); }
.idea__label { display: block; margin-bottom: 14px; color: var(--text-dim); }
.idea__field { display: flex; gap: 10px; }
.idea__input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--hair); background: rgba(6, 8, 15, 0.6); color: var(--silver-hi); font: 400 17px var(--f-cine); }
.idea__input::placeholder { color: rgba(230, 235, 245, 0.4); }
.idea__input:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
.idea__trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.idea__count, .idea__status { margin: 10px 0 0; color: var(--text-dim); }
.idea__care { margin: 16px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.55; }
.bubbles { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.bubble {
  position: fixed; max-width: 280px; padding: 10px 14px;
  background: var(--moon); color: var(--night-0);
  font-family: var(--f-cine); font-size: 14px; line-height: 1.35;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}

/* 07 · about */
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.sec--about { display: flex; align-items: flex-end; }
.sec--about .sec__head { padding: 26px 28px; max-width: 34rem; background: rgba(6, 8, 15, 0.72); border: 1px solid rgba(230, 235, 245, 0.12); }
.sec--vocab .sec__head { max-width: 27rem; }
.sec--radio .sec__head, .sec--radio .programs { max-width: 560px; }

/* 08 · work */
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 7vh 0 0; padding: 0; list-style: none; max-width: 1240px; border: 0; background: none; }
.formats li { padding: 24px; }
.formats li + li { border-left: 0; }
.formats h3 { margin: 0 0 10px; font-weight: 400; font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver-hi); }
.formats p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-soft); }
.work__fit { margin: 22px 0 0; color: var(--text-soft); font-size: 15px; }
.work__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 26px 0 0; }
.work__mail { color: var(--text-dim); text-decoration: none; }
.work__mail:hover { color: var(--silver-hi); }

/* 09 · night program: the radio's station list */
.programs { margin: 7vh 0 0; padding: 8px 0; list-style: none; max-width: 640px; }
.programs a { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 20px; color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(230, 235, 245, 0.08); transition: color 0.12s ease, background-color 0.12s ease; }
.programs li:last-child a { border-bottom: 0; }
.programs a .px { color: var(--text-dim); }
.programs a:hover, .programs a:focus-visible { color: var(--night-0); background: var(--lamp); }
.programs a:hover .px, .programs a:focus-visible .px { color: var(--night-0); }
.programs__name { font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase; }
.programs__help { margin: 16px 0 0; color: var(--text-dim); font-size: 14px; }

/* 10 · dawn and the footer */
.sec--dawn { min-height: 120vh; display: flex; align-items: flex-end; }
/* a flex item would size to its buttons' row: let it shrink */
.sec--dawn .sec__head { min-width: 0; }
.foot { position: relative; z-index: 2; margin: 0 7vw 9vh; padding: 28px; display: grid; gap: 18px; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot__links, .foot__langs { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.foot__links a { color: var(--text-dim); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; }
.foot__links a:hover { color: var(--silver-hi); }
.foot__langs a { color: var(--text-dim); text-decoration: none; }
.foot__langs a[aria-current] { color: var(--silver-hi); }
.foot__care, .foot__small { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.55; }
.foot__small { color: var(--text-dim); font-size: 13px; }

/* documents: privacy, 404 */
body.doc { background: var(--night-0); }
.doc__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: var(--edge-y) var(--edge-x); }
.doc__back { color: var(--text-dim); text-decoration: none; }
.doc__back:hover, .doc__back:focus-visible { color: var(--silver-hi); }
.doc__main { max-width: 760px; margin: 0 auto; padding: 12vh 24px 8vh; }
.doc__main .kw { margin-bottom: 6vh; }
.doc__main section { margin: 0 0 40px; }
.doc__main h2 { margin: 0 0 12px; font-weight: 400; font-size: 16px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-hi); }
.doc__main p { margin: 0; color: var(--text-soft); font-size: 17px; line-height: 1.7; }
.doc__main a:not(.btn), .lost a:not(.btn) { color: var(--text); text-underline-offset: 3px; }
.doc__main code { font-family: var(--f-pixel); font-size: 16px; letter-spacing: 1px; color: var(--text); }
.doc__foot { max-width: 760px; margin: 0 auto; padding: 0 24px 8vh; }
.lost { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.lost__bar { display: flex; width: min(420px, 100%); height: 14px; margin: 28px 0 6px; padding: 2px; border: 1px solid var(--hair); }
.lost__bar span { width: 99%; background: repeating-linear-gradient(to right, rgba(230, 235, 245, 0.85) 0 6px, transparent 6px 8px); position: relative; }
.lost__bar span::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 6px; background: var(--lens-2); animation: blink 0.8333s steps(1) infinite; }
.lost .foot__small { margin-top: 28px; }

/* the HUD's section index */
.index { position: fixed; right: var(--edge-x); bottom: var(--edge-y); z-index: 70; margin: 0; color: var(--text-dim); pointer-events: none; }
html[data-scene="roof"] .index { visibility: hidden; }

/* -------------------------------------------------------- intro pre-states */
/* Only with JS and motion: without either, everything is simply there. */

html.js:not(.is-ready) .wordmark .wl,
html.js:not(.is-ready) [data-power],
html.js:not(.is-ready) [data-power-cta],
html.js:not(.is-ready) .hero__lead,
html.js:not(.is-ready) .scroll-cue { visibility: hidden; }
html.js:not(.is-ready) .w__in,
html.js:not(.is-ready) .m__in { transform: translateY(105%); }
html.js:not(.hud-on) .clock__colon,
html.js:not(.hud-on) .loadbar__cells { visibility: hidden; }

/* ?still=1: the canvas alone, for tools/poster.mjs */
html.is-still, html.is-still body { overflow: hidden; }
html.is-still .hud-top, html.is-still .hero__copy, html.is-still .scroll-cue, html.is-still .loadbar,
html.is-still .menu-panel, html.is-still .sec, html.is-still .foot, html.is-still .index, html.is-still .skip { display: none !important; }

/* ------------------------------------------------------------ breakpoints */

@media (max-width: 1179px) {
  .links { display: none; }
  .lang__list { right: -60px; }
  .menu-btn { display: inline-block; }
}

/* Tall screens (phones, portrait tablets): the Shorts reframe — the scene
 * fills the lower part, the headline sits in the continued sky above the hero,
 * the buttons on the wall below him. */
@media (max-aspect-ratio: 6/5) {
  .hero__copy {
    left: 24px; right: 24px; top: 108px; bottom: 76px;
    max-width: none;
    display: flex; flex-direction: column;
  }
  .hero__l1 { font-size: clamp(13px, 3.4vw, 26px); letter-spacing: 0.26em; }
  .hero__l2 { font-size: clamp(34px, 9.6vw, 76px); letter-spacing: 0.14em; }
  .hero__lead { max-width: 30em; font-size: clamp(15px, 2.2vw, 18px); line-height: 1.55; }
  .hero__cta { margin-top: auto; }
  .scroll-cue { display: none; }
}

@media (max-width: 759px) {
  :root { --edge-x: 16px; --edge-y: 18px; }
  .hud-top { gap: 12px; }
  .wordmark { font-size: 14px; letter-spacing: 0.5em; }
  .hud-top .lang, .hud-top .btn--small { display: none; }
  .hud-top .sound__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero__copy { left: 20px; right: 20px; top: 92px; bottom: 64px; }
  .hero__cta { gap: 10px; }
  .hero__cta .btn { min-height: 44px; padding: 12px 14px; }
  /* a long label (some languages) wraps inside its button instead of leaving the screen */
  .btn { max-width: 100%; height: auto; min-height: 48px; padding-top: 14px; padding-bottom: 14px; line-height: 20px; white-space: normal; text-align: center; }
  .btn .wide { display: none; }
  .btn .narrow { display: inline; }
  .loadbar { bottom: 16px; gap: 10px; row-gap: 8px; }
}

@media (max-width: 359px) {
  .wordmark { font-size: 13px; letter-spacing: 0.42em; }
  .hud-top .sound { display: none; }
  .hero__cta .btn--secondary { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .clock__colon, .scroll-cue__caret, .loadbar.is-full .loadbar__cell:last-child { animation: none !important; }
  .sound.is-on .sound__w2 { animation: none; }
  .btn, .links a, .chip { transition: none; }
}


/* --------------------------------------------------- sections: narrow */

@media (max-width: 1100px) {
  .film { grid-template-columns: 1fr; }
  .loop { grid-template-columns: 1fr; }
  .series, .formats { grid-template-columns: 1fr; }
  .formats li + li { border-left: 1px solid rgba(230, 235, 245, 0.12); border-top: 0; }
}

@media (max-aspect-ratio: 6/5) {
  .beats { left: 24px; right: 24px; top: 96px; bottom: auto; width: auto; height: auto; }
  .beat { top: 0; bottom: auto; }
  .sec--vocab { padding-top: 96px; }
  .vocab { bottom: 9vh; padding-left: 20px; }
  .shorts { display: none; }
  .sec--about { align-items: flex-start; }
  .sec--about .sec__head { padding: 0; background: none; border: 0; }
  .socials { gap: 8px; }
  .socials .btn { height: 36px; padding: 0 10px; }
}

@media (max-width: 759px) {
  .sec { padding: 96px 20px 12vh; }
  .kw__l1 { font-size: 13px; letter-spacing: 0.26em; }
  .kw__l2 { font-size: clamp(30px, 9vw, 44px); letter-spacing: 0.12em; }
  .sec__lead, .beat__body p { font-size: 15px; }
  .film { padding: 14px; gap: 18px; }
  .chapters { columns: 1; }
  .tile { width: 210px; }
  .idea__field { flex-direction: column; }
  .foot { margin: 0 16px 8vh; padding: 20px; }
  .index { display: none; }
}

.film__title a { color: inherit; text-decoration: none; }
.film__title a:hover, .film__title a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* -------------------------------------------------------------- film pages */

.filmpage { max-width: 860px; }
.filmpage .kw { margin-bottom: 22px; }
.filmpage__q { font-size: clamp(30px, 4vw, 56px); line-height: 1.2; letter-spacing: 0.08em; }
.doc__main .filmpage__answer { margin: 0 0 40px; color: var(--text) !important; font-size: clamp(18px, 1.6vw, 21px) !important; line-height: 1.65 !important; }
.filmpage__player { margin: 0 0 48px; }
.filmpage__caption { margin-top: 14px; color: var(--text-dim); font-size: 14px; }
.filmpage__points { counter-reset: pt; margin: 0; padding: 0; list-style: none; display: grid; gap: 26px; }
.filmpage__points li { counter-increment: pt; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; }
.filmpage__points li::before { content: counter(pt, decimal-leading-zero); grid-row: span 2; color: var(--text-dim); font-family: var(--f-pixel); font-size: 16px; letter-spacing: 2px; padding-top: 3px; }
.filmpage__points h3 { margin: 0 0 6px; font-weight: 400; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-hi); }
.filmpage .ref { margin-left: 2px; font-family: var(--f-pixel); font-size: 8px; letter-spacing: 1px; color: var(--text-dim); text-decoration: none; vertical-align: super; }
.filmpage .ref:hover { color: var(--silver-hi); }
.filmpage__remember { margin: 48px 0; padding: 26px 28px; border-left: 2px solid var(--lens-2); background: rgba(6, 8, 15, 0.72); }
.filmpage__remember .px { margin: 0 0 10px; color: var(--text-dim); font-size: 16px; }
.filmpage__remember p:last-child { margin: 0; color: var(--silver-hi); font-size: clamp(20px, 2vw, 26px); line-height: 1.45; }
.filmpage__chapters { columns: 1; }
.filmpage__sources { margin: 0; padding-left: 26px; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.filmpage__sources li { margin-bottom: 8px; }
.filmpage__sources li:target { color: var(--silver-hi); }
.filmpage__care { margin: 40px 0 0 !important; color: var(--text-soft); font-size: 15px !important; }
.doc--film .hero__cta { margin-top: 26px; }
.doc__foot .foot__langs { margin-bottom: 18px; }
