/* ==========================================================================
   Spreidingswet — informatiesite
   Stijl geïnspireerd op de Rijkshuisstijl / NL Design System (nldesignsystem.nl).
   Geen build-stap: één CSS-bestand met design tokens als CSS custom properties.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  /* Gedurfd modern duo: diep teal + warm koraal */
  --kleur-donkerblauw: #0f4c4a;        /* hoofdkleur: teal */
  --kleur-donkerblauw-hover: #0a3735;
  --kleur-hemelblauw: #ff6b4a;         /* accent: koraal */
  --kleur-hemelblauw-hover: #ed5230;
  --kleur-link: #0f4c4a;
  --kleur-link-hover: #ed5230;
  --kleur-lichtblauw: #ffc7b8;
  --kleur-lichtblauw-zacht: #fff1ec;
  --kleur-focus: #ffb000;
  --kleur-tekst: #19191a;
  --kleur-tekst-zacht: #4f5e6e;
  --kleur-achtergrond: #ffffff;
  --kleur-achtergrond-zacht: #f3f5f6;
  --kleur-rand: #b2b8be;
  --kleur-rand-zacht: #e0e3e6;
  --kleur-positief: #39870c;
  --kleur-negatief: #d52b1e;
  --kleur-waarschuwing: #d98c00;

  /* Typografie */
  --font-body: "Source Sans 3", "Source Sans Pro", Calibri, Verdana, Arial, sans-serif;
  --font-kop: "Fira Sans", "Source Sans 3", Helvetica, Arial, sans-serif;

  --fs-sm: 0.875rem;   /* 14px */
  --fs-md: 1.0625rem;  /* 17px — iets ruimer voor leesbaarheid */
  --fs-lg: 1.25rem;    /* 20px */
  --fs-h4: 1.25rem;    /* 20px */
  --fs-h3: 1.5rem;     /* 24px */
  --fs-h2: 1.875rem;   /* 30px */
  --fs-h1: 2.5rem;     /* 40px */

  --lh-body: 1.6;
  --lh-kop: 1.2;

  /* Ruimte — 4px-grid */
  --ruimte-xs: 0.25rem;
  --ruimte-sm: 0.5rem;
  --ruimte-md: 1rem;
  --ruimte-lg: 1.5rem;
  --ruimte-xl: 2rem;
  --ruimte-2xl: 3rem;
  --ruimte-3xl: 4rem;

  /* Layout */
  --max-pagina: 1180px;
  --max-lezen: 720px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --rand-radius: 4px;
  --schaduw: 0 1px 2px rgba(21, 66, 115, 0.06), 0 4px 12px rgba(21, 66, 115, 0.08);
  --schaduw-hover: 0 2px 4px rgba(21, 66, 115, 0.10), 0 10px 24px rgba(21, 66, 115, 0.14);
}

/* --- Reset / basis ------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--kleur-tekst);
  background-color: var(--kleur-achtergrond);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--kleur-focus);
  outline-offset: 2px;
}

/* --- Gedeelde breedte-container ------------------------------------------ */
.header-balk__inner,
.brand,
.breadcrumb__inner,
.nav-inner,
.hero-inner,
.main-inner,
.footer-inner {
  width: 100%;
  max-width: var(--max-pagina);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Typografie ---------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-kop);
  font-weight: 700;
  line-height: var(--lh-kop);
  color: var(--kleur-donkerblauw);
  margin: 0 0 var(--ruimte-md);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); margin-top: var(--ruimte-2xl); }
h3 { font-size: var(--fs-h3); margin-top: var(--ruimte-xl); }
h4 { font-size: var(--fs-h4); margin-top: var(--ruimte-lg); }

p,
ul,
ol,
dl,
table {
  margin: 0 0 var(--ruimte-md);
}

li + li {
  margin-top: var(--ruimte-xs);
}

