:root {
  --bg: #060d14;
  --ink: #eef4f8;
  --ink-dim: rgba(238, 244, 248, 0.62);
  --ice: #8fd0ff;
  --gold: #ffcf6f;
  --line: rgba(238, 244, 248, 0.14);
  --nav-h: 68px;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  overflow-x: hidden;
}

::selection { background: var(--ice); color: #06121c; }

/* ============ LOADER ============ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader .mono-mark {
  font-family: var(--mono); letter-spacing: 0.5em; font-size: 13px; color: var(--ice);
}
#loader .bar { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
#loader .bar i {
  display: block; height: 100%; width: 40%; background: var(--ice);
  animation: sweep 1.1s ease-in-out infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%);} 100% { transform: translateX(400%);} }

/* ============ VIDEO STACK ============ */
#stack { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
#stack video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; will-change: opacity, transform;
}
/* Split scene: two clips side by side, faded together as one layer */
#stack .split {
  position: absolute; inset: 0; opacity: 0;
  display: flex; will-change: opacity, transform;
}
#stack .split video {
  position: relative; inset: auto;
  width: 50%; height: 100%; opacity: 1;
}
#stack .split video + video { border-left: 1px solid rgba(238, 244, 248, 0.16); }

/* Legibility scrim: soft left + bottom gradient over every scene */
#scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,13,20,0.68) 0%, rgba(6,13,20,0.25) 42%, rgba(6,13,20,0) 68%),
    linear-gradient(0deg, rgba(6,13,20,0.75) 0%, rgba(6,13,20,0) 34%),
    linear-gradient(180deg, rgba(6,13,20,0.55) 0%, rgba(6,13,20,0) 22%);
}

/* ============ NAVBAR ============ */
nav#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  background: linear-gradient(180deg, rgba(6,13,20,0.72), rgba(6,13,20,0.28) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: baseline; gap: 12px; cursor: pointer; text-decoration: none; color: var(--ink); }
.brand b { font-weight: 600; letter-spacing: 0.28em; font-size: 17px; }
.brand span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-dim); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: none; border: none; cursor: pointer;
  padding: 10px 0; display: inline-flex; align-items: center; gap: 7px;
}
.nav-item > a:hover, .nav-item > button:hover { color: var(--ice); }
.nav-item .caret { font-size: 9px; transform: translateY(-1px); opacity: 0.7; }

.dropdown {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 230px;
  background: rgba(8, 17, 26, 0.94);
  border: 1px solid var(--line);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.nav-item:hover .dropdown, .nav-item.open .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: block; padding: 11px 20px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
}
.dropdown a:hover { color: var(--ice); background: rgba(143, 208, 255, 0.06); }

#hamburger { display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; padding: 9px 14px; cursor: pointer; }

#mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 13, 20, 0.97);
  display: none; flex-direction: column; justify-content: center; padding: 0 10vw; gap: 6px;
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--ink); text-decoration: none; font-size: 15px; padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
#mobile-menu a.sub { color: var(--ink-dim); font-size: 12px; padding-left: 18px; }
#mobile-menu .close-mm { position: absolute; top: 20px; right: 6vw; border: 1px solid var(--line);
  background: none; color: var(--ink); padding: 9px 14px; font-family: var(--mono); letter-spacing: 0.2em; cursor: pointer; }

/* ============ SCROLL FILM ============ */
#film { position: relative; z-index: 2; }

/* Scroll spacers: they drive the timeline; the visible text lives
   in the fixed #captions layer below */
section.scene { min-height: 170vh; pointer-events: none; }
section.scene.short { min-height: 115vh; }
section.scene.finale { min-height: 200vh; }

/* Fixed caption layer: each act's statement holds at the
   LEFT-CENTRE of the viewport and crossfades between acts */
#captions { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.cap-slide {
  position: absolute; left: 8vw; top: 50%;
  transform: translateY(-50%);
  max-width: 620px; width: 84vw;
}
.cap { max-width: 620px; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--ice); margin-bottom: 22px; display: flex; align-items: center; gap: 14px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--ice); opacity: 0.7; }

.cap h1, .cap h2 {
  font-weight: 500; line-height: 1.12; letter-spacing: -0.015em;
}
.cap h1 { font-size: clamp(2.4rem, 6.2vw, 5rem); }
.cap h2 { font-size: clamp(1.9rem, 4.6vw, 3.7rem); }

.cap p {
  margin-top: 24px; max-width: 46ch;
  font-size: clamp(0.95rem, 1.35vw, 1.12rem);
  font-weight: 300; line-height: 1.75; color: var(--ink-dim);
}

