/* ==========================================================================
   Basis: fonts (zelf gehost, geen externe verzoeken), reset, typografie, focus, hulpklassen
   ========================================================================== */

@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("../fonts/anybody-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/anybody-latin-wdth-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Anybody";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("../fonts/anybody-latin-wdth-italic.woff2") format("woff2-variations"),
       url("../fonts/anybody-latin-wdth-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2");
}

/* --- Reset ------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-s));
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

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

/* :where() houdt de specificiteit op 0, zodat componenten hun eigen padding kunnen zetten */
:where(ol[role="list"], ul[role="list"]) {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-stretch: 72%;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.005em;
}

.kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 110%;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 44ch;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

strong {
  font-weight: 700;
}

::selection {
  background: var(--lime-400);
  color: var(--night-900);
}

/* --- Focus ------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--petrol-400);
  outline-offset: 3px;
  border-radius: 2px;
}

.theme-dark :focus-visible,
.theme-lime :focus-visible {
  outline-color: var(--white);
}

.theme-lime :focus-visible {
  outline-color: var(--night-900);
}

/* --- Hulpklassen ------------------------------------------------------- */

/* Het hidden-attribuut wint altijd van display-regels in componenten */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: var(--space-s);
  top: var(--space-s);
  z-index: calc(var(--z-intro) + 1);
  padding: var(--space-xs) var(--space-s);
  background: var(--lime-400);
  color: var(--night-900);
  font-weight: 700;
  border-radius: var(--radius-s);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out-quart);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

/* Thema's per sectie */
.theme-dark {
  background: var(--night-900);
  color: var(--white);
}

.theme-lime {
  background: var(--lime-400);
  color: var(--ink);
}

.theme-light {
  background: var(--paper);
  color: var(--ink);
}

.theme-light-2 {
  background: var(--paper-2);
  color: var(--ink);
}

/* Minder beweging: alles direct, geen smooth scroll.
   Uitzondering: html.force-motion (demo-link met ?intro=1) laat de animaties bewust staan. */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) {
    scroll-behavior: auto;
  }

  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
