/* ==========================================================================
   Datei: basis.css
   Zweck: Grundlage jeder Seite: Farben, Schriften, Zurücksetzen, Hilfsklassen,
          Knöpfe, Kopfzeile mit Handy-Menü, Aufruf, Seitenfuß, Bewegung.
          Danach folgen komponenten.css und das CSS der Seite (siehe teile/kopf.php).
   Inhalt:
     1. Farben und Schriften
     2. Zurücksetzen und Grundtext
     3. Hilfsklassen (Breite, Vorlesen, Sprunglink, Symbol, Nummer)
     4. Knöpfe, Textlinks, Öffnungsstatus, Google-Zeile
     5. Kopfzeile, Marke und Handy-Menü
     6. Aufruf vor dem Fuß
     7. Seitenfuß
     8. Bewegung
   Typische Änderungen: Farben/Schrift -> 1.; Knopfform -> 4.; Menü -> 5.
   ========================================================================== */

/* === 1. Farben und Schriften === */
/* Logofarben von Pawlak: Rot #e30613, Schwarz #1d1d1b (aus bilder/logo-pawlak.svg).
   Alle Schriften lokal in /fonts/ (SIL OFL). Der Browser lädt nur, was benutzt wird. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-kursiv.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
:root {
    --grund: #ffffff;          /* Seitenhintergrund */
    --flaeche: #f3f5f6;        /* abgesetzte Abschnitte (helles Alu-Grau) */
    --flaeche-tief: #e4e8eb;   /* Rahmen, Hover */
    --tinte: #1d1d1b;          /* Text (Logo-Schwarz) */
    --tinte-leise: #5a6066;    /* Nebentext */
    --linie: #e1e5e8;          /* Rahmen, Trennlinien */
    --rot: #e30613;            /* Logo-Rot: Hauptknopf, Punkte aus dem Logo */
    --rot-dunkel: #b4050f;     /* Rot beim Darüberfahren und als Schrift */
    --offen: #1f9d55;          /* Punkt „Jetzt geöffnet“ */
    --stern: #f4b400;          /* Google-Sterne */
    --kopf-grund: #ffffff;
    --fuss-grund: #1d1d1b;
    --fuss-text: #ecedee;
    --fehler: #b3261e;
    --erfolg: #2f6b4f;
    --schrift: "Archivo", system-ui, sans-serif;
    --schrift-titel: "Archivo", system-ui, sans-serif;
    --titel-breite: 112%;      /* Archivo etwas breiter für Überschriften */
    --rund-knopf: 999px;
    --rund-karte: 18px;
    --schatten: 0 1px 2px rgb(29 29 27 / .06), 0 14px 32px -16px rgb(29 29 27 / .3);
    --breite: 76rem;
    --rand: clamp(1rem, 4vw, 2rem);
    --abstand: clamp(3.5rem, 8vw, 6.5rem);
    --kopf-hoehe: 4.5rem;
    --text-groesse: 1.0625rem; /* wird von den Lese-Einstellungen vergrößert */
}

/* === 2. Zurücksetzen und Grundtext === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-hoehe) + 1rem); }
body {
    margin: 0; background: var(--grund); color: var(--tinte);
    font-family: var(--schrift); font-size: var(--text-groesse); line-height: 1.6;
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--schrift-titel); font-stretch: var(--titel-breite); line-height: 1.1; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1, h2 { font-weight: 750; letter-spacing: -.02em; }
p, li { text-wrap: pretty; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 3px; border-radius: 4px; }

/* === 3. Hilfsklassen === */
.breite { width: 100%; max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }
.nur-vorlesen {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.sprunglink {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    padding: .6rem 1rem; background: var(--tinte); color: var(--grund);
    border-radius: 8px; text-decoration: none;
}
.sprunglink:focus { top: 1rem; }
.symbol { width: 1.2em; height: 1.2em; flex: none; }
/* Was zusammengehört, bricht nie um (Telefonnummer, Öffnungszeit, Status) */
.nummer, .ohne-umbruch, .status { white-space: nowrap; }
.nummer { font-variant-numeric: tabular-nums; }

/* === 4. Knöpfe, Textlinks, Öffnungsstatus, Google-Zeile === */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 3.2rem; padding: .75rem 1.4rem;
    border: 2px solid transparent; border-radius: var(--rund-knopf);
    font: inherit; font-weight: 650; line-height: 1.1; text-decoration: none;
    cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
    touch-action: manipulation;
}
.knopf-haupt { background: var(--rot); color: #fff; }
.knopf-haupt:hover { background: var(--rot-dunkel); }
.knopf-zweit { border-color: var(--tinte); color: var(--tinte); background: transparent; }
.knopf-zweit:hover { background: var(--tinte); color: var(--grund); }
.knopf[disabled] { opacity: .6; cursor: progress; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .75rem; }

.textlink { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; color: var(--tinte); text-underline-offset: .25em; }
.textlink .symbol { transition: transform .2s; }
.textlink:hover .symbol { transform: translateX(3px); }

.status { display: inline-flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-weight: 500; }
.status:hover { text-decoration: underline; text-underline-offset: .2em; }
.status-punkt { width: .6rem; height: .6rem; border-radius: 50%; background: #b5bcc2; flex: none; }
.ist-offen .status-punkt { background: var(--offen); box-shadow: 0 0 0 4px rgb(31 157 85 / .18); }

.google-zeile { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-size: .95rem; }
.google-zeile:hover .ohne-umbruch { text-decoration: underline; text-underline-offset: .2em; }
.sterne { display: inline-flex; gap: 1px; color: var(--stern); }
.stern { width: 1rem; height: 1rem; }

/* === 5. Kopfzeile, Marke und Handy-Menü === */
.kopf { position: sticky; top: 0; z-index: 50; background: var(--kopf-grund); transition: box-shadow .25s; }
.gescrollt .kopf { box-shadow: 0 1px 0 var(--linie), 0 8px 24px -18px rgb(0 0 0 / .4); }
.kopf-innen { display: flex; align-items: center; gap: 1rem; min-height: var(--kopf-hoehe); }

.marke { display: block; margin-right: auto; flex: none; }
.marke img { width: 8.5rem; height: auto; }

.menue-liste { list-style: none; padding: 0; display: flex; gap: .15rem; }
.menue-liste a { display: block; padding: .5rem .75rem; border-radius: var(--rund-knopf); text-decoration: none; font-weight: 550; }
.menue-liste a:hover { background: var(--flaeche); }
.menue-liste a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--rot); text-decoration-thickness: 3px; text-underline-offset: .45em; }
.menue-kontakt { display: none; }

