/* ============================================================
   base.css — Reset, Typografie, Layout-Grid (theme-agnostisch)
   Nutzt NUR Tokens aus tokens-*.css. Lädt KEINE Farben selbst.
   ============================================================ */

@font-face {
  font-family: "Cinzel";
  src: url("../assets/fonts/cinzel-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-400i.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Special Elite";
  src: url("../assets/fonts/specialelite-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibmplexmono-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibmplexmono-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/spacegrotesk-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

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

html { scroll-behavior: smooth; }

button, select { font: inherit; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--texture-noise);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--duration-mech) var(--ease-mech),
              color var(--duration-mech) var(--ease-mech);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text);
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem);    font-weight: 600; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 600; }

p { max-width: 65ch; text-wrap: pretty; }

a { color: var(--verdigris); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cta); }

::selection { background: var(--cta); color: var(--cta-text); }

/* Zahlen & Daten IMMER in Mono — Regel 6 des Gremiums */
.data, .metric, .gauge-value, time, code, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Etiketten (Steampunk: Schreibmaschine; Modern: Mono) */
.label {
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Layout --- */
.container { width: min(1200px, 92vw); margin-inline: auto; }
.section { padding-block: clamp(4rem, 10vw, 8rem); }

.grid { display: grid; gap: var(--space-md, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  body { font-size: 1rem; }
}

/* Asymmetrie statt Center-Stack (Gremium-Regel 5) */
.asymmetric { display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-lg, 4rem); align-items: start; }
@media (max-width: 900px) { .asymmetric { grid-template-columns: 1fr; } }

/* Fokus-Zustände — sichtbar, beide Themes */
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
}

/* Bewegung respektieren (Gremium-Regel 7 + A11y) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
