/* grund.css · Pflichtteile jeder Seite aus dem Skill webseite-bauen.
 * Farbmarken für hell und dunkel, Inhaltskante, Kopfzeile mit bündigem Logo, Menü am Handy, Knöpfe ab 44 px,
 * Formular nach B9, Fußzeile D29, ruhige Fassung. Die Gestaltung der Seite (Schrift, Bildwelt, Abschnitte,
 * Effekte) gehört in seite.css. Werte mit PLATZHALTER ersetzen, Klassen der Pflichtteile behalten
 * (das Prüfwerkzeug sucht .titel, .beleg, .knopf, .beruhigung, .formular, .fuss-zeile).
 *
 * Farbwelt: <html data-farbwelt="dunkel"> (fest dunkel), "hell" (fest hell) oder "beide" (folgt dem Gerät).
 * Jede Farbe steht einmal als light-dark(hell, dunkel); nur Farben wechseln, nie Schrift, Abstände oder Aufbau. */

:root {
  color-scheme: light dark;
  /* Farbwelt locker.: weißer Grund, ein Hauch Pfirsich nur als Fläche, Himbeere als einziger Akzent (Seil, Knopf),
     Aprikose als zweite Farbe für Licht und Flächen, Tinte für Schrift. Fest hell. Kein Grün, kein Beige. */
  --grund:     light-dark(#ffffff, #ffffff);
  --grund-2:   light-dark(#fff3ee, #fff3ee);   /* Pfirsich-Hauch: Formularfelder, Bühnen */
  --pfirsich:  #ffe9df;                         /* kräftigere Pfirsichfläche */
  --aprikose:  #ff9e6d;
  --himbeere:  #e5306b;                         /* Seil, große Zahlen, Linien */
  --text:      light-dark(#2a1530, #2a1530);
  --text-2:    light-dark(#5a4460, #5a4460);
  --text-3:    light-dark(#6c5870, #6c5870);   /* klein und gedämpft, Kontrast über 4,5 : 1 */
  --linie:     light-dark(#f2ddd6, #f2ddd6);
  --linie-feld: light-dark(#96808f, #96808f);  /* Rand von Formularfeldern: über 3 : 1 gegen Weiß und Pfirsich */
  --akzent:    light-dark(#d42a62, #d42a62);   /* Himbeere eine Spur tiefer: weiße Schrift auf dem Knopf über 4,5 : 1 */
  --auf-akzent: light-dark(#ffffff, #ffffff);
  --fehler:    light-dark(#a3122f, #a3122f);
  --kopf-grund: light-dark(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92));

  /* Schrift: lokal in fonts/ (Werkzeug schriften.mjs), nie von fremden Servern. Diese Stapel sind nur Platzhalter. */
  --schrift-display: "Bricolage Grotesque", system-ui, "Segoe UI", sans-serif;
  --schrift-text: "Nunito Sans", system-ui, "Segoe UI", sans-serif;
  --schrift-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Größen: echter Gradsprung zwischen Überschrift und Text */
  --t-riesig: clamp(2.75rem, 1.6rem + 5.6vw, 8rem);
  --t-gross: clamp(2rem, 1.35rem + 2.6vw, 4rem);
  --t-mittel: clamp(1.25rem, 1.08rem + 0.7vw, 1.7rem);
  --t-text: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-klein: 0.9rem;

  /* Raster: eine Inhaltsbreite, eine Randbreite. Kopfzeile, Abschnitte und Fuß stehen auf derselben Kante. */
  --inhalt: 1200px;
  --rand: clamp(16px, 5vw, 72px);
  --kante: max(var(--rand), calc((100% - var(--inhalt)) / 2));
  --abstand: clamp(72px, 9vw, 160px);      /* zwischen Abschnitten */
  --kopf-hoehe: 72px;

  /* Ecken als feste Regel (in VORLAGE.md bzw. STECKBRIEF.md festhalten) */
  --rund-knopf: 999px;
  --rund-feld: 14px;
  --rund-bild: 22px;

  --aus: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-farbwelt="hell"] { color-scheme: light; }
:root[data-farbwelt="dunkel"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--grund); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-hoehe) + 16px); scrollbar-gutter: stable; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--grund); color: var(--text); font-family: var(--schrift-text); font-size: var(--t-text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
main { flex: 1 0 auto; }   /* kurze Seiten: die Fußzeile steht trotzdem ganz unten */
/* Weiches Scrollen (Lenis, Regel D34): die Regeln der mitgelieferten lenis.css, ohne die für iframes (Karten bleiben bedienbar) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--schrift-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; 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: 90; 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; }

/* Inhaltskante: jeder Abschnitt legt sein Innenleben in .innen; randlose Flächen gehen über die ganze Breite */
.innen { width: min(100% - 2 * var(--rand), var(--inhalt)); margin-inline: auto; }
.abschnitt { padding-block: var(--abstand); }

/* ---------- Kopfzeile: Logo auf der linken Inhaltskante (Martin, zweimal gemeldet), Menü einzeilig, höchstens 80 px */
.kopfzeile { position: fixed; inset: 0 0 auto 0; z-index: 50; min-height: var(--kopf-hoehe); display: flex; align-items: center; gap: clamp(12px, 2.6vw, 36px); padding: 10px var(--kante); background: transparent; transition: background-color 0.35s ease, box-shadow 0.35s ease; }
.kopf-messpunkt { position: absolute; top: 0; left: 0; width: 1px; height: 40px; pointer-events: none; }
.kopf-fest .kopfzeile { background: var(--kopf-grund); box-shadow: 0 1px 0 var(--linie); backdrop-filter: blur(12px); }
.marke { margin-right: auto; min-height: 44px; display: inline-flex; align-items: center; font-family: var(--schrift-display); font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; }
.menue { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.menue a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text-2); text-decoration: none; }
.menue a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--akzent); }
@media (hover: hover) and (pointer: fine) { .menue a:hover { color: var(--text); } }
.menue-knopf { display: none; min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--linie); border-radius: var(--rund-knopf); background: transparent; color: var(--text); font: inherit; font-size: 0.95rem; cursor: pointer; }
@media (max-width: 860px) {
  .js .menue-knopf { display: inline-flex; align-items: center; }
  .js .menue { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--rand) 20px; background: var(--grund); box-shadow: 0 1px 0 var(--linie); }
  .js .menue-offen .menue { display: flex; }
  .js .menue-offen { background: var(--kopf-grund); }
  .js .menue a { min-height: 48px; font-size: 1.1rem; color: var(--text); }
  .kopfzeile .knopf--klein { display: none; }
  html:not(.js) .kopfzeile { position: static; flex-wrap: wrap; }
  html:not(.js) .menue { flex-wrap: wrap; }
}

/* ---------- Knöpfe: EIN gefüllter Typ (Hauptaktion), zweite Aktion als Rahmen-Knopf. Text passt in eine Zeile. */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; min-height: 52px; padding: 10px 28px; border: 0; border-radius: var(--rund-knopf); background: var(--akzent); color: var(--auf-akzent); font: inherit; font-weight: 640; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; transition: transform 0.18s var(--aus), box-shadow 0.3s var(--aus), background-color 0.3s ease; }
@media (min-width: 600px) { .knopf { white-space: nowrap; } }   /* am Desktop in einer Zeile; Beschriftung kurz halten (2 bis 4 Wörter) */
@media (hover: hover) and (pointer: fine) { .knopf:hover { box-shadow: 0 10px 30px -12px var(--akzent); } }
.knopf:active { transform: scale(0.97); }
.knopf--klein { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }
.knopf--rahmen { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px currentColor; }
@media (hover: hover) and (pointer: fine) { .knopf--rahmen:hover { box-shadow: inset 0 0 0 1.5px var(--akzent); } }
.knopf[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Erster Bildschirm (D32): Überschrift, Zeile, Beleg, Knopf, direkt darunter der Satz gegen die Unsicherheit */
.anfang { position: relative; min-height: 100svh; display: grid; align-items: end; padding-top: calc(var(--kopf-hoehe) + 24px); }
.titel { font-size: var(--t-riesig); line-height: 0.98; letter-spacing: -0.035em; }
.unterzeile { max-width: 34rem; margin-top: 22px; font-size: var(--t-mittel); line-height: 1.4; color: var(--text-2); }
.beleg { margin-top: 18px; color: var(--text-2); font-size: var(--t-klein); }
.beleg strong { color: var(--text); font-weight: 650; }
.handlung { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.beruhigung { flex-basis: 100%; margin-top: 2px; color: var(--text-2); font-size: var(--t-klein); }
/* Ein noch leerer Bildplatz. Das Prüfwerkzeug meldet ihn ROT, solange data-platzhalter dasteht (keine Bildattrappe, D26). */
[data-platzhalter] { background: var(--grund-2); outline: 2px dashed var(--linie); outline-offset: -2px; }
/* Angabe, die der Betreiber einer echten Seite noch liefern muss: <span class="offen">[OFFEN: Telefon]</span>, ein ganzer
   Absatz oder Block mit class="offen offen-block". Sichtbar, damit er beim Durchsehen jede Lücke findet, aber ordentlich.
   Geht so nie live: pruefen.mjs --offen zeigt ENTWURF, ausliefern.md Abschnitt 1. Link ohne bekanntes Ziel: span statt a. */
.offen { padding: 0 0.3em; border-radius: 4px; color: inherit; font-style: normal; background: color-mix(in srgb, var(--akzent) 13%, transparent); outline: 1px dashed color-mix(in srgb, var(--akzent) 75%, transparent); outline-offset: 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.offen-block { display: block; padding: 14px 18px; border-radius: var(--rund-feld); outline-offset: 0; }

/* ---------- Kontakt und Formular nach B9: schickt im Hintergrund, die Seite bleibt an ihrer Stelle */
.kontakt-raster { display: grid; gap: 40px clamp(32px, 6vw, 96px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .kontakt-raster { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.formular { display: grid; gap: 16px; max-width: 36rem; }
.feld { display: grid; gap: 6px; }
.feld label { font-size: 0.95rem; color: var(--text-2); }
.feld input, .feld textarea, .feld select { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--rund-feld); border: 1px solid var(--linie-feld); background-color: var(--grund-2); color: var(--text); font: inherit; }
.feld textarea { min-height: 128px; resize: vertical; }
/* Auswahlfeld: eigener Pfeil aus zwei Verläufen (kein SVG, keine Grafikdatei), Farbe folgt dem Text */
.feld select { appearance: none; padding-right: 44px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.feld input:focus-visible, .feld textarea:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.feld [aria-invalid="true"] { border-color: var(--fehler); }
.feld-fehler { min-height: 1.2em; font-size: 0.875rem; color: var(--fehler); }
.formular-meldung { min-height: 1.5em; color: var(--text); font-weight: 560; }
.formular-meldung:focus { outline: none; }
.direkt { display: grid; gap: 6px; align-content: start; }
.direkt a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-mittel); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .direkt a:hover { color: var(--akzent); } }

/* ---------- Fußzeile: Betreiber, Rechtliches, als letzte Zeile ganz unten mittig D29 (Wortlaut nie ändern) */
.fuss { padding: 56px var(--kante) 28px; border-top: 1px solid var(--linie); color: var(--text-3); font-size: 0.9rem; text-align: center; }
.fuss p { margin: 0 auto 10px; max-width: 70ch; }
.fuss-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.fuss-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text-2); }
.fuss-zeile { width: 100%; max-width: none !important; margin: 24px 0 0 !important; text-align: center; font-size: 0.8rem; color: var(--text-3); }
.fuss-zeile a { color: var(--text-2); }

/* ---------- Unterseiten und Rechtliches */
.seite-kopf { padding-top: calc(var(--kopf-hoehe) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(32px, 5vw, 64px); }
.seite-kopf h1 { font-size: var(--t-gross); }
.lesetext { max-width: 68ch; }
.lesetext h2 { font-size: var(--t-mittel); margin: 2.2em 0 0.6em; }
.lesetext p + p { margin-top: 1em; }
.lesetext dl div { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: 4px 20px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.lesetext dt { color: var(--text-2); }
.lesetext dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .lesetext dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }   /* lange E-Mail-Adressen am Handy */

/* ---------- Ruhige Fassung: keine Bewegung, alles sofort an seinem Platz */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