/* Finale / quote slide (centred, unlike the left-centre acts) */
.cap-slide.finale-slide {
  left: 50%; transform: translate(-50%, -50%);
  width: min(900px, 88vw); max-width: none; text-align: center;
}
.cap-slide.finale-slide .cap { max-width: none; }
.quote-mark { font-family: var(--mono); color: var(--gold); letter-spacing: 0.4em; font-size: 11px; margin-bottom: 26px; }
blockquote {
  font-size: clamp(1.7rem, 4.2vw, 3.4rem);
  font-weight: 400; line-height: 1.3; letter-spacing: -0.01em;
}
blockquote em { font-style: normal; color: var(--gold); }
.quote-attr { margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em; color: var(--ink-dim); text-transform: uppercase; }

.cta-row { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; pointer-events: auto; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 15px 30px; text-decoration: none; cursor: pointer; transition: all 0.3s ease;
  border: 1px solid var(--ice); color: var(--ice); background: transparent;
}
.btn:hover { background: var(--ice); color: #06121c; }
.btn.solid { background: var(--ice); color: #06121c; }
.btn.solid:hover { background: transparent; color: var(--ice); }

/* Chapter marker + progress */
#chapter {
  position: fixed; left: 5vw; bottom: 30px; z-index: 5;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-dim); pointer-events: none;
  transition: opacity 0.5s;
}
#chapter b { color: var(--ice); font-weight: 500; margin-right: 12px; }
#progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--ice); width: 0%; z-index: 55; }

#scroll-hint {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 5;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none;
}
#scroll-hint::after {
  content: ""; width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--ice), transparent);
  animation: drip 2s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============ PAGES (About / Events / More) ============ */
.page {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: none; overflow-y: auto;
}
.page.open { display: block; }
.page .page-bg { position: fixed; inset: 0; z-index: 0; }
.page .page-bg video,
.page .page-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; }
.page .page-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,13,20,0.9), rgba(6,13,20,0.55) 60%, rgba(6,13,20,0.35)); }
.page-inner { position: relative; z-index: 1; padding: calc(var(--nav-h) + 7vh) 8vw 12vh; max-width: 1060px; }
.page .back {
  position: fixed; top: 16px; right: 5vw; z-index: 80;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  background: rgba(8,17,26,0.85); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 18px; cursor: pointer; transition: all 0.3s;
}
.page .back:hover { border-color: var(--ice); color: var(--ice); }

.page .kicker { margin-bottom: 18px; }
.page h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; max-width: 16ch; }
.page .lede { margin-top: 26px; max-width: 58ch; font-weight: 300; line-height: 1.8; color: var(--ink-dim); font-size: clamp(1rem, 1.4vw, 1.15rem); }

.info-grid { margin-top: 60px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.info-grid .cell { background: rgba(6,13,20,0.85); padding: 30px 26px; }
.cell h3 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ice); margin-bottom: 14px; }
.cell p, .cell li { font-weight: 300; font-size: 0.95rem; line-height: 1.7; color: var(--ink-dim); }
.cell a { color: var(--ice); text-decoration: none; border-bottom: 1px solid rgba(143, 208, 255, 0.35); transition: color 0.25s, border-color 0.25s; }
.cell a:hover { color: var(--ink); border-color: var(--ink); }
.cell ul { list-style: none; }
.cell li { padding: 5px 0; border-bottom: 1px solid rgba(238,244,248,0.06); }
.cell li:last-child { border-bottom: none; }

.page .cta-row { justify-content: flex-start; }

/* Event page components */
.event-tag { margin-top: 16px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.sec-title { margin: 64px 0 24px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ice);
  display: flex; align-items: center; gap: 16px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.page .body-text { max-width: 66ch; font-weight: 300; line-height: 1.85;
  color: var(--ink-dim); font-size: 0.98rem; }
.page .body-text + .body-text { margin-top: 14px; }
.bullets { list-style: none; max-width: 660px; }
.bullets li { padding: 11px 0 11px 28px; position: relative;
  border-bottom: 1px solid rgba(238,244,248,0.07);
  font-weight: 300; line-height: 1.6; color: var(--ink-dim); font-size: 0.95rem; }
.bullets li:last-child { border-bottom: none; }
.bullets li::before { content: "—"; position: absolute; left: 0; color: var(--ice); }
.bullets b { color: var(--ink); font-weight: 500; }
.hl-table { width: 100%; max-width: 760px; border-collapse: collapse; border: 1px solid var(--line); }
.hl-table th, .hl-table td { padding: 15px 20px; text-align: left;
  border-bottom: 1px solid var(--line); vertical-align: top; }
.hl-table tr:last-child th, .hl-table tr:last-child td { border-bottom: none; }
.hl-table th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ice); width: 190px; font-weight: 500;
  background: rgba(143, 208, 255, 0.04); }
.hl-table td { color: var(--ink-dim); font-weight: 300; font-size: 0.94rem; line-height: 1.6; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); }
.links-grid a { display: block; background: rgba(6,13,20,0.85); padding: 26px 24px;
  text-decoration: none; transition: background 0.3s; }
