/* Fastlane Lux
 * Colour rule 60 / 30 / 10:
 *   60  charcoal black (from the logo plate)
 *   30  deep emerald (the "rich" third colour: old-money pairing with gold, cool against Phoenix warm tones)
 *   10  brushed gold (from the logo; accents, numbers, CTA only)
 */
:root {
  --ink: #0b0d0c;
  --ink-2: #111513;
  --emerald: #0f3d33;
  --emerald-deep: #082a22;
  --emerald-line: rgba(64, 140, 116, 0.28);
  --gold: #cfb27a;
  --gold-hi: #e6d3a3;
  --gold-deep: #9c7f47;
  --ivory: #f1ebde;
  --ivory-dim: rgba(241, 235, 222, 0.72);
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* Film grain on a fixed layer only */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: radial-gradient(120% 90% at 50% 40%, var(--emerald-deep) 0%, var(--ink) 62%);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
#loader.is-done { opacity: 0; visibility: hidden; }
.loader-brand { width: min(320px, 64vw); animation: breathe 2.4s ease-in-out infinite; }
.loader-track { width: min(240px, 50vw); height: 1px; background: rgba(207, 178, 122, 0.2); overflow: hidden; }
#loader-bar { height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); transition: transform 0.25s linear; }
#loader-percent { font-size: 0.72rem; letter-spacing: 0.32em; color: var(--gold); font-variant-numeric: tabular-nums; }
@keyframes breathe { 50% { opacity: 0.75; transform: scale(0.985); } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: 0 clamp(16px, 4vw, 56px);
  background: linear-gradient(to bottom, rgba(11, 13, 12, 0.85), rgba(11, 13, 12, 0));
}
.brand img { height: 46px; width: auto; }
.nav { display: flex; justify-content: center; gap: clamp(16px, 2.6vw, 40px); }
.nav a {
  position: relative;
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-dim);
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ivory); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.call-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px;
  border: 1px solid rgba(207, 178, 122, 0.45);
  border-radius: 999px;
  background: rgba(8, 42, 34, 0.55);
  box-shadow: inset 0 1px 0 rgba(230, 211, 163, 0.12);
  font-size: 0.78rem; letter-spacing: 0.08em;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.2s var(--ease);
}
.call-pill:hover { background: var(--emerald); border-color: var(--gold); }
.call-pill:active { transform: scale(0.98); }
.call-label { color: var(--ivory-dim); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.66rem; }
.call-num { color: var(--gold-hi); font-weight: 500; font-variant-numeric: tabular-nums; }
.call-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fbf98; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Hero ---------- */
.hero-standalone {
  position: relative; z-index: 5;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) 6vw 12vh;
  background:
    radial-gradient(80% 70% at 82% 60%, rgba(15, 61, 51, 0.75) 0%, rgba(15, 61, 51, 0) 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  overflow: hidden;
}
.hero-standalone::before {
  /* hairline gold arc: the turntable the truck sits on */
  content: ""; position: absolute;
  width: 120vmax; height: 120vmax; right: -58vmax; top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(207, 178, 122, 0.16);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.hero-inner { position: relative; max-width: 1100px; }
.hero-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.6rem, 10.5vw, 12.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  margin: 18px 0 28px;
}
.hero-heading .word { display: inline-block; }
.hero-heading .gold { color: var(--gold); font-style: italic; }
.hero-tagline { max-width: 34ch; font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--ivory-dim); margin: 0; }
.scroll-cue {
  position: absolute; left: 6vw; bottom: 5vh;
  display: flex; align-items: center; gap: 14px;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold);
}
.scroll-cue i { width: 60px; height: 1px; background: var(--gold); transform-origin: left; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- Labels / type ---------- */
.section-label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.2vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 14px 0 22px;
}
.section-body { font-size: clamp(1rem, 1.15vw, 1.15rem); color: var(--ivory-dim); max-width: 42ch; margin: 0 0 22px; }
.section-note {
  display: inline-block;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ivory);
  padding-top: 14px; border-top: 1px solid rgba(207, 178, 122, 0.4);
}

/* ---------- Canvas ---------- */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 1;
  clip-path: circle(0% at 50% 55%);
  background: var(--ink);
  perspective: 1400px;
}
#canvas {
  width: 100%; height: 100%; display: block;
  transform: scale(1.05);
  will-change: transform;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 13, 12, 0.78) 0%, rgba(11, 13, 12, 0) 38%, rgba(11, 13, 12, 0) 62%, rgba(11, 13, 12, 0.78) 100%),
    linear-gradient(0deg, rgba(8, 42, 34, 0.55) 0%, rgba(8, 42, 34, 0) 30%);
  opacity: var(--vig, 1);
}

#dark-overlay {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 50%, rgba(8, 42, 34, 0.94), rgba(11, 13, 12, 0.96));
  opacity: 0;
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  position: fixed; left: 0; right: 0; top: calc(var(--header-h) + 2vh); z-index: 3;
  pointer-events: none; overflow: hidden; opacity: 0;
}
.marquee-text {
  white-space: nowrap;
  font-family: var(--font-display);
  font-style: italic; font-weight: 600;
  font-size: 11vw; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(207, 178, 122, 0.42);
  will-change: transform;
}

/* ---------- HUD ---------- */
.hud {
  position: fixed; z-index: 40;
  left: clamp(16px, 4vw, 56px); bottom: clamp(18px, 4vh, 40px);
  display: flex; align-items: center; gap: 16px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}
