/* ElaSystems v2 "Route 313" — tokens from docs/creative/DESIGN_DNA.md, motion from MOTION_LANGUAGE.md.
   Two modes set before first paint: html.is-world (WebGL route) and html.is-static (posters, reduced motion, no WebGL). */

@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/overpass-var-latin.woff2) format('woff2'); }
@font-face { font-family: 'Overpass Mono'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/overpass-mono-var-latin.woff2) format('woff2'); }
/* client faces, subset to their names (their real web fonts) */
@font-face { font-family: 'Bebas Neue'; font-weight: 400; font-display: swap; src: url(../fonts/clients/bebas-neue-400.woff2) format('woff2'); }
@font-face { font-family: 'Syne'; font-weight: 800; font-display: swap; src: url(../fonts/clients/syne-800.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url(../fonts/clients/montserrat-800.woff2) format('woff2'); }
@font-face { font-family: 'Anton'; font-weight: 400; font-display: swap; src: url(../fonts/clients/anton-400.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka One'; font-weight: 400; font-display: swap; src: url(../fonts/clients/fredoka-one-400.woff2) format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 600; font-display: swap; src: url(../fonts/clients/oswald-600.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url(../fonts/clients/cormorant-garamond-600.woff2) format('woff2'); }

:root {
  --night: #050B16;
  --night-2: #0A1628;
  --ink: #F2EFE8;
  --ink-dim: rgba(242, 239, 232, .72);
  --ink-faint: rgba(242, 239, 232, .16);
  --steel: #9DB0C8;
  --gold: #E3A02A;
  --gold-light: #F4CD72;
  --gold-deep: #8A5A12;
  --sign-green: #0E5B3A;
  --f-display: 'Overpass', 'Arial Narrow', system-ui, sans-serif;
  --f-mono: 'Overpass Mono', ui-monospace, Consolas, monospace;
  --k: .52;                       /* the mark's slash slope */
  --margin: clamp(18px, 4.6vw, 72px);
  --nav-h: 76px;
  --ease-in: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.6, 0, .9, .3);
  --t-micro: 120ms; --t-short: 260ms; --t-med: 700ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 17px/1.55 var(--f-display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--gold); color: var(--night); padding: 10px 16px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--margin); }
.eyebrow { font: 500 12px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-light); }

/* buttons: square-cut, one edge slashed at the mark's angle */
.btn {
  display: inline-flex; align-items: center; gap: .6em; min-height: 52px; padding: 0 30px 0 24px;
  font: 800 15px/1 var(--f-display); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 52px * var(--k) * .5) 100%, 0 100%);
  transition: background-color var(--t-short) var(--ease-in), color var(--t-short) var(--ease-in);
}
.btn .num { font-family: var(--f-mono); font-weight: 600; letter-spacing: .02em; }
.btn-gold { background: var(--gold); color: #0A0F18; }
.btn-gold:hover { background: var(--gold-light); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--ink); clip-path: none; }
.btn-line:hover { background: rgba(227, 160, 42, .14); }

/* ── stage: the persistent world ── */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--night); }
.stage canvas, .stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage picture { display: contents; }
.stage-poster { object-fit: cover; transition: opacity 400ms ease; }
.stage.is-live .stage-poster { opacity: 0; }
.stage canvas { opacity: 0; transition: opacity 500ms ease; }
.stage.is-live canvas { opacity: 1; }
.stage-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 11, 22, .78) 0%, rgba(5, 11, 22, .42) 30%, rgba(5, 11, 22, 0) 52%);
  opacity: var(--scrim, 1);
}
.stage::after { content: ''; position: absolute; inset: 0; background: var(--night); opacity: var(--dim, 0); pointer-events: none; }
.is-static .stage { display: none; }

/* ── nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 34px; padding-inline: var(--margin);
  background: linear-gradient(180deg, rgba(5, 11, 22, .8), rgba(5, 11, 22, 0));
}
.nav { transition: background-color var(--t-short) var(--ease-in); }
.nav.is-solid, .is-static .nav { background: rgba(5, 11, 22, .95); border-bottom: 1px solid var(--ink-faint); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 54px; height: auto; filter: drop-shadow(0 0 10px rgba(227, 160, 42, .25)); }
.brand-word { font: 500 13px/1 var(--f-display); letter-spacing: .34em; color: var(--ink); }
.brand-word b { font-weight: 500; color: var(--gold); }
.wm-lambda { width: .62em; height: .84em; margin-left: .06em; vertical-align: -.02em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font: 500 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink-dim); padding-block: 14px; transition: color var(--t-short) var(--ease-in); }
.nav-links a:hover { color: var(--gold-light); }
.nav-cta { min-height: 42px; font-size: 14px; }

/* ── the drive (scroll track) ── */
.drive { position: relative; z-index: 2; }
.is-world .drive-track { position: relative; height: var(--track, 1400vh); }
.is-world .scene { position: absolute; left: 0; right: 0; top: var(--top, 0); height: var(--h, 100vh); pointer-events: none; }
.is-world .scene-inner { position: sticky; top: 0; height: 100vh; height: 100svh; }
.is-world .scene-poster { display: none; }
.is-world .drive-track:not(.is-laid) .scene:not(.scene-hero) { visibility: hidden; } /* no layout shift before positioning */
.scene .hero, .scene .stop, .scene .collection, .scene .commerce { pointer-events: auto; }

/* hero */
.hero { position: absolute; left: var(--margin); bottom: clamp(56px, 11vh, 120px); width: min(760px, 52vw); }
.hero-title { margin: 18px 0 30px; font: 850 clamp(40px, 5.6vw, 96px)/.95 var(--f-display); letter-spacing: -.028em; text-wrap: balance; }
.hero-title .beat { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .beat > span { display: block; }
.hero-title em { font-style: normal; color: var(--gold-light); }
.beat-2 { color: var(--ink); }
.is-world .beat-2 > span { transform: translateY(var(--b2, 105%)); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.link-drive { font: 700 15px/1 var(--f-display); text-decoration: none; padding: 16px 0; border-bottom: 1.5px solid var(--ink-faint); }
.link-drive:hover { border-color: var(--gold); }
.is-world .scene-hero .hero { opacity: var(--o, 1); transform: translateY(calc((1 - var(--o, 1)) * -24px)); }

/* stop panels: typographic, on the dark left third — no boxes */
.stop { position: absolute; left: var(--margin); top: 50%; transform: translateY(-50%); width: min(560px, 40vw); }
.is-world .stop { opacity: var(--o, 0); transform: translateY(calc(-50% + (1 - var(--o, 0)) * 18px)); }
.stop-meta { font: 500 12px/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.stop-n { color: var(--accent, var(--gold-light)); margin-right: .8em; }
.stop-name { margin: 14px 0 18px; font-size: clamp(44px, 5.2vw, 88px); font-weight: 400; line-height: .92; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.stop-line { font-size: 18px; color: var(--ink-dim); max-width: 30em; }
.stop-built { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 20px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.stop-built li:not(:last-child)::after { content: ''; display: inline-block; width: 18px; height: 2px; margin: 0 10px 3px; background: var(--ink-faint); vertical-align: middle; }
.stop-link { display: inline-flex; margin-top: 26px; min-height: 44px; align-items: center; font: 800 16px/1.2 var(--f-display); text-decoration: none; border-bottom: 2px solid var(--accent, var(--gold)); }
.stop-link:hover { color: var(--gold-light); }

/* collection + commerce */
.collection, .commerce { position: absolute; left: var(--margin); bottom: clamp(64px, 12vh, 130px); width: min(760px, 56vw); }
.is-world .collection, .is-world .commerce { opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 20px)); }
.collection-title, .commerce-title { margin: 16px 0 18px; font: 850 clamp(40px, 5.4vw, 92px)/.95 var(--f-display); letter-spacing: -.028em; }
.collection-note { max-width: 32em; color: var(--ink-dim); }
.commerce-line { font-size: 19px; color: var(--ink-dim); max-width: 30em; }
.commerce-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 26px; }

/* route strip (sat-nav) */
.routestrip {
  position: fixed; left: var(--margin); bottom: 26px; z-index: 40; width: 250px;
  font: 500 11px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim);
  opacity: 0; transform: translateY(8px); transition: opacity var(--t-short) var(--ease-in), transform var(--t-short) var(--ease-in); pointer-events: none;
}
.routestrip.is-on { opacity: 1; transform: none; pointer-events: auto; }
.rs-road { margin-bottom: 10px; color: var(--steel); }
.rs-now { display: inline-block; margin-left: 4px; padding: 3px 8px 2px; border-radius: 3px; background: var(--sign-green); color: var(--ink); font: 700 12px/1.3 var(--f-display); letter-spacing: .02em; text-transform: none; box-shadow: inset 0 0 0 1px rgba(242, 239, 232, .7); }
.rs-stops { position: relative; border-left: 2px dashed var(--ink-faint); padding-left: 0; }
.rs-stops a { display: flex; align-items: center; gap: 10px; min-height: 26px; padding-left: 12px; text-decoration: none; }
.rs-stops i { width: 8px; height: 8px; margin-left: -17px; border-radius: 50%; background: var(--night); box-shadow: 0 0 0 2px var(--ink-faint); flex: none; transition: background-color var(--t-short); }
.rs-stops a.is-past i { background: var(--gold-deep); box-shadow: 0 0 0 2px var(--gold-deep); }
.rs-stops a.is-now { color: var(--ink); }
.rs-stops a.is-now i { background: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--gold); }
.rs-stops a:hover { color: var(--gold-light); }
.is-static .routestrip { display: none; }

