/*
 * Startpagina. Bouwt voort op de kleuren en het lettertype van styles.css.
 * Het ene opvallende element is de voorbeeldrit: een weg die per land
 * evenredig met de kilometers is opgedeeld, met het bedrag eronder.
 */
:root {
  --seg1: #0d1411; --seg2: #24463c; --seg3: #3e6e5f; --dash: #87e2c6;
  --wrap: 1080px; --gap: clamp(20px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root { --seg1: #3d7566; --seg2: #5fae98; --seg3: #87e2c6; --dash: #0d1411; }
}

body.landing { display: block; height: auto; min-height: 100%; font-size: 17px; line-height: 1.6; }
.landing .wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.landing .num { font-variant-numeric: normal; }
.landing h1, .landing h2, .landing h3 { font-family: var(--font); margin: 0; }
.landing p { margin: 0; max-width: 62ch; }

/* Kopbalk: tweede link als knop */
.landing .top { padding: 6px 20px; }
.landing .top nav { display: flex; align-items: center; gap: 20px; }
.landing .top nav a { white-space: nowrap; }
.landing .top nav a.nav-cta { background: var(--brand-mint); color: var(--brand-dark); border-radius: 5px; padding: 7px 13px; font-weight: 700; border-bottom: none; }
.landing .top nav a.nav-cta:hover { background: #9ceacf; }

/* Knoppen en tekstlinks */
.landing .btn { display: inline-block; background: var(--brand-mint); color: var(--brand-dark); font-weight: 700; font-size: 17px; text-decoration: none; padding: 14px 24px; border-radius: 6px; border: 1px solid #5fc7a8; }
.landing .btn:hover { background: #9ceacf; }
.landing .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.landing .textlink { font-weight: 600; }

/* Hero: korte film van een vrachtwagen op de snelweg, tekst links in het donkere deel */
.hero { padding: 0 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.hero-film { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-dark); color: #fff; padding: clamp(56px, 11vw, 140px) 0 clamp(48px, 9vw, 112px); min-height: min(76vh, 700px); display: flex; align-items: center; }
.hero-film .wrap { position: relative; }
.hero-film .film { position: absolute; top: 0; right: 0; bottom: 0; width: 68%; height: 100%; object-fit: cover; object-position: 60% center; z-index: -2; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
.hero-film::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(13,20,17,.55) 0%, rgba(13,20,17,0) 35%); }
.hero h1 { font-size: clamp(2.1rem, 8.2vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 15ch; color: #fff; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; color: rgba(255,255,255,.84); margin-top: 22px; max-width: 46ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }
.hero-film .textlink { color: var(--brand-mint); }
.hero-film .textlink:focus-visible { outline: 3px solid var(--brand-mint); outline-offset: 3px; }
@media (max-width: 780px) {
  .hero-film { min-height: 0; display: block; padding: 44px 0 calc(66vw + 16px); }
  .hero-film::after { background: linear-gradient(0deg, rgba(13,20,17,0) 0%, rgba(13,20,17,0) 100%); }
  .hero-film .film { top: auto; left: 0; width: 100%; height: 74vw; object-position: 76% center; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 34%); mask-image: linear-gradient(180deg, transparent 0, #000 34%); }
}

/* Scrollgestuurde rit: de film loopt mee met scrollen, de tekst maakt plaats voor een teller */
.hero-track.scrub { height: 220vh; height: 220svh; }
.hero-track.scrub .hero-film { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 540px; padding: 0; }
.hud { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; pointer-events: none; }
.hud .wrap { position: relative; }
.hud-cta { position: absolute; left: 0; right: 0; bottom: clamp(32px, 11vh, 110px); opacity: 0; visibility: hidden; }
.hud-cta .wrap { position: relative; }
.hero-track:not(.scrub) .hud, .hero-track:not(.scrub) .scroll-cue, .hero-track:not(.scrub) .hud-cta { display: none; }
.hud-route { font-size: 1.05rem; font-weight: 600; color: rgba(255,255,255,.8); }
.hud-amount { font-size: clamp(3.4rem, 13vw, 8.2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 10px 0 6px; color: #fff; }
.hud-meta { font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,.84); }
.hud-meta span { color: #fff; font-weight: 700; }
.hud-bar { display: flex; width: min(520px, 100%); margin-top: 26px; height: 8px; }
.hud-bar i { display: block; min-width: 0; background: rgba(255,255,255,.16); overflow: hidden; }
.hud-bar i + i { margin-left: 3px; }
.hud-bar b { display: block; height: 100%; width: 0; }
.hud-bar i:nth-child(1) b { background: #3d7566; }
.hud-bar i:nth-child(2) b { background: #5fae98; }
.hud-bar i:nth-child(3) b { background: #87e2c6; }
.hud-note { font-size: 14px; color: rgba(255,255,255,.66); margin-top: 14px; max-width: 46ch; }
.scroll-cue { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 14px; color: rgba(255,255,255,.72); max-width: none; }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 28px; margin: 8px auto 0; background: linear-gradient(180deg, rgba(135,226,198,0), #87e2c6); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue::after { animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
  @keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
}
@media (max-width: 780px) {
  .hero-track.scrub .hero-film { min-height: 0; }
  .hero-track.scrub .hud { align-items: flex-start; padding-top: 44px; }
  .hero-track.scrub .hud-amount { font-size: clamp(3rem, 17vw, 4.4rem); }
  .hud-cta { bottom: 28px; }
}

/* Voorbeeldrit */
.landing figure.ledger { margin: clamp(48px, 8vw, 88px) auto 0; }
.ledger figcaption { font-size: 14px; color: var(--muted); max-width: 70ch; margin-bottom: 18px; }
.ledger .ends { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.legs { list-style: none; margin: 0; padding: 0; display: flex; }
.legs li { min-width: 0; flex-basis: 0; }
.legs .seg { display: block; width: 100%; height: 56px; position: relative; transform-origin: left center; }
.legs li + li .seg { box-shadow: -3px 0 0 var(--bg); }
.legs .seg::after { content: ""; position: absolute; left: 10px; right: 10px; top: calc(50% - 1.5px); height: 3px; background: repeating-linear-gradient(90deg, var(--dash) 0 14px, transparent 14px 28px); }
.legs .s1 { background: var(--seg1); }
.legs .s2 { background: var(--seg2); }
.legs .s3 { background: var(--seg3); }
.leg-text { display: grid; gap: 2px; padding: 12px 12px 0 0; min-width: 9.5rem; }
.leg-text b { font-size: 15px; }
.leg-text .calc { font-size: 14px; color: var(--muted); }
.leg-text strong { font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.2; }
.landing .ledger-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 14px; border-top: 2px solid var(--fg); max-width: none; }
.ledger-total span { color: var(--muted); }
.ledger-total b { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }

/* Eén ingestudeerd moment: de weg trekt zich open, daarna verschijnen de bedragen */
@media (prefers-reduced-motion: no-preference) {
  .legs .seg { animation: weg 0.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 0.14s + 0.1s); }
  .leg-text, .ledger-total { animation: bedrag 0.5s ease-out both; animation-delay: calc(var(--i, 3) * 0.14s + 0.55s); }
  @keyframes weg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes bedrag { from { opacity: 0; } to { opacity: 1; } }
}

/* Banden */
.band { padding: clamp(44px, 7vw, 88px) 0; }
.band.alt { background: var(--panel); border-block: 1px solid var(--line); }
.landing h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.12; }
.landing h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.005em; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }

/* Stappen: een echte volgorde, dus genummerd */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); counter-reset: stap; }
.steps li { counter-increment: stap; border-top: 2px solid var(--fg); padding-top: 14px; }
.steps li::before { content: counter(stap); display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--accent); margin-bottom: 10px; }
.steps p { color: var(--muted); margin-top: 6px; }

/* Tarieventabel */
.landing .intro { color: var(--muted); margin-top: 14px; }
table.rates { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 16px; }
table.rates th, table.rates td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: normal; }
table.rates thead th { font-size: 14px; color: var(--muted); padding-top: 0; border-bottom-color: var(--fg); }
table.rates tbody th { font-weight: 700; white-space: nowrap; }
table.rates td:last-child { font-weight: 600; }
.note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* Voor wie */
.uses { margin: 0; display: grid; gap: 0; }
.uses > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.uses > div:first-child { padding-top: 0; }
.uses dt { font-weight: 700; }
.uses dd { margin: 0; color: var(--muted); }

/* Nauwkeurigheid */
#nauwkeurigheid h2 { margin-bottom: 14px; }
#nauwkeurigheid p { color: var(--muted); }
.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.twocol ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 16px; }

/* Veelgestelde vragen */
.faq details { border-top: 1px solid var(--line); padding: 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; color: var(--fg); font-size: 1.05rem; font-weight: 650; padding: 16px 32px 16px 0; margin: 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--accent); line-height: 1.3; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq details p { color: var(--muted); padding: 0 32px 18px 0; }

/* Slot en voet */
.closing { background: var(--brand-dark); color: #e8eeec; padding: clamp(48px, 8vw, 96px) 0; }
.closing h2 { color: #fff; margin-bottom: 24px; }
.sitefoot { padding: 28px 0 40px; }
.sitefoot p { font-size: 14px; color: var(--muted); }
.sitefoot p + p { margin-top: 10px; display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 480px) {
  .landing .top nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 780px) {
  body.landing { font-size: 16px; }
  .split, .steps, .twocol { grid-template-columns: 1fr; }
  .steps { gap: 28px; }
  .landing .top nav { gap: 14px; }
  /* De weg wordt een lijst: elk land onder elkaar, de balk blijft evenredig breed */
  .legs { display: block; }
  .legs li { margin-bottom: 18px; }
  .legs .seg { height: 14px; }
  .legs .seg::after { display: none; }
  .leg-text { min-width: 0; padding: 8px 0 0; }
  .uses > div { grid-template-columns: 1fr; gap: 2px; }
  table.rates th, table.rates td { display: block; padding: 0; border: none; }
  table.rates thead { display: none; }
  table.rates tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.rates td:nth-child(2) { color: var(--muted); font-size: 15px; }
}
