/* Rijschool Veilig v4 "Nachtrit"
   Style: Kinetic Typography / Motion-Driven (ui-ux-pro-max), dark.
   Signature: the lane lines roll with scroll; the route line fills as you read the steps.
   Motion is scroll-linked (no timers), so nothing is hidden waiting for a clock. */

/* Fonts: self-hosted (no requests to Google, latin subset only) */
@font-face { font-family: "Syncopate"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/syncopate-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Syncopate"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/syncopate-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/geologica-latin.woff2") format("woff2"); }

/* Primitive */
:root {
  --night: oklch(0.130 0.012 262);
  --asphalt: oklch(0.200 0.014 262);
  --kerb: oklch(0.300 0.014 262);
  --fog: oklch(0.760 0.012 260);
  --marking: oklch(0.975 0.004 260);
  --lane: oklch(0.648 0.193 252.4);   /* logo lane marks */
  --lane-hi: oklch(0.720 0.160 250);
  --ring: oklch(0.550 0.203 259.5);   /* logo ring */

  --font-wide: "Syncopate", system-ui, sans-serif;
  --font-body: "Geologica", system-ui, sans-serif;

  /* type scale, 1.333 */
  --text-xs: 0.8125rem; --text-sm: 0.9375rem; --text-body: 1.0625rem;
  --text-md: 1.25rem; --text-lg: 1.666rem; --text-xl: 2.22rem;
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem; --space-24: 6rem;
  --space-section: clamp(5rem, 11vw, 9rem);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-press: 120ms; --dur-state: 240ms; --dur-enter: 700ms;
  --z-sticky: 10; --z-dock: 20; --z-skip: 30;
}

/* Semantic */
:root {
  --color-bg: var(--night);
  --color-surface: var(--asphalt);
  --color-rule: var(--kerb);
  --color-text: var(--marking);
  --color-text-muted: var(--fog);
  --color-accent: var(--lane);
  --color-accent-hover: var(--lane-hi);
  --color-on-accent: var(--night);
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1280px;
  --pad: max(var(--gutter), calc((100vw - var(--max)) / 2));
}