/* ── after the drive: services, why, contact (over the dimmed world) ── */
.services, .why, .contact { position: relative; z-index: 3; }
.services { padding: clamp(110px, 14vw, 190px) 0 clamp(60px, 7vw, 100px); background: linear-gradient(180deg, rgba(5, 11, 22, 0) 0, rgba(5, 11, 22, .88) 180px, var(--night) 420px); }
.section-title { margin: 16px 0 clamp(40px, 5vw, 70px); font: 850 clamp(38px, 5vw, 84px)/.95 var(--f-display); letter-spacing: -.028em; }
.svc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.svc li { position: relative; padding: 26px 26px 30px; border-radius: 6px; background: #0B1A2E; box-shadow: inset 0 0 0 1.5px rgba(242, 239, 232, .55); }
.svc li:nth-child(1) { grid-column: 1 / span 5; }
.svc li:nth-child(2) { grid-column: 6 / span 4; margin-top: 60px; }
.svc li:nth-child(3) { grid-column: 10 / span 3; margin-top: 120px; }
.svc-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; background: var(--gold); color: #0A0F18; font: 900 18px/1 var(--f-display); }
.svc h3 { margin: 18px 0 10px; font: 850 clamp(28px, 2.6vw, 42px)/1 var(--f-display); letter-spacing: -.02em; }
.svc p { color: var(--ink-dim); font-size: 16px; }

.why { background: var(--night); padding: clamp(80px, 10vw, 150px) 0; }
.why-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: start; }
.why-title { grid-column: 1 / span 7; font: 850 clamp(34px, 4.4vw, 72px)/1 var(--f-display); letter-spacing: -.025em; }
.why-title span { color: var(--gold-light); }
.why-body { grid-column: 8 / span 5; padding-top: 10px; }
.why-body > p { color: var(--ink-dim); }
.steps { margin-top: 30px; border-left: 2px dashed var(--ink-faint); }
.steps li { position: relative; padding: 0 0 18px 22px; color: var(--ink-dim); font-size: 16px; }
.steps li::before { content: ''; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; background: var(--gold); transform: skewX(-27deg); }
.steps b { display: block; font: 800 20px/1.3 var(--f-display); color: var(--ink); }

.contact { background: var(--night); padding: clamp(60px, 8vw, 120px) 0 clamp(90px, 10vw, 150px); border-top: 1px solid var(--ink-faint); }
.contact-title { margin-top: 16px; font: 850 clamp(30px, 3.4vw, 56px)/1 var(--f-display); letter-spacing: -.02em; }
.contact-number { display: block; width: fit-content; margin: 22px 0 30px; font: 900 clamp(56px, 11vw, 190px)/.9 var(--f-display); letter-spacing: -.04em; color: var(--gold); text-decoration: none; }
.contact-number:hover { color: var(--gold-light); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.link-plain { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--ink-faint); padding: 12px 0; }
.link-plain:hover { color: var(--gold-light); }

