/* Meike Schiek – Grundlagen: Schriften, Grundstile, Container, Barrierefreiheit. */

/* Schriften selbst gehostet, keine Verbindung zu Google (E13) */
@font-face { font-family: "Lora"; src: url("/fonts/lora-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 140px; /* Sprungziele nicht unter dem klebenden Kopfbereich */
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  overflow-x: clip;
}

/* Aquarellflecken dürfen seitlich überstehen, ohne die Seite zu verbreitern */
main { overflow-x: clip; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--lh-titel);
  color: inherit;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: manual; /* Trennung nur an &shy;, automatische trennt Titel falsch */
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h1); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: var(--fs-h4); line-height: 1.35; }

/* Kursiver Teil einer Überschrift in Rosa, wie im Entwurf */
:is(h1, h2, h3) em { font-style: italic; font-weight: 400; color: var(--accent); }

p, ul, ol, figure, blockquote, dl { margin: 0; }
blockquote p { text-wrap: balance; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

strong { font-weight: 700; }

/* Fokus für Tastaturbedienung: immer sichtbar, nie entfernen (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Container */
.ms-wrap {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Lesbare Zeilenlänge für Fließtext */
.ms-text { max-width: var(--measure); }
.ms-text > * + * { margin-top: 1em; }
.ms-text h2 { font-size: var(--fs-h3); margin-top: 1.6em; }
.ms-text h3 { font-size: var(--fs-h4); margin-top: 1.4em; }

.ms-lead { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.ms-small { font-size: var(--fs-small); line-height: 24px; }
.ms-muted { color: var(--ink-muted); }

/* „Zum Inhalt springen“ */
.ms-skip {
  position: absolute; left: var(--space-4); top: -80px; z-index: 50;
  padding: var(--space-3) var(--space-4);
  background: var(--surface); border-radius: var(--radius-sm);
  color: var(--accent); font-weight: 700; text-decoration: underline;
}
.ms-skip:focus { top: var(--space-3); }

/* Nur für Vorleseprogramme */
.ms-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Weniger Bewegung, wenn das Gerät es wünscht (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
