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

/* scroll-behavior hoort op het scrollende element (html) en niet op body: alleen
 * daar geldt hij voor het springen naar een #anker. Hij staat hier zodat een
 * interne verwijzing als "Bereken mijn besparing" -> #tarief op /huis-verkopen
 * vloeiend naar het tariefblok loopt in plaats van er hard heen te springen —
 * zonder JavaScript, met een gewone <a href="#...">.
 *
 * scroll-padding-top is de tegenhanger: de header staat sticky bovenaan, dus
 * zonder deze marge komt de titel van de aangesprongen sectie eronder te liggen.
 * 6.5rem is de headerhoogte (circa 77px) plus lucht, zodat het label boven de
 * titel ook meekomt. Hij staat op de scrollport en niet als scroll-margin op de
 * secties zelf: dan geldt hij in één keer voor élk anker op de site.
 *
 * De media query voor prefers-reduced-motion onderaan dit bestand zet
 * scroll-behavior weer terug op auto. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 640;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
h4 {
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Hulpklassen */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--dark {
  background: var(--forest);
  color: var(--on-dark);
}

.section--moss {
  background: var(--moss-050);
}

.section--surface {
  background: var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
}

.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.section--dark .eyebrow {
  color: var(--amber);
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-70);
  line-height: 1.55;
  max-width: 62ch;
}

.section--dark .lead {
  color: var(--on-dark-70);
}

.muted {
  color: var(--ink-55);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 68ch;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.section-head--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

.amount {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  font-weight: 660;
  line-height: 0.95;
}

.sr-only {
  position: absolute;
  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: -4rem;
  z-index: 100;
  background: var(--forest);
  color: var(--on-dark);
  padding: 0.75rem 1.15rem;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 1rem;
}

/* Reveal-animatie */
/*
 * De insprong-animatie hangt aan .js, dat in de <head> op <html> wordt gezet.
 * Vrijwel iedere sectie staat in een .reveal-container: zonder deze koppeling
 * blijft de hele pagina op opacity 0 staan zodra assets/js/reveal.js niet
 * draait — geen JavaScript, een geblokkeerd script of een laadfout — en ziet
 * de bezoeker een lege site in plaats van de inhoud.
 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