a {
  color: var(--kleur-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.12s ease, text-decoration-thickness 0.12s ease;
}

a:hover {
  color: var(--kleur-link-hover);
  text-decoration-thickness: 2px;
}

strong { font-weight: 700; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--kleur-tekst-zacht);
  max-width: 60ch;
}

/* --- Skip-link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--ruimte-md);
  top: -4rem;
  z-index: 100;
  background: var(--kleur-donkerblauw);
  color: #fff;
  padding: var(--ruimte-sm) var(--ruimte-md);
  border-radius: var(--rand-radius);
  text-decoration: none;
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: var(--ruimte-md);
  color: #fff;
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  background: var(--kleur-achtergrond);
  box-shadow: 0 1px 0 var(--kleur-rand-zacht);
}

.header-balk {
  background: var(--kleur-donkerblauw);
}

.header-balk__inner {
  color: #fff;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  padding-block: 0.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--ruimte-md);
  padding-block: var(--ruimte-lg);
}

.brand__logo {
  flex: 0 0 auto;
  width: 6px;
  align-self: stretch;
  min-height: 2.75rem;
  border-radius: 6px;
  background: linear-gradient(var(--kleur-donkerblauw), var(--kleur-hemelblauw));
}

.brand__tekst {
  text-decoration: none;
  color: var(--kleur-donkerblauw);
}

.brand__tekst:hover { color: var(--kleur-donkerblauw); }

.brand__naam {
  display: block;
  font-family: var(--font-kop);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand__sub {
  display: block;
  font-size: var(--fs-sm);
  color: var(--kleur-tekst-zacht);
}

/* --- Hoofdnavigatie ------------------------------------------------------ */
.site-nav {
  background: var(--kleur-donkerblauw);
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  padding: var(--ruimte-md) var(--ruimte-lg);
  display: block;
  font-weight: 600;
  border-bottom: 4px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--kleur-hemelblauw);
}

/* --- Broodkruimel -------------------------------------------------------- */
.breadcrumb {
  background: var(--kleur-achtergrond-zacht);
  border-bottom: 1px solid var(--kleur-rand-zacht);
  font-size: var(--fs-sm);
}

.breadcrumb__inner {
  padding-block: var(--ruimte-sm);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ruimte-xs);
  margin: 0;
  padding: 0;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--ruimte-xs);
  color: var(--kleur-tekst-zacht);
}

.breadcrumb li + li { margin-top: 0; }
.breadcrumb [aria-current="page"] { color: var(--kleur-tekst-zacht); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(120% 140% at 100% 0%, var(--kleur-lichtblauw-zacht) 0%, transparent 60%),
    var(--kleur-achtergrond-zacht);
  border-bottom: 1px solid var(--kleur-rand-zacht);
}

.hero-inner {
  padding-block: var(--ruimte-2xl);
  max-width: calc(var(--max-lezen) + 2 * var(--gutter));
  margin-inline: auto;
}

.hero h1 { margin-bottom: var(--ruimte-sm); }

.hero .lead { margin-bottom: 0; color: var(--kleur-tekst); }

.hero__kicker {
  display: inline-block;
  font-family: var(--font-kop);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kleur-hemelblauw);
  margin-bottom: var(--ruimte-sm);
}

/* --- Hoofdinhoud --------------------------------------------------------- */
main {
  flex: 1 0 auto;
}

.main-inner {
  max-width: calc(var(--max-lezen) + 2 * var(--gutter));
  padding-block: var(--ruimte-2xl);
}

.main-inner--breed {
  max-width: var(--max-pagina);
}

/* --- Info-/aandachtsblok ------------------------------------------------- */
.melding {
  position: relative;
  border: 1px solid var(--kleur-rand-zacht);
  border-left: 5px solid var(--kleur-hemelblauw);
  background: var(--kleur-achtergrond-zacht);
  padding: var(--ruimte-lg) var(--ruimte-lg) var(--ruimte-lg) 3.4rem;
  border-radius: var(--rand-radius);
  margin: 0 0 var(--ruimte-lg);
}

