/* =============================================================
   base.css — Schriften, Grundtypografie, Fokus, Links
   Quelle: 09 · 3 (Typografie), 09 · 5.6 (Fokus), 09 · 10 (A11y)
   ============================================================= */

/* --- @font-face ----------------------------------------------
   Variable WOFF2, subsettet latin + latin-ext, selbst gehostet
   (09 · 3.1: Source Serif 4 + Inter, beide OFL, kein CDN).
   Aktiviert am 21.07.2026: Dateien liegen unter assets/fonts/
   (Latin-Subset via Google-Fonts-API bezogen, selbst gehostet). */
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4-latin-wght.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Grundgerüst ------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  font-size: var(--f-body);
  color: var(--c-ink);
  background: var(--c-paper);
}

/* Mobile Fußleiste braucht Platz am Seitenende */
@media (max-width: 1023px) {
  body { padding-bottom: var(--h-fussleiste); }
}

/* --- Überschriften (09 · 3.2) ------------------------------ */
/* Lange deutsche Komposita in Headlines: mit Trennstrich brechen statt roh umbrechen oder clippen.
   limit-chars: nur Woerter ab 12 Zeichen trennen, sonst zerlegt der Browser auch kurze Headlines. */
h1, .h1 {
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-before: 5;
  -webkit-hyphenate-limit-after: 5;
  hyphenate-limit-chars: 12 5 5;
  overflow-wrap: break-word;
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--f-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--f-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Display-Moment: Aussagen, die eine ganze Sektion tragen (Design-Pass) */
.display {
  font-size: clamp(2.4rem, 1.7rem + 3.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

/* Ausgewogene Umbrüche — progressive enhancement */
h1, .h1, h2, .h2, h3, .h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--f-h3);
  font-weight: 600;
  line-height: 1.25;
}
h4, .h4 {
  font-family: var(--font-text);
  font-size: var(--f-h4);
  font-weight: 600;
  line-height: 1.35;
}

.vorspann {
  font-size: var(--f-lead);
  line-height: 1.55;
}

.kicker {
  font-family: var(--font-text);
  font-size: var(--f-micro);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
.flaeche-ink .kicker, .flaeche-brand .kicker { color: var(--c-brand-soft); }

/* Marken-Balken vor dem Kicker — Formzitat aus dem Logo
   (Namensblock + Balken), wiederkehrendes Erkennungszeichen */
.kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--c-brand);
  margin-right: var(--s-3);
  vertical-align: 0.18em;
}
.flaeche-ink .kicker::before, .flaeche-brand .kicker::before { background: var(--c-brand-soft); }

/* Adressen nie kursiv */
address { font-style: normal; }

.kleintext { font-size: var(--f-small); line-height: 1.5; }
.microtext { font-size: var(--f-micro); line-height: 1.5; color: var(--c-ink-muted); }

/* Lesespalte: 60–75 Zeichen (09 · 3.2) */
p, ul, ol, blockquote { max-width: var(--w-text); }

em { font-style: italic; } /* nur Zitate und Werktitel */

/* --- Links ------------------------------------------------- */
a {
  text-decoration-line: underline;
  text-decoration-color: var(--c-brand-soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--d-fast) var(--e-out);
}
a:hover { text-decoration-color: var(--c-ink); }
.flaeche-ink a:hover, .flaeche-brand a:hover { text-decoration-color: var(--c-paper); }

/* --- Fokus: Doppelring (09 · 5.6) -------------------------- */
:focus-visible {
  outline: 3px solid var(--c-focus-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--c-focus-light);
}
.flaeche-ink :focus-visible,
.flaeche-brand :focus-visible {
  outline-color: var(--c-focus-light);
  box-shadow: 0 0 0 6px rgba(36, 31, 27, 0.9);
}

/* --- Sprunglink (10 · E9) ---------------------------------- */
.sprunglink {
  position: fixed;
  top: 0; left: var(--rand);
  z-index: 200;
  background: var(--c-ink);
  color: var(--c-paper);
  padding: var(--s-3) var(--s-5);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform var(--d-fast) var(--e-out);
}
.sprunglink:focus-visible { transform: translateY(0); }

/* --- Auswahl ----------------------------------------------- */
::selection { background: var(--c-brand); color: var(--c-paper); }
/* Auf dunklen Flächen invertieren — Taupe auf Ink wäre dunkel auf dunkel */
.flaeche-ink ::selection, .flaeche-brand ::selection {
  background: var(--c-sand);
  color: var(--c-ink);
}
