/* Vertelmijeens basis: reset, typografie, layout-hulpklassen.
   Gebruikt uitsluitend de rol-tokens uit tokens.css. */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--vme-font-sans);
  font-size: var(--vme-text-md);
  line-height: var(--vme-leading-normal);
  color: var(--vme-text);
  background-color: var(--vme-bg);
  background-image: var(--vme-bg-image);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* ------------------------------------------------------------------
   Typografie
   ------------------------------------------------------------------ */

h1, h2, h3, h4 {
  line-height: var(--vme-leading-tight);
  letter-spacing: var(--vme-tracking-tight);
  font-weight: var(--vme-weight-bold);
  text-wrap: balance;
}

h1 { font-size: var(--vme-text-3xl); }
h2 { font-size: var(--vme-text-2xl); }
h3 { font-size: var(--vme-text-xl); }
h4 { font-size: var(--vme-text-lg); }

p {
  text-wrap: pretty;
}

a {
  color: var(--vme-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--vme-t-fast) var(--vme-ease);
}

a:hover {
  color: var(--vme-accent);
}

strong {
  font-weight: var(--vme-weight-semibold);
}

small {
  font-size: var(--vme-text-sm);
}

code, kbd, samp {
  font-family: var(--vme-font-mono);
  font-size: 0.92em;
}

::selection {
  background: var(--vme-mint-300);
  color: var(--vme-navy-900);
}

/* ------------------------------------------------------------------
   Focus: altijd zichtbaar, nooit weggehaald
   ------------------------------------------------------------------ */

:focus-visible {
  outline: var(--vme-focus-width) solid var(--vme-focus-ring);
  outline-offset: 2px;
  border-radius: var(--vme-radius-xs);
}

/* ------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--vme-container);
  margin-inline: auto;
  padding-inline: var(--vme-space-4);
}

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

@media (min-width: 40rem) {
  .container {
    padding-inline: var(--vme-space-5);
  }
}

.page {
  flex: 1 0 auto;
  width: 100%;
  padding-block: var(--vme-space-6) var(--vme-space-7);
}

.page--centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section + .section {
  margin-top: var(--vme-space-7);
}

/* Verticale ritmes zonder losse marges op elk element. */
.stack > * + * { margin-top: var(--vme-space-4); }
.stack--tight > * + * { margin-top: var(--vme-space-2); }
.stack--loose > * + * { margin-top: var(--vme-space-6); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vme-space-3);
  align-items: center;
}

.cluster--between {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: var(--vme-space-4);
}

@media (min-width: 48rem) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------
   Tekst-hulpklassen
   ------------------------------------------------------------------ */

.lead {
  font-size: var(--vme-text-lg);
  color: var(--vme-text-muted);
  line-height: var(--vme-leading-loose);
}

.text-muted { color: var(--vme-text-muted); }
.text-center { text-align: center; }
.text-sm { font-size: var(--vme-text-sm); }
.text-balance { text-wrap: balance; }

.eyebrow {
  font-size: var(--vme-text-xs);
  font-weight: var(--vme-weight-semibold);
  letter-spacing: var(--vme-tracking-wide);
  text-transform: uppercase;
  color: var(--vme-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Overslaan-naar-inhoud, zichtbaar zodra hij focus krijgt. */
.skip-link {
  position: absolute;
  top: var(--vme-space-2);
  left: var(--vme-space-2);
  z-index: var(--vme-z-toast);
  padding: var(--vme-space-2) var(--vme-space-4);
  border-radius: var(--vme-radius-sm);
  background: var(--vme-accent);
  color: var(--vme-accent-contrast);
  font-weight: var(--vme-weight-semibold);
  transform: translateY(-150%);
  transition: transform var(--vme-t-base) var(--vme-ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ------------------------------------------------------------------
   Micro-animaties: subtiel, en uit zodra de gebruiker dat wil
   ------------------------------------------------------------------ */

@keyframes vme-rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vme-pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes vme-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -0.5rem, 0); }
}

.u-rise {
  animation: vme-rise var(--vme-t-slow) var(--vme-ease) both;
}

.u-rise-1 { animation-delay: 60ms; }
.u-rise-2 { animation-delay: 140ms; }
.u-rise-3 { animation-delay: 220ms; }

/* Small confirmation pop, e.g. a badge that just became true. */
.u-pop {
  animation: vme-pop var(--vme-t-base) var(--vme-ease-bounce) both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
