/* ==========================================================================
   Vorlage 01 Handwerk · Haustechnik Ebenhofer (Demo)
   --------------------------------------------------------------------------
   Umfärben: nur die Werte unter „Farben" ändern.
   Abstände und Breiten: unter „Maße".
   Bewegung: im <html>-Tag data-bewegung="starr | mittel | dynamisch".
   ========================================================================== */

/* ---------- Schriften (lokal, SIL Open Font License, Lizenz in fonts/) ---------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* ---------- Farben ---------- */
  --anthrazit: #1f2225;        /* Text, dunkle Flächen */
  --anthrazit-hell: #2e3237;   /* Linien auf dunklen Flächen */
  --beton: #e3e4e1;            /* Seitenhintergrund, Betongrau hell */
  --beton-hell: #efefec;       /* abgesetzte Abschnitte */
  --beton-tief: #cfd0cc;       /* Bildrahmen */
  --linie: #a7a9a5;            /* dünne Linien auf hell */
  --feld-rand: #6d7176;        /* Rahmen der Eingabefelder (3,8:1 auf Beton) */
  --text: #1f2225;
  --text-leise: #4d5257;       /* Nebentext, 6:1 auf Beton */
  --text-hell: #d2d4d1;        /* Text auf Anthrazit */
  --text-hell-leise: #9fa3a0;  /* Nebentext auf Anthrazit, 5,9:1 */
  --signal: #f26a21;           /* Signalorange: Knöpfe, Zahlen auf dunkel. Nie als Text auf hell. */
  --signal-hell: #ff8a4c;      /* Knopf beim Überfahren */
  --fokus: var(--anthrazit);

  /* ---------- Schrift ---------- */
  --schrift-titel: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --schrift-text: "Public Sans", "Segoe UI", system-ui, sans-serif;

  /* ---------- Maße ---------- */
  --breite: 77.5rem;                       /* 1240 px Inhaltsbreite */
  --rand: clamp(1rem, 4vw, 2.5rem);        /* seitlicher Abstand */
  --abschnitt: clamp(4rem, 9vw, 7.5rem);   /* Luft zwischen Abschnitten */
  --ecke: 0;                               /* überall rechtwinklig */
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--beton);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, blockquote, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }

.behaelter { width: min(100% - 2 * var(--rand), var(--breite)); margin-inline: auto; }
/* Was beim Hereinschieben kurz über den Rand ragt, wird hier abgeschnitten,
   sonst lässt sich die Seite auf dem Handy seitlich verschieben. */
main { overflow-x: clip; }

.sprunglink {
  position: absolute; left: var(--rand); top: -4rem; z-index: 20;
  background: var(--anthrazit); color: #fff8f2; padding: .75rem 1rem; font-weight: 600;
}
.sprunglink:focus { top: .75rem; }

.abschnitt-titel {
  font-family: var(--schrift-titel);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);
  line-height: .92;
  letter-spacing: .005em;
}

/* ---------- Knopf ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .85rem 1.5rem;
  background: var(--signal); color: var(--anthrazit);
  border: 0; border-radius: var(--ecke);
  font: 700 1.0625rem/1.1 var(--schrift-text);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.knopf:hover { background: var(--signal-hell); }
.knopf-klein { min-height: 2.75rem; padding: .6rem 1.1rem; font-size: 1rem; }

/* ---------- Bildrahmen (Platzhalter für Fotos) ----------
   Gleiche Klasse in allen Vorlagen. Tausch: <figure> durch <img> ersetzen. */
.bild-platzhalter {
  position: relative;
  display: flex; align-items: flex-end;
  aspect-ratio: var(--format, 3 / 2);
  background:
    repeating-linear-gradient(135deg, transparent 0 13px, rgb(31 34 37 / .08) 13px 14px),
    var(--beton-tief);
  border: 1px solid var(--linie);
  overflow: hidden;
}
.bild-platzhalter figcaption {
  margin: .75rem; padding: .45rem .65rem;
  max-width: calc(100% - 1.5rem);
  background: var(--beton-hell); color: var(--text);
  font-size: .75rem; line-height: 1.35; font-weight: 600; letter-spacing: .02em;
}

