/*
 * Nebenseiten von stoeberby.de: Impressum, Datenschutz, 404 und die
 * Antwortseiten der Testrunde (/_testrunde/*). Farben, Schatten und Ränder
 * sind aus der index.html übernommen (Tokens des Designsystems), damit man
 * beim Wechsel nicht merkt, dass man die Seite verlassen hat.
 *
 * Kein JavaScript: Die Seiten laufen unter derselben CSP wie die Startseite,
 * das Thema folgt allein prefers-color-scheme.
 */

:root {
  --papier: #f9ecd0;
  --papier-tief: #f1dfb8;
  --zettel: #fffaf0;
  --tusche: #28302e;
  --tusche-weich: #5b5a47;
  --strich: #28302e;
  --auf-tusche: #f9ecd0;
  --rot: #a4472f;
  --reet: #d5a548;
  --meer: #3f6a86;
  --wiese: #56733a;
  --nebel: #e4ddcc;
  --schatten-zettel: 3px 4px 0 #28302e;
  --fokus: var(--meer);

  --font-hand: "Caveat Brush", "Caveat Brush Fallback", cursive;
  --font-text: Recursive, "Recursive Ext", "Recursive Fallback", system-ui, sans-serif;

  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius-s: 6px; --radius-m: 14px;
  --kritzel-rand: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --kritzel-rand-2: 15px 255px 15px 225px / 225px 15px 255px 15px;
  --strich-breite: 2.5px;

  --gutter: 16px;
  --lesebreite: 65ch;
  color-scheme: light dark;
}
@media (min-width: 700px) { :root { --gutter: 32px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #1e2528; --papier-tief: #283236; --zettel: #313c40;
    --tusche: #f3e7cc; --tusche-weich: #c9bfa6; --strich: #d9ccb0;
    --auf-tusche: #1e2528; --rot: #ec8f72;
    --reet: #e2b75e; --meer: #86b3cf; --wiese: #9dc07a; --nebel: #3a4448;
    --schatten-zettel: 3px 4px 0 #0c1012;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background-color: var(--papier);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--tusche);
  font: 400 17px/1.6 var(--font-text);
  font-variation-settings: "CASL" 0.6;
  overflow-x: clip;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--meer); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 2px; }

.spalte { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

/* ── Kopfzeile ─────────────────────────────────────────────── */
.kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px var(--space-4); padding-block: 18px; }
/* Logo: Bildmarke + Wortmarke aus assets/icons/ (hell/dunkel per <picture>); Tausch der Dateien = neues Logo. */
.marke { display: inline-flex; align-items: center; gap: 8px; color: var(--tusche); text-decoration: none; }
.marke picture { display: block; flex: none; }
.marke img { display: block; flex: none; }
.marke .bm { width: 40px; height: 40px; }
.marke .wm { width: 128px; height: 42px; }
@media (max-width: 379px) { .marke .bm { width: 34px; height: 34px; } .marke .wm { width: 110px; height: 36px; } }
.zurueck {
  font-weight: 650; font-size: 15px; color: var(--tusche);
  text-decoration: underline wavy var(--meer) 1.5px; text-underline-offset: 5px;
}
.zurueck:hover { text-decoration-thickness: 2.5px; }

/* ── Schrift ───────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-hand); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 7vw, 68px); line-height: .98; }
h2 { font-size: 32px; line-height: 1.06; }
h3 { font-size: 25px; line-height: 1.1; }
p, ul, ol, address { margin: 0; }
address { font-style: normal; }
strong { font-weight: 650; }
.anriss { font-size: clamp(18px, 1.9vw, 20px); line-height: 1.55; }
.klein { font-size: 14px; line-height: 20px; color: var(--tusche-weich); }
.von { font: 400 22px/1 var(--font-hand); color: var(--rot); }
.stand { font-size: 14px; color: var(--tusche-weich); }

/* ── Zettel ────────────────────────────────────────────────── */
.zettel {
  position: relative;
  background: var(--zettel);
  border: var(--strich-breite) solid var(--strich);
  border-radius: var(--kritzel-rand);
  box-shadow: var(--schatten-zettel);
}
.pin {
  position: absolute; top: -12px; left: 50%; translate: -50% 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rot); border: var(--strich-breite) solid var(--strich);
}

