/* Demoseite Handwerk - Layout & Design.
   Farben kommen aus config.js und werden von app.js als CSS-Variablen gesetzt. */

:root {
  --primaer: #0f172a;
  --akzent: #2563eb;
  --akzent-dark: #1d4ed8;
  --akzent-hell: #eaf0fe;
  --akzent-licht: #93b4fd;   /* fuer blaue Akzente auf dunklem Grund */
  --akzent-text: #fff;
  --hell: #f6f8fb;
  --text: #16202e;
  --text-leise: #5a6675;
  --linie: #e4e8ee;
  --weiss: #fff;
  --radius: 8px;
  --schatten: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .07);
  --breite: 1140px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--weiss); line-height: 1.65; font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 24px; }
.abschnitt { padding: 88px 0; }
.abschnitt--hell { background: var(--hell); }
.abschnitt--dunkel { background: var(--primaer); color: #eef1f4; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1em; }

.kicker {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--akzent-dark); margin-bottom: 12px;
}
.abschnitt--dunkel .kicker { color: var(--akzent-licht); }
.lead { font-size: 1.08rem; color: var(--text-leise); max-width: 62ch; }
.abschnitt--dunkel .lead { color: #b9c3ce; }
.kopfzeile-block { max-width: 62ch; margin-bottom: 44px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 13px 24px; border-radius: var(--radius); border: 1.5px solid transparent;
  font: inherit; font-weight: 650; font-size: .97rem; text-decoration: none;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primaer { background: var(--akzent); color: var(--akzent-text); }
.btn--primaer:hover { background: var(--akzent-dark); }
.btn--dunkel { background: var(--primaer); color: #fff; }
.btn--dunkel:hover { background: #1e293b; }
.btn--geist { background: transparent; border-color: rgba(255, 255, 255, .34); color: #fff; }
.btn--geist:hover { background: rgba(255, 255, 255, .1); }
.btn--linie { background: var(--weiss); border-color: var(--linie); color: var(--text); }
.btn--linie:hover { border-color: var(--primaer); }

/* --- Kopfzeile --- */
.kopf {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--linie);
}
.kopf__inhalt { display: flex; align-items: center; gap: 28px; height: 74px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.1rem; text-decoration: none; letter-spacing: -.02em; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--primaer); color: #fff;
  display: grid; place-items: center; font-size: .95rem; font-weight: 800;
}
.logo img { max-height: 40px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 550; font-size: .95rem; color: var(--text-leise); }
.nav a:hover { color: var(--primaer); }
.kopf__tel { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kopf__burger { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; margin-left: auto; }

/* --- Hero: Text links, Bild rechts --- */
.hero { padding: 72px 0 64px; background: var(--weiss); }
.hero__raster { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-bottom: 18px; }
.hero__lead { font-size: 1.12rem; color: var(--text-leise); max-width: 52ch; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px; background: var(--hell);
  border: 1px solid var(--linie); padding: 7px 14px; border-radius: 999px;
  font-size: .83rem; font-weight: 600; margin-bottom: 20px; color: var(--text-leise);
}
.punkt { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.hero__aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__bild { border-radius: 14px; overflow: hidden; background: var(--hell); box-shadow: var(--schatten); }
.hero__bild img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* --- Zahlenleiste --- */
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 30px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.fakt b { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: var(--primaer); }
.fakt span { font-size: .87rem; color: var(--text-leise); }

/* --- Leistungen --- */
.raster { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(295px, 1fr)); }
.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.karte:hover { box-shadow: var(--schatten); border-color: #ccd5e0; }
.karte__bild { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--hell); }
.karte__inhalt { padding: 26px 26px 28px; }
.karte__icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-dark);
  display: grid; place-items: center; margin-bottom: 16px;
}
.karte__icon svg { width: 26px; height: 26px; }
.karte ul { list-style: none; padding: 0; margin: 16px 0 0; }
.karte li { position: relative; padding-left: 24px; font-size: .94rem; color: var(--text-leise); margin-bottom: 7px; }
.karte li::before {
  content: ""; position: absolute; left: 2px; top: .58em; width: 9px; height: 5px;
  border-left: 2px solid var(--akzent); border-bottom: 2px solid var(--akzent); transform: rotate(-45deg);
}
.karte__frage {
  margin-top: 20px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  font-size: .92rem; font-weight: 650; color: var(--akzent-dark); display: inline-flex; align-items: center; gap: 6px;
}
.karte__frage:hover { color: var(--primaer); }

/* --- Ablauf --- */
.schritte { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: s; }
.schritt { counter-increment: s; padding-top: 8px; }
.schritt::before {
  content: counter(s, decimal-leading-zero); display: block; font-size: 2.1rem; font-weight: 800;
  color: var(--akzent); letter-spacing: -.03em; margin-bottom: 8px;
}

/* --- Referenzen / Stimmen --- */
.ref { background: var(--weiss); border-left: 3px solid var(--akzent); border-radius: 0 12px 12px 0; padding: 24px 26px; box-shadow: var(--schatten); }
.stimmen { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 40px; }
.stimme { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 26px; }
.stimme p { font-size: 1.03rem; }
.stimme cite { font-style: normal; font-size: .87rem; color: var(--akzent-licht); }

/* --- Assistent testen --- */
.demo-karte {
  display: flex; flex-direction: column; text-align: left; gap: 0; cursor: pointer;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 26px; color: inherit; font: inherit;
  transition: background .18s ease, border-color .18s ease, transform .15s ease;
}
.demo-karte:hover { background: rgba(255, 255, 255, .09); border-color: var(--akzent-licht); transform: translateY(-2px); }
.demo-karte__icon {
  width: 42px; height: 42px; border-radius: 10px; background: rgba(255, 255, 255, .1);
  color: var(--akzent-licht); display: grid; place-items: center; margin-bottom: 16px;
}
.demo-karte__icon svg { width: 22px; height: 22px; }
.demo-karte h3 { margin: 0 0 6px; font-size: 1.08rem; color: #fff; }
.demo-karte p { margin: 0; font-size: .93rem; color: #b9c3ce; }
.demo-karte__frage {
  margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem; color: #dbe3ec; font-style: italic;
}
.demo-karte__start { margin-top: 14px; font-size: .88rem; font-weight: 650; color: var(--akzent-licht); }

/* --- Notdienst --- */
.notdienst {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px; justify-content: space-between;
  background: var(--primaer); color: #fff; border-radius: 14px; padding: 30px 34px;
}
.notdienst h3 { margin: 0 0 4px; font-size: 1.25rem; }
.notdienst p { margin: 0; color: #a8b4c4; font-size: .95rem; }

/* --- Über uns --- */
.ueber-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ueber-raster img { border-radius: 14px; box-shadow: var(--schatten); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.haken { list-style: none; padding: 0; margin: 22px 0 0; }
.haken li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text-leise); }
.haken li::before {
  content: ""; position: absolute; left: 3px; top: .5em; width: 10px; height: 6px;
  border-left: 2px solid var(--akzent); border-bottom: 2px solid var(--akzent); transform: rotate(-45deg);
}

/* --- Kontakt --- */
.kontakt-raster { display: grid; gap: 44px; grid-template-columns: 1fr 1fr; align-items: start; }
.info-zeile { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--linie); }
.info-zeile:last-child { border-bottom: 0; }
.info-zeile svg { width: 20px; height: 20px; color: var(--akzent-dark); flex: none; margin-top: 3px; }
.info-zeile b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-leise); font-weight: 700; }
.info-zeile a { text-decoration: none; font-weight: 600; }
.zeiten { list-style: none; margin: 0; padding: 0; }
.zeiten li { display: flex; justify-content: space-between; gap: 16px; font-size: .93rem; padding: 5px 0; }
.zeiten span:last-child { color: var(--text-leise); }

form { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 30px; box-shadow: var(--schatten); }
.feld { margin-bottom: 16px; }
.feld label { display: block; font-size: .86rem; font-weight: 650; margin-bottom: 6px; }
.feld input, .feld textarea, .feld select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--linie); border-radius: 8px;
  font: inherit; font-size: .95rem; background: #fdfcfb;
}
.feld input:focus, .feld textarea:focus, .feld select:focus { outline: 0; border-color: var(--akzent); background: #fff; }
.feld textarea { min-height: 118px; resize: vertical; }
.form-hinweis { font-size: .8rem; color: var(--text-leise); margin: 12px 0 0; }
.form-status { font-size: .9rem; margin-top: 12px; font-weight: 600; }

/* --- FAQ --- */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--linie); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--akzent-dark); font-size: 1.35rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--text-leise); margin: 0 0 16px; padding-right: 40px; }

