/* base.css
   Grondslag: kleuren, typografie, spacing, dark/light theme.
   Alle andere CSS-bestanden bouwen hierop verder — nooit losse kleurwaarden elders. */

:root {
  /* Light theme (default) */
  --color-bg: #faf9f6;
  --color-bg-elevated: #ffffff;
  --color-bg-sunken: #f1eee7;
  --color-text: #211d17;
  --color-text-muted: #675f52;
  --color-border: #e7e2d7;
  --color-accent: #b4641f;
  --color-accent-strong: #8e4c13;
  --color-accent-soft: #f6e7d5;
  --color-accent-contrast: #ffffff;
  --color-success: #3f7a4f;
  --color-warning: #a9741f;
  --color-danger: #a3402f;

  /* Merk-gradient: warm amber, gebruikt in logo, knoppen en accenten */
  --gradient-accent: linear-gradient(135deg, #d9822f 0%, #a05a22 100%);

  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Historische naam: koppen zijn intussen sans — token blijft bestaan
     zodat componenten niet allemaal moeten worden aangepast. */
  --font-serif: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(24, 18, 10, 0.05), 0 4px 12px rgba(24, 18, 10, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(24, 18, 10, 0.06), 0 10px 28px rgba(24, 18, 10, 0.1);
  --shadow-accent: 0 4px 14px rgba(180, 100, 31, 0.32);
  --transition-fast: 140ms cubic-bezier(0.2, 0, 0.2, 1);
  --transition-med: 240ms cubic-bezier(0.2, 0, 0.2, 1);
}

:root[data-theme="dark"] {
  --color-bg: #131418;
  --color-bg-elevated: #1b1d23;
  --color-bg-sunken: #0e0f13;
  --color-text: #ede9e1;
  --color-text-muted: #a49f92;
  --color-border: #2d2f37;
  --color-accent: #d99a5b;
  --color-accent-strong: #e8b783;
  --color-accent-soft: #2d2419;
  --color-accent-contrast: #1a1206;
  --color-success: #6fbf80;
  --color-warning: #d9a441;
  --color-danger: #e0685a;

  --gradient-accent: linear-gradient(135deg, #e09250 0%, #b06428 100%);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-accent: 0 4px 16px rgba(217, 154, 91, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-med), color var(--transition-med);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--space-3) 0;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.65rem); }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 var(--space-3) 0;
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent-strong);
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

/* Zichtbare focus voor toetsenbordgebruikers — consistent op de hele site */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Tekst met merk-gradient (bv. accentwoord in de hero) */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Muzieknotatie / akkoorden krijgen een monospace-achtig, rustig lettertype */
.chord,
code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.95em;
}

button, input, select {
  font-family: inherit;
  font-size: 1rem;
}

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

/* Subtiele scrollbars die meekleuren met het thema */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

/* Respecteer de bewegingsvoorkeur van de gebruiker: schakel alle
   animaties en overgangen in één keer uit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
