/* ===========================================================================
   ss-story.css — Scroll-story acts for the homepage
   Act 1  .ss-hook   — kinetic-type USP reveal (pinned)
   Act 2  .ss-drive  — one long neon-car drive: outline draw → ignition →
                       facts passing like road signs → live numbers → fix+CTA
   Pinning is CSS position:sticky (same pattern as the hero); GSAP only scrubs.
   =========================================================================== */

.ss-act { position: relative; }

.ss-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* ── Act 1 · HOOK ───────────────────────────────────────────────────────── */
.ss-hook { height: 250vh; background: var(--bg-0, #0e0f10); }

.ss-hook .ss-pin {
  display: flex;
  align-items: center;
}

.ss-hook-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.ss-hook-head {
  margin: 18px 0 34px;
  font-family: var(--sans, "Inter Tight", sans-serif);
  font-size: clamp(40px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
  color: var(--fg-0, #f3f0e8);
}

.ss-hook-head .ss-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ss-hook-head .ss-ch { display: inline-block; will-change: transform; }
.ss-hook-head .ss-ch-sp { width: 0.24em; }

/* Accent line renders in the brand's italic serif lime (matches the hero) */
.ss-hook-head .ss-line-accent {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--lime, #cfff00);
}

.ss-usp-stack { max-width: 860px; }

.ss-usp {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.ss-usp-num {
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  font-weight: 800;
  color: var(--lime, #cfff00);
  letter-spacing: 0.08em;
  padding-top: 5px;
  flex: 0 0 auto;
}

.ss-usp h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.ss-usp p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #a0a5ad;
  max-width: 62ch;
}

.ss-hook-tail {
  margin: 30px 0 0;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime, #cfff00);
}

.ss-hook-tail .ss-tail-arrow { display: inline-block; animation: ssTailBob 1.6s ease-in-out infinite; }

@keyframes ssTailBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── Act 2 · THE DRIVE ──────────────────────────────────────────────────── */
.ss-drive { height: 800vh; background: #08090a; }

.ss-speed-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ss-drive-stage {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  transform: translateX(-50%);
  width: min(840px, 94vw);
  pointer-events: none;
}

.ss-car { width: 100%; display: block; overflow: visible; }

.ss-car-main { will-change: transform, filter; }

.ss-car-body { fill: #0a0b0c; stroke: var(--lime, #cfff00); stroke-width: 3; stroke-linejoin: round; }
.ss-car-detail { fill: none; stroke: var(--lime, #cfff00); }
.ss-wheel-ring { fill: #0a0b0c; stroke: var(--lime, #cfff00); stroke-width: 3; }
.ss-wheel-rim { fill: none; stroke: var(--lime, #cfff00); stroke-width: 1.5; opacity: 0.6; }
.ss-wheel-spokes { stroke: var(--lime, #cfff00); stroke-width: 2; opacity: 0.8; }

.ss-ghost use, .ss-ghost path { stroke: #3c3f43 !important; fill: rgba(10, 11, 12, 0.85) !important; }
.ss-ghost { opacity: 0; }

.ss-beam { opacity: 0; }
.ss-exhaust { opacity: 0; }
.ss-car-reflection { pointer-events: none; }

.ss-road-line { stroke: #2b2d30; stroke-width: 2; }
.ss-road-dash { stroke: rgba(207, 255, 0, 0.4); stroke-width: 3; stroke-dasharray: 46 64; }

.ss-drive-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 28px;
  pointer-events: none;
}

.ss-drive-beat {
  grid-area: 1 / 1;
  max-width: 840px;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.ss-drive-beat .editorial-text { max-width: 58ch; margin-left: auto; margin-right: auto; }

.ss-drive-beat .neon-mono-tag { justify-content: center; }

/* Stats row */
.ss-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.ss-stat {
  min-width: 168px;
  padding: 18px 22px;
  border: 1px solid rgba(207, 255, 0, 0.18);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(207, 255, 0, 0.06), rgba(10, 11, 12, 0.6));
  opacity: 0;
  transform: translateY(26px);
}

.ss-stat-num {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--lime, #cfff00);
}

.ss-stat-label {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #a0a5ad;
}

.ss-stat-foot {
  margin-top: 26px;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f7177;
  opacity: 0;
}

/* Resolve beat: chips + CTA (driven by ss-story.js) */
.ss-chiprow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.ss-chip {
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lime, #cfff00);
  border: 1px solid rgba(207, 255, 0, 0.3);
  background: rgba(207, 255, 0, 0.05);
  border-radius: 999px;
  padding: 10px 18px;
  opacity: 0;
  transform: translateY(16px);
}

.ss-g-cta {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.ss-drive-beat-resolve { pointer-events: auto; margin-top: 9vh; }

/* ── Facts: billboards that sweep past while the car drives ────────────── */
.ss-facts {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62vh;
  display: grid;
  place-items: center;
  padding: 0 24px;
  pointer-events: none;
  overflow: visible;
}

.ss-facts-kicker {
  position: absolute;
  top: 13vh;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6f7177;
  opacity: 0;
}

.ss-fact {
  grid-area: 1 / 1;
  width: min(640px, 88vw);
  padding: 30px 34px;
  border: 1px solid rgba(207, 255, 0, 0.22);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(20, 22, 23, 0.92), rgba(9, 10, 11, 0.88));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.ss-fact-kicker {
  margin: 0 0 12px;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime, #cfff00);
}

.ss-fact-head {
  margin: 0;
  font-family: var(--sans, "Inter Tight", sans-serif);
  font-size: clamp(24px, 3.3vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
  color: var(--fg-0, #f3f0e8);
}

.ss-fact-sub {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: #a0a5ad;
  max-width: 52ch;
}

/* ── Fallbacks ──────────────────────────────────────────────────────────────
   Until ss-story.js signals readiness (body.ss-story-ready), or when the
   visitor prefers reduced motion, every act flattens into a readable,
   static page: no pins, all copy visible, car fully drawn.
   ─────────────────────────────────────────────────────────────────────── */
body:not(.ss-story-ready) .ss-act { height: auto !important; }

body:not(.ss-story-ready) .ss-pin {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 72px 0;
}

body:not(.ss-story-ready) .ss-usp,
body:not(.ss-story-ready) .ss-hook-tail,
body:not(.ss-story-ready) .ss-stat,
body:not(.ss-story-ready) .ss-stat-foot,
body:not(.ss-story-ready) .ss-chip,
body:not(.ss-story-ready) .ss-g-cta,
body:not(.ss-story-ready) .ss-facts-kicker {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

body:not(.ss-story-ready) .ss-drive-beat,
body:not(.ss-story-ready) .ss-fact {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  margin: 44px auto;
  max-width: 880px;
  transform: none !important;
}

body:not(.ss-story-ready) .ss-drive-copy,
body:not(.ss-story-ready) .ss-facts {
  position: relative;
  height: auto;
  display: block;
  padding: 0 28px;
}

body:not(.ss-story-ready) .ss-facts-kicker { position: relative; top: auto; margin: 40px 0 0; }
body:not(.ss-story-ready) .ss-drive-stage { position: relative; left: auto; bottom: auto; transform: none; margin: 40px auto 0; }
body:not(.ss-story-ready) .ss-speed-canvas { display: none; }
body:not(.ss-story-ready) .ss-ghost { opacity: 0.35; }
body:not(.ss-story-ready) .ss-exhaust { opacity: 0.5; }

/* ── Mobile tuning ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ss-hook { height: 200vh; }
  .ss-drive { height: 600vh; }

  .ss-hook-head { font-size: clamp(38px, 11vw, 56px); }
  .ss-usp { gap: 14px; padding: 14px 0; }
  .ss-usp h3 { font-size: 18px; }
  .ss-usp p { font-size: 14px; }

  .ss-drive-copy, .ss-facts { height: 58vh; padding: 0 18px; }
  .ss-drive-stage { bottom: 5vh; }
  .ss-stat { min-width: 132px; padding: 14px 16px; flex: 1 1 40%; }

  .ss-fact { padding: 22px 22px; border-radius: 20px; }
  .ss-fact-head { font-size: clamp(22px, 6.6vw, 30px); }
  .ss-fact-sub { font-size: 14px; }
  .ss-facts-kicker { top: 9vh; letter-spacing: 0.1em; }
}

/* Very short screens: keep the car from colliding with copy */
@media (max-height: 620px) {
  .ss-drive-copy, .ss-facts { height: 52vh; }
  .ss-drive-stage { width: min(640px, 90vw); }
}
