/* ==========================================================================
   Datei: basis.css
   Zweck: Grundlage für alle Seiten: Schriften, Maße, Farbmodus, Reset,
          Grundtypografie und Hilfsklassen. Die FARBEN legt jede Seite in ihrem
          eigenen CSS fest (z. B. css/variante-1.css, Abschnitt 1).
   Inhalt:
     1. Schriften (lokal, keine Verbindung zu Google)
     2. Maße und Schriftgrößen (Tokens)
     3. Farbmodus hell/dunkel (Mechanik)
     4. Reset und Grundtypografie
     5. Hilfsklassen (Breite, nur für Vorleser, Sprunglink, Fokus)
   Typische Änderungen: Abstände/Schriftgrößen -> 2.
   Farben: als light-dark(HELL, DUNKEL) in der Datei der jeweiligen Seite.
   ========================================================================== */

/* === 1. Schriften === */
/* Playfair Display und Noto Sans Display: die Schriften der bisherigen Website.
   Beide als variable Schrift (eine Datei für alle Stärken). Noto Sans Display
   kann zusätzlich schmaler laufen (font-stretch 62,5 % bis 100 %). */
@font-face {
    font-family: "Playfair Display";
    src: url("/fonts/playfair-display.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("/fonts/playfair-display-kursiv.woff2") format("woff2");
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Noto Sans Display";
    src: url("/fonts/noto-sans-display.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62.5% 100%;
    font-style: normal;
    font-display: swap;
}

/* === 2. Maße und Schriftgrößen === */
:root {
    --schrift-titel: "Playfair Display", Georgia, "Times New Roman", serif;
    --schrift-text: "Noto Sans Display", "Segoe UI", system-ui, sans-serif;

    --breite-max: 76rem;
    --rand: clamp(1rem, 4.5vw, 2.5rem);
    --abschnitt: clamp(4rem, 9vw, 7.5rem);

    /* Schriftgrößen: Verhältnis ca. 1,25 (große Terz), mitwachsend */
    --groesse-klein: 0.9375rem;
    --groesse-text: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    --groesse-gross: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4rem);
    --groesse-h3: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
    --groesse-h2: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem);
    --groesse-h1: clamp(2.15rem, 1.4rem + 3.4vw, 4.1rem);

    --rund-knopf: 999px;
    --rund-feld: 0.6rem;
    --dauer: 180ms;
}

/* === 3. Farbmodus hell/dunkel ===
   Standard: folgt Handy/PC. Hat jemand den Knopf benutzt, setzt js/start.js
   data-farbmodus="hell" oder "dunkel" am <html>. Alle Farben werden in den
   Seiten-CSS-Dateien mit light-dark(HELL, DUNKEL) angegeben und richten sich
   automatisch nach color-scheme. NICHT ÄNDERN. */
:root { color-scheme: light dark; }
:root[data-farbmodus="hell"] { color-scheme: light; }
:root[data-farbmodus="dunkel"] { color-scheme: dark; }

/* === 4. Reset und Grundtypografie === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    margin: 0;
    background: var(--grund);
    color: var(--tinte);
    font-family: var(--schrift-text);
    font-size: var(--groesse-text);
    line-height: 1.6;
    font-kerning: normal;
    font-variant-numeric: proportional-nums;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; hyphens: auto; }
ul, ol { margin: 0; padding: 0; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--akzent); color: var(--akzent-tinte); }

/* Zahlen, die nicht umbrechen dürfen (Telefon, Preise, Bewertung) */
.nummer, .preis, .zusammen { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }

/* === 5. Hilfsklassen === */
.breite { width: min(100% - 2 * var(--rand), var(--breite-max)); margin-inline: auto; }
.nur-vorlesen {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprunglink {
    position: absolute; left: var(--rand); top: -4rem; z-index: 100;
    padding: 0.6rem 1rem; background: var(--tinte); color: var(--grund); border-radius: var(--rund-feld);
}
.sprunglink:focus { top: 0.75rem; }
:focus-visible { outline: 2px solid var(--fokus, var(--akzent)); outline-offset: 3px; }
.symbol { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
