/* hairpin.bike — one page, no build step. Animations live in site.js. */

:root {
    --bg: #f6f4ef;
    --surface: #ffffff;
    --sunken: #eeebe4;
    --text: #16181d;
    --muted: #5b606b;
    --accent: #e0321c;
    --route: #1a6fe8;
    --route-casing: #0b3f8f;
    --rain: #5b8fd6;
    --line: #e3dfd6;
    --map: #ecebe6;
    --road: #ffffff;
    --hill: #dcdcd4;
    --water: #c9dcef;
    --good: #2f9e55;
    --warn: #e8a23a;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .28);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111317;
        --surface: #1b1e24;
        --sunken: #16191e;
        --text: #f2f1ee;
        --muted: #a4a8b1;
        --accent: #ff5a3d;
        --route: #3d9bff;
        --route-casing: #0d3c7a;
        --rain: #7aa6e6;
        --line: #2a2e36;
        --map: #22252b;
        --road: #3a3e45;
        --hill: #2b2f36;
        --water: #1f3550;
        --good: #49c172;
        --warn: #f0b252;
        --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--line); }
header { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { min-height: 44px; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
nav a { text-decoration: none; padding: 10px 0; }
nav a:hover { color: var(--text); }
@media (max-width: 760px) { nav { display: none; } }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 80px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 24px; } }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 22px; }
.hero p { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 44ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 12px 22px; min-height: 52px; border-radius: 14px; font-weight: 700; font-size: 16px; }
.badge svg { width: 22px; height: 22px; }
.badge small { display: block; font-weight: 500; opacity: .7; font-size: 12px; }
.ghost { display: inline-flex; align-items: center; min-height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 16px; }