.links-grid a:hover { background: rgba(143, 208, 255, 0.07); }
.links-grid b { display: block; font-weight: 500; color: var(--ink); font-size: 1.02rem; margin-bottom: 7px; }
.links-grid p { font-weight: 300; font-size: 0.85rem; color: var(--ink-dim); line-height: 1.55; margin-bottom: 14px; }
.links-grid span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ice); }
.cta-band { margin-top: 64px; padding: 34px 32px; border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.cta-band h4 { font-weight: 400; font-size: 1.15rem; line-height: 1.5; max-width: 44ch; }
.tagline-foot { margin-top: 72px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-dim); }

/* Missing-file notice */
#missing-panel {
  position: fixed; bottom: 20px; right: 20px; z-index: 95;
  max-width: 420px; padding: 18px 20px;
  background: rgba(30, 12, 12, 0.95); border: 1px solid #b0563e;
  font-family: var(--mono); font-size: 11px; line-height: 1.6; color: #ffd9cf;
}
#missing-panel b { display: block; margin-bottom: 8px; letter-spacing: 0.08em; }
#missing-panel ul { margin: 0 0 10px 16px; }
#missing-panel li { word-break: break-all; padding: 2px 0; }
#missing-panel span { color: rgba(255, 217, 207, 0.7); display: block; margin-bottom: 12px; }
#missing-panel button { background: none; border: 1px solid #b0563e; color: #ffd9cf;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; padding: 7px 14px; cursor: pointer; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  #scroll-hint::after, #loader .bar i { animation: none; }
}

/* ============ RESPONSIVE ============ */

/* Small laptops / tablets: tighten the nav before it can crowd the brand */
@media (max-width: 1024px) {
  .nav-links { gap: 22px; }
  .nav-item > a, .nav-item > button { font-size: 11px; letter-spacing: 0.16em; }
  .brand span { display: none; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  #hamburger { display: block; }
  .brand span { display: inline; font-size: 9px; }
  .cap-slide { left: 7vw; width: 86vw; }
  #chapter { display: none; }

  /* split scenes stack vertically on phones */
  #stack .split { flex-direction: column; }
  #stack .split video { width: 100%; height: 50%; }
  #stack .split video + video { border-left: none; border-top: 1px solid rgba(238, 244, 248, 0.16); }

  /* menu must scroll if the links outgrow a short viewport */
  #mobile-menu { justify-content: flex-start; padding: 90px 8vw 40px; overflow-y: auto; }

  .page-inner { padding: calc(var(--nav-h) + 5vh) 7vw 10vh; }
  .info-grid { margin-top: 40px; }
  .info-grid .cell { padding: 24px 20px; }
  .sec-title { margin: 44px 0 20px; letter-spacing: 0.24em; }
  .cta-band { padding: 26px 22px; }
  .cta-row { gap: 12px; }
  .btn { padding: 13px 22px; font-size: 11px; letter-spacing: 0.16em; }

  /* the fixed 190px label column is unusable on a phone: stack the rows */
  .hl-table, .hl-table tbody, .hl-table tr, .hl-table th, .hl-table td { display: block; width: 100%; }
  .hl-table th { border-bottom: none; padding: 14px 18px 6px; }
  .hl-table td { padding: 0 18px 14px; }

  /* keep the notice inside a narrow screen */
  #missing-panel { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}

/* Phones: keep the hero caption from overflowing the viewport */
@media (max-width: 480px) {
  .cap h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  .cap h2 { font-size: clamp(1.5rem, 7vw, 2.1rem); }
  .cap p { margin-top: 18px; line-height: 1.65; }
  .kicker { letter-spacing: 0.26em; margin-bottom: 16px; }
  blockquote { font-size: clamp(1.35rem, 6.5vw, 2rem); }
  .cta-row { margin-top: 30px; }
  .cta-row .btn { flex: 1 1 100%; text-align: center; }
  .page h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}

/* Landscape phones / very short windows: the caption block is the thing
   most likely to run past the top and bottom edges — let it scroll itself
   instead of being clipped, and drop the decorative hint. */
@media (max-height: 520px) {
  .cap-slide { top: var(--nav-h); transform: none; max-height: calc(100dvh - var(--nav-h) - 16px); overflow-y: auto; }
  .cap-slide.finale-slide { top: var(--nav-h); transform: translateX(-50%); }
  .cap h1 { font-size: clamp(1.6rem, 4.4vw, 2.2rem); }
  .cap h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
  .cap p { margin-top: 14px; font-size: 0.9rem; line-height: 1.55; }
  #scroll-hint, #chapter { display: none; }
}

/* Mobile browser chrome makes 100vh taller than the visible area —
   use dynamic viewport units where supported so the film never jumps. */
@supports (height: 100dvh) {
  section.scene { min-height: 170dvh; }
  section.scene.short { min-height: 115dvh; }
  section.scene.finale { min-height: 200dvh; }
}