.melding::before {
  content: "i";
  position: absolute;
  left: var(--ruimte-md);
  top: var(--ruimte-lg);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--kleur-hemelblauw);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.melding > :last-child { margin-bottom: 0; }
.melding h2,
.melding h3 { margin-top: 0; font-size: var(--fs-h4); }

.melding--let-op { border-left-color: var(--kleur-waarschuwing); }
.melding--let-op::before {
  content: "!";
  background: var(--kleur-waarschuwing);
  font-family: var(--font-kop);
  font-style: normal;
}

/* --- Statuslabel --------------------------------------------------------- */
.status-label {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--kleur-positief);
  color: #fff;
}

.status-label::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
}

/* --- Kaartenrij (verwijzingen) ------------------------------------------ */
.kaarten {
  list-style: none;
  margin: var(--ruimte-lg) 0;
  padding: 0;
  display: grid;
  gap: var(--ruimte-md);
  grid-template-columns: 1fr;
}

.kaarten li { margin: 0; }

.kaart {
  display: block;
  height: 100%;
  border: 1px solid var(--kleur-rand-zacht);
  border-radius: var(--rand-radius);
  padding: var(--ruimte-lg);
  text-decoration: none;
  color: inherit;
  background: var(--kleur-achtergrond);
  box-shadow: var(--schaduw);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.kaart:hover {
  border-color: var(--kleur-hemelblauw);
  box-shadow: var(--schaduw-hover);
  transform: translateY(-2px);
  color: inherit;
}

.kaart__titel {
  font-family: var(--font-kop);
  font-weight: 700;
  color: var(--kleur-link);
  margin: 0 0 var(--ruimte-xs);
}

.kaart__titel::after {
  content: " →";
  display: inline-block;
  transition: transform 0.12s ease;
}

.kaart:hover .kaart__titel::after { transform: translateX(4px); }

.kaart__tekst {
  margin: 0;
  color: var(--kleur-tekst-zacht);
  font-size: var(--fs-sm);
}

/* --- Tijdlijn ------------------------------------------------------------ */
.tijdlijn {
  list-style: none;
  margin: var(--ruimte-lg) 0;
  padding: 0;
  border-left: 3px solid var(--kleur-lichtblauw);
}

.tijdlijn li {
  position: relative;
  margin: 0 0 var(--ruimte-lg);
  padding-left: var(--ruimte-lg);
}

.tijdlijn li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 0.35em;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--kleur-donkerblauw);
  box-shadow: 0 0 0 4px var(--kleur-achtergrond), 0 0 0 6px var(--kleur-lichtblauw);
}

.tijdlijn__datum {
  display: block;
  font-weight: 700;
  font-family: var(--font-kop);
  color: var(--kleur-donkerblauw);
}

/* --- Definitielijst (rollen) -------------------------------------------- */
.rollen { margin: var(--ruimte-md) 0; }

.rollen dt {
  font-weight: 700;
  font-family: var(--font-kop);
  color: var(--kleur-donkerblauw);
  margin-top: var(--ruimte-md);
}

.rollen dd { margin: var(--ruimte-xs) 0 0; }

/* --- Tabel --------------------------------------------------------------- */
table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid var(--kleur-rand-zacht);
  border-radius: var(--rand-radius);
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: var(--ruimte-sm) var(--ruimte-md);
  border-bottom: 1px solid var(--kleur-rand-zacht);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

th {
  background: var(--kleur-achtergrond-zacht);
  font-family: var(--font-kop);
  color: var(--kleur-donkerblauw);
}

/* --- Knop ---------------------------------------------------------------- */
.knop {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-sm);
  background: var(--kleur-hemelblauw);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.65rem var(--ruimte-lg);
  border-radius: var(--rand-radius);
  border: 2px solid transparent;
  box-shadow: var(--schaduw);
  transition: background 0.12s ease, transform 0.12s ease;
}

