/* =========================================================
   base.css: Schrift, Farbtoken, Reset, Basistypografie

   Gestaltungsidee: die Seite ist ein Bericht, wie die Schwesterseite
   zur psychischen Gewalt. Lesetypografie statt Interface, Papier
   statt Fläche, fast keine Farbe. Das ist das Argument der Seite in
   Gestalt: beschreiben statt feststellen.
   ========================================================= */

/* --- Selbst gehostete Schriften (keine externen Requests) --- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-optical-sizing: auto;
  font-display: swap;
  src: url('../fonts/sourceserif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-optical-sizing: auto;
  font-display: swap;
  src: url('../fonts/sourceserif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-display: swap;
  src: url('../fonts/sourceserif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-optical-sizing: auto;
  font-display: swap;
  src: url('../fonts/sourceserif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Token --- */
:root {
  /* Papier, nicht Fläche. Leicht warm, damit es nicht klinisch wirkt. */
  --paper:       #f7f5f1;
  --ink:         #1c1a17;
  --ink-2:       #45413b;
  --ink-3:       #6a655d;

  /* Haarlinien tragen die gesamte Gliederung */
  --rule:        #ddd8d0;
  --rule-mid:    #c4bdb2;

  /* Die einzige Farbe der Seite. Sie ist für Hilfe und Notruf
     reserviert und kommt sonst nirgends vor. */
  --alarm:       #96341f;

  --font-text: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;

  --sheet:   40rem;   /* eine Textspalte plus Rand */
  --gutter:  clamp(1.25rem, 5vw, 3rem);
  --pad-y:   clamp(2.75rem, 6vw, 4.5rem);
  --measure: 34rem;   /* rund 68 Zeichen */

  --ease: cubic-bezier(.22, .7, .28, 1);
}

/* Nachtvariante, weil die Zielgruppe solche Seiten spät liest. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #171614;
    --ink:         #eae7e1;
    --ink-2:       #bab5ac;
    --ink-3:       #928d84;

    --rule:        #34312c;
    --rule-mid:    #4a463f;

    --alarm:       #e08e75;
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-inline-size: 0; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

html { scroll-behavior: smooth; }
/* Sprungziele müssen unter der stehenden Kopfzeile landen, nicht dahinter. */
:target, [id] { scroll-margin-top: 6rem; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1.05rem, .35vw + 1rem, 1.18rem);
  line-height: 1.66;
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Typografie ---
   Überschriften gliedern über den Grad, nicht über die Größe. */
h1, h2, h3 {
  font-family: var(--font-text);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.006em;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.95rem, 3.8vw, 2.85rem);
  line-height: 1.14;
  font-weight: 400;      /* die Frage wird gestellt, nicht gerufen */
  letter-spacing: -.012em;
}
h2 { font-size: clamp(1.35rem, 2.1vw, 1.7rem); }
h3 { font-size: 1.12rem; }

p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

/* Beischrift: Feldnamen, Ziffern, Beleglagen.
   Diese Stimme spricht über den Text, nicht in ihm. */
.meta {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-3);
}

.lead {
  font-size: clamp(1.12rem, .4vw + 1.05rem, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
}

.prose { max-width: var(--measure); color: var(--ink-2); }
.prose p + p { margin-top: 1.05em; }
.prose strong { color: var(--ink); }
.prose--wide { max-width: 40rem; }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-mid);
  text-underline-offset: .18em;
}
a:hover { text-decoration-color: currentColor; }

/* --- Hilfsklassen --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: .5rem; left: .5rem;
  z-index: 50;
  padding: .7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}
/* Auch bei programmatischem Fokus sichtbar: Skip-Links müssen immer erscheinen. */
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* --- Einblenden beim Scrollen (nur mit JS) --- */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