/* Lange Texte (Impressum, Datenschutz): ein gerader, großer Zettel. */
.blatt {
  max-width: calc(var(--lesebreite) + 2 * clamp(20px, 5vw, 56px));
  margin: clamp(16px, 3vw, 32px) auto clamp(48px, 7vw, 88px);
  padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 56px) clamp(28px, 4vw, 48px);
  /* Die Kritzel-Radien der Knöpfe verbiegen bei einem langen Blatt die ganze
     Seitenkante; hier reichen kleine, ungleiche Ecken. */
  border-radius: 22px 10px 26px 12px / 12px 24px 10px 22px;
}
.blatt > * + * { margin-top: var(--space-4); }
.blatt h2 { margin-top: 40px; }
.blatt h3 { margin-top: 28px; }
.blatt h2 + *, .blatt h3 + * { margin-top: 10px; }
.blatt ul { padding-left: 1.2em; }
.blatt li + li { margin-top: 6px; }
.blatt li::marker { color: var(--tusche-weich); }
.blatt .deko {
  float: right; width: clamp(64px, 14vw, 110px);
  margin: -8px -4px 12px 16px; shape-outside: margin-box;
}

/* Kasten „In Kürze" */
.kurz {
  background: var(--papier-tief);
  border: var(--strich-breite) solid var(--strich);
  border-radius: 12px 26px 10px 22px / 22px 10px 24px 12px;
  padding: 18px 20px 20px;
  clear: both;
}
.blatt .kurz { margin-top: 28px; }
.kurz h2 { font-size: 28px; margin: 0; }
.kurz ul { margin-top: 10px; }

/* Anschrift als kleiner abgesetzter Block */
.anschrift { padding-left: 14px; border-left: var(--strich-breite) solid var(--tusche-weich); }

/* Offene Punkte für Tim: laut, damit keiner übersehen wird. */
.tim {
  background: var(--reet); color: #28302e;
  font: 650 0.92em/1.5 var(--font-text); font-variation-settings: "CASL" 0;
  padding: 1px 6px; border-radius: var(--radius-s);
  outline: 2px dashed var(--rot); outline-offset: 1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ── Kurze Seiten (404, Testrunde): Bühne mit Bild und schiefem Zettel ── */
.buehne {
  display: grid; justify-items: center; align-content: center;
  gap: 0; padding-block: clamp(8px, 4vw, 48px) clamp(48px, 8vw, 96px);
}
.buehne .bild { width: min(var(--b, 220px), 62vw); margin-bottom: -14px; position: relative; z-index: 1; }
.karte {
  width: 100%; max-width: 560px;
  display: grid; gap: var(--space-4); justify-items: start;
  padding: clamp(30px, 5vw, 44px) clamp(20px, 5vw, 40px) clamp(24px, 4vw, 34px);
  rotate: var(--r, -1.2deg);
}
.karte p { max-width: var(--lesebreite); }
.knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.karte form { display: contents; }

/* ── Knöpfe (wie auf der Startseite) ───────────────────────── */
.knopf {
  font: 650 16px/20px var(--font-text); font-variation-settings: "CASL" .8;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 14px 22px; min-height: 48px;
  border: var(--strich-breite) solid var(--strich); border-radius: var(--kritzel-rand);
  background: var(--zettel); color: var(--tusche); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.knopf--haupt { background: var(--tusche); color: var(--auf-tusche); box-shadow: var(--schatten-zettel); }
.knopf--haupt:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--strich); }
.knopf--haupt:active { transform: translate(3px, 4px); box-shadow: none; }
.knopf--leise {
  background: transparent; border-color: transparent; padding-inline: 4px; color: var(--tusche);
  text-decoration: underline wavy var(--meer) 1.5px; text-underline-offset: 5px;
}

/* ── Fuß ───────────────────────────────────────────────────── */
.fuss {
  background: var(--papier-tief);
  border-top: var(--strich-breite) solid var(--strich);
  padding: 22px var(--gutter) 28px;
  text-align: center; font-size: 14px; line-height: 20px; color: var(--tusche-weich);
}
.fuss nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; }
.fuss a {
  display: inline-block; padding: 8px 4px;
  color: var(--tusche); font-weight: 650;
  text-decoration: underline wavy var(--meer) 1.5px; text-underline-offset: 5px;
}
.fuss a[aria-current="page"] { text-decoration-style: solid; }
.fuss p { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .knopf { transition: none; }
}
