:root {
  --ink: #050607;
  --ink-soft: #0b0e11;
  --silver: #e8edf0;
  --mist: #9aa4aa;
  --muted: #626c72;
  --ice: #6ee7ff;
  --hairline: rgba(232, 237, 240, 0.19);
  --ease: cubic-bezier(0.2, 0.78, 0.22, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--silver);
}

html { color-scheme: dark; }

body {
  font-family: "Aptos", "Segoe UI Variable", "Yu Gothic UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overscroll-behavior: none;
}

button,
a { font: inherit; }

button { color: inherit; }

.experience,
.atmosphere,
.loader {
  position: fixed;
  inset: 0;
}

.experience {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 63% 42%, rgba(36, 48, 54, 0.14), transparent 34%),
    linear-gradient(145deg, #090c0e 0%, var(--ink) 52%, #030405 100%);
}

#product-canvas,
.hold-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#product-canvas { z-index: 1; }

.hold-image {
  z-index: 2;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 260ms var(--ease), filter 700ms var(--ease);
}

body[data-station="0"] .hold-image { transition-duration: 560ms; }

.vignette {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 3, 4, 0.92) 0%, rgba(2, 3, 4, 0.55) 20%, transparent 49%),
    linear-gradient(0deg, rgba(2, 3, 4, 0.6), transparent 32%),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.46) 100%);
}

.grain {
  position: absolute;
  z-index: 4;
  inset: -70%;
  opacity: 0.055;
  pointer-events: none;
  background-image: repeating-radial-gradient(circle at 32% 45%, #fff 0 0.45px, transparent 0.7px 3px);
  background-size: 6px 6px;
  mix-blend-mode: soft-light;
  animation: drift 11s steps(8) infinite;
}

.atmosphere {
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.aurora {
  position: absolute;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 999px;
  opacity: 0.08;
  filter: blur(90px);
  background: var(--ice);
  transition: transform 2.4s var(--ease), opacity 1.2s ease;
}

.aurora--north { top: -31vw; right: 10vw; }
.aurora--south { right: -26vw; bottom: -35vw; opacity: 0.045; }
body[data-station="1"] .aurora--north { transform: translate(-15vw, 21vw) scale(1.2); opacity: 0.14; }
body[data-station="2"] .aurora--south { transform: translate(-21vw, -18vw) scale(1.3); opacity: 0.1; }

.masthead {
  position: absolute;
  z-index: 8;
  top: max(28px, 4.3vh);
  left: clamp(24px, 4.2vw, 78px);
  right: clamp(24px, 4.2vw, 78px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.wordmark {
  color: var(--silver);
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  font-family: "Bahnschrift", "DIN Alternate", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-decoration: none;
}

.wordmark b {
  color: var(--ice);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.signal {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mist);
  font-family: "Bahnschrift", sans-serif;
  font-size: 9px;
  letter-spacing: 0.19em;
}

.signal i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 13px var(--ice);
  animation: pulse 2.6s ease-in-out infinite;
}

.narrative {
  position: absolute;
  z-index: 7;
  top: 0;
  bottom: 0;
  left: clamp(24px, 4.2vw, 78px);
  width: min(42vw, 670px);
  pointer-events: none;
}

.chapter {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  opacity: 0;
  transform: translateY(calc(-50% + 38px));
  visibility: hidden;
  transition: opacity 700ms var(--ease), transform 900ms var(--ease), visibility 700ms;
}

.chapter.is-active {
  opacity: 1;
  transform: translateY(-50%);
  visibility: visible;
}

.chapter__index {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 150px;
  margin-bottom: clamp(22px, 4vh, 44px);
  color: var(--ice);
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.chapter__index i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ice), rgba(110, 231, 255, 0.15));
}

.chapter__index em { color: var(--muted); font-style: normal; }

.chapter__eyebrow {
  margin: 0 0 14px;
  color: var(--mist);
  font-family: "Bahnschrift", "Yu Gothic UI", sans-serif;
  font-size: clamp(9px, 0.72vw, 12px);
  letter-spacing: 0.23em;
}

.chapter h1,
.chapter h2 {
  margin: 0;
  font-family: "Bahnschrift Condensed", "Arial Narrow", "Yu Gothic UI", sans-serif;
  font-size: clamp(58px, 7.6vw, 142px);
  font-stretch: condensed;
  font-weight: 650;
  letter-spacing: -0.062em;
  line-height: 0.74;
  text-transform: uppercase;
  text-shadow: 0 12px 45px rgba(0, 0, 0, 0.38);
}

.chapter h1 span,
.chapter h2 span { display: block; }

.chapter h1 span:last-child,
.chapter h2 span:last-child {
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 237, 240, 0.66);
}

