/* ============================================================
   Metabolisch Gezond — design system v2
   Identiteit: warm canvas, diep teal, serif koppen, korrel.
   Tokens overgenomen van de conceptsite, nu als eigen CSS.
   ============================================================ */

:root {
  /* Kleuren */
  --canvas: #F3EEE4;
  --paper: #FCFAF6;
  --sand: #E8E1D4;
  --line: #DDD6C8;
  --ink: #1A2824;
  --ink-soft: #2C3D37;
  --muted: #5A6A64;
  --muted-faint: #7A8A84;
  --teal: #0E5C54;
  --teal-deep: #0A3F3A;
  --teal-soft: #E6F1EE;
  --teal-mist: #F0F6F4;
  --clay: #C46A3A;
  --clay-soft: #FBF4EE;

  /* Typografie */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;

  /* Afmetingen */
  --page: 72rem;
  --prose: 42rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow-card: 0 1px 2px rgba(26,40,36,.04), 0 12px 32px rgba(26,40,36,.06);
  --shadow-lift: 0 8px 28px rgba(14,92,84,.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
::selection { background: var(--teal); color: var(--paper); }

/* Korrel-overlay (subtiele textuur, zoals conceptsite) */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: var(--prose); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }
@media (min-width: 640px) { .section { padding: 5rem 0; } }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, 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)); }
}

/* ---------- Typografie ---------- */
.display {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 700;
}
.title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.18;
  letter-spacing: -.025em;
  font-weight: 700;
}
.subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 700;
}
.kicker {
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--teal);
  margin-bottom: .75rem;
}
.lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.muted { color: var(--muted); }
.faint { color: var(--muted-faint); }
.teal { color: var(--teal); }
.serif { font-family: var(--font-serif); }

/* Prose (gids-content) */
.prose { font-size: 1.05rem; line-height: 2rem; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-top: 3rem;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 2.25rem;
}
.prose ul, .prose ol { list-style: none; }
.prose ul li { padding-left: 1.5rem; position: relative; margin-bottom: .5rem; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: .25rem; top: .72em;
  width: .5rem; height: .5rem;
  border-radius: 999px;
  background: var(--teal);
  opacity: .55;
}
.prose ol { counter-reset: ol; }
.prose ol li { padding-left: 2.25rem; position: relative; margin-bottom: .75rem; }
.prose ol li::before {
  counter-increment: ol;
  content: counter(ol, decimal-leading-zero);
  position: absolute;
  left: 0; top: .1em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--teal);
}
.prose a { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(14,92,84,.3); text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--teal); }
.prose strong { color: var(--ink); }
.prose blockquote {
  border-left: 3px solid var(--teal);
  padding: .5rem 0 .5rem 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.cite {
  margin-left: .125rem;
  vertical-align: super;
  font-size: .75rem;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
}

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  border-radius: 9999px;
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  transition: all .15s ease;
}
.btn-primary {
  background: var(--teal);
  color: var(--paper);
  box-shadow: var(--shadow-lift);
}
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.btn-ghost:hover { border-color: rgba(14,92,84,.4); }
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover { background: #000; }

/* ---------- Navigatie ---------- */
.topbar {
  background: var(--teal-deep);
  color: var(--paper);
  font-size: .8rem;
  line-height: 1.25rem;
}
.topbar .wrap { padding-top: .625rem; padding-bottom: .625rem; text-align: center; }
.topbar a { text-decoration: underline; text-decoration-color: rgba(252,250,246,.4); text-underline-offset: 2px; }
.topbar a:hover { text-decoration-color: var(--paper); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243,238,228,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(221,214,200,.8);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .875rem;
  padding-bottom: .875rem;
}
.brand { display: flex; align-items: center; gap: .625rem; flex-shrink: 0; }
.brand-name { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1; font-weight: 700; }
.brand-name em { font-style: normal; color: var(--teal); }

.main-nav { display: none; align-items: center; gap: .125rem; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.main-nav a {
  border-radius: 9999px;
  padding: .375rem .75rem;
  font-size: .875rem;
  color: var(--muted);
  transition: all .15s ease;
}
.main-nav a:hover { color: var(--ink); background: rgba(232,225,212,.7); }
.main-nav a.active { color: var(--teal); background: var(--teal-soft); font-weight: 500; }
.main-nav .nav-sep { width: 1px; height: 1.25rem; background: var(--line); margin: 0 .375rem; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  border-radius: .5rem;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease; }

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 1.25rem 1.5rem;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: .625rem .5rem;
  border-radius: .5rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.mobile-nav a:hover { background: var(--sand); }
.mobile-nav a.active { color: var(--teal); font-weight: 600; }
.mobile-nav .mnav-group {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted-faint);
  margin: 1rem .5rem .25rem;
}
.mobile-nav .mnav-group:first-child { margin-top: 0; }

/* ---------- Kaarten ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-hover:hover { transform: translateY(-.25rem); box-shadow: var(--shadow-lift); }
.card .num {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--teal);
  margin-bottom: .75rem;
}
.card h3 { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.35; margin-bottom: .5rem; }
.card p { font-size: .95rem; line-height: 1.6; color: var(--muted); }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--teal);
}
.card .card-link .arrow { transition: transform .15s ease; }
.card:hover .card-link .arrow { transform: translateX(.125rem); }

/* Donkere sectie */
.section-dark {
  background: var(--teal-deep);
  color: var(--paper);
}
.section-dark .kicker { color: rgba(252,250,246,.6); }
.section-dark .lead { color: rgba(252,250,246,.8); }
.section-dark .card {
  background: rgba(252,250,246,.06);
  border-color: rgba(252,250,246,.15);
  box-shadow: none;
}
.section-dark .card h3 { color: var(--paper); }
.section-dark .card p { color: rgba(252,250,246,.65); }
.section-dark .card .num { color: rgba(252,250,246,.5); }
.section-dark .card .card-link { color: rgba(252,250,246,.85); }

/* Zachte sectie */
.section-soft { background: var(--teal-mist); }
.section-sand { background: var(--sand); }

/* ---------- Stat-blokjes ---------- */
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat .stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.1;
}
.stat .stat-label { font-size: .85rem; color: var(--muted); margin-top: .375rem; line-height: 1.4; }

