/* ============================================================
   AURION X — cinematic launch experience, v4 "night ledger"
   One narrative: one night, one charge, 610 km. Six chapters,
   each opened by a mono slate (timecode · odometer · name),
   and one live odometer that ticks with the scroll.

   Signature system:
   - twin hairline rules, borrowed from the twin-strip DRL
   - expanded Archivo caps for headlines, condensed for numerals
   - Instrument Serif italic "whispers" as the editorial voice
   - mono microtype for slates, ledgers and the odometer
   - one warm "first light" accent, reserved for the finale

   Layout contract:
   - This stylesheet is a complete, fully visible static page.
   - JS adds motion only; it never gates visibility. All hidden
     initial states are set from JS and only when GSAP is live.
   ============================================================ */

:root {
  --ink: #050708;
  --panel: #0b1416;
  --paint: #123b36;
  --paint-bright: #2c6b5f;
  --chrome: #93a8a2;
  --beam: #edf4f2;
  --mist: #a9b6b2;
  --dawn: #c99a66;
  --line: rgba(147, 168, 162, 0.18);

  --font-display: "Archivo", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-serif: "Instrument Serif", serif;
  --font-mono: "IBM Plex Mono", monospace;

  --pad-x: clamp(1.25rem, 5vw, 5.5rem);
  --nav-h: 4.5rem;
  --measure: 33rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--beam);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }

h1, h2, h3, p, dl, dd, dt, figure { margin: 0; padding: 0; }

::selection { background: var(--paint); color: var(--beam); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0.6rem; left: 0.6rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--panel);
  color: var(--beam);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- shared type ---------- */

h2 {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 780;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: 1.1rem;
}

.lede {
  margin-top: 1.2rem;
  max-width: var(--measure);
  color: var(--mist);
}

.whisper {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.18em;
  letter-spacing: 0.005em;
  color: var(--beam);
}

/* ---------- the night-ledger slate ---------- */

.slate {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chrome);
  white-space: nowrap;
}

.slate-ch { color: var(--beam); }

.slate-meta {
  position: relative;
  padding-left: 1.1rem;
}
/* twin-line tick before the timecode — the DRL signature in microtype */
.slate-meta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.55rem;
  height: 5px;
  border-top: 1px solid var(--chrome);
  border-bottom: 1px solid var(--chrome);
  transform: translateY(-60%);
  opacity: 0.7;
}

.slate-name {
  color: var(--mist);
  letter-spacing: 0.24em;
}

.slate-center { justify-content: center; }

/* the finale slate warms with first light */
.slate-dawn .slate-ch { color: var(--dawn); }
.slate-dawn .slate-meta::before { border-color: var(--dawn); }

.hero-card .slate,
.perf-head .slate,
.finale-copy .slate { text-shadow: 0 1px 8px rgba(5, 7, 8, 0.7); }

/* twin hairline rule */
.twin-rule {
  display: block;
  width: 3.6rem;
  height: 7px;
  border-top: 1px solid var(--chrome);
  border-bottom: 1px solid var(--chrome);
  opacity: 0.8;
  margin-bottom: 1.4rem;
  transform-origin: left center;
}

.spec-chip {
  display: inline-block;
  margin-top: 1.3rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chrome);
}

/* headline line masks (JS slides .line up into place) */
.line-mask {
  display: block;
  overflow: hidden;
}
.line { display: block; }

/* ---------- the live odometer ---------- */

.odometer {
  position: fixed;
  right: var(--pad-x);
  bottom: 1.4rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chrome);
  text-shadow: 0 1px 8px rgba(5, 7, 8, 0.85);
  pointer-events: none;
  transition: color 0.6s ease;
}
.odometer .odo-km {
  font-variant-numeric: tabular-nums;
  color: var(--beam);
  transition: color 0.6s ease;
}
.odometer .odo-sep {
  width: 0.55rem;
  height: 5px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.7;
}
/* the readout warms as the night ends */
.odometer.is-dawn,
.odometer.is-dawn .odo-km { color: var(--dawn); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.2rem;
  border-radius: 2px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--paint);
  color: var(--beam);
  border: 1px solid var(--paint-bright);
}
.btn-primary:hover,
.btn-primary:focus-visible { background: var(--paint-bright); }

