/* ============================================================================
   The Walking Dog — Base
   Reset, Typografie, Layout-Primitive, Marken-Motive.
   Setzt tokens.css voraus.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-body);
  font-weight: var(--fw-regular);
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
/* Fotos sind statisch. Keine Transition, kein Transform, kein Hover-Effekt.
   Diese Regel ist Absicht und setzt eine Briefing-Vorgabe technisch durch. */
img { transition: none !important; transform: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-8) 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* --- Links --------------------------------------------------------------
   Redaktioneller Text kann ueberall Links enthalten, nicht nur in .prose.
   Ohne diese Grundregel erscheinen sie im Browser-Blau. Komponenten mit
   eigener Optik (Buttons, Navigation, Karten) setzen sie danach zurueck. */
a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--accent-line);
  transition: text-decoration-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
a:hover { text-decoration-color: currentColor; }

/* Komponenten, die ihre eigene Optik mitbringen. */
.btn, .nav__link, .nav__brand, .footer__link,
.card, .skip-link, a.card { text-decoration: none; }

/* --- Fokus: ein System, ueberall sichtbar --------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: var(--focus-gap);
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute; left: var(--s-4); top: var(--s-4);
  transform: translateY(-160%);
  z-index: calc(var(--z-gate) + 10);
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill);
  font-weight: var(--fw-semi); font-size: var(--t-small);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* --- Schriftbindung ------------------------------------------------------- */
h1,h2,h3,h4,.display,.eyebrow { font-family: var(--font-display); }

/* Deutsche Komposita sind laenger als eine schmale Spalte: „Frag den
   Praeventionsbeauftragten" passte auf einem 320-px-Geraet nicht in eine
   Zeile und schob die ganze Seite seitlich heraus. `hyphens: auto` trennt
   nach den Regeln der Dokumentsprache (das <html lang> steht), `break-word`
   ist das Netz darunter, falls der Browser keine Trennmuster hat. Greift nur
   dann, wenn das Wort sonst nicht passt. */
h1,h2,h3,h4,.display,.h1,.h2,.h3,.h4 { hyphens: auto; overflow-wrap: break-word; }

.display {
  font-size: var(--t-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-bold);
  color: var(--ink-strong);
  text-wrap: balance;
}
h1, .h1 {
  font-size: var(--t-h1); line-height: var(--lh-tight);
  letter-spacing: var(--ls-display); font-weight: var(--fw-bold);
  color: var(--ink-strong); text-wrap: balance;
}
h2, .h2 {
  font-size: var(--t-h2); line-height: var(--lh-snug);
  letter-spacing: var(--ls-head); font-weight: var(--fw-bold);
  color: var(--ink-strong); text-wrap: balance;
}
h3, .h3 {
  font-size: var(--t-h3); line-height: var(--lh-snug);
  letter-spacing: var(--ls-head); font-weight: var(--fw-semi);
  color: var(--ink-strong); text-wrap: balance;
}
h4, .h4 {
  font-size: var(--t-h4); line-height: 1.3;
  letter-spacing: -0.012em; font-weight: var(--fw-semi);
  color: var(--ink-strong);
}

.lead {
  font-size: var(--t-lead); line-height: 1.45;
  color: var(--ink-muted); font-weight: var(--fw-regular);
  text-wrap: pretty;
}
.small { font-size: var(--t-small); }
.micro { font-size: var(--t-micro); color: var(--ink-faint); }

/* Eyebrow — das technische Detail der "Cyber"-Seite der Art Direction. */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 1.75rem; height: 1px;
  background: currentColor; opacity: .55; flex: none;
}
.eyebrow--plain::before { display: none; }
/* Ortsangabe, Bildquelle, Kapitelnummer: Metadaten, keine Bedienelemente.
   In Akzentfarbe sehen sie aus, als liesse sich darauf klicken. */
.eyebrow--muted { color: var(--ink-faint); }
.eyebrow--atmos { color: var(--atmos); }
.eyebrow--premium { color: var(--premium); }

/* --- Lesestrecke: Aufklaerung, Recht, Praevention -------------------------- */
.prose { max-width: var(--w-text); }
.prose > * + * { margin-top: var(--s-5); }
.prose p { line-height: var(--lh-relaxed); color: var(--ink); text-wrap: pretty; }
.prose h2 { margin-top: var(--s-9); }
.prose h3 { margin-top: var(--s-7); }
.prose h2 + p, .prose h3 + p { margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose li + li { margin-top: var(--s-3); }
.prose li { line-height: var(--lh-relaxed); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li {
  position: relative; padding-left: var(--s-6);
}
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 0.6rem; height: 1px; background: var(--accent);
}
.prose strong { color: var(--ink-strong); font-weight: var(--fw-semi); }
.prose a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--accent-line);
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote {
  margin: var(--s-7) 0; padding-left: var(--s-5);
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--t-h4); line-height: 1.4;
  letter-spacing: var(--ls-head);
  color: var(--ink-strong);
}

