/* Enrisq — design tokens uit Figma (Enrisq) + basis, knoppen, links en navigatie */
:root {
  --navy: #0b0b2a;
  --navy-light: #141457;
  --blue: #4041d6;
  --blue-hi: #5859ea;
  --sky: #508fff;
  --line-blue: #82afff;
  --lilac: #9a9ae7;
  --grey: #e8e8e8;
  --white: #fff;
  --text-2: rgba(255, 255, 255, 0.75);
  --text-3: rgba(255, 255, 255, 0.5);
  --line: rgba(220, 222, 226, 0.25);

  /* oude app-UI kleuren (telefoon + bulk) */
  --accent: #6b69e0;
  --accent-hi: #8b89f0;
  --green: #2fb37a;
  --amber: #f2a73b;
  --plate: #f7c948;
  --plate-blue: #1f4fd1;

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-eyebrow: "Schibsted Grotesk", var(--font);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);

  --pad: 48px;
  --maxw: 1184px;
  --nav-h: 94px;
}
@media (max-width: 900px) { :root { --pad: 20px; --nav-h: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0; background: var(--navy); color: var(--white);
  font-family: var(--font); font-size: 16px; line-height: 1.5; letter-spacing: -0.01em;
  font-variation-settings: "opsz" 14; /* Figma gebruikt DM Sans op optische grootte 14 */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(100% - 2 * var(--pad), var(--maxw)); margin-inline: auto; }

/* ---------- Typografie ---------- */
.h-1 { font-size: 60px; font-weight: 600; line-height: 1.2; letter-spacing: -0.035em; }
.h-2 { font-size: 48px; font-weight: 600; line-height: 1.2; letter-spacing: -0.035em; }
.h-3 { font-size: 36px; font-weight: 600; line-height: 1.2; letter-spacing: -0.035em; }
.h-card { font-size: 24px; font-weight: 600; line-height: 1.19; letter-spacing: -0.01em; }
.h-card-sm { font-size: 20px; font-weight: 600; line-height: 1.19; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--font-eyebrow); font-size: 16px; line-height: 24px; color: var(--sky); letter-spacing: 0; }
.lead { font-size: 16px; line-height: 1.5; color: var(--text-3); max-width: 517px; }
.lead-wide { max-width: 701px; }
.lead-mid { max-width: 624px; }
.small { font-size: 14px; line-height: 1.4; color: var(--text-2); }
@media (max-width: 900px) {
  .h-1 { font-size: 48px; }
  .h-2 { font-size: 36px; }
  .h-3 { font-size: 30px; }
  /* mobiel: kleine teksten een stap groter, knoppen minimaal 44px hoog */
  .lead { font-size: 17px; }
  .small { font-size: 15px; line-height: 1.45; }
  .h-card-sm { font-size: 21px; }
  .btn { min-height: 46px; padding: 11px 18px; font-size: 17px; }
}
@media (max-width: 360px) { .h-1 { font-size: 40px; } }