/* the finale CTA carries the dawn accent */
.btn-dawn { border-color: rgba(201, 154, 102, 0.55); }
.btn-dawn:hover,
.btn-dawn:focus-visible { background: #2a5a50; border-color: var(--dawn); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--beam);
  padding: 0.6rem 1.4rem;
}
.btn-ghost:hover,
.btn-ghost:focus-visible { border-color: var(--chrome); }

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--chrome);
  outline-offset: 3px;
}

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 var(--pad-x);
  z-index: 50;
  background: linear-gradient(rgba(5, 7, 8, 0.8), rgba(5, 7, 8, 0));
  transition: background-color 0.35s ease;
}

.site-nav.is-solid {
  background: rgba(5, 7, 8, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--beam);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-x { color: var(--paint-bright); }

.nav-links {
  display: flex;
  gap: 1.9rem;
  margin-left: auto;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--beam); }

/* ============================================================
   CH.01 — hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-stage {
  position: absolute;
  inset: 0;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 7, 8, 0.45), rgba(5, 7, 8, 0) 30%, rgba(5, 7, 8, 0) 55%, rgba(5, 7, 8, 0.88) 100%),
    linear-gradient(100deg, rgba(5, 7, 8, 0.5), rgba(5, 7, 8, 0) 45%);
}

.hero-card {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad-x) clamp(3.5rem, 9vh, 6rem);
  max-width: 42rem;
}

.hero-title {
  font-family: var(--font-display);
  font-stretch: 121%;
  font-weight: 830;
  font-size: clamp(2.5rem, 4.8vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: 1.2rem;
}

.hero-sub {
  margin-top: 1.3rem;
  max-width: 28rem;
  color: var(--mist);
  font-size: 1.05rem;
}

.hero-actions { margin-top: 2rem; }

/* ============================================================
   CH.02 — the long way: statement, cinema frame, ledger
   ============================================================ */

.tour { background: var(--ink); }

.tour-statement {
  padding: clamp(5.5rem, 15vh, 10rem) var(--pad-x) clamp(3rem, 8vh, 5rem);
  max-width: 50rem;
}

.statement-line {
  font-family: var(--font-display);
  font-stretch: 106%;
  font-weight: 480;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.3;
  color: var(--mist);
}
.statement-line em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
  color: var(--beam);
}

/* the cinema frame — letterboxed, inset from the page edge */
.tour-frame {
  position: relative;
  margin: 0 var(--pad-x);
  overflow: hidden;
  border-radius: 2px;
}
.tour-video {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  will-change: transform;
}

.tour-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding: clamp(2.2rem, 6vh, 3.8rem) var(--pad-x) clamp(4.5rem, 12vh, 8rem);
}

/* mono ledger — figures as rows, never cards */
.ledger {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row:first-child { border-top: 1px solid var(--line); }
.ledger-row dt { color: var(--chrome); }
.ledger-row dd { color: var(--beam); }

/* ============================================================
   CH.03 — form & proportion: oversized editorial figure
   ============================================================ */

.form {
  background: var(--ink);
  padding-bottom: clamp(4.5rem, 12vh, 8rem);
}

.form-head {
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}

.form-title {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  margin-top: 1rem;
  /* the second line overlaps the image's dark upper band */
  margin-bottom: calc(-0.55em);
}

.form-figure { position: relative; }

.form-media {
  overflow: hidden;
  max-height: 78svh;
}
.form-media img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  will-change: transform;
}