/* ---------- 1 · Leiste oben ---------- */
.leiste { background: var(--anthrazit); color: var(--text-hell); font-size: .875rem; --fokus: var(--signal); }
.leiste-innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; padding-block: .55rem; }
.leiste-marke { color: var(--text-hell-leise); margin-right: .35rem; }
.leiste a { color: var(--signal); font-weight: 700; text-decoration: none; letter-spacing: .02em; }
.leiste a:hover { text-decoration: underline; }
@media (max-width: 47.99rem) { .leiste-zeiten { display: none; } }

/* ---------- Kopf ---------- */
.kopf { border-bottom: 1px solid var(--linie); }
.kopf-innen { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.marke { display: flex; flex-direction: column; text-decoration: none; line-height: 1; margin-right: auto; }
.marke-name { font-family: var(--schrift-titel); font-weight: 900; font-size: 2rem; text-transform: uppercase; letter-spacing: .01em; }
.marke-zusatz { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-leise); margin-top: .2rem; }
.kopf-nav ul { display: flex; gap: 1.75rem; }
.kopf-nav a { text-decoration: none; font-weight: 600; font-size: .9875rem; }
.kopf-nav a:hover { text-decoration: underline; }

.menue { position: relative; }
.menue summary {
  list-style: none; cursor: pointer;
  min-height: 2.75rem; padding: .55rem .9rem;
  border: 1.5px solid var(--anthrazit); font-weight: 700;
}
.menue summary::-webkit-details-marker { display: none; }
.menue[open] summary { background: var(--anthrazit); color: var(--beton-hell); }
.menue nav {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 10;
  min-width: 14rem; background: var(--anthrazit); color: var(--beton-hell); --fokus: var(--signal);
}
.menue nav a { display: block; padding: .9rem 1.25rem; text-decoration: none; font-weight: 600; }
.menue nav li + li { border-top: 1px solid var(--anthrazit-hell); }

@media (max-width: 59.99rem) {
  .kopf-nav, .kopf-knopf { display: none; }
}
@media (min-width: 60rem) {
  .menue { display: none; }
}

/* ---------- 2 · Erster Bildschirm ---------- */
.held { padding-top: clamp(2rem, 5vw, 4rem); }
.held-raster { display: grid; gap: 2rem; }
.held-titel {
  font-family: var(--schrift-titel);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(3rem, 1.2rem + 7vw, 7.25rem);
  line-height: .88;
  letter-spacing: .003em;
}
.held-titel .zeile { display: block; }
.held-satz { margin-top: 1.25rem; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); color: var(--text-leise); max-width: 30ch; }
.held-aktion { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.held-telefon { font-weight: 600; }
.held-bild { --format: 4 / 5; align-items: flex-start; }

@media (min-width: 60rem) {
  .held-raster { grid-template-columns: 7fr 5fr; gap: 3rem; align-items: start; }
  .held-text { padding-top: clamp(1rem, 4vw, 3.5rem); }
}

/* ---------- 3 · Fakten ----------
   Der eine Regelbruch dieser Seite: die dunkle Leiste schiebt sich auf dem
   großen Bildschirm über die Unterkante des Bildes. */
.fakten { position: relative; z-index: 1; margin-top: 2.5rem; --fokus: var(--signal); }
.fakten-liste {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--anthrazit); color: var(--text-hell);
}
.fakt { padding: 1.5rem 1.25rem; border-top: 1px solid var(--anthrazit-hell); }
.fakt:nth-child(odd) { border-right: 1px solid var(--anthrazit-hell); }
.fakt:nth-child(-n + 2) { border-top: 0; }
.fakt-zahl {
  display: inline-block;
  font-family: var(--schrift-titel); font-weight: 800;
  font-size: clamp(2.75rem, 2rem + 2.6vw, 4.5rem); line-height: 1;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.fakt dd { margin-top: .5rem; font-size: .9375rem; line-height: 1.4; color: var(--text-hell); }

@media (min-width: 60rem) {
  .fakten { margin-top: -4.5rem; }
  .fakten-liste { grid-template-columns: repeat(4, 1fr); width: calc(100% - 8rem); }
  .fakt { padding: 1.75rem 1.75rem 2rem; border-top: 0; border-right: 1px solid var(--anthrazit-hell); }
  .fakt:last-child { border-right: 0; }
}

/* ---------- 4 · Leistungen ---------- */
.leistungen { padding-block: var(--abschnitt); }
.leistungen-raster { display: grid; gap: 2.5rem; }
.leistungen-liste { display: grid; gap: 2.25rem; }
.leistung { border-top: 3px solid var(--anthrazit); padding-top: 1.1rem; }
.leistung h3 {
  font-family: var(--schrift-titel); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1;
}
.leistung p { margin-top: .75rem; max-width: 38ch; }
.leistung .leistung-fakt { margin-top: .9rem; font-weight: 700; font-size: .9375rem; }

.notdienst {
  background: var(--anthrazit); color: var(--text-hell);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: .75rem 2rem; --fokus: var(--signal);
}
.notdienst h3 { font-family: var(--schrift-titel); font-weight: 800; text-transform: uppercase; font-size: 2.25rem; line-height: 1; color: var(--beton-hell); }
.notdienst p { max-width: 40ch; }
.notdienst-nummer {
  font-family: var(--schrift-titel); font-weight: 800;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem); line-height: 1;
  color: var(--signal); text-decoration: none; letter-spacing: .01em;
}
.notdienst-nummer:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.notdienst-fakt { font-size: .875rem; color: var(--text-hell-leise); }

