/* grund.css · Pflichtteile jeder WOW-Seite aus dem Baukasten (Bühne, Startbild, Bildmodus, Messanzeige, Knöpfe ab 44 px,
 * Formular nach B9, Fußzeile D29, ruhige Fassung). Gestaltung (Schrift, Farben, Abstände, Länge der Fahrt) gehört in seite.css.
 * Alles mit PLATZHALTER ersetzen. */
:root {
  --grund: #0b0b0d;          /* PLATZHALTER: Grundfarbe der Seite */
  --text: #f1ede7;           /* PLATZHALTER */
  --text-2: #b9b2aa;
  --text-3: #8f8880;
  --akzent: #ffb35c;         /* PLATZHALTER: genau eine Akzentfarbe (Farbe des wiederkehrenden Motivs) */
  --linie: #2a2a30;
  --rand: clamp(16px, 5vw, 84px);
  --rund-knopf: 999px;       /* Eckenradien als feste Regel */
  --rund-feld: 12px;
  --schrift: system-ui, 'Segoe UI', sans-serif;   /* PLATZHALTER: eigene Schrift lokal in fonts/ (kein CDN) */
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --aus: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--grund); -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--grund); color: var(--text); font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprung { position: fixed; left: 12px; top: -64px; z-index: 70; padding: 12px 18px; background: var(--text); color: var(--grund); border-radius: var(--rund-knopf); text-decoration: none; font-weight: 600; transition: top 0.2s var(--aus); }
.sprung:focus { top: 12px; }

/* ---------- Bühne: Canvas, Startbild und Bildmodus liegen exakt gleich (gleicher Zuschnitt = unsichtbare Überblendung) */
.buehne-bild, .startbild, .bildwechsel { position: fixed; left: 0; top: 0; width: 100%; height: 100lvh; z-index: 0; pointer-events: none; }
.buehne-bild { display: block; touch-action: pan-y; }
.startbild img, .bildwechsel img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.startbild { transition: opacity 0.7s ease; }
[data-buehne="blende"] .startbild { opacity: 0; }
[data-buehne="lebt"] .startbild { opacity: 0; visibility: hidden; transition: opacity 0.7s ease, visibility 0s linear 0.7s; }
.standbild .startbild, [data-buehne="bildmodus"] .startbild, [data-buehne="ruhig"] .startbild { display: none; }
[data-buehne="bildmodus"] .buehne-bild, [data-buehne="ruhig"] .buehne-bild { display: none; }
.bildwechsel img { position: absolute; inset: 0; opacity: 0; }
.bildwechsel--stufig img { transition: opacity 0.8s ease; }
.bildwechsel--stufig img.sichtbar { opacity: 1; }
.bildwechsel--stufig img.vorne { z-index: 1; }
/* Der erste Moment lebt (lebendig.js): leichte Ebene über dem Startbild, blendet mit ihm aus */
.lebendig { position: fixed; left: 0; top: 0; width: 100%; height: 100lvh; z-index: 0; pointer-events: none; transition: opacity 0.7s ease; }
.lebendig--aus { opacity: 0; }
main, .fuss { position: relative; z-index: 1; }
/* Textschutz (js/baukasten/textschutz.js): weicher Hof hinter Textblöcken mit data-schutz, eng um den Text. Ohne lebende
   Szene (Startbild, Bildmodus, ruhige Fassung, ohne JavaScript) zeichnet ihn dieses CSS; lebt die Szene, rechnet ihn die
   Ausgabe nur so stark wie nötig, und dieser Hof blendet aus (--schutz-css). Dunkle Schrift: data-schutz="hell" (oder der
   Baustein erkennt es und setzt data-schutz-art). */
[data-schutz] { position: relative; isolation: isolate; }
[data-schutz]::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: 48px; background: var(--schutz-hof); box-shadow: 0 0 72px 44px var(--schutz-hof); opacity: var(--schutz-css, 1); --schutz-hof: rgba(0, 0, 0, 0.36); }
[data-schutz="hell"]::before, [data-schutz-art="hell"]::before { --schutz-hof: rgba(246, 242, 236, 0.5); }
.ohne-text [data-schutz]::before { display: none; }
/* Werkzeug ?ohnetext: nur die Szene (Startbilder, Übergangsprüfung) */
/* Werkzeug ?standbild: keine Scrollleiste im Bild */
html.standbild, html.standbild body { overflow: hidden; }
/* ?ohnetext (Startbilder, Übergangsprüfung): alles außer Bühne, Startbild, lebendiger Ebene und Bildwechsel verstecken, auch
   eigene feste Anzeigen der Seite außerhalb von main (Testlauf 2: Temperaturanzeige landete in allen Startbildern) */