.foot { position: relative; z-index: 3; background: #03070E; border-top: 1px solid var(--ink-faint); padding: 44px 0 36px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px 24px; }
.foot-brand { grid-column: 1 / span 5; display: flex; align-items: center; gap: 14px; color: var(--ink-dim); }
.foot-brand img { width: 58px; height: auto; }
.foot-meta { grid-column: 6 / span 3; font: 500 12px/1.6 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); }
.foot-contact { grid-column: 9 / span 4; font-style: normal; color: var(--ink-dim); }
.foot-contact a { text-decoration: none; color: var(--ink); }
.foot-legal { grid-column: 1 / -1; font: 400 12px/1.5 var(--f-mono); color: rgba(242, 239, 232, .55); }

/* ── static mode: posters + stacked stops (reduced motion, no WebGL, no JS) ── */
.is-static .drive { padding-top: var(--nav-h); }
.is-static .scene { position: relative; }
.is-static .scene-inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; padding: 40px var(--margin); }
.is-static .scene-poster { grid-column: 6 / -1; grid-row: 1; width: 100%; }
.is-static .scene-poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.is-static .hero, .is-static .stop, .is-static .collection, .is-static .commerce { position: static; transform: none; width: auto; grid-column: 1 / span 5; grid-row: 1; }
.is-static .scene-hero .scene-inner { min-height: 80vh; }
.is-static .beat-2 > span { transform: none; }
.is-static .hero-title { font-size: clamp(36px, 3.7vw, 62px); }
.is-static .scene-hero .scene-inner { align-items: end; }

/* ═══ phones & narrow tablets: recomposed, not scaled ═══ */
@media (max-width: 899px) {
  :root { --nav-h: 62px; }
  .nav { gap: 14px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; min-height: 40px; padding: 0 20px 0 16px; font-size: 13px; }
  .brand-mark { width: 44px; }
  .brand-word { font-size: 11px; letter-spacing: .26em; }
  .stage-scrim { background: linear-gradient(0deg, rgba(5, 11, 22, .92) 0%, rgba(5, 11, 22, .7) 30%, rgba(5, 11, 22, 0) 58%); }
  .hero { left: var(--margin); right: var(--margin); width: auto; bottom: calc(24px + env(safe-area-inset-bottom)); }
  .hero-title { font-size: clamp(34px, 10vw, 54px); margin: 14px 0 22px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .stop { top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); left: var(--margin); right: var(--margin); width: auto; transform: none; }
  .is-world .stop { transform: translateY(calc((1 - var(--o, 0)) * 18px)); }
  .stop-name { font-size: clamp(38px, 11vw, 60px); margin: 10px 0 12px; }
  .stop-line { font-size: 16px; }
  .stop-built { margin-top: 14px; font-size: 11px; }
  .stop-link { margin-top: 14px; }
  .collection, .commerce { left: var(--margin); right: var(--margin); width: auto; bottom: calc(40px + env(safe-area-inset-bottom)); }
  .routestrip { left: 0; right: 0; top: var(--nav-h); bottom: auto; width: auto; padding: 6px var(--margin) 0; }
  .rs-road { margin: 0; }
  .rs-stops { display: none; }
  .svc { grid-template-columns: 1fr; }
  .svc li:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .why-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .why-title, .why-body { grid-column: 1 / -1; }
  .foot-brand, .foot-meta, .foot-contact { grid-column: 1 / -1; }
  .is-static .scene-inner { grid-template-columns: 1fr; padding: 24px var(--margin) 40px; }
  .is-static .scene-poster { grid-column: 1; grid-row: 1; }
  .is-static .scene-poster img { aspect-ratio: 4 / 5; object-position: 50% 0; }
  .is-static .hero, .is-static .stop, .is-static .collection, .is-static .commerce { grid-column: 1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}