@media (min-width: 48rem) {
  .leistungen-liste { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; row-gap: 3rem; }
  .notdienst { grid-template-columns: 1fr auto; align-items: end; }
  .notdienst h3, .notdienst > p:first-of-type { grid-column: 1; }
  .notdienst-nummer { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .notdienst-fakt { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .leistungen-raster { grid-template-columns: 4fr 8fr; column-gap: 4rem; }
  .leistungen-titel { grid-row: 1 / 3; position: sticky; top: 2rem; align-self: start; }
  .leistungen-liste, .notdienst { grid-column: 2; }
}

/* ---------- 5 · Meister ---------- */
.meister { background: var(--beton-hell); padding-block: var(--abschnitt); }
.meister-raster { display: grid; gap: 2rem; }
.meister-rolle { margin-top: .75rem; font-weight: 600; color: var(--text-leise); }
.meister-zitat { margin-top: 2rem; }
.meister-zitat p { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.625rem); line-height: 1.45; font-weight: 500; max-width: 34ch; }
.meister-zitat p::before { content: "„"; }
.meister-zitat p::after { content: "\201C"; }
.team-liste { margin-top: 2.5rem; display: grid; gap: 1rem; max-width: 34rem; }
.team-liste li { border-top: 1px solid var(--linie); padding-top: .9rem; display: grid; gap: .1rem; }
.team-liste strong { font-weight: 700; }

@media (min-width: 48rem) {
  .meister-raster { grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
}

/* ---------- 6 · Referenz ---------- */
.referenz { padding-block: var(--abschnitt); }
.referenz-ort { margin-top: 1rem; color: var(--text-leise); font-weight: 600; }
.vergleich { margin-top: 2.5rem; display: grid; gap: 1rem; }
.vergleich-marke {
  position: absolute; top: 0; left: 0;
  background: var(--anthrazit); color: var(--beton-hell);
  font-family: var(--schrift-titel); font-weight: 800; text-transform: uppercase;
  font-size: 1.375rem; line-height: 1; padding: .6rem .9rem;
}
.vergleich-marke-nachher { background: var(--signal); color: var(--anthrazit); }
.referenz-daten { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
.referenz-daten dt { font-size: .875rem; color: var(--text-leise); }
.referenz-daten dd { font-family: var(--schrift-titel); font-weight: 800; font-size: clamp(1.625rem, 1.3rem + 1vw, 2.25rem); line-height: 1.05; margin-top: .2rem; }
@media (min-width: 48rem) {
  .vergleich { grid-template-columns: 1fr 1fr; }
  .referenz-daten { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 7 · Kundenstimme ---------- */
.stimme { padding-block: 0 var(--abschnitt); }
.stimme-figur { border-top: 3px solid var(--anthrazit); padding-top: clamp(2rem, 5vw, 3.5rem); }
.stimme blockquote p {
  font-family: var(--schrift-titel); font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem); line-height: 1.02;
  max-width: 24ch;
}
.stimme blockquote p::before { content: "„"; }
.stimme blockquote p::after { content: "\201C"; }
.stimme figcaption { margin-top: 1.5rem; font-weight: 700; display: grid; gap: .15rem; }
.stimme-zusatz { font-weight: 400; color: var(--text-leise); }

/* ---------- 8 · Kontakt ---------- */
.kontakt { background: var(--beton-hell); padding-block: var(--abschnitt); }
.kontakt-raster { display: grid; gap: 3rem; }
.kontakt-satz { margin-top: 1rem; max-width: 42ch; }
.formular { margin-top: 2rem; display: grid; gap: 1.25rem; }
.feld { display: grid; gap: .4rem; }
.feld label { font-weight: 600; font-size: .9375rem; }
.feld-hinweis { font-weight: 400; color: var(--text-leise); }
.feld input, .feld select, .feld textarea {
  width: 100%; min-height: 3rem; padding: .7rem .8rem;
  font: inherit; color: var(--text);
  background: #fbfbf9; border: 1.5px solid var(--feld-rand); border-radius: var(--ecke);
}
.feld textarea { resize: vertical; min-height: 7rem; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible { outline-offset: 0; }
.formular-datenschutz { font-size: .875rem; color: var(--text-leise); }
.formular-meldung:empty { display: none; }
.formular-meldung { font-weight: 600; padding: .9rem 1rem; background: var(--anthrazit); color: var(--beton-hell); }

.kontakt-seite { display: grid; gap: 2rem; align-content: start; }
.kontakt-notfall { background: var(--signal); color: var(--anthrazit); padding: clamp(1.5rem, 4vw, 2rem); }
.kontakt-notfall h3, .kontakt-gebiet h3 { font-family: var(--schrift-titel); font-weight: 800; text-transform: uppercase; font-size: 1.875rem; line-height: 1; }
.kontakt-notfall p { margin-top: .6rem; }
.kontakt-nummer { display: inline-block; margin-top: .6rem; font-family: var(--schrift-titel); font-weight: 800; font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem); line-height: 1; text-decoration: none; }
.kontakt-nummer:hover { text-decoration: underline; }
.kontakt-gebiet p { margin-top: .6rem; }
.orte { margin-top: .75rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .35rem 1.5rem; font-weight: 600; }
.kontakt-raster > * { min-width: 0; }

@media (min-width: 48rem) {
  .formular { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .feld-breit { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .kontakt-raster { grid-template-columns: 7fr 4fr; gap: 5rem; }
  .kontakt-seite { padding-top: .5rem; }
}

/* ---------- Anruf-Knopf fürs Handy ---------- */
.anruf-leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: center;
  min-height: 3.5rem; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--signal); color: var(--anthrazit);
  font-family: var(--schrift-titel); font-weight: 800; text-transform: uppercase;
  font-size: 1.375rem; letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 -1px 0 var(--anthrazit);
}
@media (max-width: 47.99rem) { body { padding-bottom: 3.5rem; } }
@media (min-width: 48rem) { .anruf-leiste { display: none; } }

/* ---------- 9 · Fuß ---------- */
.fuss { background: var(--anthrazit); color: var(--text-hell); padding-top: clamp(3rem, 7vw, 5rem); font-size: .9375rem; --fokus: var(--signal); }
.fuss-raster { display: grid; gap: 2rem; }
.fuss-marke { font-family: var(--schrift-titel); font-weight: 900; font-size: 2.5rem; line-height: 1; text-transform: uppercase; color: var(--beton-hell); margin-bottom: 1rem; }
.fuss address { font-style: normal; line-height: 1.7; }
.fuss-titel { font-size: .875rem; font-weight: 700; color: var(--text-hell-leise); margin-bottom: .6rem; }
.fuss-links { margin-top: .75rem; display: flex; gap: 1.25rem; }
.fuss-demo { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--anthrazit-hell); font-size: .875rem; color: var(--text-hell-leise); }
/* D29: letzte Zeile, ganz unten mittig. width/max-width, damit sie wirklich mittig steht. */
.fuss-zeile {
  width: 100%; max-width: none; text-align: center;
  padding: 1.5rem 1rem 1.25rem; font-size: .8125rem; color: var(--text-hell-leise);
}
.fuss-zeile a { color: inherit; }
@media (min-width: 48rem) { .fuss-raster { grid-template-columns: 5fr 3fr 4fr; } }

/* ==========================================================================
   Bewegung
   starr      – nichts bewegt sich (nur Farbwechsel bei Knöpfen und Links)
   mittel     – Einblenden beim Scrollen, Zahlen zählen hoch, Knöpfe mit Druck
   dynamisch  – dazu: Bild und Leistungen an das Scrollen gekoppelt
   Alles nur, wenn am Gerät keine reduzierte Bewegung eingestellt ist.
   Animiert werden ausschließlich transform und opacity.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* Auftritt beim Scrollen: versteckt wird nur, wenn JavaScript läuft (.js) */
  :root.js:not([data-bewegung="starr"]) [data-auftritt] {
    transition: opacity .8s var(--ease), transform .8s var(--ease);
  }
  :root.js:not([data-bewegung="starr"]) [data-auftritt]:not(.ist-sichtbar) {
    opacity: 0;
    transform: translateY(1.75rem);
  }

  /* Erster Bildschirm baut sich Zeile für Zeile auf */
  :root:not([data-bewegung="starr"]) .held-titel .zeile,
  :root:not([data-bewegung="starr"]) .held-satz,
  :root:not([data-bewegung="starr"]) .held-aktion {
    animation: rein-von-unten .9s var(--ease) both;
  }
  :root:not([data-bewegung="starr"]) .held-titel .zeile:nth-child(2) { animation-delay: .08s; }
  :root:not([data-bewegung="starr"]) .held-satz { animation-delay: .2s; }
  :root:not([data-bewegung="starr"]) .held-aktion { animation-delay: .3s; }
  :root:not([data-bewegung="starr"]) .held-bild { animation: rein-blende 1.1s var(--ease) .1s both; }

  /* Knopf mit spürbarem Druck */
  :root:not([data-bewegung="starr"]) .knopf {
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s;
  }
  :root:not([data-bewegung="starr"]) .knopf:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--anthrazit); }
  :root:not([data-bewegung="starr"]) .knopf:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--anthrazit); }
}

