/* ==========================================================================
   King Richard — base: reset, tokens, typography
   ========================================================================== */

:root {
    /* Inkt en papier */
    --color-ink: #121214;
    --color-ink-soft: #1c1c20;
    --color-ink-line: rgba(251, 250, 247, 0.14);
    --color-paper: #f7eed4;
    --color-stone: #f0dfb0;
    --color-white: #fcf8ea;
    --color-gold-soft: #f2e0a4;

    /* Accent: goud */
    --color-gold: #c9a227;
    --color-gold-bright: #e0b93a;
    --color-gold-dark: #a3841a;
    --color-gold-deep: #7d6512;
    --color-accent-text: var(--color-gold-dark);

    /* Tekst */
    --color-text: #121214;
    --color-text-muted: #5f5a4a;
    --color-text-faint: #948d78;
    --color-text-inverse: #fbfaf7;
    --color-text-inverse-muted: rgba(251, 250, 247, 0.66);
    --color-line: rgba(18, 18, 20, 0.16);
    --color-line-strong: rgba(18, 18, 20, 0.5);

    /* Semantisch */
    --color-primary: var(--color-gold);
    --color-bg: var(--color-paper);

    /* Typografie */
    --font-display: "Cormorant Garamond", "Times New Roman", serif;
    --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

    --fs-xs: 0.6875rem;
    --fs-sm: 0.8125rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.375rem;
    --fs-xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
    --fs-2xl: clamp(2.5rem, 1.6rem + 3.2vw, 4.25rem);
    --fs-3xl: clamp(3rem, 1.4rem + 5.6vw, 6.5rem);

    --lh-tight: 0.98;
    --lh-snug: 1.15;
    --lh-body: 1.65;

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --sp-32: 8rem;

    --section-y: clamp(4.5rem, 3rem + 6vw, 9rem);
    --container: 1280px;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);

    --radius: 0;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.45s;
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

img {
    height: auto;
}

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

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

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
    margin: 0;
}

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

h1,
h2,
h3,
.display {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--lh-snug);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--fs-3xl);
    line-height: var(--lh-tight);
    font-weight: 300;
    text-wrap: balance;
}

h2 {
    font-size: var(--fs-2xl);
    line-height: 1.05;
    font-weight: 300;
    text-wrap: balance;
}

h3 {
    font-size: var(--fs-xl);
    font-weight: 400;
}

h4 {
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 500;
    line-height: var(--lh-snug);
}

em,
.italic {
    font-style: italic;
}

.display em {
    font-weight: 300;
}

p {
    max-width: 62ch;
}

.lead {
    font-size: var(--fs-md);
    line-height: 1.6;
    color: var(--color-text-muted);
}

.muted {
    color: var(--color-text-muted);
}

/* Mono labels (eyebrow, nummers) */
.label {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.label--accent {
    color: var(--color-accent-text);
}

h1 em,
h2 em,
.display em {
    color: var(--color-accent-text);
}

.label--inverse {
    color: var(--color-text-inverse-muted);
}

/* Donkere secties */
.theme-dark {
    background: var(--color-ink);
    color: var(--color-text-inverse);
    --color-text: var(--color-text-inverse);
    --color-text-muted: var(--color-text-inverse-muted);
    --color-text-faint: rgba(251, 250, 247, 0.4);
    --color-line: var(--color-ink-line);
    --color-line-strong: rgba(251, 250, 247, 0.55);
    --color-accent-text: var(--color-gold-bright);
}

.theme-dark--soft {
    background: var(--color-ink-soft);
}

.theme-stone {
    background: var(--color-stone);
}

/* Rustiger palet (feedback Richard, oktober 2026): secties wisselen tussen papier en steen,
   donker alleen als accent. Wit en goud-zacht als sectiekleur vallen samen met papier en steen. */
.theme-white {
    background: var(--color-paper);
}

.theme-gold {
    background: var(--color-stone);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
}

/* Selectie */
::selection {
    background: var(--color-gold);
    color: var(--color-ink);
}

/* Utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

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