.chapter__copy {
  margin: clamp(24px, 4.4vh, 48px) 0 0;
  padding-left: 17px;
  border-left: 1px solid var(--ice);
  color: rgba(232, 237, 240, 0.72);
  font-size: clamp(12px, 0.9vw, 15px);
  font-weight: 300;
  letter-spacing: 0.09em;
  line-height: 1.8;
}

.replay {
  margin-top: 28px;
  padding: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--silver);
  border: 0;
  border-bottom: 1px solid rgba(110, 231, 255, 0.65);
  background: none;
  font-family: "Bahnschrift", sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
  pointer-events: auto;
}

.replay i { color: var(--ice); font-size: 18px; font-style: normal; transition: transform 350ms var(--ease); }
.replay:hover i { transform: rotate(-120deg); }
.replay:focus-visible,
.enter:focus-visible { outline: 1px solid var(--ice); outline-offset: 7px; }

.rail {
  position: absolute;
  z-index: 8;
  top: 50%;
  right: clamp(22px, 3vw, 58px);
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  font-family: "Bahnschrift", sans-serif;
  pointer-events: none;
}

.rail__label {
  position: absolute;
  right: -1px;
  top: -40px;
  font-size: 8px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.rail__line {
  position: relative;
  width: 1px;
  height: 218px;
  overflow: hidden;
  background: rgba(232, 237, 240, 0.14);
}

.rail__line i {
  position: absolute;
  inset: 0 0 auto;
  height: 0;
  background: var(--ice);
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.7);
  transition: height 800ms var(--ease);
}

.rail ol { display: grid; gap: 41px; margin: 0; padding: 0; list-style: none; }
.rail li { display: grid; grid-template-columns: 18px 48px; align-items: center; gap: 4px; transition: color 500ms ease; }
.rail li b { font-size: 9px; font-weight: 500; }
.rail li span { font-size: 7px; letter-spacing: 0.12em; opacity: 0; transform: translateX(-4px); transition: opacity 400ms ease, transform 400ms ease; }
.rail li.is-active { color: var(--ice); }
.rail li.is-active span { opacity: 1; transform: none; }

.interaction-hint {
  position: absolute;
  z-index: 8;
  left: clamp(24px, 4.2vw, 78px);
  bottom: max(42px, 7.4vh);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--mist);
  transition: opacity 500ms ease;
}

body[data-station="3"] .interaction-hint { opacity: 0; }

.mouse {
  width: 17px;
  height: 28px;
  border: 1px solid rgba(232, 237, 240, 0.45);
  border-radius: 12px;
}

.mouse i {
  display: block;
  width: 2px;
  height: 5px;
  margin: 6px auto;
  border-radius: 4px;
  background: var(--ice);
  animation: scroll 1.8s ease-in-out infinite;
}

.interaction-hint p { display: grid; gap: 3px; margin: 0; }
.interaction-hint b { color: var(--silver); font-family: "Bahnschrift", sans-serif; font-size: 8px; letter-spacing: 0.18em; }
.interaction-hint p span { font-size: 7px; letter-spacing: 0.13em; }