.ohne-text body > *:not(.buehne-bild):not(.startbild):not(.lebendig):not(.bildwechsel) { visibility: hidden !important; }

/* ---------- Messanzeige (?messen=1) */
.messanzeige { position: fixed; left: 12px; bottom: 12px; z-index: 80; max-width: calc(100vw - 24px); padding: 8px 12px; border-radius: 10px; background: rgba(8, 8, 10, 0.86); border: 1px solid var(--linie); color: var(--text); font: 0.74rem/1.45 var(--mono); white-space: pre-line; pointer-events: none; }

/* ---------- Kopfzeile: Logo auf der linken Inhaltskante (gleicher Rand wie der Inhalt) */
.kopfzeile { position: fixed; inset: 0 0 auto 0; z-index: 20; min-height: 72px; display: flex; align-items: center; gap: clamp(12px, 3vw, 36px); padding: 12px var(--rand); background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
.kopfzeile { transition: background-color 0.35s ease; }
/* Kopfzeile nach dem ersten Scrollen: deckende Fläche. Nie backdrop-filter über der Bühne: der Weichzeichner wird über der
   lebenden Szene jedes Bild neu gerechnet (Testlauf 2: auf Intel bei 150 % spürbar langsamer). */
.kopf-fest .kopfzeile { background: rgba(8, 8, 10, 0.95); box-shadow: 0 1px 0 var(--linie); }
.marke { margin-right: auto; text-decoration: none; font-weight: 650; letter-spacing: 0.08em; min-height: 44px; display: inline-flex; align-items: center; }
.menue { display: flex; gap: clamp(12px, 2.4vw, 30px); }
.menue a { color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .menue a:hover { color: var(--text); } }
@media (max-width: 720px) { .menue { display: none; } }

/* ---------- Knöpfe: ein gefüllter Typ, zweite Aktion als Rahmen-Knopf, Tippflächen mindestens 44 px */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--rund-knopf); background: var(--text); color: var(--grund); font: inherit; font-weight: 640; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--aus); }
@media (hover: hover) and (pointer: fine) { .knopf:hover { box-shadow: 0 0 0 2px var(--akzent); } }
.knopf:active { transform: scale(0.97); }
.knopf--klein { min-height: 44px; padding: 0 18px; font-size: 0.9rem; }
.knopf--rahmen { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px currentColor; }
.ton, .neigung { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--rund-knopf); border: 1px solid var(--linie); background: rgba(10, 10, 12, 0.5); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.ton[aria-pressed="true"] { border-color: var(--akzent); }

/* ---------- Formular nach B9: schickt im Hintergrund, Seite bleibt an ihrer Stelle */
.formular { display: grid; gap: 16px; max-width: 34rem; }
.feld { display: grid; gap: 6px; }
.feld label { font-size: 0.92rem; color: var(--text-2); }
.feld input, .feld textarea { min-height: 48px; padding: 12px 14px; border-radius: var(--rund-feld); border: 1px solid var(--linie); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; }
.feld textarea { min-height: 120px; resize: vertical; }
.feld input[aria-invalid="true"], .feld textarea[aria-invalid="true"] { border-color: #ff7a6b; }
.feld-fehler { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: #ff9a8e; }
.formular-meldung { margin: 0; min-height: 1.5em; color: var(--text); }

/* ---------- Fußzeile: Betreiber, Impressum/Datenschutz, als letzte Zeile mittig D29 */
.fuss { padding: 56px var(--rand) 28px; background: var(--grund); border-top: 1px solid var(--linie); color: var(--text-3); font-size: 0.86rem; text-align: center; }
.fuss p { margin: 0 auto 10px; max-width: 70ch; }
.fuss-links { display: flex; justify-content: center; gap: 22px; }
.fuss-links a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }
.fuss-zeile { width: 100%; max-width: none !important; margin: 26px 0 0 !important; text-align: center; font-size: 0.78rem; color: var(--text-3); }
.fuss-zeile a { color: var(--text-2); }

/* ---------- Ruhige Fassung: keine Animation, Standbilder je Station (bildmodus.js, stufig) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .knopf { transition: none; }
}

/* Seitenfuß auf eigener Grafikebene: Rutscht der Fuß am Seitenende über die feste Bühne, legt Chrome (Windows, NVIDIA, 125 %)
   die Fläche der Bühne neu an und zeigt oben einen Streifen fremden Grafikspeicher (lp-205, 29.10.2026). Eigene Ebene verhindert das. */
.fuss { transform: translateZ(0); }