/* --- Fusszeile --- */
.fuss { background: #131e29; color: #97a5b3; padding: 56px 0 28px; font-size: .92rem; }
.fuss a { color: #cdd7e0; text-decoration: none; }
.fuss a:hover { color: var(--akzent-licht); }
.fuss__raster { display: grid; gap: 34px; grid-template-columns: 1.6fr 1fr 1fr; margin-bottom: 34px; }
.fuss h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 8px; }
.fuss__unten { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: .85rem; }

/* --- Chat-Widget --- */
.chat-knopf {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--primaer); color: #fff; border: 0; border-radius: 999px; padding: 14px 22px 14px 18px;
  font: inherit; font-weight: 650; cursor: pointer; box-shadow: 0 10px 30px rgba(16, 28, 40, .34);
  transition: transform .15s ease;
}
.chat-knopf:hover { transform: translateY(-2px); }
.chat-knopf svg { width: 21px; height: 21px; }
.chat-knopf__ping { position: absolute; top: 10px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: #5ddc9a; }
.chat-knopf[hidden] { display: none; }

.chat {
  position: fixed; right: 22px; bottom: 22px; z-index: 61; width: 396px; max-width: calc(100vw - 32px);
  height: 620px; max-height: calc(100vh - 40px); background: var(--weiss); border-radius: 18px;
  box-shadow: 0 24px 64px rgba(13, 22, 32, .34); display: flex; flex-direction: column; overflow: hidden;
  animation: chat-auf .2s ease;
}
@keyframes chat-auf { from { opacity: 0; transform: translateY(14px); } }
.chat[hidden] { display: none; }
.chat__kopf { background: var(--primaer); color: #fff; padding: 17px 18px; display: flex; align-items: center; gap: 12px; }
.chat__avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--akzent); color: var(--akzent-text); display: grid; place-items: center; font-weight: 800; flex: none; }
.chat__kopf strong { display: block; font-size: .97rem; }
.chat__kopf span { font-size: .8rem; color: #b5c1cd; }
.chat__zu { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: .75; }
.chat__zu:hover { opacity: 1; }
.chat__verlauf { flex: 1; overflow-y: auto; padding: 20px 18px; background: var(--hell); display: flex; flex-direction: column; gap: 12px; }
.blase { max-width: 84%; padding: 12px 15px; border-radius: 14px; font-size: .95rem; line-height: 1.55; word-wrap: break-word; }
.blase p { margin: 0 0 .6em; }
.blase p:last-child { margin-bottom: 0; }
.blase--bot { background: var(--weiss); border: 1px solid var(--linie); border-bottom-left-radius: 4px; align-self: flex-start; }
.blase--ich { background: var(--primaer); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.blase--hinweis { align-self: center; background: var(--akzent-hell); border: 1px dashed #a9c0f5; color: #1e3a8a; font-size: .84rem; text-align: center; max-width: 100%; }
.blase a { color: var(--akzent-dark); }
.blase--ich a { color: #a9c8ff; }
.tippt { display: flex; gap: 4px; align-self: flex-start; padding: 14px 16px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; }
.tippt i { width: 7px; height: 7px; border-radius: 50%; background: #b3bcc6; animation: tippt 1.2s infinite; }
.tippt i:nth-child(2) { animation-delay: .18s; }
.tippt i:nth-child(3) { animation-delay: .36s; }
@keyframes tippt { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat__vorschlaege { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 12px; background: var(--hell); }
.chat__vorschlaege button {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: 999px; padding: 7px 13px;
  font: inherit; font-size: .84rem; cursor: pointer; color: var(--text-leise);
}
.chat__vorschlaege button:hover { border-color: var(--akzent); color: var(--text); }
.chat__eingabe { display: flex; gap: 9px; padding: 13px 14px; border-top: 1px solid var(--linie); background: var(--weiss); }
.chat__eingabe textarea {
  flex: 1; border: 1.5px solid var(--linie); border-radius: 10px; padding: 10px 12px; font: inherit;
  font-size: .94rem; resize: none; max-height: 110px; min-height: 42px;
}
.chat__eingabe textarea:focus { outline: 0; border-color: var(--akzent); }
.chat__senden { border: 0; background: var(--akzent); color: var(--akzent-text); border-radius: 10px; width: 44px; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat__senden:disabled { opacity: .45; cursor: default; }
.chat__senden svg { width: 19px; height: 19px; }
.chat__fuss { font-size: .72rem; color: var(--text-leise); text-align: center; padding: 0 14px 11px; background: var(--weiss); }

/* --- Rechtstexte --- */
.rechtstext { max-width: 780px; padding: 60px 0 80px; }
.rechtstext h2 { font-size: 1.35rem; margin-top: 40px; }
.rechtstext p, .rechtstext li { color: var(--text-leise); }

/* --- Mobil --- */
@media (max-width: 900px) {
  .kontakt-raster, .fuss__raster, .hero__raster, .ueber-raster { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 48px 0 40px; }
}
@media (max-width: 760px) {
  .abschnitt { padding: 60px 0; }
  .kopf__tel span { display: none; }
  .nav {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--linie); padding: 8px 24px 18px; display: none;
  }
  .nav.offen { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--linie); }
  .kopf__burger { display: block; }
  .kopf__tel { margin-left: 0; }
  .notdienst { padding: 26px; }
  .chat { right: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .chat-knopf { right: 16px; bottom: 16px; }
}