/* --- Layout-Primitive ----------------------------------------------------- */
.shell { width: 100%; margin-inline: auto; padding-inline: var(--gutter); }
.shell--wide   { max-width: var(--w-wide); }
.shell--page   { max-width: var(--w-page); }
.shell--text   { max-width: var(--w-text); }
.shell--narrow { max-width: var(--w-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--lg { padding-block: var(--section-y-lg); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.stack > * + * { margin-top: var(--flow, var(--s-5)); }
.stack--tight  { --flow: var(--s-3); }
.stack--loose  { --flow: var(--s-7); }
.stack--xloose { --flow: var(--s-9); }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.cluster--tight { gap: var(--s-2); }

/* Sektionskopf: Eyebrow + Titel + Lead, ueberall gleich aufgebaut.
   Der Abstand NACH dem Kopf muss deutlich groesser sein als der zwischen
   seinen Teilen — sonst klebt eine 2,5rem-Ueberschrift am Folgeinhalt. */
.section-head { max-width: 46rem; }
.section-head > * + * { margin-top: var(--s-4); }
.section-head--intro { margin-bottom: var(--s-8); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }

/* --- Marken-Motive --------------------------------------------------------
   Abstrahiert aus dem Logo. Rein dekorativ, CSS-only, keine Fotos beteiligt. */

/* Sonnenaufgang -> Licht- und Fokusprinzip.
   Auf hellem Grund arbeitet das Motiv mit warmem Gold und kuehlem Himmel,
   nicht mit Leuchtgruen. Sehr niedrige Deckkraft: es soll spuerbar sein,
   nicht sichtbar als Farbfleck. */
/* ABGESCHALTET seit dem Editorial-Umbau 10/2026.
   Die drei radialen Waschungen (Gold, Himmel, Gruen) waren als "Sonnenlicht"
   gedacht. Auf der ruhigen Papierflaeche lesen sie sich als Farbschleier und
   sind genau das, was eine Seite nach Vorlage aussehen laesst. Die Vorgabe
   lautet: keine dekorativen Verlaeufe.

   Die Klasse bleibt als Haken in den Templates stehen — sie positioniert und
   kostet nichts. Wer die Waschungen zurueckholen will, fuellt hier wieder ein
   `background` ein und muss nichts am Markup anfassen. */
.lightfall { position: relative; isolation: isolate; }

/* Hangkurve -> die eine erlaubte organische Kante */
.slope-edge { position: relative; }
.slope-edge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4.5rem;
  background: var(--bg-deep);
  clip-path: ellipse(78% 100% at 42% 100%);
  pointer-events: none;
}

/* Feine Haarlinie als Sektionstrenner */
.hairline {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* --- Utilities ------------------------------------------------------------ */
.u-center     { text-align: center; }
.u-accent     { color: var(--accent); }
.u-atmos      { color: var(--atmos); }
.u-premium    { color: var(--premium); }
.u-warm       { color: var(--warm); }
.u-strong     { color: var(--ink-strong); }
.u-muted      { color: var(--ink-muted); }
.u-mono       { font-family: var(--font-mono); }
.u-nowrap     { white-space: nowrap; }
.u-bleed      { background: var(--bg); }

/* Abstands- und Breiten-Utilities.
   WARUM ALS KLASSEN UND NICHT ALS style="": Die Content-Security-Policy
   erlaubt nur style-src 'self'. Inline-Style-Attribute waeren im Browser
   wirkungslos — ohne sichtbare Fehlermeldung. Deshalb gibt es im gesamten
   Projekt keine style=""-Attribute. */
.u-mt-4 { margin-top: var(--s-4); }
.u-mt-5 { margin-top: var(--s-5); }
.u-mt-6 { margin-top: var(--s-6); }
.u-mt-7 { margin-top: var(--s-7); }
.u-mb-6 { margin-bottom: var(--s-6); }
.u-mb-7 { margin-bottom: var(--s-7); }
.u-measure        { max-width: var(--w-text); }
.u-measure-narrow { max-width: 28ch; }
.u-danger         { color: var(--c-danger-600); }
.cluster--center  { justify-content: center; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