.phone { justify-self: center; width: min(340px, 86vw); aspect-ratio: 9 / 18.5; border-radius: 46px; background: var(--text); padding: 12px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--map); }
.screen > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Chips, shared by every stage */
.chip { position: absolute; background: var(--surface); color: var(--text); border-radius: 14px; padding: 8px 12px; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.14); transition: opacity .4s, transform .4s; }
.chip b { display: block; font-size: 14.5px; }
.chip.muted { color: var(--muted); }
.chip.accent { background: var(--accent); color: #fff; font-weight: 700; }
.chip.hide { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.hero .chip { left: 14px; right: 14px; }
.hero .chip.top { top: 18px; }
.hero .chip.rain { top: 84px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.hero .chip.rain svg { width: 18px; height: 18px; flex: none; }
.hero .chip.switch { left: 14px; right: auto; bottom: 18px; top: auto; display: flex; align-items: center; gap: 8px; }
.hero .chip.switch svg { width: 16px; height: 16px; }

/* Scenes */
.scene { padding: 72px 0; border-top: 1px solid var(--line); }
.scene .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.scene.flip .wrap > .copy { order: 2; }
@media (max-width: 860px) {
    .scene { padding: 56px 0; }
    .scene .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .scene.flip .wrap > .copy { order: 0; }
}
.copy h2 { font-size: clamp(28px, 4.2vw, 42px); letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 14px; }
.copy p { color: var(--muted); margin: 0 0 14px; font-size: 18px; max-width: 48ch; }
.copy ul { margin: 0; padding-left: 20px; color: var(--muted); }
.copy li { margin: 6px 0; }
.copy .note { font-size: 14px; }

.stage-col { min-width: 0; }
.stage { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: var(--map); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .chip.tl { top: 12px; left: 12px; }
.stage .chip.tr { top: 12px; right: 12px; }
.stage .chip.bl { bottom: 12px; left: 12px; }
.stage .chip.br { bottom: 12px; right: 12px; }
@media (max-width: 480px) {
    .stage .chip { font-size: 11.5px; padding: 6px 9px; border-radius: 11px; }
    .stage .chip b { font-size: 12.5px; }
}

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .1s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn:focus-visible, input[type=range]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.seg .btn { border: 0; border-radius: 0; }

.slider { flex: 1 1 260px; min-width: 0; }
.slider label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.slider output { color: var(--text); font-weight: 700; }
input[type=range] { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); background: transparent; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* SVG map vocabulary */
.m-bg { fill: var(--map); }
.m-hill { fill: var(--hill); }
.m-water { fill: var(--water); }
.m-road { fill: none; stroke: var(--road); stroke-linecap: round; stroke-linejoin: round; }
.m-block { fill: var(--sunken); stroke: var(--line); stroke-width: 1; }
.m-casing { fill: none; stroke: var(--route-casing); stroke-linecap: round; stroke-linejoin: round; }
.m-route { fill: none; stroke: var(--route); stroke-linecap: round; stroke-linejoin: round; }
.m-route.alt { stroke: color-mix(in srgb, var(--route) 45%, var(--map)); }
.m-label { fill: var(--muted); font: 600 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.m-strong { fill: var(--text); font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.fade { transition: opacity .6s ease; }
.draw { transition: stroke-dashoffset 1.2s ease; }
.cloud { transition: transform 1.6s cubic-bezier(.4, 0, .2, 1); }
.rain-drop { stroke: var(--rain); stroke-width: 3; stroke-linecap: round; }
.rain-blob { fill: var(--rain); opacity: .3; }

/* Route bar */
.bar-stage .rbar { position: absolute; left: 14px; top: 14px; bottom: 14px; width: 40px; border-radius: 20px; background: var(--surface); box-shadow: 0 6px 18px rgba(0,0,0,.14); overflow: hidden; }
.rbar .item { position: absolute; top: 0; left: 6px; width: 28px; height: 28px; margin-top: -14px; display: grid; place-items: center; will-change: transform; }
.rbar .item svg { width: 22px; height: 22px; }
.rbar .rain { position: absolute; left: 4px; right: 4px; border-radius: 6px; background: var(--rain); opacity: .45; }
.rbar .rider { position: absolute; left: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.rbar .rider svg { width: 14px; height: 14px; }
.bar-stage .dist { position: absolute; left: 60px; font: 700 12px -apple-system, BlinkMacSystemFont, sans-serif; background: var(--surface); padding: 2px 7px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,.12); margin-top: -10px; white-space: nowrap; will-change: transform; }
.i-cam { color: #e8792a; }
.i-fuel { color: var(--text); }
.i-flag { color: var(--accent); }

/* Group */
.dot-label { font: 800 9px -apple-system, BlinkMacSystemFont, sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: central; }

/* Tilt */
.tilt-stage { perspective: 900px; perspective-origin: 50% 0%; background: var(--sunken); }
.tilt-plane { position: absolute; left: -12%; right: -12%; top: -6%; bottom: -30%; transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(.4, 0, .2, 1); }
.tilt-plane svg { width: 100%; height: 100%; display: block; }
.tilt-stage.three .tilt-plane { transform: rotateX(52deg) translateY(-6%) scale(1.15); }

/* Elevation */
.elev-read { font: 800 13px -apple-system, BlinkMacSystemFont, sans-serif; fill: var(--text); }

/* Small trio */
.trio { padding: 72px 0; border-top: 1px solid var(--line); }
.trio h2 { font-size: clamp(28px, 4.2vw, 42px); letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 12px; }
.trio .lead { color: var(--muted); max-width: 60ch; margin: 0 0 30px; font-size: 18px; }
.trio-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.trio-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.trio-card .stage { border: 0; border-radius: 0; box-shadow: none; }
.trio-card .txt { padding: 18px 20px 22px; }
.trio-card h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.trio-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.soon { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); vertical-align: 2px; }
.car { background: #0d0f13; }
.car .chip { background: #23262d; color: #f2f1ee; }
.car .chip.alert { background: #2b2f37; border-left: 4px solid #e8792a; }

/* Features overview (unchanged look) */
section h2.title { font-size: clamp(28px, 4.4vw, 40px); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 12px; }
section p.lead { color: var(--muted); max-width: 60ch; margin: 0 0 32px; font-size: 18px; }
.features { padding: 64px 0; border-top: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.group { margin-top: 40px; }
.group:first-of-type { margin-top: 0; }
.group > h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.group > h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card h4 { font-size: 17px; margin: 0 0 6px; letter-spacing: -0.01em; }
.card.new { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card.new h4::after { content: "nieuw"; margin-left: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); vertical-align: 2px; }

.promise { padding: 64px 0; border-top: 1px solid var(--line); }
.promise .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .promise .wrap { grid-template-columns: 1fr; } }
.promise h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.promise p { color: var(--muted); margin: 0 0 12px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer p { margin: 0; }

/* Reveal on scroll */
/* Only hidden when the script runs to show it again: without JavaScript
   every scene is simply there. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Hero motion */
.hero-route { stroke-dasharray: 900; stroke-dashoffset: 900; animation: hero-draw 2.4s .4s ease forwards; }
.hero-cloud { animation: hero-drift 9s ease-in-out infinite alternate; }
@keyframes hero-draw { to { stroke-dashoffset: 0; } }
@keyframes hero-drift { from { transform: translateX(-8px); } to { transform: translateX(10px); } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-route { animation: none; stroke-dashoffset: 0; }
    .hero-cloud { animation: none; }
    .fade, .draw, .cloud, .tilt-plane, .chip { transition: none !important; }
}