/* Component */
:root {
  --btn-h: 3.5rem;
  --nav-h: 4.75rem;
  --dash: repeating-linear-gradient(to right, var(--color-text) 0 2.5rem, transparent 2.5rem 5rem);
  --radius-card: 14px;
  --icon-box: 3rem;
  --stop: 3.5rem;
  --logo-hero: clamp(8.5rem, 11vw, 11rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 400 var(--text-body)/1.7 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.skip { position: absolute; left: var(--space-4); top: -4rem; z-index: var(--z-skip); padding: var(--space-3) var(--space-4); background: var(--color-accent); color: var(--color-on-accent); font-weight: 600; }
.skip:focus { top: var(--space-4); }

/* Wide display face, used for headings and numbers only */
h1, h2 {
  font-family: var(--font-wide); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 3.6vw, 3rem); }
h3 { font: 600 var(--text-md)/1.3 var(--font-body); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  min-height: var(--btn-h); padding: 0 var(--space-8);
  background: var(--color-accent); color: var(--color-on-accent);
  font: 600 var(--text-body)/1 var(--font-body); text-decoration: none; cursor: pointer;
  border-radius: 999px;
  transition: background-color var(--dur-state) var(--ease-out-expo), transform var(--dur-press) var(--ease-out-expo);
}
.btn::after { content: "→"; transition: transform var(--dur-state) var(--ease-out-expo); }
.btn:hover { background: var(--color-accent-hover); }
.btn:hover::after { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--space-8);
  min-height: var(--nav-h); padding: 0 var(--pad);
  background: oklch(0.130 0.012 262 / 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav__brand { margin-right: auto; }
.nav__links { display: flex; gap: var(--space-8); }
.nav__links a { text-decoration: none; font-size: var(--text-sm); color: var(--color-text-muted); transition: color var(--dur-state); }
.nav__links a:hover { color: var(--color-text); }
.nav__cta { font: 700 var(--text-xs)/1 var(--font-wide); letter-spacing: 0.04em; text-decoration: none; color: var(--color-accent); }

/* Hero */
.hero { position: relative; padding: var(--space-8) 0 0; overflow: hidden; }
.hero__word {
  padding: 0 var(--pad);
  font: 700 clamp(5rem, 21vw, 19rem)/0.8 var(--font-wide);
  text-transform: uppercase; letter-spacing: -0.04em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 2px var(--color-accent);
  user-select: none;
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: end;
  padding: var(--space-12) var(--pad) var(--space-16);
}
.hero__logo { width: var(--logo-hero); height: auto; margin-bottom: var(--space-6); }
.hero h1 { font-size: clamp(2rem, 3.8vw, 3.25rem); }
.hero__lead { margin: var(--space-6) 0 var(--space-8); max-width: 30rem; font-size: var(--text-md); line-height: 1.55; color: var(--color-text-muted); }
.hero__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }

/* The lane: dashed centre line, moves with scroll */
.lane { height: 4px; margin: 0 0 var(--space-4); background: var(--dash); background-size: 5rem 4px; }

/* Perks: one big languages card, three smaller ones beside it */
.perks { padding: var(--space-section) var(--pad) 0; }
.perks h2 { margin-bottom: var(--space-12); }
.perks__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-auto-rows: auto; gap: var(--space-4); }
.perk {
  display: grid; grid-template-columns: var(--icon-box) minmax(0, 1fr); column-gap: var(--space-6); row-gap: var(--space-2); align-content: start;
  padding: var(--space-8); border-radius: var(--radius-card);
  background: var(--color-surface); text-decoration: none;
}
.perk > :not(.icon) { grid-column: 2; }
.perk .icon { grid-row: span 3; }
.perk p { color: var(--color-text-muted); }
.icon {
  width: var(--icon-box); height: var(--icon-box); padding: var(--space-3);
  border-radius: var(--space-3); background: var(--color-bg);
  fill: none; stroke: var(--color-accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
a.perk { cursor: pointer; transition: background-color var(--dur-state) var(--ease-out-expo); }
a.perk:hover { background: var(--color-rule); }
.perk__go { margin-top: var(--space-2); font-weight: 600; color: var(--color-accent); }
.perk__go::after { content: " →"; }
.perk--lang {
  grid-row: span 3; grid-template-columns: 1fr; align-content: space-between; gap: var(--space-8);
  background: var(--color-accent); color: var(--color-on-accent);
}
.perk.perk--lang > * { grid-column: 1; }
.perk--lang .icon { grid-row: auto; background: var(--color-on-accent); }
.perk--lang p { max-width: 26rem; font-size: var(--text-md); color: var(--color-on-accent); }
.perk--lang .perk__langs { display: grid; max-width: none; font: 700 clamp(1.6rem, 3.4vw, 3.25rem)/1.1 var(--font-wide); text-transform: uppercase; letter-spacing: -0.03em; }

/* Prices: each row is a lane */
.prices { padding: var(--space-section) var(--pad); overflow-x: clip; }
.prices h2 { margin-bottom: var(--space-12); }
.prices__row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px dashed var(--color-rule);
}
.prices__row:first-child { border-top: 1px dashed var(--color-rule); }
.prices__name { font-size: var(--text-md); font-weight: 500; }
.prices__name small { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-text-muted); }
.prices__amount { font: 700 clamp(2rem, 5vw, 3.75rem)/1 var(--font-wide); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.prices__row--lead .prices__amount { color: var(--color-accent); }
.prices__note { margin-top: var(--space-6); color: var(--color-text-muted); }

/* Full-bleed night photo */
.night { height: clamp(22rem, 70vh, 44rem); overflow: hidden; }
.night img { width: 100%; height: 118%; object-fit: cover; object-position: center 35%; }

/* Route: three stops on one road; the line fills as you read */
.route { padding: var(--space-section) var(--pad); }
.route__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); align-items: end; margin-bottom: var(--space-16); }
.route__head p { color: var(--color-text-muted); font-size: var(--text-md); }
.route__road { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12); }
.route__road::before,
.route__road::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--stop) / 2 - 2px); height: 4px;
}
.route__road::before { background: repeating-linear-gradient(to right, var(--color-rule) 0 1.5rem, transparent 1.5rem 3rem); }
.route__road::after { background: var(--color-accent); transform-origin: left; transform: scaleX(1); }
.route__road li { position: relative; z-index: 1; display: grid; gap: var(--space-2); align-content: start; max-width: 24rem; }
.route__stop { display: grid; place-items: center; width: var(--stop); height: var(--stop); margin-bottom: var(--space-6); border-radius: 50%; background: var(--color-bg); box-shadow: 0 0 0 4px var(--color-accent); }
.route__stop .icon { background: none; }
.route__km { font: 700 var(--text-xl)/1 var(--font-wide); color: var(--color-accent); font-variant-numeric: tabular-nums; }
.route__road p { color: var(--color-text-muted); }
.route__road p a { color: var(--color-accent); font-weight: 600; }