/* figure caption: measure ticks under the image, pointing up at it */
.form-ticks {
  position: relative;
  height: 3.4rem;
  margin: 0 var(--pad-x);
  border-top: 1px solid var(--line);
}
.form-tick {
  position: absolute;
  top: 0;
  left: var(--tick-x);
  transform: translateX(-50%);
  padding-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chrome);
  white-space: nowrap;
}
/* the tick mark: a short twin line reaching up toward the silhouette */
.form-tick::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 5px;
  height: 0.8rem;
  border-left: 1px solid var(--chrome);
  border-right: 1px solid var(--chrome);
  transform: translateX(-50%) translateY(-100%);
  opacity: 0.6;
}

.form-copy {
  margin: clamp(2rem, 6vh, 3.5rem) var(--pad-x) 0 auto;
  padding: 0 var(--pad-x);
  max-width: 34rem;
  color: var(--mist);
  text-align: left;
}

/* ============================================================
   CH.04 — signature details: one sticky visual, flowing copy
   ============================================================ */

.details {
  padding: clamp(5.5rem, 13vh, 9rem) 0 clamp(4rem, 10vh, 7rem);
  background: var(--ink);
}

.details-head {
  padding: 0 var(--pad-x);
  margin-bottom: clamp(3rem, 8vh, 5.5rem);
  max-width: 52rem;
}
.details-whisper {
  margin-top: 1.1rem;
  color: var(--mist);
}

.details-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 0 var(--pad-x);
  align-items: start;
}

.details-media {
  position: sticky;
  top: calc(var(--nav-h) + 2vh);
  align-self: start;
}
.details-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: calc(96svh - var(--nav-h) - 6vh);
  overflow: hidden;
  border-radius: 2px;
}
.details-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.65s ease, transform 1.1s ease;
}
.details-img.is-active {
  opacity: 1;
  transform: scale(1);
}
.details-counter {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--chrome);
}

.details-flow { min-width: 0; }

.decision {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 82svh;
  max-width: 26rem;
}
.decision-img { display: none; } /* mobile only */

.detail-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chrome);
  position: relative;
  padding-top: 0.9rem;
}
.detail-index::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.4rem;
  height: 5px;
  border-top: 1px solid var(--chrome);
  border-bottom: 1px solid var(--chrome);
  opacity: 0.7;
}

.decision h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 730;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-top: 0.7rem;
}
.decision > p:not(.detail-index):not(.spec-chip) {
  margin-top: 0.8rem;
  color: var(--mist);
}

/* ============================================================
   CH.05 — performance: video backdrop, staged stat reveal.
   No pinning — the section is exactly as tall as its content.
   ============================================================ */

.perf {
  position: relative;
  background: var(--panel);
  overflow: hidden;
}

.perf-stage { position: relative; }

.perf-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  will-change: transform;
}

.perf-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(5, 7, 8, 0.72), rgba(5, 7, 8, 0.18) 42%, rgba(11, 20, 22, 0.96) 99%);
  pointer-events: none;
}

.perf-head {
  position: absolute;
  z-index: 2;
  top: clamp(4.5rem, 13vh, 7.5rem);
  left: var(--pad-x);
  right: var(--pad-x);
}
.perf-whisper {
  margin-top: 0.9rem;
  color: var(--mist);
}

.perf-stats {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.6rem;
  padding: 2.8rem var(--pad-x) clamp(3.5rem, 9vh, 5.5rem);
  background: var(--panel);
}

.stat {
  position: relative;
  padding-top: 1.1rem;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.4rem;
  height: 5px;
  border-top: 1px solid var(--chrome);
  border-bottom: 1px solid var(--chrome);
  opacity: 0.7;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chrome);
}

