/* ==========================================================================
   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 (startseite.css
          oder seiten.css, 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, Notdienst-Link
     5. Kopfzeile, Marke und Handy-Menü
     6. Aufruf vor dem Fuß
     7. Seitenfuß
     8. Rohr-Zeichen (Logo) und Bewegung
   Typische Änderungen: Farben/Schrift -> 1.; Knopfform -> 4.; Menü -> 5.
   ========================================================================== */

/* === 1. Farben und Schriften === */
/* Logofarben der Klenke Haustechnik: Rot #e30613, Blau #005fac, Schwarz #1d1d1b.
   Schriften: Sora (Überschriften) und Figtree (Text), beide lokal in /fonts/ (SIL OFL). */
@font-face { font-family: "Sora"; src: url("/fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
    --grund: #ffffff;          /* Seitenhintergrund */
    --flaeche: #f2f6fa;        /* abgesetzte Abschnitte (Wasser-Hellblau, kaum sichtbar) */
    --flaeche-tief: #e2ebf3;   /* Rahmen von Fotokarten, Hover */
    --tinte: #14263a;          /* Text */
    --tinte-leise: #52637a;    /* Nebentext */
    --linie: #dbe3ec;          /* Rahmen, Trennlinien */
    --rot: #e30613;            /* Logo-Rot: Anruf-Knopf, Name im Logo */
    --rot-dunkel: #b8050f;     /* Rot beim Darüberfahren und als Schrift */
    --blau: #005fac;           /* Logo-Blau: kalte Leitung, Links */
    --orange: #ee7203;         /* Flamme / warme Leitung */
    --offen: #1f9d55;          /* Punkt „Jetzt erreichbar“ */
    --kopf-grund: rgb(255 255 255 / .95);
    --fuss-grund: #14263a;
    --fuss-text: #e6edf4;
    --fehler: #b3261e;
    --erfolg: #2f6b4f;
    --schrift: "Figtree", system-ui, sans-serif;
    --schrift-titel: "Sora", "Figtree", sans-serif;
    --rund-knopf: 999px;
    --rund-karte: 20px;
    --schatten: 0 1px 2px rgb(20 38 58 / .06), 0 14px 32px -16px rgb(20 38 58 / .3);
    --breite: 76rem;
    --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%; 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 { font-family: var(--schrift-titel); line-height: 1.12; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1, h2 { font-weight: 700; letter-spacing: -.025em; }
p, li { text-wrap: pretty; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--blau); 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, Notdienst-Link === */
.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;
}
.knopf-anruf { background: var(--rot); color: #fff; }
.knopf-anruf: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: 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: #b5c0cb; flex: none; }
.ist-offen .status-punkt { background: var(--offen); box-shadow: 0 0 0 4px rgb(31 157 85 / .18); }

.notdienst-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--rot-dunkel); text-decoration: none; }
.notdienst-link:hover { text-decoration: underline; text-underline-offset: .2em; }

/* === 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); }
.kopf-innen { display: flex; align-items: center; gap: 1rem; min-height: var(--kopf-hoehe); }

/* Marke: Rohr-Zeichen + „KLENKE“ (Logo-Rot) + „Haustechnik“ */
.marke { display: flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1; margin-right: auto; }
.marke-zeichen { flex: none; width: auto; height: 2.3rem; }
.marke-text { display: flex; flex-direction: column; gap: .12rem; }
.marke-name { font-family: var(--schrift-titel); font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; color: var(--rot); white-space: nowrap; }
.marke-zusatz { font-size: .82rem; font-weight: 500; letter-spacing: .02em; color: var(--tinte); white-space: nowrap; }

.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: 500; }
.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: .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(--rot); color: #fff; text-decoration: none; font-weight: 600;
}
.kopf-anruf:hover { background: var(--rot-dunkel); }
.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: 1080px) {
    .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.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); }
.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.1rem; }
.fuss-zeichen { height: 1.9rem; 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: #9fcdf0; }
.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. Rohr-Zeichen (Logo) und Bewegung === */
/* Leitungen zeichnen sich einmal beim Laden (nur an Elementen mit .leitung-zeichnen). */
@keyframes leitung-zeichnen { from { stroke-dashoffset: var(--laenge, 120); } to { stroke-dashoffset: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.js .leitung-zeichnen .leitung { stroke-dasharray: var(--laenge, 120); animation: leitung-zeichnen 1.6s cubic-bezier(.4, .1, .2, 1) .2s both; }
.js .leitung-zeichnen .leitung-warm { animation-delay: .9s; }
.js .leitung-zeichnen .tropfen, .js .leitung-zeichnen .flamme { transform-box: fill-box; transform-origin: 50% 100%; animation: auftauchen .5s ease-out both; }
.js .leitung-zeichnen .tropfen { animation-delay: 1.3s; }
.js .leitung-zeichnen .flamme { animation-delay: 2.1s; }
@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; }
}