/* FAQ */
.faq {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-12);
  padding: var(--space-section) var(--pad);
  background: var(--color-surface);
}
.faq details { border-top: 1px solid var(--color-rule); }
.faq details:last-child { border-bottom: 1px solid var(--color-rule); }
.faq summary {
  display: flex; justify-content: space-between; gap: var(--space-6);
  padding: var(--space-6) 0; cursor: pointer; list-style: none;
  font-weight: 500; font-size: var(--text-md);
  transition: color var(--dur-state);
}
.faq summary:hover { color: var(--color-accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 var(--text-lg)/1 var(--font-wide); color: var(--color-accent); transition: transform var(--dur-state) var(--ease-out-expo); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--space-12) var(--space-6) 0; color: var(--color-text-muted); }

/* Contact */
.contact {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: var(--space-section) var(--pad);
}
.contact__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.contact__copy { display: grid; gap: var(--space-6); justify-items: start; }
.contact__number { font: 700 clamp(2.25rem, 5.5vw, 4.5rem)/1 var(--font-wide); letter-spacing: -0.03em; color: var(--color-accent); text-decoration: none; }
.contact__number:hover { color: var(--color-accent-hover); }
.contact__copy p { max-width: 30rem; color: var(--color-text-muted); font-size: var(--text-md); }
.contact__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); }
.contact__links a:not(.btn) { color: var(--color-text-muted); text-underline-offset: 0.3em; }
.contact__links a:not(.btn):hover { color: var(--color-text); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding: var(--space-8) var(--pad); border-top: 1px solid var(--color-rule); color: var(--color-text-muted); font-size: var(--text-sm); }
.footer a { color: inherit; text-underline-offset: 0.2em; }
.footer a:hover { color: var(--color-text); }
.dock { display: none; }

/* Kinetic layer: scroll-linked only, so it never hides content. Off for reduced motion and unsupported browsers. */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: wipe var(--dur-enter) var(--ease-out-expo) both; }
  @keyframes wipe { from { clip-path: inset(0 100% 0 0); } }

  @supports (animation-timeline: scroll()) {

    .lane { animation: roll linear both; animation-timeline: scroll(root); animation-range: 0 150vh; }
    @keyframes roll { to { background-position: -40rem 0; } }

    .night img { animation: parallax linear both; animation-timeline: view(); }
    @keyframes parallax { from { transform: translateY(-8%); } to { transform: translateY(0); } }

    .route__road::after { animation: fill-x linear both; animation-timeline: view(); animation-range: entry 60% cover 60%; }
    @keyframes fill-x { from { transform: scaleX(0); } }
    @keyframes fill-y { from { transform: scaleY(0); } }

    .prices__row { animation: merge linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    @keyframes merge { from { transform: translateX(6%); } }
  }
}

@media (max-width: 960px) {
  .hero__grid, .route__head, .faq, .contact, .perks__grid { grid-template-columns: 1fr; }
  .perk--lang { grid-row: auto; }
  .route__road { grid-template-columns: 1fr; gap: var(--space-12); padding-left: calc(var(--stop) + var(--space-8)); }
  .route__road::before, .route__road::after { left: calc(var(--stop) / 2 - 2px); right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
  .route__road::before { background: repeating-linear-gradient(to bottom, var(--color-rule) 0 1.5rem, transparent 1.5rem 3rem); }
  .route__road::after { transform-origin: top; animation-name: fill-y; }
  .route__stop { position: absolute; left: calc(-1 * (var(--stop) + var(--space-8))); top: 0; margin: 0; }
  .hero__grid { padding-top: var(--space-8); }
  .contact__media img { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  body { padding-bottom: 5rem; }
  .nav__links { display: none; }
  .hero__word { -webkit-text-stroke-width: 1.5px; }
  .hero .btn, .contact .btn { width: 100%; }
  .prices__row { align-items: end; }
  .route__road { gap: var(--space-8); }
  .route__km { font-size: var(--text-lg); }
  .perk { padding: var(--space-6); column-gap: var(--space-4); }
  .hero__logo { --logo-hero: 7rem; }
  .faq details p { padding-right: 0; }
  .contact__media { display: none; }
  .dock {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: var(--space-3); right: var(--space-3);
    bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); z-index: var(--z-dock);
    min-height: var(--btn-h); border-radius: 999px;
    background: var(--color-accent); color: var(--color-on-accent);
    font: 600 var(--text-body)/1 var(--font-body); text-decoration: none;
    box-shadow: 0 10px 30px oklch(0 0 0 / 0.5);
    transition: transform 250ms ease, opacity 250ms ease;
  }
  /* Hidden while the hero or contact WhatsApp button is on screen, so there are never two at once */
  .dock.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
