:root {
  --void: #08111F;
  --midnight: #12365A;
  --projector: #A9D8FF;
  --cyan: #DFF6FF;
  --blueprint: #4E7FA6;
  --amber: #F2B66D;
  --violet: #3A2F5F;
  --silver: #E8EDF2;
  --font-main: "Commissioner", Inter, system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --font-accent: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

html { background: var(--void); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--cyan);
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 72% 10%, rgba(169, 216, 255, 0.18), transparent 32vw),
    radial-gradient(circle at 18% 46%, rgba(58, 47, 95, 0.48), transparent 42vw),
    linear-gradient(117deg, #08111F 0%, #12365A 44%, #A9D8FF 100%);
}

.grain, .scanlines, .vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.grain {
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232, 237, 242, 0.28) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 10%, rgba(223, 246, 255, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 44% 88%, rgba(242, 182, 109, 0.14) 0 1px, transparent 1px);
  background-size: 43px 47px, 31px 29px, 71px 67px;
}

.scanlines {
  opacity: 0.16;
  background: repeating-linear-gradient(to bottom, rgba(223, 246, 255, 0.15) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

.vignette {
  box-shadow: inset 0 0 13vw 5vw #08111F;
}

.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1vw, 13px);
  letter-spacing: 0.12em;
  color: rgba(223, 246, 255, 0.76);
}

.film { position: relative; }

.chamber {
  position: relative;
  min-height: 108vh;
  overflow: hidden;
  isolation: isolate;
  padding: 13vh 7vw;
}

.opening {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.96), rgba(8, 17, 31, 0.82));
}

.hero-lines span {
  position: absolute;
  top: 10vh;
  bottom: 8vh;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #A9D8FF, #DFF6FF, transparent);
  box-shadow: 0 0 28px #A9D8FF;
  transform: rotate(17deg);
  animation: driftApart 8s ease-in-out infinite alternate;
}

.line-a { left: 35%; }
.line-b { right: 35%; animation-direction: alternate-reverse !important; }

@keyframes driftApart {
  from { translate: -1.1vw 0; opacity: 0.52; }
  to { translate: 1.1vw 0; opacity: 0.9; }
}

.wordmark-wrap {
  position: relative;
  z-index: 3;
  grid-column: 2 / 8;
  transform: translateY(5vh);
}