.knop::after {
  content: "→";
  transition: transform 0.12s ease;
}

.knop:hover {
  background: var(--kleur-hemelblauw-hover);
  color: #fff;
  text-decoration: none;
}

.knop:hover::after { transform: translateX(4px); }

/* --- Wettekst ------------------------------------------------------------ */
.wet-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-xl);
  align-items: start;
}

.wettekst { max-width: var(--max-lezen); }

.wet-intitule {
  font-style: italic;
  color: var(--kleur-tekst-zacht);
}

.wet-artikel {
  margin: 0 0 var(--ruimte-lg);
  scroll-margin-top: var(--ruimte-md);
}

.wet-artikel h4 {
  margin-top: var(--ruimte-xl);
  margin-bottom: var(--ruimte-sm);
}

.wettekst h3 {
  padding-bottom: var(--ruimte-sm);
  border-bottom: 2px solid var(--kleur-lichtblauw);
}

.wet-leden {
  margin: 0 0 var(--ruimte-md);
  padding-left: 1.7em;
}

.wet-leden > li { margin-bottom: var(--ruimte-sm); }

.wet-leden > li::marker {
  font-weight: 700;
  color: var(--kleur-donkerblauw);
}

.wet-leden p { margin-bottom: var(--ruimte-sm); }

.wet-lijst {
  list-style: none;
  margin: var(--ruimte-sm) 0;
  padding-left: 1.7em;
}

.wet-lijst > li { margin-bottom: var(--ruimte-xs); }

.wet-marker {
  font-weight: 600;
  margin-right: 0.3em;
  color: var(--kleur-donkerblauw);
}

/* --- Inhoudsopgave wet (TOC) -------------------------------------------- */
.wet-toc {
  border: 1px solid var(--kleur-rand-zacht);
  border-top: 4px solid var(--kleur-hemelblauw);
  border-radius: var(--rand-radius);
  background: var(--kleur-achtergrond-zacht);
  padding: var(--ruimte-md) var(--ruimte-lg) var(--ruimte-lg);
}

.wet-toc__titel {
  font-size: var(--fs-h4);
  margin: var(--ruimte-sm) 0 var(--ruimte-sm);
}

.wet-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-sm);
}

.wet-toc > ol > li { margin: 0 0 var(--ruimte-sm); }
.wet-toc > ol > li > a {
  font-weight: 700;
  font-family: var(--font-kop);
  color: var(--kleur-donkerblauw);
  text-decoration: none;
}

.wet-toc > ol > li > a:hover { text-decoration: underline; }

.wet-toc ol ol {
  margin: var(--ruimte-xs) 0 var(--ruimte-sm);
  padding-left: var(--ruimte-md);
  border-left: 2px solid var(--kleur-rand-zacht);
}

.wet-toc ol ol li { margin: 0; }

.wet-toc ol ol a {
  display: block;
  padding: 0.15rem 0;
  text-decoration: none;
  color: var(--kleur-link);
}

.wet-toc ol ol a:hover { text-decoration: underline; }

/* --- Memorie van toelichting -------------------------------------------- */
.mvt-tekst h4 { color: var(--kleur-donkerblauw); }

.mvt-tekst h5 {
  font-family: var(--font-kop);
  font-weight: 600;
  color: var(--kleur-donkerblauw);
  font-size: 1.0625rem;
  margin: var(--ruimte-lg) 0 var(--ruimte-xs);
}

.mvt-tussenkop { margin-top: var(--ruimte-md); }

sup.mvt-noot { line-height: 0; font-size: 0.7em; }
sup.mvt-noot a { text-decoration: none; padding: 0 0.1em; }
sup.mvt-noot a:hover { text-decoration: underline; }