/* ---------- Knoppen ----------
   Hover: #508FFF vult de knop recht van onder naar boven en het label rolt omhoog
   (de kopie zit in text-shadow, dus geen dubbele tekst in de DOM). */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 2px;
  font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 180ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-hover, var(--sky));
  transform: scaleY(0); transform-origin: center bottom;
  transition: transform 520ms var(--ease-io);
}
/* nav.js wikkelt de labeltekst in .btn-roll; .btn-label knipt af op één regel */
.btn-label { --lh: 1.5em; display: block; height: var(--lh); overflow: hidden; }
.btn-roll { display: block; text-shadow: 0 var(--lh) 0 currentColor; transition: transform 480ms var(--ease-io); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) {
  .btn:hover::before { transform: scaleY(1); }
  .btn:hover .btn-roll { transform: translateY(-100%); }
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-light { background: #fff; color: #000; font-weight: 600; line-height: 1.1; }
.btn-light .btn-label { --lh: 1.1em; }
.btn-block { width: 100%; }

/* ---------- Links ----------
   Lijn groeit van links bij hover en trekt zich naar rechts terug bij verlaten. */
.link { position: relative; display: inline-block; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right center;
  transition: transform 420ms var(--ease-io);
}
@media (hover: hover) { .link:hover::after { transform: scaleX(1); transform-origin: left center; } }
.link.is-active::after { transform: scaleX(1); transform-origin: left center; }
.link-strong { font-weight: 700; }
.link-strong::after { transform: scaleX(1); transform-origin: left center; opacity: 0; transition: transform 420ms var(--ease-io), opacity 200ms; }
@media (hover: hover) {
  .link-strong:hover::after { animation: link-redraw 640ms var(--ease-io); opacity: 1; }
}
@keyframes link-redraw {
  0% { transform: scaleX(1); transform-origin: right center; }
  45% { transform: scaleX(0); transform-origin: right center; }
  46% { transform: scaleX(0); transform-origin: left center; }
  100% { transform: scaleX(1); transform-origin: left center; }
}

/* ---------- Navigatie ---------- */
.nav {
  position: fixed; z-index: 50; left: 0; right: 0; top: 0;
  padding: 16px var(--pad);
  transition: transform 600ms var(--ease-io);
}
.nav.is-hidden:not(.is-open) { transform: translateY(calc(-100% - 8px)); }
.nav-bar {
  max-width: var(--maxw); margin-inline: auto;
  background: var(--navy); border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0); transition: box-shadow 400ms;
}
.nav.is-scrolled .nav-bar { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 40px -20px rgba(0, 0, 0, 0.7); }
.nav-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 7px; flex: none; }
.brand-mark { width: 27px; height: 27px; overflow: visible; }
/* Hover op het logo: de twee schakels gaan uit elkaar, draaien elk een rondje (tegengesteld)
   en klikken weer vast; de tegel veert mee op het moment van vastklikken. nav.js zet .is-spinning. */
.brand-mark path { transform-box: fill-box; transform-origin: center; }
/* draaien en uit elkaar gaan zijn aparte animaties (rotate vs translate/scale), zodat de draai
   één doorlopende beweging is en niet stilvalt op het verste punt */
.brand.is-spinning .bm-a { animation: bm-turn-cw 900ms cubic-bezier(0.45, 0, 0.2, 1) both, bm-spread-a 900ms linear both; }
.brand.is-spinning .bm-b { animation: bm-turn-ccw 900ms cubic-bezier(0.45, 0, 0.2, 1) both, bm-spread-b 900ms linear both; }
.brand.is-spinning .bm-tile { animation: bm-tile 900ms ease-out both; }
@keyframes bm-turn-cw { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes bm-turn-ccw { from { rotate: 0deg; } to { rotate: -360deg; } }
@keyframes bm-spread-a {
  0% { translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(0.3, 0.6, 0.4, 1); }
  42% { translate: -2.4px -2.4px; scale: 0.86; animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.4); }
  86% { translate: 0.4px 0.4px; scale: 1.04; animation-timing-function: ease-out; }
  100% { translate: 0 0; scale: 1; }
}
@keyframes bm-spread-b {
  0% { translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(0.3, 0.6, 0.4, 1); }
  42% { translate: 2.4px 2.4px; scale: 0.86; animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.4); }
  86% { translate: -0.4px -0.4px; scale: 1.04; animation-timing-function: ease-out; }
  100% { translate: 0 0; scale: 1; }
}
@keyframes bm-tile { 0%, 78% { transform: none; } 86% { transform: scale(0.9); } 100% { transform: none; } }
.brand-word { width: 84px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 16px; white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 24px; }
.nav-cta { font-weight: 600; line-height: 1.1; }
.nav-cta .btn-label { --lh: 1.1em; }

.lang { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: 16px; line-height: 1.1; cursor: pointer; }
.lang img { transition: transform 700ms var(--ease-spring); }
@media (hover: hover) { .lang:hover img { transform: rotate(180deg); } }
.lang select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang:focus-within { outline: 2px solid var(--sky); outline-offset: 4px; border-radius: 2px; }

