/* ============================================================================
   41squid CD-Guide v2 — Base
   Reset · @font-face (lokal, WOFF2, font-display:swap, kein CDN) ·
   Font-Stacks · Theme-Anwendung · prefers-reduced-motion-Grundgerüst.
   Lädt nach tokens.css (braucht die Custom Properties).
   ========================================================================== */

/* ── @font-face — drei Fonts, sechs Schnitte (TYP-01/02) ─────────────────
   Syne 500/600 · DM Sans 400/500 · DM Mono 400/500. Syne 800 existiert nicht.
   Pfade relativ zu dieser Datei (assets/css/ → ../fonts/).                  */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/syne-medium.woff2") format("woff2");
}
@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/syne-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmsans-regular.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dmsans-medium.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmmono-regular.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dmmono-medium.woff2") format("woff2");
}

/* ── Reset (schlank, modern) ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background-color: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: 16px;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard);
}

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

/* hidden-Attribut hat Vorrang vor Display-Utilities (z.B. .aa-badge). */
[hidden] {
  display: none !important;
}

a {
  color: var(--brand-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
}

/* Inline-Code: DM Mono, neutral (kein Indigo — Signal bleibt rationiert). */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ── Typo-Grundlagen ─────────────────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  font-weight: var(--weight-display);
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-text); /* Eyebrow-Kicker in Akzent (Indigo, theme-aware) */
}

/* Sichtbarer Fokus für Keyboard-First-Bedienung (CMP-07: 2px Indigo-300,
   Offset 2px, folgt der Element-Form — moderne Browser ziehen den Outline
   automatisch entlang des border-radius des Elements). */
:focus-visible {
  outline: 2px solid var(--indigo-300);
  outline-offset: 2px;
}

/* Screenreader-only Utility (Skip-Link etc.). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── prefers-reduced-motion — Grundgerüst (Pflicht, MOT-02) ──────────────── */
@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;
  }
}
