/* Base — reset, fonts, skip-nav, focus, motion
 *
 * Tokens uit tokens.css (moet eerder ingeladen worden).
 * Component-styling staat in components.css (fase 6).
 */

/* === @font-face — self-hosted (ADR-0009) ============================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter/inter-v20-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter/inter-v20-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter/inter-v20-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/playfair-display/playfair-display-v40-latin-600.woff2")
    format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/playfair-display/playfair-display-v40-latin-700.woff2")
    format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/static/fonts/playfair-display/playfair-display-v40-latin-900.woff2")
    format("woff2");
}

/* === Minimal reset ==================================================== */

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

* {
  margin: 0;
}

html {
  height: 100%;
}

/* `min-height` (niet `height`) op body: anders zit een dynamisch
   toegevoegde padding-bottom (bv. door cookie-banner-spacing in
   main.js) BINNEN body's vaste 100vh-box, waardoor content overflowt
   onder body en de fixed banner niet meer correct boven de footer
   uitkomt. `min-height: 100%` zorgt dat body de viewport vult op
   korte pagina's én meegroeit met content + padding. */
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

p,
ul,
ol,
dl {
  line-height: var(--line-height-base);
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition-default);
}

a:hover {
  color: var(--color-primary);
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* === Focus-stijlen (WCAG 2.1 AA) ====================================== */

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-button);
}

/* === Skip-navigatie (a11y) ============================================ */

.skip-nav {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-primary);
  color: var(--color-surface-lowest);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-button);
  z-index: 9999;
  transition: top var(--transition-default);
}

.skip-nav:focus {
  top: var(--space-md);
  color: var(--color-surface-lowest);
}

/* === Visually-hidden (voor labels alleen voor screenreaders) ========= */

.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;
}

/* === Container ======================================================== */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* === Reduced motion (WCAG 2.3.3) ====================================== */

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