.hud.is-on { opacity: 1; transform: none; }
.hud-ring { position: relative; width: 58px; height: 58px; }
.hud-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hud-ring circle { fill: none; stroke-width: 1.5; }
.ring-bg { stroke: rgba(207, 178, 122, 0.18); }
.ring-fg { stroke: var(--gold); stroke-dasharray: 176; stroke-dashoffset: 176; stroke-linecap: round; }
.hud-deg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.62rem; letter-spacing: 0.06em; color: var(--ivory); font-variant-numeric: tabular-nums;
}
.hud-text { display: grid; line-height: 1.25; }
.hud-kind { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: #6fcaa4; }
.hud-place { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.hud-spin { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); }
.hud-spin b { color: var(--gold); font-weight: 500; }
.hud-text > * { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.hud.is-swapping .hud-kind, .hud.is-swapping .hud-place { opacity: 0; transform: translateY(6px); }

/* ---------- Scroll sections ---------- */
#scroll-container { position: relative; z-index: 4; height: 1100vh; }
.scroll-section {
  /* Pinned in place while its spin is active; the container only supplies scroll distance */
  position: fixed; left: 0; right: 0; top: 50%; z-index: 4;
  transform: translateY(-50%);
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.scroll-section.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.align-left { padding-left: 6vw; padding-right: 55vw; }
.align-right { padding-left: 57vw; padding-right: 5vw; }
.align-left .section-inner, .align-right .section-inner { max-width: 40vw; }

/* Stats: the one centred moment, over the dark overlay */
.section-stats { padding: 0 6vw; text-align: center; }
.stats-head { margin-bottom: 7vh; }
.stats-head .section-heading { max-width: 18ch; margin-left: auto; margin-right: auto; }
.stats-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--emerald-line);
}
.stat { padding: 40px 24px 0; display: grid; justify-items: center; }
.stat + .stat { border-left: 1px solid var(--emerald-line); }
.stat-number {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(4.5rem, 9vw, 9rem); line-height: 0.9;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.stat-suffix { font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-hi); margin-top: 8px; }
.stat-label { font-size: 0.95rem; color: var(--ivory-dim); margin-top: 10px; }

/* CTA: sits under the logo end card */
.section-cta {
  top: auto; bottom: 0; transform: none;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 6vw 6vh;
}
.cta-row {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px;
  padding-top: 32px; border-top: 1px solid rgba(207, 178, 122, 0.35);
}
.cta-copy .section-heading { font-size: clamp(2.4rem, 4.2vw, 4.4rem); margin-bottom: 12px; }
.cta-copy .section-body { margin: 0; }
.cta-email { margin: 14px 0 0; font-size: 0.9rem; color: var(--ivory-dim); }
.cta-email a { color: var(--gold-hi); border-bottom: 1px solid rgba(207, 178, 122, 0.4); transition: border-color 0.3s var(--ease); word-break: break-all; }
.cta-email a:hover { border-color: var(--gold-hi); }
.cta-button {
  display: grid; gap: 6px; justify-items: start;
  padding: 26px 38px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 24px 48px -24px rgba(8, 42, 34, 0.9);
  transition: background 0.35s var(--ease), scale 0.2s var(--ease); /* never transition transform: GSAP owns it */
}
.cta-button:hover { background: var(--gold-hi); }
.cta-button:active { scale: 0.985; }
.cta-kicker { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--emerald); }
.cta-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.fine { margin: 26px 0 0; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(241, 235, 222, 0.45); }

.call-sticky { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .site-header { grid-template-columns: auto 1fr; }
  .call-pill { justify-self: end; }
  .call-label { display: none; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .call-pill { padding: 8px 14px 8px 12px; font-size: 0.72rem; }
  .hero-standalone { align-items: flex-end; padding-bottom: 18vh; }
  .hero-heading { font-size: clamp(3.2rem, 15vw, 5rem); }
  #scroll-container { height: 650vh; }
  .align-left, .align-right { padding: 0 16px; }
  .align-left .section-inner, .align-right .section-inner {
    max-width: none;
    padding: 22px 20px 24px;
    background: linear-gradient(180deg, rgba(11, 13, 12, 0.2), rgba(11, 13, 12, 0.88) 30%);
    border-left: 1px solid var(--gold);
  }
  .section-content { top: auto; bottom: 84px; transform: none; }
  .section-stats { padding: 0 16px; }
  .marquee-wrap { top: calc(var(--header-h) + 1vh); }
  .call-sticky { transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
  body.cta-on .call-sticky { opacity: 0; transform: translateY(20px); pointer-events: none; }
  .section-heading { font-size: clamp(2.1rem, 9vw, 3rem); }
  .vignette { background: linear-gradient(0deg, rgba(11, 13, 12, 0.92) 0%, rgba(11, 13, 12, 0) 55%); }
  .stats-grid { grid-template-columns: 1fr; border-top: 0; }
  .stat { padding: 18px 0; border-top: 1px solid var(--emerald-line); }
  .stat + .stat { border-left: 0; }
  .stat-number { font-size: 4.2rem; }
  .stats-head { margin-bottom: 3vh; }
  .hud { display: none; }
  .marquee-text { font-size: 18vw; }
  .section-cta { padding: 0 16px 28px; }
  .cta-row { grid-template-columns: 1fr; gap: 22px; }
  .cta-button { justify-items: stretch; text-align: center; }
  .call-sticky {
    display: block; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 45;
    padding: 15px 18px; text-align: center;
    background: var(--gold); color: var(--ink);
    font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
    border-radius: 2px;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-standalone::before, .loader-brand, .call-dot, .scroll-cue i { animation: none; }
}
