/* Base: fonts, design tokens, reset, typography, utilities, reveal animation. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-variable.woff2") format("woff2");
}

:root {
  /* Palette */
  --ivory: #fbf7ef;
  --sand: #f1e8d8;
  --white: #fff;
  --ink: #241a26;
  --ink-soft: #5d5260;
  --plum: #2b1a2f;
  --plum-raised: #3a2640;
  --on-plum: #f6eee6;
  --on-plum-soft: #c9b9c4;
  --brick: #c4452c;
  --brick-deep: #a2361f;
  --brick-wash: #f8e1d9;
  --saffron: #f4b942;
  --saffron-wash: #fdf0d2;
  --rule: #e2d6c3;
  --danger: #b3261e;
  --success: #2f7d4b;

  /* Type */
  --ff-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-hero: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.6vw, 3.625rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.625rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-read: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-small: 0.9375rem;
  --fs-tiny: 0.8125rem;

  /* Space */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --section: clamp(3.5rem, 2.25rem + 4.5vw, 6.5rem);

  /* Layout */
  --frame: 74rem;
  --gutter: clamp(1rem, 0.5rem + 2.2vw, 2.5rem);
  --topbar-h: 4.5rem;

  /* Shape and motion */
  --radius: 4px;
  --radius-l: 10px;
  --offset: 6px 6px 0 var(--ink);
  --offset-s: 4px 4px 0 var(--ink);
  --ease: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--ff-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  /* Long Dutch compounds (e.g. "Gebruiksvoorwaarden") must not overflow narrow screens. */
  overflow-wrap: break-word;
  hyphens: auto;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

img {
  height: auto;
}

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

a:hover {
  color: var(--brick-deep);
}

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

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: calc(var(--topbar-h) + var(--s-3));
}

/* Scroll reveal: only when JS has marked the page ready, so content is never hidden without JS. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(1.5rem);
    transition:
      opacity 0.7s ease,
      transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important; /* honour the reduced-motion preference everywhere */
    animation-duration: 0.01ms !important;
  }
}

/* Utilities */

.skip {
  position: absolute;
  top: var(--s-1);
  left: var(--s-1);
  z-index: 200;
  padding: 0.625rem 1rem;
  font-weight: 700;
  color: var(--ink);
  background-color: var(--saffron);
  border: 2px solid var(--ink);
  transform: translateY(-250%);
}

.skip:focus {
  color: var(--ink);
  transform: none;
}

.label {
  display: inline-block;
  margin-bottom: var(--s-2);
  padding: 0.2rem 0.6rem;
  font-family: var(--ff-head);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background-color: var(--saffron);
  border-radius: var(--radius);
}

.label--saffron {
  color: var(--plum);
}

/* Long-form text: legal documents and information pages. */

.prose {
  font-size: var(--fs-read);
  line-height: 1.75;
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 1em;
}

.prose h2 {
  margin: var(--s-4) 0 var(--s-2);
  font-size: var(--fs-h2);
}

.prose h3 {
  margin: var(--s-3) 0 var(--s-1);
  font-size: var(--fs-h3);
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--brick);
}