.kopf-aktionen { display: flex; align-items: center; gap: .5rem; }
.kopf-termin { min-height: 2.75rem; padding: .5rem 1.1rem; }
.kopf-symbol {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--linie); border-radius: 12px;
    background: transparent; color: inherit; cursor: pointer; text-decoration: none;
}
.kopf-symbol:hover { background: var(--flaeche); }
.kopf-anruf { display: none; background: var(--rot); border-color: var(--rot); color: #fff; }
.kopf-anruf:hover { background: var(--rot-dunkel); }
.menue-knopf {
    display: none; width: 2.75rem; height: 2.75rem; padding: 0;
    border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer;
}
.menue-knopf-striche, .menue-knopf-striche::before, .menue-knopf-striche::after {
    display: block; width: 1.3rem; height: 2px; margin-inline: auto;
    background: currentColor; border-radius: 2px; transition: transform .25s;
}
.menue-knopf-striche { position: relative; }
.menue-knopf-striche::before, .menue-knopf-striche::after { content: ""; position: absolute; left: 0; }
.menue-knopf-striche::before { top: -7px; }
.menue-knopf-striche::after { top: 7px; }
.menue-knopf[aria-expanded="true"] .menue-knopf-striche { background: transparent; }
.menue-knopf[aria-expanded="true"] .menue-knopf-striche::before { transform: translateY(7px) rotate(45deg); }
.menue-knopf[aria-expanded="true"] .menue-knopf-striche::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1040px) {
    :root { --kopf-hoehe: 4rem; }
    .marke img { width: 7rem; }
    .menue-knopf { display: inline-flex; align-items: center; justify-content: center; }
    .kopf-termin { display: none; }
    .kopf-anruf { display: inline-flex; }
    .hauptmenue {
        position: fixed; inset: var(--kopf-hoehe) 0 0 0; z-index: 40;
        display: none; flex-direction: column; gap: 2rem;
        padding: 1.5rem var(--rand) 2rem; overflow-y: auto; overscroll-behavior: contain; background: var(--grund);
    }
    .hauptmenue.offen { display: flex; }
    .menue-liste { flex-direction: column; gap: 0; }
    .menue-liste a { padding: .9rem 0; border-radius: 0; border-bottom: 1px solid var(--linie); font-size: 1.3rem; }
    .menue-liste a:hover { background: transparent; }
    .menue-kontakt { display: grid; gap: 1rem; justify-items: start; }
    body.menue-offen { overflow: hidden; }
}

/* === 6. Aufruf vor dem Fuß === */
.aufruf { background: var(--flaeche); padding-block: clamp(3rem, 7vw, 5rem); }
.aufruf-innen { display: grid; gap: 1.75rem; align-items: center; }
.aufruf h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .6rem; }
.aufruf-text p { max-width: 38em; color: var(--tinte-leise); }
@media (min-width: 860px) { .aufruf-innen { grid-template-columns: 1.3fr 1fr; } .aufruf-knoepfe { justify-content: flex-end; } }

/* === 7. Seitenfuß === */
.fuss { background: var(--fuss-grund); color: var(--fuss-text); font-size: .95rem; }
.fuss-innen { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }
.fuss h2 { font-size: 1rem; font-stretch: 100%; margin-bottom: .7rem; letter-spacing: 0; }
.fuss-spalte address { margin-bottom: .6rem; opacity: .85; }
.fuss-liste { list-style: none; padding: 0; display: grid; gap: .4rem; margin-bottom: 1rem; }
.fuss-liste li { display: flex; align-items: center; gap: .5rem; }
.fuss-liste a, .fuss-link { display: inline-flex; align-items: center; gap: .5rem; }
.fuss-link { margin-top: .6rem; }
.fuss-klein { font-size: .85rem; opacity: .75; margin-block: .6rem .3rem; }
.zeiten-liste { display: grid; gap: .15rem; max-width: 17rem; }
.zeiten-liste div { display: flex; justify-content: space-between; gap: 1rem; white-space: nowrap; }
.zeiten-liste dt { font-weight: 600; }
.fuss a { color: inherit; text-underline-offset: .2em; }
.fuss a:hover { color: #ff8a8f; }
.fuss-unten { border-top: 1px solid rgb(255 255 255 / .12); }
.fuss-unten-innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; padding-block: 1.1rem; font-size: .85rem; opacity: .8; }
.fuss-unten nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* === 8. Bewegung === */
/* Sanftes Einblenden beim Scrollen (Klasse .einblenden, js/main.js setzt .sichtbar). */
.js .einblenden { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .einblenden.sichtbar { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .einblenden { opacity: 1; transform: none; }
}
