:root {
  --void: #05060f;
  --void-2: #0a0d1a;
  --ink: #e8ecff;
  --mute: #8b94b8;
  --gold: #e8b84a;
  --gold-dim: #9a7a2e;
  --indigo: #4a3aff;
  --indigo-glow: #6e5cff;
  --line: rgba(110, 92, 255, 0.22);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --disp: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--void); color: var(--ink); }
body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  padding: 8px 16px; background: var(--gold); color: var(--void);
}
.skip:focus { left: 12px; top: 12px; }

/* chrome */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(5,6,15,.92), rgba(5,6,15,.55) 80%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { font-family: var(--disp); font-weight: 700; letter-spacing: .12em; font-size: 13px; }
.day-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold);
}
.topbar .spacer { flex: 1; }
.topbar a.back { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--mute); }
.topbar a.watch {
  font-family: var(--disp); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
  background: linear-gradient(90deg, var(--indigo), var(--indigo-glow));
  color: #fff; text-decoration: none;
}

.progress-rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 10px;
}
.progress-rail a {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--mute); background: transparent;
  transition: transform .2s, background .2s, border-color .2s;
}
.progress-rail a.active {
  background: var(--gold); border-color: var(--gold);
  transform: scale(1.35);
  box-shadow: 0 0 12px rgba(232,184,74,.5);
}

/* intro */
#gate {
  min-height: 100vh; display: grid; place-items: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 20%, rgba(74,58,255,.18), transparent 55%),
    radial-gradient(80% 60% at 80% 80%, rgba(232,184,74,.08), transparent 50%),
    var(--void);
}
#gate-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .55; pointer-events: none;
}
.gate-inner {
  position: relative; z-index: 2; text-align: center; padding: 24px;
  max-width: 640px;
}
.gate-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: .28em;
  color: var(--mute); margin-bottom: 20px;
}
.gate-title {
  font-family: var(--disp); font-size: clamp(28px, 6vw, 48px);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-sub { font-size: 15px; color: var(--mute); margin: 0 0 28px; }
.gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: var(--disp); font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(90deg, var(--gold), #f5d07a);
  color: var(--void);
}
.btn-ghost {
  background: transparent; color: var(--mute);
  border: 1px solid var(--line);
}

/* sections */
section { padding: 88px 20px 64px; max-width: 1100px; margin: 0 auto; }
.section-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--indigo-glow); margin-bottom: 10px;
}
.section-title {
  font-family: var(--disp); font-size: clamp(24px, 4vw, 36px);
  font-weight: 700; margin: 0 0 8px;
}
.section-lead { color: var(--mute); margin: 0 0 32px; max-width: 52ch; }

/* today */
.today-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center;
}
.today-copy .status {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--gold); margin-bottom: 12px;
}
.today-copy h2 {
  font-family: var(--disp); font-size: clamp(22px, 3.5vw, 32px);
  margin: 0 0 8px;
}
.today-copy .glyph-line {
  font-family: var(--mono); font-size: 12px; color: var(--mute); margin-bottom: 16px;
}
.today-copy .hook { font-size: 17px; margin-bottom: 20px; }
.today-visual {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0,0,0,.45), inset 0 0 60px rgba(74,58,255,.06);
}
.today-visual img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.countdown {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: var(--mute); margin-top: 14px;
}

/* chambers */
.chamber {
  margin-bottom: 72px; padding: 28px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,13,26,.9), rgba(5,6,15,.6));
  transition: border-color .4s, box-shadow .4s;
}
.chamber.active {
  border-color: rgba(232,184,74,.45);
  box-shadow: 0 0 40px rgba(74,58,255,.12);
}
.chamber.finale.active {
  border-color: rgba(232,184,74,.7);
  box-shadow: 0 0 50px rgba(232,184,74,.15);
}
.chamber-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.chamber-glyph {
  font-size: 36px; line-height: 1; color: var(--gold);
  text-shadow: 0 0 20px rgba(232,184,74,.35);
}
.chamber-meta h3 {
  font-family: var(--disp); font-size: 22px; margin: 0 0 6px;
}
.chamber-meta p { margin: 0; color: var(--mute); font-size: 14px; }
.chamber-pano {
  border-radius: 12px; overflow: hidden; margin-bottom: 18px;
  border: 1px solid var(--line);
}
.chamber-pano img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.chamber-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; font-size: 13px;
}
.chamber-facts dt {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--mute); margin-bottom: 4px;
}
.chamber-facts dd { margin: 0; }
.cast-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cast-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--ink);
}

/* cast */
.cast-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.cast-card {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--void-2);
}
.cast-card img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block;
  border-bottom: 1px solid var(--line);
}
.cast-body { padding: 14px 16px 18px; }
.cast-body h3 { font-family: var(--disp); margin: 0 0 6px; font-size: 16px; }
.cast-body .philosophy {
  font-family: var(--mono); font-size: 11px; color: var(--gold-dim);
  font-style: italic; margin-bottom: 10px;
}
.cast-body .arcs { font-size: 12px; color: var(--mute); }

/* footer */
#transmission {
  border-top: 1px solid var(--line);
  padding-bottom: 100px;
  text-align: center;
}
.tx-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.tx-note { font-size: 12px; color: var(--mute); max-width: 48ch; margin: 0 auto; }

@media (max-width: 800px) {
  .today-grid { grid-template-columns: 1fr; }
  .progress-rail { display: none; }
  section { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #gate-canvas { display: none; }
}