/* =================================================================
   base.css — Tokens, Reset, Typografie, Container, Utilities
   Konzept: "Kontrollierte Klarheit"
   ================================================================= */

:root {
  /* --- Farbe (§11) --- */
  --ink:        #141412;   /* Werkstatt-Schwarz */
  --ink-deep:   #0E0E0C;
  --graphit:    #2B2A27;
  --graphit-2:  #232220;
  --nebel:      #F3F1EC;   /* warme Leseflaeche */
  --weiss:      #FAF9F5;   /* Werkstatt-Weiss */
  --stahl:      #8A8C86;   /* kuehles Mittelgrau / Metadaten */
  --stahl-dim:  #6E6F69;
  --gruen:      #2D443A;   /* Praezisionsgruen (Akzent) */
  --gruen-hell: #3D5A4C;   /* Hover / Linien */
  --gruen-line: #4E6E5E;
  --messing:    #A08F6A;   /* sehr sparsam */

  --line-dark:  rgba(243,241,236,.14);
  --line-light: rgba(20,20,18,.14);

  /* --- Typografie --- */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* --- Container (§12.1) --- */
  --c-max:  1300px;
  --c-text:  680px;
  --pad:    clamp(18px, 4vw, 64px);

  /* --- Spacing-Skala --- */
  --space-section: clamp(72px, 12vw, 168px);   /* Makroabstand */
  --space-lg: clamp(40px, 6vw, 88px);
  --space-md: clamp(24px, 3vw, 40px);
  --space-sm: clamp(16px, 2vw, 24px);

  /* --- Motion (§27) --- */
  --ease-out:  cubic-bezier(.16, 1, .3, 1);       /* expo-out-artig */
  --ease-ui:   cubic-bezier(.4, 0, .2, 1);
  --t-hover:   .2s;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 12px, 18px);
  line-height: 1.55;
  color: var(--nebel);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
ul { list-style: none; padding: 0; }

::selection { background: var(--gruen-hell); color: var(--weiss); }

/* --- Typografische Grundklassen (§10.4) --- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -0.005em;
  text-transform: none;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stahl);
}
.mono { font-family: var(--font-mono); }

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--nebel);
}

/* --- Container & Grid (§12) --- */
.container {
  width: 100%;
  max-width: var(--c-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.measure { max-width: var(--c-text); }

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2.5vw, 36px);
}

/* --- Sektionsrhythmus --- */
.section { padding-block: var(--space-section); }
.section--tight { padding-block: var(--space-lg); }

.surface-dark   { background: var(--ink);     color: var(--nebel); }
.surface-deep   { background: var(--ink-deep); color: var(--nebel); }
.surface-graph  { background: var(--graphit); color: var(--nebel); }
.surface-light  { background: var(--nebel);   color: var(--ink); }
.surface-white  { background: var(--weiss);   color: var(--ink); }
.surface-light .eyebrow,
.surface-white .eyebrow { color: var(--stahl-dim); }

/* --- Hilfsklassen --- */
.hairline-top    { border-top: 1px solid var(--line-dark); }
.hairline-bottom { border-bottom: 1px solid var(--line-dark); }
.surface-light .hairline-top,
.surface-white .hairline-top { border-color: var(--line-light); }

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

/* --- Fokus (§26.2) --- */
:focus-visible {
  outline: 2px solid var(--gruen-line);
  outline-offset: 3px;
  border-radius: 1px;
}