/* ---------- Checker / tool UI ---------- */
.tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.tool-head {
  background: var(--teal-deep);
  color: var(--paper);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tool-head h3 { font-family: var(--font-serif); font-size: 1.15rem; }
.tool-badge {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(252,250,246,.12);
  border: 1px solid rgba(252,250,246,.25);
  border-radius: 9999px;
  padding: .25rem .75rem;
}
.tool-body { padding: 1.5rem; }
.tool-field { margin-bottom: 1.5rem; }
.tool-field > label, .tool-field > .tool-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .625rem;
}
.tool-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.tool-option {
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: 9999px;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--ink-soft);
  transition: all .15s ease;
}
.tool-option:hover { border-color: rgba(14,92,84,.4); }
.tool-option[aria-pressed="true"], .tool-option.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}
.tool-result {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.tool-result h4 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: .75rem; }
.tool-result .result-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}
.tool-result .result-unit { font-size: 1rem; color: var(--muted); font-weight: 400; }
.meter {
  height: .75rem;
  border-radius: 9999px;
  background: var(--sand);
  overflow: hidden;
  margin: 1rem 0 .5rem;
}
.meter > div {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--clay), var(--teal));
  transition: width .4s ease;
}
.tool-note { font-size: .8rem; color: var(--muted-faint); line-height: 1.5; margin-top: 1rem; }

/* Stepper (MOT) */
.mot-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--canvas);
}
.mot-step .mot-q { font-weight: 600; margin-bottom: .75rem; }
.mot-step .mot-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.mot-score {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--teal);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 0 1.25rem; color: var(--ink-soft); line-height: 1.75; font-size: .98rem; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 40rem; }
table.data th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
table.data td { padding: .875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
table.data tr:last-child td { border-bottom: none; }
table.data td:first-child { font-weight: 600; color: var(--ink); }

/* ---------- Bronnenlijst ---------- */
.sources { font-size: .9rem; }
.sources li {
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
  color: var(--ink-soft);
}
.sources li:last-child { border-bottom: none; }
.sources .src-num { color: var(--teal); font-weight: 600; margin-right: .5rem; }
.sources a { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(14,92,84,.3); text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: rgba(252,250,246,.7);
  padding: 3.5rem 0 2rem;
  font-size: .9rem;
}
.site-footer .footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .site-footer .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(252,250,246,.45);
  margin-bottom: 1rem;
}
.site-footer a { color: rgba(252,250,246,.75); display: block; padding: .2rem 0; }
.site-footer a:hover { color: var(--paper); }
.site-footer .footer-brand { font-family: var(--font-serif); font-size: 1.1rem; color: var(--paper); margin-bottom: .75rem; }
.site-footer .footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(252,250,246,.12);
  font-size: .8rem;
  color: rgba(252,250,246,.45);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Animaties ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-up { animation: fadeUp .6s ease-out both; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-fade-up { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Diversen ---------- */
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 9999px;
  padding: .25rem .75rem;
}
.tag-clay { color: var(--clay); background: var(--clay-soft); }
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.callout-warn { border-left-color: var(--clay); }
.callout strong { color: var(--ink); }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: var(--paper);
  padding: .5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Illustratie-frames */
.illo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--teal-mist);
}
.illo svg { width: 100%; height: auto; }