.homework-mark {
  position: absolute;
  z-index: 8;
  right: clamp(24px, 4.2vw, 78px);
  bottom: max(24px, 4vh);
  color: rgba(232, 237, 240, 0.36);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.loader {
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49.96%, rgba(255, 255, 255, 0.045) 50%, transparent 50.04%),
    linear-gradient(0deg, transparent 49.96%, rgba(255, 255, 255, 0.035) 50%, transparent 50.04%),
    radial-gradient(circle at center, #101519 0%, #07090b 47%, #030405 100%);
  transition: opacity 900ms var(--ease), visibility 900ms;
}

.loader::before,
.loader::after {
  content: "";
  position: absolute;
  width: min(76vw, 980px);
  aspect-ratio: 1;
  border: 1px solid rgba(110, 231, 255, 0.06);
  border-radius: 50%;
}

.loader::after { width: min(43vw, 560px); }
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__center { position: relative; width: min(76vw, 1040px); z-index: 1; }
.loader__kicker { margin: 0 0 22px; color: var(--ice); font-family: "Bahnschrift", sans-serif; font-size: 9px; letter-spacing: 0.44em; }
.loader__brand { position: relative; overflow: hidden; height: clamp(78px, 14vw, 190px); white-space: nowrap; font-family: "Bahnschrift Condensed", "Arial Narrow", sans-serif; font-size: clamp(76px, 14vw, 196px); font-weight: 650; letter-spacing: -0.075em; line-height: 0.9; }
.loader__ghost { color: rgba(232, 237, 240, 0.08); }
.loader__fill { position: absolute; inset: 0; width: 0%; overflow: hidden; color: var(--silver); filter: drop-shadow(0 0 28px rgba(110, 231, 255, 0.16)); }
.loader__meta { margin-top: 22px; display: flex; justify-content: space-between; align-items: baseline; color: var(--mist); font-family: "Bahnschrift", sans-serif; font-size: 8px; letter-spacing: 0.18em; }
.loader__meta strong { color: var(--ice); font-size: 12px; font-weight: 400; }
.loader__bar { height: 1px; margin-top: 12px; background: rgba(232, 237, 240, 0.12); }
.loader__bar i { display: block; width: 0%; height: 1px; background: var(--ice); box-shadow: 0 0 14px rgba(110, 231, 255, 0.7); }

.enter {
  margin-top: 32px;
  min-width: 238px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(232, 237, 240, 0.22);
  background: rgba(5, 6, 7, 0.36);
  color: var(--silver);
  font-family: "Bahnschrift", sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  animation: enter-in 700ms var(--ease) both;
}

.enter:hover { border-color: rgba(110, 231, 255, 0.7); background: rgba(110, 231, 255, 0.06); }
.enter i { color: var(--ice); font-size: 16px; font-style: normal; }
.loader__corner,
.loader__foot { position: absolute; margin: 0; color: var(--muted); font-family: "Bahnschrift", sans-serif; font-size: 8px; letter-spacing: 0.17em; line-height: 1.65; }
.loader__corner { top: 38px; left: 42px; }
.loader__corner span { color: rgba(110, 231, 255, 0.55); }
.loader__foot { right: 42px; bottom: 38px; }

noscript {
  position: fixed;
  z-index: 50;
  inset: auto 20px 20px;
  padding: 14px;
  background: #101214;
  color: var(--silver);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes drift { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(4%, -3%); } 50% { transform: translate(-3%, 4%); } 75% { transform: translate(2%, 2%); } }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(-1px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }
@keyframes enter-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .hold-image { object-fit: contain; }
  .vignette {
    background:
      linear-gradient(0deg, rgba(2, 3, 4, 0.9) 0%, rgba(2, 3, 4, 0.45) 32%, transparent 60%),
      radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.42));
  }
  .masthead { top: max(22px, env(safe-area-inset-top)); }
  .signal { display: none; }
  .narrative { left: 22px; right: 22px; bottom: 92px; top: auto; width: auto; height: 37vh; }
  .chapter { top: auto; bottom: 0; transform: translateY(22px); }
  .chapter.is-active { transform: none; }
  .chapter__index { margin-bottom: 14px; }
  .chapter h1,
  .chapter h2 { font-size: clamp(46px, 15vw, 72px); line-height: 0.78; }
  .chapter__copy { margin-top: 20px; font-size: 11px; line-height: 1.65; }
  .chapter__eyebrow { font-size: 8px; }
  .rail { top: 25%; right: 14px; transform: translateY(-50%) scale(0.84); transform-origin: right center; }
  .rail li span,
  .rail__label { display: none; }
  .rail li { grid-template-columns: 18px; }
  .interaction-hint { display: none; }
  .homework-mark { right: 20px; bottom: max(18px, env(safe-area-inset-bottom)); font-size: 6px; }
  .loader__center { width: calc(100vw - 44px); }
  .loader__brand { font-size: clamp(63px, 20vw, 92px); height: 78px; }
  .loader__corner { top: 24px; left: 22px; }
  .loader__foot { right: 22px; bottom: 22px; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .chapter__index { margin-bottom: 20px; }
  .chapter__copy { margin-top: 24px; }
  .interaction-hint { bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
  .grain { display: none; }
  .aurora { transition-duration: 1ms; }
}