@keyframes rein-von-unten {
  from { opacity: 0; transform: translateY(2.5rem); }
  to   { opacity: 1; transform: none; }
}
@keyframes rein-blende {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: none; }
}

/* Stufe „dynamisch": Bewegung, die direkt am Scrollen hängt.
   Nur in Browsern, die scroll-gekoppelte Animationen können; sonst gilt „mittel". */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :root[data-bewegung="dynamisch"] .held-bild {
      animation: bild-weiter linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
    :root[data-bewegung="dynamisch"] .leistung,
    :root[data-bewegung="dynamisch"] .notdienst {
      animation: von-rechts linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    :root[data-bewegung="dynamisch"] .vergleich .bild-platzhalter:first-child { animation: von-links linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    :root[data-bewegung="dynamisch"] .vergleich .bild-platzhalter:last-child  { animation: von-rechts linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }
}
@keyframes bild-weiter { to { transform: translateY(12%) scale(.96); opacity: .6; } }
@keyframes von-rechts { from { opacity: 0; transform: translateX(3rem); } to { opacity: 1; transform: none; } }
@keyframes von-links  { from { opacity: 0; transform: translateX(-3rem); } to { opacity: 1; transform: none; } }

/* Drucken: keine Bewegung, alles sichtbar */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-auftritt] { opacity: 1 !important; transform: none !important; }
}
