/* ==========================================================================
   Datei: basis.css
   Zweck: Grundlage jeder Seite: Farben, Schriften, Zurücksetzen, Hilfsklassen,
          Knöpfe, Kopfzeile mit Handy-Menü, Aufruf, Seitenfuß, Bewegung.
          Danach folgt das CSS der Seite (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, Öffnungsstatus
     5. Kopfzeile und Handy-Menü
     6. Aufruf vor dem Fuß
     7. Seitenfuß
     8. Farbfächer (Logo) und Bewegung
   Typische Änderungen: Farben/Schrift -> 1.; Knopfform -> 4.; Menü -> 5.
   ========================================================================== */

/* === 1. Farben und Schriften === */
@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;
}
:root {
    --grund: #ffffff;          /* Kalkweiß: Seitenhintergrund */
    --flaeche: #f1f4f5;        /* Schaufenster-Hellblau, stark aufgehellt: abgesetzte Abschnitte */
    --flaeche-tief: #e2e9ec;   /* Rahmen von Fotokarten, Hover */
    --tinte: #1e2a31;          /* Schiefer: Text, WhatsApp-Knopf */
    --tinte-leise: #56646c;    /* Nebentext */
    --linie: #dde4e7;          /* Rahmen, Trennlinien */
    --signal: #f6d930;         /* Fächer-Gelb aus dem Logo: Anruf-Knopf */
    --signal-hell: #fae35e;    /* Gelb beim Darüberfahren */
    --signal-text: #1e2a31;    /* Schrift auf Gelb */
    --signal-dunkel: #8a6d00;  /* Gelb als Schrift-/Rahmenfarbe (Kontrast auf Weiß) */
    --whatsapp: #25d366;       /* nur das WhatsApp-Zeichen */
    --offen: #1f9d55;          /* Punkt „Jetzt geöffnet“ */
    --kopf-grund: rgb(255 255 255 / .94);
    --fuss-grund: #1e2a31;
    --fuss-text: #e8eef0;
    --fehler: #a8322a;
    --erfolg: #2f6b4f;
    --schrift: "Instrument Sans", system-ui, sans-serif;
    --breit: 112%;             /* Laufweite der Überschriften (breiter Schnitt der Instrument Sans) */
    --rund-knopf: 999px;
    --rund-karte: 20px;
    --schatten: 0 1px 2px rgb(30 42 49 / .06), 0 14px 32px -16px rgb(30 42 49 / .3);
    --breite: 74rem;
    --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(246 217 48 / .3); 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.12; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1, h2 { font-stretch: var(--breit); font-weight: 700; letter-spacing: -.02em; }
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.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 === */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 3.2rem; padding: .75rem 1.45rem;
    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;
}
/* Die beiden Hauptknöpfe sind gleich groß und gleich kräftig (Wunsch: WhatsApp so präsent wie Anrufen) */
.knopf-anruf { background: var(--signal); color: var(--signal-text); }
.knopf-anruf:hover { background: var(--signal-hell); }
.knopf-whatsapp { background: var(--tinte); color: #fff; }
.knopf-whatsapp .symbol { color: var(--whatsapp); }
.knopf-whatsapp:hover { background: #33444e; }
.knopf-rahmen { border-color: currentColor; color: var(--tinte); background: transparent; }
.knopf-rahmen:hover { background: var(--tinte); color: var(--grund); border-color: var(--tinte); }
.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(--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: #b9c2c6; flex: none; }
.ist-offen .status-punkt { background: var(--offen); box-shadow: 0 0 0 4px rgb(31 157 85 / .18); }

/* === 5. Kopfzeile 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); }
.kopf-innen { display: flex; align-items: center; gap: 1rem; min-height: var(--kopf-hoehe); }
.marke { display: flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1.05; margin-right: auto; }
.marke-zeichen { flex: none; width: auto; height: 2.4rem; }
.marke-text { display: flex; flex-direction: column; }
.marke-oben { font-size: .78rem; font-weight: 500; color: var(--tinte-leise); white-space: nowrap; }
.marke-name { font-size: 1.3rem; font-weight: 700; font-stretch: var(--breit); letter-spacing: -.02em; white-space: nowrap; }

.menue-liste { list-style: none; padding: 0; display: flex; gap: .25rem; }
.menue-liste a { display: block; padding: .5rem .85rem; 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: 3px; text-underline-offset: .4em; }
.menue-kontakt { display: none; }

.kopf-aktionen { display: flex; align-items: center; gap: .5rem; }
.kopf-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;
}
.kopf-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 quadratisch neben dem Menü, Nummer steht groß in der Bühne */
    .kopf-anruf { width: 2.75rem; padding: 0; justify-content: center; border-radius: 12px; }
    .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; }
    .menue-kontakt { display: grid; gap: .75rem; }
    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); }
.aufruf-aktionen { display: grid; gap: 1rem; justify-items: start; }
@media (min-width: 860px) { .aufruf-innen { grid-template-columns: 1.2fr 1fr; } .aufruf-aktionen { justify-items: 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(14rem, 1fr)); }
.fuss h2 { font-size: 1rem; margin-bottom: .6rem; }
.fuss .fuss-name { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.fuss-zeichen { height: 2rem; width: auto; flex: none; }
.fuss-spalte p, .fuss-spalte address { margin-bottom: .6rem; opacity: .85; }
.fuss-liste { list-style: none; padding: 0; display: grid; gap: .4rem; }
.fuss-liste li { display: flex; align-items: center; gap: .5rem; }
.fuss-liste a { display: inline-flex; align-items: center; gap: .5rem; }
.fuss-zeiten li { justify-content: space-between; max-width: 17rem; white-space: nowrap; }
.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; }

/* === 8. Farbfächer (Logo) und Bewegung === */
/* Der Fächer klappt einmal beim Laden auf (nur am Element mit .faecher-aufklappen):
   eine kreisförmige Maske um den Drehpunkt der Karten (62/62 von 120×72) öffnet sich im Uhrzeigersinn. */
@property --faecher-winkel { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
@keyframes faecher-auf { from { --faecher-winkel: 0deg; } to { --faecher-winkel: 360deg; } }
.js .faecher-aufklappen {
    -webkit-mask-image: conic-gradient(from 245deg at 51.7% 86%, #000 var(--faecher-winkel), transparent 0);
    mask-image: conic-gradient(from 245deg at 51.7% 86%, #000 var(--faecher-winkel), transparent 0);
    animation: faecher-auf 1.4s cubic-bezier(.3, .6, .2, 1) .2s both;
}
.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; }
}
