/*
 * AWL Designsystem – Basis (Schriften, Grundstil, Fokus, Skip-Link, Raster)
 * Schriften liegen lokal (D-05). Keine Ressourcen von fremden Servern.
 */

/* ---------- Schriften (SIL Open Font License, siehe assets/fonts) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 600; font-display: swap;
  src: url("../fonts/barlow-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }
/* Ersatzschriften (T4-05): Arial, auf die Breite der Webschriften skaliert (gemessen am Textmuster der Website).
 * Ober- und Unterlängen (ascent/descent) wie bei Barlow (100/20) und Source Sans 3 (102/40), geteilt durch size-adjust.
 * So brechen Zeilen vor und nach dem Laden der Webschriften gleich um und die Seite springt nicht (CLS). */
@font-face { font-family: "Barlow Ersatz"; src: local("Arial"), local("ArialMT"); font-weight: 100 549; size-adjust: 92%; ascent-override: 108.7%; descent-override: 21.7%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Ersatz"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 550 900; size-adjust: 92.5%; ascent-override: 108.1%; descent-override: 21.6%; line-gap-override: 0%; }
@font-face { font-family: "Source Sans Ersatz"; src: local("Arial"), local("ArialMT"); font-weight: 100 549; size-adjust: 93.5%; ascent-override: 109.1%; descent-override: 42.8%; line-gap-override: 0%; }
@font-face { font-family: "Source Sans Ersatz"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 550 900; size-adjust: 89.5%; ascent-override: 114%; descent-override: 44.7%; line-gap-override: 0%; }

/* ---------- Grundstil ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Platz für die fixierte Infoleiste, damit Sprungziele und Fokus frei bleiben (B-15) */
  scroll-padding-top: calc(var(--infoleiste-hoehe, 2.5rem) + var(--abstand-5));
}
/* Kein globales weiches Scrollen: Es verzögert die Tastatur-Navigation über lange Strecken.
   Weiche Übergänge gibt es gezielt per Skript („Nach oben“). */

body {
  margin: 0;
  background: var(--weiss);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: var(--groesse-text);
  line-height: var(--zeile-text);
  font-kerning: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}
/* Automatische Silbentrennung nur auf schmalen Bildschirmen; ab Tablet trennt der Browser nicht mehr (23.11.2026) */
@media (min-width: 48em) { body { hyphens: manual; } }

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

h1, h2, h3, h4 {
  font-family: var(--schrift-titel);
  font-weight: 600;
  line-height: var(--zeile-titel);
  color: var(--navy-900);
  margin: 0 0 var(--abstand-4);
  letter-spacing: -0.005em;
  hyphens: manual;
  text-wrap: balance;
}
/* Sehr schmale Bildschirme: lange Wörter wie „Unternehmensberatung“ in Überschriften trennen,
 * statt die Seite zu verbreitern (B-08, WCAG 1.4.10, Ä-39). Ab 30em bleibt die Trennung manuell. */
@media (max-width: 30em) { h1, h2, h3, h4 { hyphens: auto; } }
h1 { font-size: var(--groesse-h1); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--groesse-h2); }
h3 { font-size: var(--groesse-h3); }
h4 { font-size: var(--groesse-h4); }

p, ul, ol, dl, table, figure { margin: 0 0 var(--abstand-4); }
p, li { max-width: var(--zeilenlaenge); }
/* Textspalte als Ganzes auf Lesebreite: Überschriften, Kästen und Tabellen enden mit dem Fließtext (23.11.2026) */
.text { max-width: var(--zeilenlaenge); }
small, .klein { font-size: var(--groesse-klein); }
strong, b { font-weight: 600; }

/* Kicker / Dachzeile: kursiv und in Versalien wie „STEUER“ im Logo */
.kicker {
  display: block;
  font-family: var(--schrift-titel);
  font-style: italic;
  font-weight: 600;
  font-size: var(--groesse-klein);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tuerkis-700);
  margin-bottom: var(--abstand-2);
}
.einleitung { font-size: var(--groesse-gross); color: var(--text); }

/* ---------- Links (B-09: nicht nur Farbe, immer unterstrichen) ---------- */
a {
  color: var(--navy-900);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--navy-700); text-decoration-thickness: 2px; }

/* ---------- Fokus (B-03, WCAG 2.4.7 / 2.4.11) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: var(--fokus-breite) solid var(--fokus-farbe);
  outline-offset: var(--fokus-abstand);
  border-radius: var(--radius-s);
}
.dunkel { --fokus-farbe: var(--tuerkis-400); }

/* ---------- Skip-Link (B-04) ---------- */
.skip-link {
  position: absolute;
  left: var(--abstand-4);
  top: var(--abstand-4);
  z-index: 1000;
  padding: var(--abstand-3) var(--abstand-5);
  background: var(--navy-900);
  color: var(--weiss);
  font-weight: 600;
  text-decoration: underline;
  border-radius: var(--radius-s);
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
  --fokus-farbe: var(--tuerkis-400);
  outline-offset: 2px;
}

/* ---------- Bildschirmleser-Text ---------- */
.nur-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Raster ---------- */
.inhalt {
  width: 100%;
  max-width: calc(var(--inhalt-max) + 2 * var(--rand));
  margin-inline: auto;
  padding-inline: var(--rand);
}
.abschnitt { padding-block: var(--abschnitt); }
.abschnitt--hell { background: var(--navy-50); }
.dunkel { background: var(--navy-900); color: var(--weiss); }
.dunkel h1, .dunkel h2, .dunkel h3, .dunkel h4 { color: var(--weiss); }
.dunkel a { color: var(--weiss); }
.dunkel .kicker { color: var(--tuerkis-400); }

.raster { display: grid; gap: var(--abstand-5); }
@media (min-width: 40em) { .raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 48em) { .raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 40em) and (max-width: 47.99em) { .raster--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .raster--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 40em) and (max-width: 63.99em) { .raster--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Formelement Schräge: Akzentbalken mit 9° Neigung ---------- */
.akzent {
  display: block;
  width: 3rem;
  height: var(--akzent-hoehe);
  background: var(--tuerkis-400);
  transform: skewX(var(--schraege));
  margin-bottom: var(--abstand-4);
}
.akzent--navy { background: var(--navy-900); }

/* ---------- Kennzeichnung der Vorschau (Phase 0a) ---------- */
.vorschau-leiste {
  background: var(--hinweis-flaeche);
  color: var(--text);
  border-bottom: 2px solid var(--hinweis);
  font-size: var(--groesse-klein);
  padding-block: var(--abstand-2);
}
.vorschau-leiste p { margin: 0; max-width: none; }
.entwurf-hinweis {
  display: inline-block;
  font-size: var(--groesse-klein);
  font-weight: 600;
  color: var(--hinweis);
  background: var(--hinweis-flaeche);
  border: 1px solid var(--hinweis);
  border-radius: var(--radius-s);
  padding: 0 var(--abstand-2);
}

/* ---------- Hohe Kontraste (Windows) ---------- */
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .akzent { background: CanvasText; }
}
.id { white-space: nowrap; }

/* Logo-Wechsel im dunklen Modus (Ä-34, Ä-36): helles und dunkles Logo, eines ist ausgeblendet */
.logo-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-farbschema="hell"]) .logo-hell { display: none; }
  :root:not([data-farbschema="hell"]) .logo-dunkel { display: inline-block; }
}
:root[data-farbschema="dunkel"] .logo-hell { display: none; }
:root[data-farbschema="dunkel"] .logo-dunkel { display: inline-block; }
