/* Omega Mega 2 Muuuuuch · base: tokens, the bar, the paper (CH 1), the TV chrome, magic buttons */

@font-face { font-family: "Anton"; src: url(../fonts/anton.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(../fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(../fonts/courier-prime-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-900.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #0b0b0c; --ink-2: #161618; --ink-3: #26262b;
  --paper: #f7f6f1; --paper-2: #ecebe4; --paper-3: #d6d4ca;
  --lav: #c9bdf6; --red: #ff6b68; --yellow: #f6f08a; --lime: #d2f783; --pink: #ffaeb4;
  --mute-d: #9a9aa1;   /* on ink, 7.0:1 */
  --mute-l: #5d5d63;   /* on paper, 6.0:1 */
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --osd: "Courier Prime", ui-monospace, Menlo, monospace;
  --serif: "Fraunces", Georgia, serif;
  --bar-h: 56px;
  --gutter: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-st="story"]    { --c: var(--lav); }
[data-st="drop"]     { --c: var(--red); }
[data-st="feedback"] { --c: var(--yellow); }
[data-st="iterate"]  { --c: var(--lime); }
[data-st="repeat"]   { --c: var(--pink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; overflow-x: hidden;
  background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
body:not([data-ch="paper"]) { background: var(--ink); color: var(--paper); }
a { color: inherit; }
kbd { font: 700 .72em/1 var(--osd); padding: .2em .4em; border: 1px solid currentColor; border-radius: 4px; opacity: .7; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 99; background: var(--lime); color: var(--ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
body[data-ch="paper"] :focus-visible { outline-color: var(--ink); }

/* While the script boots, hide the flat page so the loop doesn't flash it.
   If the script never arrives, the page shows itself after 1.6s anyway. */
@media (scripting: enabled) {
  body:not([data-ch]) { background: var(--ink); }
  body:not([data-ch]) #paper { visibility: hidden; animation: show-anyway 0s 1.6s forwards; }
  @keyframes show-anyway { to { visibility: visible; } }
}

/* ── the bar ─────────────────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--bar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  color: var(--paper);
  background: linear-gradient(to bottom, rgba(11,11,12,.92) 30%, rgba(11,11,12,0));
}
body[data-ch="paper"] .bar, body:not([data-ch]) .bar { color: var(--ink); background: rgba(247,246,241,.94); border-bottom: 1px solid var(--paper-3); backdrop-filter: blur(8px); }
.wordmark { font: 400 22px/1 var(--display); letter-spacing: .03em; text-decoration: none; white-space: nowrap; transition: color .2s var(--ease), box-shadow .2s var(--ease); }
.wordmark span { display: inline-block; font-family: var(--serif); font-size: 1.1em; margin-right: .08em; transition: transform .5s var(--ease); }
/* hover: the omega flips to a mho, the name lights up */
.wordmark:hover, .wordmark:focus-visible { color: var(--lime); }
.wordmark:hover span, .wordmark:focus-visible span { transform: rotate(180deg); }
body[data-ch="paper"] .wordmark:hover, body[data-ch="paper"] .wordmark:focus-visible,
body:not([data-ch]) .wordmark:hover, body:not([data-ch]) .wordmark:focus-visible { color: var(--ink); box-shadow: inset 0 -.38em 0 var(--lime); }
.bar-tune { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bar-step {
  display: none; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  font: 700 12px/1 var(--osd); color: var(--paper); background: var(--ink-2); border: 1.5px solid var(--ink-3);
  box-shadow: 2px 2px 0 var(--hov, transparent); transition: box-shadow .2s var(--ease), border-color .2s;
}
.bar-step:hover { border-color: var(--paper); }
.bar-step:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.tuner { margin: 0; font: 700 14px/1 var(--osd); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tuner-ch { color: var(--lime); }
body[data-ch="paper"] .tuner-ch { color: var(--ink); background: var(--lime); padding: 3px 5px; }
.tuner-name { text-transform: uppercase; }
.guide-btn {
  flex: none; font: 700 14px/1 var(--osd); letter-spacing: .04em; text-transform: uppercase;
  color: inherit; background: transparent; border: 1.5px solid currentColor; border-radius: 999px;
  padding: 9px 14px; cursor: pointer;
}
@media (max-width: 560px) {
  .tuner-name { display: none; }
  .guide-btn kbd { display: none; }
}
.wm-word { font-weight: inherit; }
/* the bar holds wordmark, ◀ CH ▶ and Guide down to 320 without truncating the channel */
@media (max-width: 560px) {
  .bar { gap: 10px; }
  .wordmark { font-size: 19px; }
  .guide-btn { padding-left: 11px; padding-right: 11px; }
  .bar-step { width: 34px; height: 34px; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 18px; }
  .bar-tune { gap: 4px; }
  .tuner { font-size: 13px; }
}
@media (max-width: 350px) { body[data-ch]:not([data-ch="paper"]) .wm-word { display: none; } }

/* ── CH 1 · the paper ────────────────────────────────────── */
.paper { padding: calc(var(--bar-h) + 8px) var(--gutter) 40px; max-width: 1180px; margin: 0 auto; }
.p-hero { min-height: calc(92svh - var(--bar-h)); display: flex; flex-direction: column; justify-content: center; padding: 6vh 0 4vh; }
.kicker { font: 700 13px/1.3 var(--osd); letter-spacing: .06em; text-transform: uppercase; color: var(--mute-l); margin: 0 0 18px; }
.p-hero h1 {
  font: 400 clamp(52px, 10.5vw, 148px)/.9 var(--display); text-transform: uppercase; letter-spacing: -.005em;
  margin: 0 0 28px; max-width: 13ch; text-wrap: balance;
}
.lead { font-size: clamp(18px, 2.1vw, 23px); line-height: 1.45; max-width: 40ch; margin: 0 0 26px; }
.loopline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 30px; font: 700 15px/1 var(--osd); text-transform: uppercase; letter-spacing: .04em; }
.loopline span { background: var(--c); padding: 8px 10px; border-radius: 3px; }
.loopline i { font-style: normal; color: var(--mute-l); }
.cta-row { margin: 8px 0 0; }

.p-sec { padding: 9vh 0 4vh; border-top: 2px solid var(--ink); }
.sec-n { font: 700 14px/1 var(--osd); margin: 18px 0 22px; color: var(--mute-l); }
.p-sec h2 { font: 400 clamp(38px, 6.4vw, 84px)/.95 var(--display); text-transform: uppercase; margin: 0 0 26px; max-width: 16ch; text-wrap: balance; }
.p-sec > p { max-width: 58ch; font-size: 19px; }
.big { font: 900 clamp(26px, 3.6vw, 42px)/1.15 var(--serif); max-width: 24ch !important; margin: 26px 0 16px; }
.big strong { background: var(--red); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.stair { list-style: none; padding: 0; margin: 10px 0 0; display: flex; align-items: flex-end; gap: 4px; height: 210px; max-width: 760px; }
.stair li {
  flex: 1; background: var(--paper-3); border-top: 4px solid var(--ink);
  font: 700 12px/1.2 var(--osd); text-transform: uppercase; padding: 8px 6px; overflow-wrap: anywhere;
}
.stair li:nth-child(1) { height: 30%; } .stair li:nth-child(2) { height: 42%; } .stair li:nth-child(3) { height: 54%; }
.stair li:nth-child(4) { height: 66%; } .stair li:nth-child(5) { height: 78%; } .stair li:nth-child(6) { height: 90%; background: var(--red); }
.stair li.cliff { flex: .7; height: 100%; background: transparent; border-top: 0; border-left: 3px dashed var(--ink); }

.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.station { background: var(--c); padding: 22px 22px 26px; border-radius: 6px; }
.st-n { font: 700 13px/1 var(--osd); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.station h3 { font: 900 25px/1.12 var(--serif); margin: 0 0 10px; }
.st-engine { font-weight: 700; margin: 0 0 10px; font-size: 15px; }
.station p:last-child { margin: 0; font-size: 16px; }

.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px 34px; margin: 26px 0 0; }
.method dt { font: 900 24px/1.15 var(--serif); margin-bottom: 8px; }
.method dd { margin: 0; }

.people { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 0; max-width: 900px; }
.people li { font-size: clamp(19px, 2.2vw, 26px); line-height: 1.3; padding: 14px 0; border-bottom: 1px solid var(--paper-3); }
.people strong { font: 400 1.15em/1 var(--display); text-transform: uppercase; margin-right: .3em; letter-spacing: .01em; }

.prec { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 34px; }
.prec li { padding: 14px 0; border-bottom: 1px solid var(--paper-3); }
.prec span { font: 700 13px/1 var(--osd); display: inline-block; width: 4.4em; color: var(--mute-l); }
.prec strong { margin-right: .35em; }

.p-belief { padding-bottom: 10vh; }
.p-belief p { font: 900 clamp(32px, 5.4vw, 70px)/1.06 var(--serif); max-width: 20ch; margin: 0 0 .25em; }
.p-belief p:last-child { background: var(--lime); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 .1em; }

.chlist { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 8px; }
.chlist a { display: flex; align-items: baseline; gap: 12px; padding: 14px 16px; background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 6px; font-weight: 700; }
.chlist b { font: 700 22px/1 var(--osd); color: var(--lime); width: 1.1em; }
.chlist em { margin-left: auto; font: 700 12px/1 var(--osd); font-style: normal; text-transform: uppercase; color: var(--mute-d); }
.p-foot { border-top: 2px solid var(--ink); padding: 26px 0 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--mute-l); }

/* ── TV chrome: stage, static, OSD, remote ───────────────── */
.stage { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: var(--ink); }
.stage[hidden] { display: none; }
.static {
  position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%;
  image-rendering: pixelated; pointer-events: none; opacity: 0;
}
.static.on { opacity: 1; }
.osd {
  position: fixed; z-index: 55; top: calc(var(--bar-h) + 14px); left: var(--gutter);
  font: 700 clamp(30px, 5vw, 56px)/1 var(--osd); color: var(--lime);
  text-shadow: 0 0 6px rgba(210,247,131,.55), 2px 2px 0 rgba(0,0,0,.6);
  pointer-events: none; opacity: 0; transition: opacity .5s;
  display: flex; flex-direction: column; gap: 8px; text-transform: uppercase;
  /* a plate, so the flash reads as a layer over the picture, never as type mixed into it */
  padding: 12px 16px 11px; background: rgba(11,11,12,.97); border: 1.5px solid rgba(210,247,131,.6); border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.osd span { font-size: .42em; letter-spacing: .08em; }
.osd.on { opacity: 1; transition: none; }
body[data-ch="paper"] .osd { color: var(--ink); text-shadow: 0 0 0 transparent, 3px 3px 0 var(--lime); background: rgba(247,246,241,.98); border-color: var(--ink); }

.remote {
  position: fixed; z-index: 45; right: var(--gutter); bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; gap: 6px;
}
.remote[hidden] { display: none; }
/* phones + small tablets: the remote rides in the bar, so nothing floats over the picture */
@media (max-width: 899px) {
  .remote { display: none; }
  body[data-ch]:not([data-ch="paper"]) .bar-step { display: inline-grid; place-items: center; }
  .osd { font-size: 28px; padding: 10px 13px 9px; }
}
.remote button, .chip {
  font: 700 13px/1 var(--osd); letter-spacing: .05em; text-transform: uppercase;
  color: var(--paper); background: var(--ink-2); border: 1.5px solid var(--ink-3);
  border-radius: 999px; padding: 11px 14px; cursor: pointer; min-height: 40px;
  box-shadow: 3px 3px 0 var(--hov, transparent);
  transition: box-shadow .2s var(--ease), border-color .2s;
}
.remote button:hover, .chip:hover { border-color: var(--paper); }

/* ── the guide ───────────────────────────────────────────── */
.guide {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0;
  border: 0; border-radius: 10px; background: #1a1730; color: var(--paper);
  box-shadow: 0 30px 120px rgba(0,0,0,.6);
}
.guide::backdrop { background: rgba(5,5,8,.72); backdrop-filter: blur(3px); }
.guide-in { padding: 22px clamp(16px, 3vw, 30px) 18px; }
.guide-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; margin-bottom: 16px; }
.guide-head h2 { margin: 0; font: 400 clamp(30px, 4.6vw, 46px)/1 var(--display); text-transform: uppercase; color: var(--yellow); }
.guide-head p { margin: 0; grid-column: 1; font: 700 13px/1.3 var(--osd); text-transform: uppercase; color: var(--mute-d); }
.guide-x { grid-column: 2; grid-row: 1 / span 2; font: 700 13px/1 var(--osd); text-transform: uppercase; color: var(--paper); background: transparent; border: 1.5px solid var(--paper); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.guide-grid button {
  width: 100%; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  text-align: left; color: var(--paper); background: #26214a; border: 0; border-radius: 4px; padding: 12px 14px; cursor: pointer;
  font: inherit; box-shadow: inset 0 0 0 0 var(--lime); transition: background .15s, box-shadow .15s;
}
.guide-grid button:hover, .guide-grid button:focus-visible { background: #332c63; box-shadow: inset 5px 0 0 0 var(--hov, var(--lime)); }
.guide-grid button[aria-current="true"] { background: #3d3577; }
.g-num { font: 700 30px/1 var(--osd); color: var(--lime); }
.g-name { font: 400 22px/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.g-tag { grid-column: 2; font-size: 14px; color: #c9c5e0; line-height: 1.35; }
.g-kind { font: 700 11px/1 var(--osd); text-transform: uppercase; color: #c9c5e0; margin-left: 8px; letter-spacing: .05em; }
.g-air { grid-column: 3; grid-row: 1 / span 2; font: 700 11px/1 var(--osd); text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-radius: 3px; background: var(--ink); color: var(--mute-d); white-space: nowrap; }
.g-air.live { background: var(--red); color: var(--ink); }
.guide-foot { margin: 14px 0 0; font: 700 13px/1 var(--osd); text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.guide-foot .build { font-size: 11px; letter-spacing: .05em; color: var(--mute-d); }
@media (max-width: 560px) {
  .guide-grid button { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 10px; }
  .g-num { font-size: 24px; }
  .g-name { font-size: 19px; }
  .g-kind { display: block; margin: 4px 0 0; }
}

/* ── magic buttons (buttons.talking-cta-steady-line) ─────── */
.mb {
  --w: 19rem;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: var(--w); max-width: 100%; min-height: 66px; padding: 10px 22px;
  background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 999px;
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--hov, var(--lime));
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
  animation: mb-float 5.5s ease-in-out infinite;
}
body:not([data-ch="paper"]) .mb { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.mb:hover, .mb:focus-visible { box-shadow: 8px 8px 0 var(--hov, var(--lime)); animation-play-state: paused; }
.mb-say, .mb-go { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.mb-say { font: 400 21px/1.05 var(--display); text-transform: uppercase; letter-spacing: .015em; }
.mb-go { font: 700 12px/1 var(--osd); text-transform: uppercase; letter-spacing: .06em; opacity: .78; }
.mb.done { animation: none; }
.mb-ruler { position: absolute; visibility: hidden; white-space: nowrap; font: 400 21px/1.05 var(--display); text-transform: uppercase; letter-spacing: .015em; left: -9999px; top: 0; }
@keyframes mb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  .mb { animation: none; }
  .osd { transition: none; }
  .wordmark span { transition: none; }
  * { scroll-behavior: auto !important; }
}
body[data-ch="paper"] .osd { left: auto; right: var(--gutter); align-items: flex-end; text-align: right; }

/* ── the demand meter in the guide (P2) ──────────────────── */
.g-want { grid-column: 2 / -1; display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.g-want[hidden] { display: none; }
.g-bar { flex: 0 0 96px; height: 6px; border-radius: 999px; background: #3a3366; overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(var(--f, 0)); }
.g-wn { white-space: nowrap; font: 700 11px/1 var(--osd); text-transform: uppercase; letter-spacing: .05em; color: var(--lime); }
.guide-foot .ns { color: var(--lime); }
.guide-foot .ns[hidden] { display: none; }

/* ── 404: no signal ──────────────────────────────────────── */
body[data-ch="nosignal"] { background: var(--ink) repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 4px); }
.nosig { min-height: 100svh; display: grid; align-content: center; gap: 18px; max-width: 780px; margin: 0 auto; padding: 48px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.nosig::before {
  content: ""; height: 10px; border-radius: 2px;
  background: linear-gradient(to right, var(--lav) 0 20%, var(--red) 20% 40%, var(--yellow) 40% 60%, var(--lime) 60% 80%, var(--pink) 80%);
}
.nosig-osd { margin: 0; font: 700 clamp(40px, 8vw, 72px)/1 var(--osd); color: var(--lime); text-shadow: 0 0 6px rgba(210,247,131,.55), 2px 2px 0 rgba(0,0,0,.6); animation: nosig-blink 1.4s steps(2) infinite; }
@keyframes nosig-blink { 50% { opacity: .35; } }
.nosig h1 { margin: 0; font: 400 clamp(64px, 14vw, 140px)/.9 var(--display); text-transform: uppercase; }
.nosig > p:not(.nosig-osd) { margin: 0; font-size: 19px; max-width: 44ch; }
.nosig-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.nosig-go .chip { display: inline-flex; align-items: center; text-decoration: none; }
.nosig-go .chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .nosig-osd { animation: none; } }