.mvt-tabel-wrap { overflow-x: auto; margin-bottom: var(--ruimte-md); }
.mvt-tabel-wrap td:not(:first-child),
.mvt-tabel-wrap th:not(:first-child) { text-align: right; white-space: nowrap; }

.mvt-voetnoten {
  margin-top: var(--ruimte-2xl);
  padding-top: var(--ruimte-md);
  border-top: 2px solid var(--kleur-rand-zacht);
  font-size: var(--fs-sm);
  color: var(--kleur-tekst-zacht);
}

.mvt-voetnoten h2 { font-size: var(--fs-h4); margin-top: 0; }
.mvt-voetnoten__lijst li { margin-bottom: var(--ruimte-sm); }
.mvt-terug { text-decoration: none; margin-left: 0.25em; }

/* --- Zoek uw gemeente ---------------------------------------------------- */
.gemeente-zoek { margin: var(--ruimte-lg) 0; }

.gemeente-zoek label {
  display: block;
  font-weight: 600;
  font-family: var(--font-kop);
  color: var(--kleur-donkerblauw);
  margin-bottom: var(--ruimte-xs);
}

.gemeente-zoek input {
  width: 100%;
  max-width: 28rem;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--kleur-rand);
  border-radius: var(--rand-radius);
  background: #fff;
}

.gemeente-zoek input:focus-visible {
  outline: 3px solid var(--kleur-focus);
  outline-offset: 1px;
  border-color: var(--kleur-hemelblauw);
}

.gemeente-zoek__status {
  font-size: var(--fs-sm);
  color: var(--kleur-tekst-zacht);
  margin: var(--ruimte-xs) 0 0;
}

.gemeente-lijst {
  list-style: none;
  padding: 0;
  margin: var(--ruimte-md) 0;
  columns: 15rem auto;
  column-gap: var(--ruimte-xl);
}

.gemeente-lijst li { margin: 0; break-inside: avoid; }
.gemeente-lijst li + li { margin-top: 0; }

.gemeente-lijst a {
  display: block;
  padding: 0.35rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--kleur-rand-zacht);
}

.gemeente-lijst a:hover { text-decoration: underline; }

.gemeente-geen { font-weight: 600; color: var(--kleur-tekst-zacht); }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  background: var(--kleur-donkerblauw);
  color: #fff;
  margin-top: var(--ruimte-3xl);
  border-top: 4px solid var(--kleur-hemelblauw);
}

.footer-inner {
  padding-block: var(--ruimte-2xl);
}

.footer-kolommen {
  display: grid;
  gap: var(--ruimte-xl);
  grid-template-columns: 1fr;
}

.site-footer h2 {
  color: #fff;
  font-size: var(--fs-h4);
  margin: 0 0 var(--ruimte-md);
}

.site-footer p { color: #dfe6ec; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: var(--ruimte-xs); }

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.footer-disclaimer {
  margin-top: var(--ruimte-xl);
  padding-top: var(--ruimte-md);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: var(--fs-sm);
  color: #c9d4de;
}

.footer-disclaimer a { color: #fff; text-decoration: underline; }

/* --- Responsive ---------------------------------------------------------- */
@media (min-width: 768px) {
  .kaarten { grid-template-columns: 1fr 1fr; }
  .footer-kolommen { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 992px) {
  .wet-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .wet-toc {
    position: sticky;
    top: var(--ruimte-md);
    max-height: calc(100vh - 2 * var(--ruimte-md));
    overflow: auto;
  }
}

@media (max-width: 767px) {
  :root {
    --fs-h1: 2rem;
    --fs-h2: 1.5rem;
  }
  .site-nav a {
    padding: var(--ruimte-sm) var(--ruimte-md);
    border-bottom: none;
    border-left: 4px solid transparent;
  }
  .site-nav a:hover { border-left-color: rgba(255, 255, 255, 0.55); }
  .site-nav a[aria-current="page"] { border-left-color: var(--kleur-hemelblauw); }
  .nav-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
