/* =============================================================
   ASB Wohnpark Lausitzer Seenland — base.css
   Reset, Schrift-Einbindung, Grundtypografie, Grundlayout, A11y-Basics.
   Lädt tokens.css voraus (Reihenfolge in <head> beachten).
   ============================================================= */

/* -------------------------------------------------------------
   SCHRIFT-EINBINDUNG (self-hosted, DSGVO-konform)
   -------------------------------------------------------------
   PLATZHALTER: Die woff2-Dateien werden später in fonts/ abgelegt.
   Solange sie fehlen, greift automatisch der CD-Fallback (Arial / Georgia)
   aus den Tokens --font-head / --font-body. font-display: swap verhindert
   unsichtbaren Text (FOIT). KEINE externen Google-/CDN-Requests.

   Erwartete Dateien (Google Fonts „Noto Sans" / „Noto Serif", woff2):
     fonts/noto-sans-regular.woff2
     fonts/noto-sans-700.woff2
     fonts/noto-serif-regular.woff2
     fonts/noto-serif-700.woff2
   Dateinamen ggf. an den tatsächlichen Download anpassen.
------------------------------------------------------------- */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-serif-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-serif-700.woff2") format("woff2");
}

/* -------------------------------------------------------------
   RESET (modern, minimal)
------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  min-height: 100vh;
  /* Atmosphäre statt sterilem Weiß: dezenter warm-gelber Marken-Schimmer
     oben rechts + kühler Anthrazit-Hauch oben links, der in Weiß ausläuft.
     Liegt nur im oberen Bereich (hinter dem Hero), der Rest bleibt ruhig. */
  background:
    radial-gradient(56rem 30rem at 82% 0%, rgba(255, 238, 0, .14), transparent 60%),
    radial-gradient(44rem 30rem at -6% 4%, rgba(45, 45, 70, .05), transparent 56%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select { font: inherit; color: inherit; }

ul, ol { padding: 0; list-style-position: inside; }

a { color: inherit; }

/* -------------------------------------------------------------
   TYPOGRAFIE
   Headlines: Noto Sans Bold, Anthrazit. Fließtext: Noto Serif, Anthrazit.
------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: var(--lh-head);
  color: var(--text);
  text-wrap: balance;        /* harmonischere Umbrüche bei Überschriften */
}

h1 { font-size: var(--fs-h1); letter-spacing: .01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p, li { max-width: var(--maxw-text); }  /* Zeilenlänge begrenzen (65–75 Zeichen) */
p { text-wrap: pretty; }                /* angenehmere Absatz-Umbrüche (keine Schusterjungen) */

p + p { margin-top: var(--space-2); }

/* Hervorhebung einzelner Wörter in Rot — sparsam, nur in Headlines (CD). */
.accent-red { color: var(--asb-red); }

/* CD-Headline-Aufbau: 1. Zeile Bold, Folgezeile(n) Regular.
   <h2>Erste Zeile<br><span class="hl-regular">zweite Zeile</span></h2> */
.hl-regular { font-weight: 400; }

/* Claim „Wir helfen hier und jetzt." — Noto Sans Bold, ASB-Rot, prominent. */
.claim {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--asb-red);
  line-height: 1.15;
}

/* -------------------------------------------------------------
   LAYOUT-HILFEN
------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* Vertikaler Rhythmus für Sektionen */
.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }

.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: var(--on-dark); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--on-dark); }

/* Sticky-Header-Höhe bei Anker-Sprüngen berücksichtigen (Ziel nicht verdeckt). */
:where(h1, h2, h3, [id]) { scroll-margin-top: 96px; }

/* Lesetext-Spalte */
.prose { max-width: var(--maxw-text); }
.prose > * + * { margin-top: var(--space-3); }
.prose h2 { margin-top: var(--space-5); }
.prose h3 { margin-top: var(--space-4); }

/* -------------------------------------------------------------
   A11y: Skip-Link + Fokus-Indikatoren
------------------------------------------------------------- */

/* Sichtbar nur bei Fokus (Tastatur). Springt an den Hauptinhalt. */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
  z-index: 1000;
  padding: var(--space-1) var(--space-2);
  background: var(--asb-anthracite);
  color: var(--on-dark);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--motion) ease;
}
.skip-link:focus { transform: translateY(0); }

/* Deutlich sichtbarer Fokus-Ring für alle interaktiven Elemente.
   Niemals outline:none ohne Ersatz. */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: 4px;
}

/* Nur visuell verstecken, für Screenreader lesbar. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------
   prefers-reduced-motion respektieren
------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  :root { --motion: 0ms; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