.coordinate, .tiny-label, .chapter-index, .measurements, .final-hud, .corner-note, .caption-panel {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.coordinate { color: var(--amber); font-size: 13px; }

.wordmark {
  position: relative;
  margin: 0;
  font-size: clamp(58px, 10vw, 160px);
  font-weight: 200;
  letter-spacing: 0.045em;
  color: var(--cyan);
  text-shadow: 0 0 28px rgba(169, 216, 255, 0.52);
  animation: resolveMark 4.8s ease forwards;
}

.wordmark::before, .wordmark::after {
  content: attr(data-duplicate);
  position: absolute;
  inset: 0;
  opacity: 0;
}

.wordmark::before { color: var(--projector); transform: translate(-10px, -4px); animation: duplicateA 3.2s ease 0.8s; }
.wordmark::after { color: var(--violet); transform: translate(12px, 5px); animation: duplicateB 3.2s ease 0.8s; }

@keyframes duplicateA { 0%,100%{opacity:0} 18%,58%{opacity:.55} }
@keyframes duplicateB { 0%,100%{opacity:0} 22%,52%{opacity:.48} }
@keyframes resolveMark { from{filter:blur(8px)} to{filter:blur(0)} }

.intertitle {
  max-width: 610px;
  color: rgba(232, 237, 242, 0.78);
  font-family: var(--font-accent);
  font-size: clamp(23px, 3vw, 42px);
  line-height: 1.05;
}

.Intertitles-soft-flashes {
  animation: projectorFlash 6s ease-in-out infinite;
}

.corner-note {
  position: absolute;
  right: 8vw;
  bottom: 12vh;
  z-index: 4;
  color: var(--amber);
  border: 1px solid rgba(242, 182, 109, 0.66);
  padding: 9px 13px;
  transform: rotate(-8deg);
}

.photo-stack {
  position: absolute;
  z-index: 2;
  clip-path: polygon(13% 0, 100% 0, 87% 100%, 0 100%);
  border: 1px solid rgba(232, 237, 242, 0.32);
  box-shadow: 0 0 70px rgba(169, 216, 255, 0.18);
}

.hero-photo {
  right: 11vw;
  top: 21vh;
  width: min(42vw, 640px);
  height: 52vh;
  opacity: 0;
  animation: photoArrive 3.8s ease 0.6s forwards;
}

@keyframes photoArrive { to { opacity: 0.82; } }
@keyframes projectorFlash { 0%, 100% { text-shadow: 0 0 0 rgba(223,246,255,0); } 50% { text-shadow: 0 0 18px rgba(223,246,255,.28); } }

.photo {
  position: absolute;
  inset: 0;
  filter: grayscale(1) contrast(1.16) sepia(0.16) hue-rotate(164deg) saturate(1.65);
  mix-blend-mode: screen;
}

.photo-ghost { opacity: 0.44; transform: translate(12px, -8px); mix-blend-mode: lighten; }

.platform {
  background:
    linear-gradient(90deg, rgba(8, 17, 31, .8), transparent 42%, rgba(169, 216, 255, .22)),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(232,237,242,.2) 42px 46px),
    linear-gradient(17deg, transparent 0 42%, rgba(232,237,242,.24) 42% 45%, transparent 45%),
    radial-gradient(ellipse at 50% 76%, rgba(223, 246, 255, .36), transparent 28%),
    linear-gradient(#12365A, #08111F);
}

.stairs {
  background:
    repeating-linear-gradient(163deg, rgba(232,237,242,.2) 0 10px, rgba(8,17,31,.2) 10px 24px),
    linear-gradient(107deg, rgba(78,127,166,.8), rgba(8,17,31,.9)),
    radial-gradient(circle at 36% 25%, rgba(223,246,255,.38), transparent 24%);
}

.corridor {
  background:
    linear-gradient(90deg, rgba(8,17,31,.95), transparent 28%, rgba(8,17,31,.8)),
    repeating-linear-gradient(90deg, rgba(232,237,242,.12) 0 4px, transparent 4px 62px),
    linear-gradient(135deg, #3A2F5F, #12365A 48%, #08111F);
}

.sprockets::before, .sprockets::after {
  content: "";
  position: absolute;
  top: 7%;
  bottom: 7%;
  width: 16px;
  background: repeating-linear-gradient(to bottom, rgba(232,237,242,.75) 0 10px, transparent 10px 30px);
  opacity: 0.42;
}

.sprockets::before { left: 18px; }
.sprockets::after { right: 18px; }

.diagonal {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2vw;
}

.plane {
  position: absolute;
  inset: 5vh -12vw;
  z-index: -1;
  clip-path: polygon(0 18%, 100% 0, 100% 74%, 0 100%);
  opacity: 0.82;
}

.plane-blue { background: linear-gradient(117deg, rgba(8,17,31,.4), rgba(18,54,90,.82) 44%, rgba(169,216,255,.28)); }
.plane-violet { background: linear-gradient(63deg, rgba(58,47,95,.92), rgba(8,17,31,.64), rgba(78,127,166,.28)); clip-path: polygon(0 0, 100% 19%, 100% 100%, 0 78%); }
.plane-frost { background: linear-gradient(117deg, rgba(8,17,31,.84), rgba(18,54,90,.72), rgba(223,246,255,.22)); }

.chapter-index {
  position: absolute;
  top: 16vh;
  left: 8vw;
  color: rgba(223,246,255,.7);
  font-size: 12px;
}
.chapter-index.amber { color: var(--amber); left: auto; right: 10vw; }

.chapter-copy {
  grid-column: 2 / 7;
  align-self: center;
  z-index: 4;
  transform: translateY(8vh);
}

.right-copy { grid-column: 7 / 12; }
.final-copy { grid-column: 2 / 8; }

.tiny-label { color: var(--amber); font-size: 12px; }

h2 {
  margin: 0 0 22px;
  color: var(--projector);
  font-size: clamp(56px, 8vw, 128px);
  font-weight: 200;
  line-height: 0.85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter-copy p:not(.tiny-label):not(.archival) {
  max-width: 560px;
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.45;
  color: rgba(232,237,242,.78);
}

.reveal-block { opacity: 0.34; transform: translate3d(0, 7vh, 0); transition: opacity 900ms ease, transform 900ms ease; }
.reveal-block.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

.evidence { width: min(45vw, 660px); height: 48vh; top: 27vh; }
.evidence-one { right: 8vw; }
.evidence-two { left: 7vw; }

.hud-path {
  position: absolute;
  inset: 8%;
  overflow: visible;
}

.hud-path path, .hud-path circle {
  fill: none;
  stroke: #DFF6FF;
  stroke-width: 2;
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  filter: drop-shadow(0 0 8px #A9D8FF);
}
.hud-path circle { stroke: #F2B66D; stroke-dasharray: 90; stroke-dashoffset: 90; }
.chamber.active .hud-path path, .chamber.active .hud-path circle { animation: drawLine 1.7s ease forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.tune {
  margin-top: 20px;
  padding: 11px 15px;
  border: 1px solid rgba(223,246,255,.52);
  background: rgba(8,17,31,.28);
  color: var(--cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  cursor: pointer;
}
.tune:hover { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 24px rgba(242,182,109,.18); }

.measurements {
  position: absolute;
  right: 9vw;
  bottom: 13vh;
  display: grid;
  gap: 8px;
  color: rgba(223,246,255,.68);
  font-size: 12px;
}

.tape {
  position: absolute;
  width: 90px;
  height: 26px;
  background: rgba(232,237,242,.36);
  box-shadow: 0 0 12px rgba(232,237,242,.16);
}
.tape-a { top: 16px; left: 32px; transform: rotate(-17deg); }
.tape-b { right: 44px; bottom: 22px; transform: rotate(14deg); }

.reticle {
  position: absolute;
  right: 22vw;
  top: 22vh;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(169,216,255,.56);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(169,216,255,.2);
}
.reticle span { position: absolute; background: rgba(223,246,255,.6); }
.reticle span:first-child { left: 50%; top: -20px; bottom: -20px; width: 1px; }
.reticle span:last-child { top: 50%; left: -20px; right: -20px; height: 1px; }

.archival {
  color: var(--amber);
  font-family: var(--font-accent);
  font-size: clamp(32px, 5vw, 76px);
  line-height: 1;
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24vh;
  height: 28vh;
}
.horizon span {
  position: absolute;
  left: -8vw;
  right: -8vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, #A9D8FF, #DFF6FF, transparent);
  box-shadow: 0 0 22px #A9D8FF;
  transform: rotate(-17deg);
}
.horizon span:nth-child(1){ top: 8%; opacity:.22; }
.horizon span:nth-child(2){ top: 22%; opacity:.32; }
.horizon span:nth-child(3){ top: 39%; opacity:.5; }
.horizon span:nth-child(4){ top: 56%; opacity:.68; }
.horizon span:nth-child(5){ top: 72%; opacity:.5; }
.horizon span:nth-child(6){ top: 88%; opacity:.28; }

.final-hud {
  position: absolute;
  right: 8vw;
  bottom: 12vh;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(223,246,255,.72);
  font-size: 12px;
}

.caption-panel {
  position: fixed;
  left: 24px;
  bottom: 22px;
  z-index: 70;
  max-width: min(560px, calc(100vw - 48px));
  padding: 12px 14px;
  color: rgba(223,246,255,.75);
  background: rgba(8,17,31,.72);
  border: 1px solid rgba(78,127,166,.54);
  font-size: 12px;
  transform: translateY(120%);
  transition: transform .45s ease, color .45s ease, border-color .45s ease;
}
.caption-panel.live { transform: translateY(0); color: var(--amber); border-color: rgba(242,182,109,.72); }

@media (max-width: 860px) {
  .chamber { padding: 13vh 6vw; min-height: 116vh; }
  .opening, .diagonal { display: block; }
  .wordmark-wrap { transform: translateY(16vh); }
  .hero-photo, .evidence { width: 76vw; height: 38vh; right: 4vw; left: auto; top: 42vh; }
  .chapter-copy, .right-copy, .final-copy { margin-top: 18vh; }
  .chapter-index { top: 11vh; }
  .measurements, .final-hud { left: 7vw; right: 7vw; }
  .reticle { right: 7vw; }
}