.menu-btn { display: none; position: relative; width: 24px; height: 24px; flex: none; }
.menu-btn i {
  position: absolute; right: 3px; height: 2px; background: #fff;
  transition: transform 520ms var(--ease-io), width 520ms var(--ease-io), top 520ms var(--ease-io), opacity 300ms;
}
.menu-btn i:nth-child(1) { top: 4px; width: 18px; }
.menu-btn i:nth-child(2) { top: 11px; width: 16.5px; }
.menu-btn i:nth-child(3) { top: 18px; width: 18px; }
.nav.is-open .menu-btn i:nth-child(1) { top: 11px; width: 20px; transform: translateX(1px) rotate(45deg); }
.nav.is-open .menu-btn i:nth-child(2) { width: 0; opacity: 0; }
.nav.is-open .menu-btn i:nth-child(3) { top: 11px; width: 20px; transform: translateX(1px) rotate(-45deg); }

/* uitklapmenu: hoogte animeert via grid-rows 0fr → 1fr, items komen gestaffeld binnen */
.menu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 620ms var(--ease-io); }
.menu-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 24px; padding: 0 24px; }
.nav.is-open .menu { grid-template-rows: 1fr; }
.menu-links { display: flex; flex-direction: column; gap: 24px; padding-top: 12px; }
.menu-links a, .menu-lang, .menu .btn-block {
  opacity: 0; transform: translateY(-10px);
  transition: opacity 260ms ease, transform 260ms var(--ease-out);
}
.menu-links a { align-self: flex-start; font-size: 16px; line-height: 1.5; }
@media (max-width: 900px) {
  .menu-links { gap: 8px; }
  .menu-links a { font-size: 20px; padding: 6px 0; }
  .menu-lang { font-size: 18px; padding: 6px 0; }
  /* 48px tikvlak; het icoon zelf blijft ~22px */
  .menu-btn { width: 48px; height: 48px; margin-right: -10px; }
  .menu-btn i { right: 12px; height: 2.2px; }
  .menu-btn i:nth-child(1) { top: 16px; width: 22px; } .menu-btn i:nth-child(2) { top: 23px; width: 18px; } .menu-btn i:nth-child(3) { top: 30px; width: 22px; }
  .nav.is-open .menu-btn i:nth-child(1), .nav.is-open .menu-btn i:nth-child(3) { top: 23px; width: 24px; }
}
.menu .btn-block { margin-bottom: 24px; font-weight: 600; line-height: 1.1; }
.menu .btn-block .btn-label { --lh: 1.1em; }
.nav.is-open .menu-links a, .nav.is-open .menu-lang, .nav.is-open .menu .btn-block {
  opacity: 1; transform: none;
  transition: opacity 420ms ease calc(160ms + var(--i) * 45ms), transform 620ms var(--ease-out) calc(160ms + var(--i) * 45ms);
}
.menu-lang { align-self: flex-start; }
.menu-scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(5, 5, 20, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-io), visibility 0s 500ms;
}
.menu-scrim.is-on { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease-io); }

@media (min-width: 1081px) { .menu, .menu-scrim { display: none; } }
@media (max-width: 1080px) {
  .nav-links, .nav-actions > .lang { display: none; }
  .menu-btn { display: block; }
  .nav-actions { gap: 16px; }
}
@media (max-width: 900px) {
  .nav { padding: 12px; }
  /* ingeklapt: hogere balk zonder demoknop (die staat in het uitklapmenu) */
  .nav-head { padding: 12px 16px; min-height: 72px; }
  .nav.is-open .nav-head { padding: 12px 16px 0; }
  .nav-actions > .nav-cta { display: none; }
  .nav-head { transition: padding 620ms var(--ease-io); }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { width: 87px; height: 29px; }
  .nav-cta { font-size: 15px; padding: 10px 14px; min-height: 40px; }
  .menu-inner { padding: 0 24px; }
}

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.reduced [data-reveal] { opacity: 1; transform: none; }

/* Nederlands kenteken (bulk + telefoon) */
.plate {
  display: inline-flex; align-items: stretch; height: 1.9em; border-radius: 0.28em; overflow: hidden;
  background: var(--plate); color: #111; font-weight: 700; letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.55); font-variant-numeric: tabular-nums;
}
.plate::before {
  content: "NL"; display: grid; place-items: end center; padding: 0 0.28em 0.18em;
  background: var(--plate-blue); color: #fff; font-size: 0.42em; letter-spacing: 0; font-weight: 600;
}
.plate span { display: grid; place-items: center; padding: 0 0.5em; }

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