/* ==========================================================================
   Kling Haustechnik – Stylesheet
   Meisterbetrieb für Heizung, Sanitär & Klima · Villingen-Schwenningen
   ========================================================================== */

/* --- Design Tokens ------------------------------------------------------ */
:root {
  /* Markenfarben, abgeleitet aus dem Firmenlogo (Feuer/Wasser/Erde/Luft) */
  --feuer: #d33c14;
  --feuer-dunkel: #a82d0c;
  --wasser: #1a4fa0;
  --wasser-hell: #2f7fc4;
  --erde: #2e9e3e;
  --sonne: #f0a500;

  --anthrazit: #26262a;
  --anthrazit-tief: #17171a;
  --grau-900: #33333a;
  --grau-700: #555560;
  --grau-500: #7a7a86;
  --grau-300: #d4d4dc;
  --grau-100: #f1f1f4;
  --grau-50: #f8f8fa;
  --weiss: #ffffff;

  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --schatten-s: 0 2px 8px rgba(20, 20, 30, .07);
  --schatten-m: 0 8px 26px rgba(20, 20, 30, .10);
  --schatten-l: 0 20px 50px rgba(20, 20, 30, .16);

  --breite: 1180px;
  --kopf-hoehe: 76px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kopf-hoehe) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--grau-900);
  background: var(--weiss);
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--wasser); }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .6em; color: var(--anthrazit); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 700; }
p { margin: 0 0 1.1em; }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--wasser-hell);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Layout-Helfer ------------------------------------------------------ */
.wrap { width: min(100% - 2.5rem, var(--breite)); margin-inline: auto; }
.sektion { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sektion--grau { background: var(--grau-50); }
.sektion--dunkel { background: var(--anthrazit); color: #e6e6ea; }
.sektion--dunkel h2, .sektion--dunkel h3 { color: var(--weiss); }

.kopfzeile { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.kopfzeile--mitte { margin-inline: auto; text-align: center; }

.augbraue {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--feuer);
  margin-bottom: .7rem;
}
.sektion--dunkel .augbraue { color: var(--sonne); }

.lead { font-size: 1.15rem; color: var(--grau-700); }
.sektion--dunkel .lead { color: #b9b9c4; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--feuer); color: #fff; padding: .8rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .92rem 1.6rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  white-space: nowrap;
  max-width: 100%;
}
@media (max-width: 460px) {
  .btn { white-space: normal; text-align: left; }
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--primaer { background: var(--feuer); color: #fff; box-shadow: 0 6px 18px rgba(211, 60, 20, .32); }
.btn--primaer:hover { background: var(--feuer-dunkel); box-shadow: 0 10px 26px rgba(211, 60, 20, .4); }

.btn--sekundaer { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--sekundaer:hover { background: #fff; color: var(--anthrazit); border-color: #fff; }

.btn--rand { background: transparent; color: var(--anthrazit); border-color: var(--grau-300); }
.btn--rand:hover { border-color: var(--anthrazit); background: var(--anthrazit); color: #fff; }

.btn--klein { padding: .6rem 1.1rem; font-size: .92rem; }

/* --- Kopfzeile / Navigation --------------------------------------------- */
.kopf {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grau-300);
  transition: box-shadow .25s ease;
}
.kopf.ist-gescrollt { box-shadow: var(--schatten-m); }

.kopf__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--kopf-hoehe);
}
.marke { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.marke img { height: 46px; width: auto; }
.marke__text { display: flex; flex-direction: column; line-height: 1.12; }
.marke__name { font-weight: 800; font-size: 1.05rem; color: var(--anthrazit); letter-spacing: -.01em; }
.marke__zusatz { font-size: .72rem; color: var(--grau-500); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a {
  text-decoration: none; color: var(--grau-900); font-weight: 600; font-size: .98rem;
  position: relative; padding-block: .3rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--feuer); transition: right .25s ease;
}
.nav a:hover::after { right: 0; }

.kopf__cta { display: flex; align-items: center; gap: .7rem; flex: none; }
.kopf__tel {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 800; color: var(--anthrazit); text-decoration: none; font-size: 1.02rem;
}
.kopf__tel svg { width: 1.15rem; height: 1.15rem; color: var(--feuer); }

.burger {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer;
  color: var(--anthrazit);
}
.burger svg { width: 28px; height: 28px; }

@media (max-width: 960px) {
  .nav {
    position: fixed; inset: var(--kopf-hoehe) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--grau-300);
    padding: .5rem 1.25rem 1.5rem;
    box-shadow: var(--schatten-l);
    transform: translateY(-140%);
    transition: transform .3s ease;
  }
  .nav.ist-offen { transform: translateY(0); }
  .nav a { padding: .95rem .25rem; border-bottom: 1px solid var(--grau-100); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .burger { display: block; order: 3; }
  .kopf__tel span { display: none; }
  .marke__zusatz { display: none; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--anthrazit-tief);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__bild {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 78%;
  opacity: .5;
}
@media (max-width: 760px) { .hero__bild { object-position: 62% 82%; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 18% 20%, rgba(23, 23, 26, .93) 0%, rgba(23, 23, 26, .55) 55%, rgba(23, 23, 26, .35) 100%),
    linear-gradient(180deg, rgba(23,23,26,.7) 0%, rgba(23,23,26,.25) 45%, rgba(23,23,26,.9) 100%);
}
.hero__inner { padding-block: clamp(4rem, 11vw, 8.5rem); max-width: 43rem; }
.hero h1 { color: #fff; margin-bottom: .55em; text-wrap: balance; }
.hero h1 .akzent { color: var(--sonne); }
.hero__text { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: #d7d7df; margin-bottom: 2rem; }
.hero__aktionen { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.6rem; }

.hero__badges { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-size: .93rem; color: #cfcfd8; }
.hero__badge { display: inline-flex; align-items: center; gap: .45rem; }
.hero__badge svg { width: 1.1rem; height: 1.1rem; color: var(--erde); flex: none; }

/* --- Vertrauensleiste --------------------------------------------------- */
.vertrauen {
  background: var(--weiss);
  border-bottom: 1px solid var(--grau-100);
  padding-block: 1.4rem;
}
.vertrauen__liste {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1.6rem;
}
.vertrauen__liste li {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: .96rem; color: var(--grau-900);
}
.vertrauen__liste svg { width: 1.35rem; height: 1.35rem; color: var(--erde); flex: none; }

/* --- Leistungskarten ---------------------------------------------------- */
.karten { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.karte {
  background: var(--weiss);
  border: 1px solid var(--grau-300);
  border-radius: var(--radius-lg);
  padding: 2rem 1.7rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.karte::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--farbe, var(--feuer)); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.karte:hover { transform: translateY(-6px); box-shadow: var(--schatten-m); border-color: transparent; }
.karte:hover::before { transform: scaleX(1); }

.karte__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 1.2rem;
  background: color-mix(in srgb, var(--farbe) 12%, transparent);
  color: var(--farbe);
}
.karte__icon svg { width: 28px; height: 28px; }
.karte h3 { margin-bottom: .5rem; }
.karte p { color: var(--grau-700); font-size: .99rem; margin-bottom: .8rem; }
.karte ul { margin: 0; padding-left: 1.1rem; color: var(--grau-700); font-size: .95rem; }
.karte li { margin-bottom: .25rem; }

/* --- Zweispalter -------------------------------------------------------- */
.split {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}
.split__bild img { border-radius: var(--radius-lg); box-shadow: var(--schatten-m); width: 100%; }
.bildnachweis { font-size: .78rem; color: var(--grau-500); margin: .6rem 0 0; text-align: right; }
.konfig__vorschau {
  width: 100%; max-width: 560px; margin: 0 auto 1.8rem;
  border-radius: var(--radius); box-shadow: var(--schatten-s);
}
.split--umgekehrt .split__bild { order: -1; }
@media (max-width: 720px) { .split--umgekehrt .split__bild { order: 0; } }

.haken { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.haken li {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-bottom: .75rem; font-size: 1.02rem;
}
.haken svg { width: 1.3rem; height: 1.3rem; color: var(--erde); flex: none; margin-top: .2rem; }

.foerder-box {
  background: linear-gradient(135deg, rgba(46, 158, 62, .1), rgba(240, 165, 0, .1));
  border-left: 4px solid var(--erde);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.6rem;
}
.foerder-box strong { color: var(--anthrazit); }
.foerder-box p { margin: 0; font-size: .98rem; color: var(--grau-700); }

/* --- Service-Versprechen ------------------------------------------------ */
.versprechen { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: v; }
.versprechen__item {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  counter-increment: v;
}
.versprechen__item::before {
  content: "0" counter(v);
  display: block; font-size: 2rem; font-weight: 800; line-height: 1;
  color: var(--sonne); margin-bottom: .8rem;
}
.versprechen__item h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.versprechen__item p { color: #b9b9c4; font-size: .97rem; margin: 0; }

/* --- Bewertungen -------------------------------------------------------- */
.bewertung {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  background: var(--weiss);
  border: 1px solid var(--grau-300);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--schatten-s);
}
.sterne { display: flex; gap: .2rem; margin-bottom: .6rem; }
.sterne svg { width: 1.7rem; height: 1.7rem; color: var(--sonne); }
.bewertung__zahl { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--anthrazit); }
.bewertung__zahl span { font-size: 1.2rem; color: var(--grau-500); font-weight: 600; }

/* --- Konfigurator (2-Klick-Lösung) -------------------------------------- */
.konfig {
  background: var(--weiss);
  border: 1px solid var(--grau-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--schatten-s);
}
.konfig__platzhalter { padding: clamp(2rem, 5vw, 3.4rem); text-align: center; }
.konfig__platzhalter h3 { margin-bottom: .6rem; }
.konfig__hinweis { font-size: .87rem; color: var(--grau-500); max-width: 40rem; margin: 1.2rem auto 0; }
.konfig__rahmen { width: 100%; height: 820px; border: 0; display: block; }
@media (max-width: 700px) { .konfig__rahmen { height: 1000px; } }

.konfig__schritte {
  list-style: none; padding: 0; margin: 1.8rem auto 1.6rem; max-width: 46rem;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  text-align: left;
}
.konfig__schritte li {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .95rem; color: var(--grau-700);
}
.konfig__schritte svg { width: 1.4rem; height: 1.4rem; color: var(--wasser); flex: none; margin-top: .15rem; }

/* --- Partner ------------------------------------------------------------ */
.partner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}
.partner img {
  max-height: 46px; width: auto;
  filter: grayscale(1); opacity: .62;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.partner img:hover { filter: none; opacity: 1; transform: scale(1.04); }
.partner img[src$=".svg"] { max-height: 34px; }

/* --- Kontakt ------------------------------------------------------------ */
.kontakt-gitter { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.kontakt-karte {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--weiss);
  border: 1px solid var(--grau-300);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.kontakt-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-m); border-color: transparent; }
.kontakt-karte__icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--farbe, var(--wasser)) 12%, transparent);
  color: var(--farbe, var(--wasser));
}
.kontakt-karte__icon svg { width: 22px; height: 22px; }
.kontakt-karte__titel { font-weight: 700; display: block; margin-bottom: .1rem; color: var(--anthrazit); }
.kontakt-karte__wert { font-size: .97rem; color: var(--grau-700); word-break: break-word; }

.oeffnung {
  background: var(--grau-50);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-top: 1.2rem;
}
.oeffnung dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.4rem; margin: 0; font-size: .98rem; }
.oeffnung dt { font-weight: 600; color: var(--grau-900); }
.oeffnung dd { margin: 0; color: var(--grau-700); }

/* --- Fußzeile ----------------------------------------------------------- */
.fuss { background: var(--anthrazit-tief); color: #9d9daa; padding-block: 3.5rem 2rem; font-size: .95rem; }
.fuss__gitter {
  display: grid; gap: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 2.6rem;
}
.fuss h4 { color: #fff; font-size: 1rem; margin-bottom: .9rem; letter-spacing: 0; }
.fuss a { color: #c4c4cf; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss ul { list-style: none; padding: 0; margin: 0; }
.fuss li { margin-bottom: .5rem; }
.fuss__marke img { height: 58px; margin-bottom: 1rem; }
.fuss__unten {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 1.6rem;
  display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; justify-content: space-between;
  font-size: .88rem;
}

/* --- Rechtsseiten ------------------------------------------------------- */
.rechtstext { max-width: 48rem; }
.rechtstext h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.rechtstext h3 { font-size: 1.15rem; margin-top: 1.8rem; }
.rechtstext p, .rechtstext li { color: var(--grau-700); font-size: 1rem; }
.rechtstext address { font-style: normal; }
.seitenkopf { background: var(--grau-50); border-bottom: 1px solid var(--grau-300); padding-block: clamp(2.5rem, 6vw, 4rem); }
.seitenkopf h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }

/* --- Scroll-Animation --------------------------------------------------- */
.anim { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.anim.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .anim { opacity: 1; transform: none; }
}

/* --- Druck -------------------------------------------------------------- */
@media print {
  .kopf, .fuss, .hero__aktionen, .burger { display: none; }
  body { font-size: 11pt; }
}
