/* ==========================================================================
   Datei: basis.css
   Zweck: Grundlage jeder Seite: Farben, Schrift, Zurücksetzen, Hilfsklassen,
          Knöpfe, Kopfzeile mit Handy-Menü, Seitenfuß, Bewegung.
          Reihenfolge der CSS-Dateien: basis.css → komponenten.css →
          startseite.css bzw. seiten.css (eingebunden in teile/kopf.php).
   Inhalt:
     1. Farben und Schriften
     2. Zurücksetzen und Grundtext
     3. Hilfsklassen (Breite, Vorlesen, Sprunglink, Symbol, Nummer)
     4. Knöpfe, Textlinks, Status- und Google-Zeile
     5. Kopfzeile und Handy-Menü
     6. Seitenfuß
     7. Einblenden und reduzierte Bewegung
   Typische Änderungen: Farben/Schrift -> 1.; Knopfform -> 4.; Menü -> 5.
   ========================================================================== */

/* === 1. Farben und Schriften === */
@font-face {
    font-family: "Albert Sans";
    src: url("/fonts/albert-sans.woff2") format("woff2");
    font-weight: 100 900; font-display: swap;
}
:root {
    --grund: #fcfbf9;          /* Porzellanweiß: Seitenhintergrund */
    --weiss: #ffffff;          /* Karten */
    --flaeche: #eef3f5;        /* Rheinnebel: abgesetzte Abschnitte */
    --tinte: #1d2b36;          /* Text */
    --tinte-leise: #566672;    /* Nebentext */
    --linie: #dfe6ea;          /* Rahmen, Trennlinien */
    --akzent: #1f3a4d;         /* Rheinblau: Hauptfarbe (Links, Aufruf) */
    --signal: #f2a65a;         /* Apricot (aus dem Orange der alten Website): Anruf-Knopf */
    --signal-hell: #f5b673;    /* Apricot beim Darüberfahren */
    --signal-text: #1d2b36;    /* Schrift auf Apricot */
    --signal-dunkel: #b8661a;  /* Apricot als Schriftfarbe (Kontrast auf Weiß) */
    --fuss-grund: #142836;
    --fuss-text: #e9eff2;
    --fehler: #a8322a;
    --erfolg: #2f6b4f;
    --schrift: "Albert Sans", system-ui, sans-serif;
    --rund-knopf: 999px;
    --rund-karte: 22px;
    --schatten: 0 1px 2px rgb(29 43 54 / .06), 0 14px 32px -16px rgb(29 43 54 / .28);
    --breite: 72rem;
    --rand: clamp(1rem, 4vw, 2rem);
    --abstand: clamp(3.5rem, 8vw, 6.5rem);
    --kopf-hoehe: 4.25rem;
}

/* === 2. Zurücksetzen und Grundtext === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgb(242 166 90 / .25); scroll-padding-top: calc(var(--kopf-hoehe) + 1rem); }
body {
    margin: 0; background: var(--grund); color: var(--tinte);
    font-family: var(--schrift); font-size: 1.0625rem; 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 { line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p, li { text-wrap: pretty; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--signal-dunkel); 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.25em; height: 1.25em; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round;
}
/* Was zusammengehört, bricht nie um (Telefonnummer, Bewertung, Adresse) */
.nummer, .google-text, .ohne-umbruch { white-space: nowrap; }
.nummer { font-variant-numeric: tabular-nums; }

/* === 4. Knöpfe, Textlinks, Status- und Google-Zeile === */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 3.1rem; padding: .75rem 1.4rem;
    border: 2px solid transparent; border-radius: var(--rund-knopf);
    font: inherit; font-weight: 600; 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(--signal); color: var(--signal-text); }
.knopf-haupt:hover { background: var(--signal-hell); }
.knopf-rahmen { border-color: currentColor; color: var(--tinte); background: transparent; }
.knopf-rahmen:hover { background: var(--tinte); color: var(--grund); border-color: var(--tinte); }
.knopf-hell { border-color: rgb(255 255 255 / .6); color: #fff; background: transparent; }
.knopf-hell:hover { background: #fff; color: var(--akzent); }
.knopf-breit { width: 100%; }
.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: 600; color: var(--akzent); text-underline-offset: .25em; }
.textlink:hover { color: var(--signal-dunkel); }

.status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.status:hover { text-decoration: underline; }
.status-punkt { width: .6rem; height: .6rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgb(242 166 90 / .25); }

.google-zeile { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-size: .95rem; }
.google-zeile:hover .google-text { text-decoration: underline; }
.sterne { display: inline-flex; gap: 1px; color: #e9a23b; }
.stern { width: 1rem; height: 1rem; }

/* === 5. Kopfzeile und Handy-Menü === */
.kopf { position: sticky; top: 0; z-index: 50; background: rgb(252 251 249 / .94); transition: box-shadow .25s; }
.gescrollt .kopf { box-shadow: 0 1px 0 var(--linie); }
.kopf-innen { display: flex; align-items: center; gap: 1rem; min-height: var(--kopf-hoehe); }
.marke { display: flex; align-items: center; gap: .65rem; text-decoration: none; line-height: 1.15; margin-right: auto; }
.marke-zeichen { flex: none; width: auto; height: 2.75rem; color: var(--akzent); }
.marke-text { display: flex; flex-direction: column; }
.marke-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.marke-unten { font-size: .8rem; color: var(--tinte-leise); white-space: nowrap; }

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

.kopf-aktionen { display: flex; align-items: center; gap: .5rem; }
.knopf-anruf {
    display: inline-flex; align-items: center; gap: .5rem;
    min-height: 2.75rem; padding: .5rem 1rem; border-radius: var(--rund-knopf);
    background: var(--signal); color: var(--signal-text); text-decoration: none; font-weight: 600;
}
.knopf-anruf:hover { background: var(--signal-hell); }
.menue-knopf {
    display: none; width: 2.75rem; height: 2.75rem; padding: 0;
    border: 0; border-radius: var(--rund-knopf); 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: 960px) {
    .menue-knopf { display: inline-flex; align-items: center; justify-content: center; }
    /* Handy: Anruf-Knopf rund, Nummer steht im Menü und in der Bühne */
    .knopf-anruf { width: 2.75rem; padding: 0; justify-content: center; }
    .kopf-nummer { display: none; }
    .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.35rem; }
    .menue-liste a:hover { background: transparent; color: var(--signal-dunkel); }
    .menue-kontakt { display: grid; gap: .75rem; }
    .menue-kontakt .knopf { justify-self: start; }
    body.menue-offen { overflow: hidden; }
}
/* Schmale Handys: Name zweizeilig, Unterzeile entfällt (der Zahn sagt „Zahnarzt“) */
@media (max-width: 430px) {
    .marke { gap: .5rem; }
    .marke-zeichen { height: 2.5rem; }
    .marke-name { white-space: normal; max-width: 8.5em; line-height: 1.12; }
    .marke-unten { display: none; }
}

/* === 6. 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(14rem, 1fr)); }
.fuss h2 { font-size: 1rem; margin-bottom: .6rem; }
.fuss .fuss-name { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.fuss .marke-zeichen { height: 2.4rem; color: var(--fuss-text); }
.fuss-spalte p, .fuss-spalte address { margin-bottom: .6rem; opacity: .85; }
.fuss-liste { list-style: none; padding: 0; display: grid; gap: .35rem; }
.fuss a { color: inherit; text-underline-offset: .2em; }
.fuss a:hover { color: var(--signal); }
.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; gap: 1.25rem; }

/* === 7. Einblenden und reduzierte Bewegung === */
.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-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .einblenden { opacity: 1; transform: none; }
}
