/* ==========================================================================
   Basis: reset, typografie, layout
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

body {
  margin: 0;
  background: var(--wit);
  color: var(--tekst);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video, picture { display: block; max-width: 100%; height: auto; }
picture img { width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, figure, blockquote, dl { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-display);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
  /* Lange samenstellingen ("laadinfrastructuurstrategie") breken in een smalle
     kolom als laatste redmiddel af in plaats van uit te steken */
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: 1.12; }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-medium); letter-spacing: -.005em; }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); letter-spacing: 0; }

p { text-wrap: pretty; }
strong, b { font-weight: var(--fw-bold); }

a { color: var(--blauw-link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

/* Transparante outline: onzichtbaar in de gewone weergave (de box-shadow is de
   focusring), maar in de Windows-contrastmodus (forced-colors), waar
   box-shadow wegvalt, tekent de browser hem in een systeemkleur. */
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--focus); border-radius: 4px; }

::selection { background: var(--roze); color: var(--navy); }

hr { border: 0; border-top: 1px solid var(--lijn); margin: 2rem 0; }

/* --- Toegankelijkheid -------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--navy); color: var(--wit);
  padding: .75rem 1.25rem; border-radius: var(--r-pill);
  font-weight: var(--fw-bold); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* --- Layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--smal { max-width: calc(880px + 2 * var(--gutter)); }

.section { position: relative; padding-block: var(--space-section); }
.section--tight { padding-block: var(--space-section-tight); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

/* Banden (achtergronden). Wissel ze af; nooit twee dezelfde gekleurde banden na elkaar. */
.band--wit { background: var(--wit); color: var(--tekst); }
.band--grijs { background: var(--grijs-licht); color: var(--tekst); }
.band--roze { background: var(--roze-licht); color: var(--tekst); }
.band--navy {
  background: var(--navy);
  color: var(--tekst-op-donker);
  /* Ook --tekst: anders krijgt alles wat var(--tekst) gebruikt (.kaart, vet
     in een antwoord) navy tekst op navy. Een licht eiland (wit kaartje) zet
     zijn kleuren zelf. */
  --tekst: var(--tekst-op-donker);
  --tekst-zacht: var(--tekst-op-donker-zacht);
  --lijn: rgba(255, 255, 255, .16);
  --focus: 0 0 0 3px var(--navy), 0 0 0 6px var(--roze);
}
.band--navy a:not(.btn) { color: var(--wit); }

/* Twee banden van dezelfde kleur na elkaar (bijv. tekst-intro en stappen,
   allebei wit): ze delen hun witruimte, zodat de afstand het gewone ritme is
   (één keer --space-section) en niet het dubbele. De homepage wisselt altijd
   van band en merkt hier niets van. */
.band--wit.section + .band--wit.section,
.band--grijs.section + .band--grijs.section,
.band--roze.section + .band--roze.section,
.band--navy.section + .band--navy.section { padding-top: 0; }

.grid { display: grid; gap: var(--gap); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stack > * + * { margin-top: var(--stack, 1rem); }
.measure { max-width: var(--maxw-tekst); }
.tekst-zacht { color: var(--tekst-zacht); }
.mt-0 { margin-top: 0 !important; }

/* Lopende tekst (editor-inhoud) */
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .35em; }
