/* ViCargo, three direction samples. Colours come from ../design-system/tokens/colors.css;
   everything else here is authored for this page. One theme per direction, never mixed. */

:root {
  --ease: cubic-bezier(.16, .84, .24, 1);
  --pad: clamp(20px, 5vw, 88px);
  --bar-h: 68px;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
}

/* ---------- A: the world continues (light, airy, geometric) ---------- */
[data-dir="a"] {
  --font: "Outfit", system-ui, sans-serif;
  --h-weight: 400; --h-track: -.025em; --h-size: clamp(34px, 4.1vw, 68px);
  --page: var(--steel-050); --ink: var(--ink-800); --soft: var(--steel-600);
  --bar-bg: rgba(248, 250, 251, .9); --bar-ink: var(--ink-800);
  --radius: 999px;
  --scrim:
    linear-gradient(180deg, rgba(6,16,26,.34) 0%, rgba(6,16,26,0) 17%),
    radial-gradient(100% 95% at 0% 100%, rgba(6,16,26,.86) 0%, rgba(6,16,26,.58) 38%, rgba(6,16,26,0) 70%),
    linear-gradient(rgba(10,23,36,.07), rgba(10,23,36,.07));
}
/* ---------- D: A's hero language, C's photo moment (contained, not full-bleed) ---------- */
[data-dir="d"] {
  --font: "Outfit", system-ui, sans-serif;
  --h-weight: 400; --h-track: -.025em; --h-size: clamp(34px, 4.1vw, 68px);
  --page: #fff; --ink: var(--ink-800); --soft: var(--steel-600);
  --bar-bg: rgba(255, 255, 255, .9); --bar-ink: var(--ink-800);
  --radius: 999px;
  --scrim:
    linear-gradient(180deg, rgba(6,16,26,.34) 0%, rgba(6,16,26,0) 17%),
    radial-gradient(100% 95% at 0% 100%, rgba(6,16,26,.86) 0%, rgba(6,16,26,.58) 38%, rgba(6,16,26,0) 70%),
    linear-gradient(rgba(10,23,36,.07), rgba(10,23,36,.07));
}
/* ---------- B: dark cinematic ---------- */
[data-dir="b"] {
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --h-weight: 500; --h-track: -.03em; --h-size: clamp(34px, 4vw, 66px);
  --page: var(--ink-900); --ink: #fff; --soft: #9CB0C4;
  --bar-bg: rgba(6, 16, 26, .82); --bar-ink: #fff;
  --radius: 3px;
  --scrim:
    linear-gradient(180deg, rgba(6,16,26,.55) 0%, rgba(6,16,26,.38) 40%, rgba(6,16,26,.72) 78%, #06101A 100%);
}
/* ---------- C: industrial editorial (white, tight, heavy) ---------- */
[data-dir="c"] {
  --font: "Instrument Sans", system-ui, sans-serif;
  --h-weight: 650; --h-track: -.035em; --h-size: clamp(38px, 4.9vw, 82px);
  --page: #fff; --ink: var(--steel-950); --soft: var(--steel-600);
  --bar-bg: rgba(255, 255, 255, .92); --bar-ink: var(--steel-950);
  --radius: 0px;
  --scrim:
    linear-gradient(180deg, rgba(6,16,26,.34) 0%, rgba(6,16,26,0) 18%, rgba(6,16,26,0) 36%, rgba(6,16,26,.9) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
/* ---------- grain: a very faint noise layer over the whole page, for depth rather than a flat
   fill (CLAUDE.md "SVG-noise grain for depth, sparingly, as accent"). User decision 2026-11-06.
   One fixed, non-interactive layer above everything, so it reads the same over light and dark
   sections without needing a rule per section. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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");
}
[data-dir="c"] body { font-stretch: 88%; }
h1, h2 { margin: 0; font-weight: var(--h-weight); letter-spacing: var(--h-track); text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:root { --focus-ring: var(--blue-600); }   /* 5.6:1 on white; the old cyan was 1.7:1 and vanished on light sections */
[data-nav="dark"], #site-footer, #vc-consent, .cc-panel, #hero { --focus-ring: var(--cyan-400); }   /* on navy, cyan is the stronger one */
.glass-card { --focus-ring: var(--ink-900); }   /* pale glass over blue: near-black is the only one that holds 3:1 */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
#top-bar a:not(.btn):focus-visible, #top-bar button:focus-visible { outline-color: currentColor; }
#top-bar .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink-900); }   /* two-tone: one of the two always reads, over white or over the dark hero */   /* the bar's text colour already flips with what is behind it */

/* ---------- buttons (one shape per direction) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-solid { background: var(--blue-600); color: #fff; }
.btn-line { border-color: rgba(255,255,255,.5); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--blue-700); }
  .btn-line:hover { background: rgba(255,255,255,.12); border-color: #fff; }
}

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; display: none; background: var(--ink-900); color: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: transform 520ms var(--ease);
}
.is-loading #loader { display: flex; }
.is-loading body { overflow: hidden; }
#loader.is-done { transform: translateX(100%); pointer-events: none; }
.loader-name { font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: 30px; letter-spacing: -.02em; }
.loader-line { width: min(340px, 64vw); height: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.loader-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--cyan-400)); transform: scaleX(0); transform-origin: left; transition: transform 180ms linear; }
.loader-pct { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; color: #9CB0C4; }

/* ---------- top bar ---------- */
#top-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--bar-h); padding: 0 var(--pad);
  display: flex; align-items: center; gap: 40px; color: #fff;
  transition: background-color 240ms ease, color 240ms ease;
}
#top-bar.is-solid { background: var(--bar-bg); color: var(--bar-ink); backdrop-filter: saturate(160%) blur(14px); }

#top-bar .name { font-weight: 600; font-size: 21px; letter-spacing: -.02em; text-decoration: none; font-family: "Outfit", system-ui, sans-serif; }
#top-bar nav { display: flex; gap: 32px; margin-left: auto; }
#top-bar nav a { font-size: 15px; text-decoration: none; opacity: .86; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) { #top-bar nav a:hover { opacity: 1; } }
@media (max-width: 860px) { #top-bar nav { display: none; } #top-bar .btn { margin-left: auto; } }

/* ---------- hero ---------- */
#hero-slot { height: 100dvh; }
#hero { position: relative; height: 100dvh; overflow: hidden; background: var(--ink-900); color: #fff; }
#hero.is-pinned { position: fixed; inset: 0; z-index: 10; }
#stage, .scrim, .veil { position: absolute; inset: 0; }
#stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.scrim { background-image: var(--scrim); }
.veil { background: #06101A; opacity: 0; pointer-events: none; }

.copy-stack { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(88px, 13vh, 150px); }
.copy { position: absolute; left: 0; bottom: 0; max-width: min(100%, 15.5em); font-size: var(--h-size); opacity: 0; transform: translateX(-14px); pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease); }
.copy.is-on { position: relative; opacity: 1; transform: none; pointer-events: auto; transition: opacity 420ms ease 80ms, transform 520ms var(--ease) 80ms; }
.copy h1, .copy h2 { font-size: 1em; line-height: 1.04; }
.copy p { font-size: clamp(17px, 1.25vw, 21px); line-height: 1.5; margin-top: 22px; max-width: 30em; color: rgba(255,255,255,.92); text-wrap: balance; }
.actions { display: flex; gap: 12px; margin-top: 32px; font-size: 16px; }

.stations { position: absolute; z-index: 3; right: var(--pad); bottom: clamp(88px, 13vh, 150px); display: flex; gap: 26px; }
.stations button {
  background: none; border: 0; padding: 6px 0; cursor: pointer; color: rgba(255,255,255,.68);
  font: inherit; font-size: 15px; border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.stations button[aria-current="true"] { color: #fff; border-bottom-color: var(--cyan-400); }
@media (hover: hover) and (pointer: fine) { .stations button:hover { color: #fff; } }

.skip { position: absolute; z-index: 50; left: var(--pad); top: 12px; padding: 10px 16px; background: #fff; color: var(--ink-800); border-radius: 4px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- first section: only the active direction shows ---------- */
.move { display: none; padding: clamp(88px, 11vw, 170px) var(--pad); }
[data-dir="a"] .move-a, [data-dir="b"] .move-b, [data-dir="c"] .move-c, [data-dir="d"] .move-d { display: block; }
.move h2 { font-size: var(--h-size); line-height: 1.04; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 600ms ease, transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* A */
.a-scene { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 4vw, 72px); }
.a-text h2 { font-size: clamp(38px, 4.6vw, 78px); font-weight: 300; }
.a-text p { margin: 26px 0 34px; max-width: 30em; color: var(--soft); font-size: 19px; }
.a-truck { width: 122%; max-width: none; filter: drop-shadow(0 34px 34px rgba(10,23,36,.16)); }
.a-modes { list-style: none; margin: clamp(64px, 8vw, 128px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px clamp(28px, 4.4vw, 76px); }
.a-modes a { font-size: clamp(22px, 2.3vw, 38px); font-weight: 300; letter-spacing: -.02em; color: var(--ink); text-decoration: underline 2px transparent; text-underline-offset: 10px; transition: text-decoration-color 240ms ease, color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .a-modes a:hover { text-decoration-color: var(--blue-500); color: var(--blue-700); } }
@media (max-width: 860px) { .a-scene { grid-template-columns: 1fr; } .a-truck { width: 100%; } }

/* B */
.b-head { max-width: 20em; font-size: var(--h-size); }
.b-head h2 { font-size: 1em; }
.b-head p { font-size: 19px; margin-top: 24px; max-width: 30em; color: var(--soft); }
.b-route { position: relative; margin-top: clamp(72px, 9vw, 140px); }
.b-truck { width: min(64%, 1040px); margin-left: 6%; position: relative; z-index: 1; transform: translateX(-9%); transition: transform 1400ms var(--ease) 150ms; }
.b-route.is-in .b-truck { transform: none; }
.b-line { height: 2px; margin-top: -3px; background: linear-gradient(90deg, var(--blue-600), var(--cyan-400)); transform: scaleX(0); transform-origin: left; transition: transform 1100ms var(--ease) 150ms; }
.b-route.is-in .b-line { transform: none; }
.b-stops { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); font-family: var(--mono); font-size: 14px; color: var(--soft); }
.b-stops li:first-child { color: #fff; }
.b-stops li:last-child { text-align: right; }
.b-stops li:nth-child(2), .b-stops li:nth-child(3) { text-align: center; }
@media (max-width: 860px) { .b-truck { width: 78%; margin-left: 0; } }

/* C */
.move-c { padding-inline: 0; }
.move-c h2 { padding: 0 var(--pad); max-width: 13em; font-size: clamp(44px, 6.6vw, 118px); line-height: .98; }
.c-photo { margin: clamp(48px, 6vw, 96px) 0 0; }
.c-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 62%; filter: saturate(.72) contrast(1.04); }
.c-photo figcaption { padding: 14px var(--pad) 0; font-size: 14px; color: var(--soft); }
.c-facts { margin: clamp(48px, 6vw, 96px) 0 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.c-facts div { border-top: 2px solid var(--steel-950); padding-top: 16px; }
.c-facts dt { font-size: 15px; color: var(--soft); }
.c-facts dd { margin: 8px 0 0; font-size: clamp(24px, 2.4vw, 40px); font-weight: 650; letter-spacing: -.03em; color: var(--steel-600); }
@media (max-width: 860px) { .c-facts { grid-template-columns: 1fr; } .c-photo img { aspect-ratio: 4 / 3; } }

/* D — A's header type, C's photo moment kept inside the page margins (not edge-to-edge) */
.d-head { max-width: 40em; }
.d-head h2 { font-size: clamp(38px, 4.6vw, 78px); font-weight: 300; line-height: 1.04; }
.d-head p { margin: 26px 0 0; max-width: 30em; color: var(--soft); font-size: 19px; }
.d-photo { margin: clamp(56px, 7vw, 112px) 0 0; }
.d-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 58%; border-radius: 20px; filter: saturate(.85); }
.d-photo figcaption { padding: 14px 2px 0; font-size: 14px; color: var(--soft); }
@media (max-width: 860px) { .d-photo img { aspect-ratio: 4 / 3; border-radius: 14px; } }

/* real truck photo slot — same prominence the 3D truck had in direction A, real photo pending */
.d-truck-ph {
  aspect-ratio: 21 / 9; border-radius: 20px; background: var(--steel-100); border: 1.5px dashed var(--steel-400);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px;
}
.d-truck-ph span { font-size: 17px; font-weight: 500; color: var(--steel-700); }
.d-truck-ph small { font-family: var(--mono); font-size: 12px; color: var(--steel-700); }
@media (max-width: 860px) { .d-truck-ph { aspect-ratio: 4 / 3; } }

/* second, single photo: one real load as quiet proof, not a gallery */
.d-photo--cargo { margin-top: clamp(40px, 5vw, 72px); }

.move-d .a-modes { margin-top: clamp(64px, 8vw, 128px); }

.sample-end { margin: 0; padding: 40px var(--pad) 140px; font-size: 14px; color: var(--soft); }

/* ---------- demo-only direction switch ---------- */
.switch {
  position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 16px; border-radius: 999px;
  background: rgba(6,16,26,.88); color: #fff; font-family: "Outfit", system-ui, sans-serif; font-size: 13px;
  box-shadow: 0 10px 30px rgba(6,16,26,.3);
}
.switch span { margin-right: 6px; color: #9CB0C4; }
.switch button { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: transparent; color: #fff; font: inherit; font-weight: 600; transition: background-color 160ms ease; }
.switch button[aria-pressed="true"] { background: var(--blue-600); }

/* ---------- small screens and reduced motion: no scroll takeover ---------- */
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .stations { display: none; }
  .copy-stack { bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .copy, .copy.is-on { transform: none; transition: opacity 200ms ease; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .b-line, .b-truck { transform: none; transition: none; }
  #loader { transition: opacity 200ms ease; }
  #loader.is-done { transform: none; opacity: 0; }
  .stations { display: none; }
}

html { overflow-x: clip; }