.stat-num {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.stat-value {
  font-family: var(--font-display);
  font-stretch: 64%;
  font-weight: 840;
  font-size: clamp(3.6rem, 7.5vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--chrome);
}
.stat-line {
  margin-top: 0.8rem;
  max-width: 20rem;
  color: var(--mist);
  font-size: 0.95rem;
}

/* desktop: full-height scene, stats overlaid on the lower third */
@media (min-width: 900px) {
  .perf-stage { position: static; }
  .perf {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .perf-video {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }
  .perf-scrim { position: absolute; }
  .perf-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    background: none;
    padding-bottom: clamp(3rem, 9vh, 5.5rem);
  }
}

/* ============================================================
   CH.06 — finale: first light
   ============================================================ */

.finale {
  position: relative;
  min-height: 96svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.finale-stage {
  position: absolute;
  inset: 0;
}
.finale-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finale-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 7, 8, 0.35), rgba(5, 7, 8, 0.15) 30%, rgba(5, 7, 8, 0.15) 62%, rgba(5, 7, 8, 0.95)),
    radial-gradient(70% 80% at 50% 58%, rgba(5, 7, 8, 0.55), rgba(5, 7, 8, 0) 70%);
}

.finale-copy {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 14vh, 9rem) var(--pad-x);
  max-width: 44rem;
  text-shadow: 0 2px 22px rgba(5, 7, 8, 0.92);
}
.finale-sub {
  margin: 1.3rem auto 2.4rem;
  max-width: 30rem;
  color: var(--mist);
}
.finale-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 6vh, 4rem) var(--pad-x) 2rem;
  background: var(--ink);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  padding: 0.5rem 0;
}
.footer-links a:hover,
.footer-links a:focus-visible { color: var(--beam); }

.footer-bottom {
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: rgba(169, 182, 178, 0.6);
  font-size: 0.82rem;
}

/* ---------- responsive ---------- */

@media (max-width: 899px) {
  .nav-links { display: none; }

  .slate { gap: 0.8rem; flex-wrap: wrap; white-space: normal; }

  .odometer { right: 1.1rem; bottom: 1rem; }

  .tour-frame { margin: 0; border-radius: 0; }
  .tour-video {
    aspect-ratio: auto;
    height: clamp(300px, 52svh, 460px);
    width: 100%;
  }
  .tour-copy { grid-template-columns: 1fr; align-items: start; }
  .ledger { max-width: 26rem; }

  .form-title { margin-bottom: -0.5em; }
  .form-media img {
    height: clamp(300px, 54svh, 460px);
    width: 100%;
    min-height: 0;
  }
  .form-copy { margin-top: 1.6rem; padding: 0; }

  /* details: stacked pairs, image above copy */
  .details-split { grid-template-columns: 1fr; }
  .details-media { display: none; }
  .decision {
    min-height: 0;
    max-width: none;
    margin-bottom: clamp(3.5rem, 9vh, 5.5rem);
  }
  .decision:last-child { margin-bottom: 0; }
  .decision-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 70svh;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 1.4rem;
  }

  .perf-head { top: auto; bottom: 1.6rem; }
  .perf-whisper { display: none; }
}

@media (max-width: 520px) {
  .site-nav { gap: 1rem; }
  .nav-cta {
    margin-left: auto;
    padding: 0.55rem 0.9rem;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
  }
  .hero-title { font-size: clamp(2.2rem, 10.5vw, 2.9rem); }
  .hero-card { padding-bottom: 3.4rem; }
  .btn { padding: 0.95rem 1.8rem; }
  .footer-bottom { flex-direction: column; }
  .perf-stats { gap: 2.2rem; }
  .statement-line { font-size: clamp(1.4rem, 6.4vw, 1.8rem); }
  .form-title { font-size: clamp(2rem, 9.5vw, 2.9rem); }
  .form-ticks { display: flex; align-items: center; gap: 1.2rem; height: auto; padding-top: 0.9rem; }
  .form-tick { position: static; transform: none; padding-top: 0; }
  .form-tick::before { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-links a, .site-nav, .details-img { transition: none; }
}
