/* ==========================================================================
   THIEME Kunden-Landingpages (deinwunschvorort.de)
   Farben + Schriften kommen pro Kunde aus build.py (Block :root in index.html).
   Hier nur Struktur. Keine Kundenwerte hart eintragen.
   ========================================================================== */

/* ---------- Schrift-Presets (lokal, OFL-lizenziert; build.py entfernt ungenutzte) ---------- */
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* ---------- Basis-Token (werden vom Build überschrieben) ---------- */
:root {
  --c-primary: #1f4e5a;
  --c-primary-ink: #1f4e5a;   /* Primärfarbe als Textfarbe auf --c-paper, kontrastgeprüft */
  --c-on-primary: #ffffff;
  --c-accent: #e0a12b;
  --c-on-accent: #1a1a1a;
  --c-paper: #ffffff;
  --c-surface: #ffffff;
  --c-ink: #191a1a;
  --c-muted: #5b5f60;
  --c-line: rgba(0, 0, 0, .12);
  --c-soft: #f3f3f2;          /* ruhige Fläche hinter dem Quiz */

  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --head-weight: 700;
  --head-case: none;
  --head-track: -0.035em;
  --head-scale: 1;

  --gutter: 16px;
  --maxw: 1200px;
  --radius: 2px;
  --space: clamp(64px, 12vw, 136px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--c-paper); color: var(--c-ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--font-head); font-weight: var(--head-weight);
  text-transform: var(--head-case); letter-spacing: var(--head-track);
  line-height: 1.02; margin: 0; text-wrap: balance;
}
h2 { font-size: calc(clamp(1.9rem, 7.4vw, 3.6rem) * var(--head-scale)); }
h3 { font-size: calc(1.2rem * var(--head-scale)); line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--space) 0; }
.lead { margin-top: 16px; font-size: 1.1rem; color: var(--c-muted); max-width: 36em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: var(--radius);
  background: var(--c-accent); color: var(--c-on-accent);
  font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Beispielseite: Hinweisleiste ---------- */
.demo-bar { background: #1d1d1b; color: #fff; text-align: center; font-size: .78rem; padding: 7px 12px; }

/* ---------- Kopfleiste (weiß, Originallogo) ---------- */
.top { background: var(--c-paper); border-bottom: 1px solid var(--c-line); position: relative; z-index: 10; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.top__logo { height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.top__logo--text { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); font-size: 1.2rem; }
.top__call { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: .95rem; color: var(--c-primary-ink); white-space: nowrap; }
.top__call svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .top__call span { display: none; } .top__call { width: 44px; height: 44px; justify-content: center; border: 1px solid var(--c-line); } }

/* ---------- Hero: großes Foto, Headline steht im Bild ---------- */
.hero__stage { position: relative; height: clamp(280px, 42svh, 560px); overflow: hidden; background: var(--c-primary); }
.hero__stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__stage::after { content: ""; position: absolute; inset: 35% 0 0 0; background: linear-gradient(transparent, rgba(0,0,0,.62)); pointer-events: none; }
.hero__title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding-bottom: 22px; color: #fff; }
.hero h1 { font-size: calc(clamp(2.1rem, 10vw, 5.6rem) * var(--head-scale)); max-width: 13em; text-shadow: 0 1px 24px rgba(0,0,0,.25); }
.hero__eyebrow { font-weight: 600; font-size: .95rem; margin-bottom: 10px; opacity: .92; }
.hero__plain { padding: 56px 0 8px; }
.hero--plain h1 { color: var(--c-ink); text-shadow: none; }
.hero--plain .hero__eyebrow { color: var(--c-muted); }

/* Bewertungs-Zeile */
.rating { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; text-decoration: none; color: var(--c-ink); }
.rating svg { width: 17px; height: 17px; color: #e7a614; flex: none; }
a.rating span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-line); }

/* ---------- Anfrage-Bereich mit Quiz ---------- */
.ask { padding: 22px 0 0; scroll-margin-top: 8px; }
.ask__grid { display: grid; gap: 22px; }
.ask__lead { font-size: 1.08rem; line-height: 1.5; max-width: 30em; }
.ask__intro .rating { margin-top: 12px; }
.ask__box { background: var(--c-soft); margin-inline: calc(var(--gutter) * -1); padding: 20px var(--gutter) 28px; scroll-margin-top: 8px; }
/* Mobil: die erste Frage soll im ersten Bildschirm stehen, Überschrift bleibt für Screenreader */
@media (max-width: 719px) { .ask__title, .ask__sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .quiz__progress { margin-top: 0; } }
.ask__title { font-size: calc(1.55rem * var(--head-scale)); line-height: 1.1; }
.ask__sub { margin-top: 6px; color: var(--c-muted); font-size: .95rem; }

.quiz__progress { display: flex; align-items: center; gap: 12px; margin: 20px 0 22px; font-size: .8rem; font-weight: 600; color: var(--c-muted); }
.quiz__bar { flex: 1; height: 2px; background: var(--c-line); }
.quiz__bar i { display: block; height: 100%; width: 0; background: var(--c-ink); transition: width .3s ease; }

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { font-weight: 700; font-size: 1.22rem; letter-spacing: -0.02em; line-height: 1.25; padding: 0; margin-bottom: 14px; }
.step legend:focus { outline: none; }
.step__hint { margin: -6px 0 14px; color: var(--c-muted); font-size: .9rem; }

/* Antwort-Kacheln zum Tippen */
.tiles { display: grid; gap: 8px; }
.tiles--grid { grid-template-columns: 1fr 1fr; }
.tile { position: relative; display: flex; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile span {
  flex: 1; position: relative; display: flex; align-items: center; min-height: 60px; padding: 14px 40px 14px 16px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  font-weight: 600; line-height: 1.25; cursor: pointer; overflow-wrap: anywhere; hyphens: auto;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.tiles--grid .tile span { min-height: 78px; align-items: flex-end; padding: 12px 14px; }
.tile span svg { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 1.5px var(--c-line); }
@media (hover: hover) { .tile:hover span { border-color: var(--c-ink); } }
.tile input:checked + span { border-color: var(--c-primary-ink); box-shadow: inset 0 0 0 1px var(--c-primary-ink); }
.tile input:checked + span svg { background: var(--c-primary); color: var(--c-on-primary); box-shadow: none; }
.tile input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Kontaktschritt */
.field-row { display: grid; gap: 0 10px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: .9rem; }
.field label small { font-weight: 400; color: var(--c-muted); }
.field input {
  min-height: 54px; padding: 0 14px; width: 100%; font-size: 1.05rem;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.field input:focus { outline: none; border-color: var(--c-primary-ink); box-shadow: inset 0 0 0 1px var(--c-primary-ink); }
.field input[aria-invalid="true"] { border-color: #b3261e; box-shadow: inset 0 0 0 1px #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.quiz__nav { display: flex; gap: 14px; margin-top: 18px; align-items: center; }
.quiz__back { background: none; border: 0; padding: 10px 2px; color: var(--c-muted); font-weight: 600; cursor: pointer; }
.quiz__back::before { content: "← "; }
.quiz__nav .btn { flex: 1; padding: 0 16px; white-space: nowrap; }
.quiz__form:not(.is-last) .quiz__legal { display: none; }
.quiz__legal { margin-top: 14px; font-size: .76rem; color: var(--c-muted); line-height: 1.5; }
.quiz__error { margin-top: 12px; color: #b3261e; font-weight: 600; font-size: .95rem; }
.quiz__error:empty { display: none; }
.quiz__done h3 { font-size: 1.5rem; margin-bottom: 8px; }
.quiz__done:focus { outline: none; }
.quiz__check { width: 48px; height: 48px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-primary); display: grid; place-items: center; margin-bottom: 16px; }
.quiz__check svg { width: 24px; height: 24px; }

/* ---------- Leistungen: Katalog-Liste mit Haarlinien ---------- */
.list__items { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--c-ink); }
.list__item { padding: 18px 0; border-bottom: 1px solid var(--c-line); display: grid; gap: 4px; }
.list__item p { color: var(--c-muted); max-width: 34em; }
.list--compact .list__item { padding: 14px 0; }
.list--compact .list__item h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Team ---------- */
.team__grid { display: grid; gap: 24px; }
.team__bild { margin: 0; margin-inline: calc(var(--gutter) * -1); }
.team__bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.team__text p { margin-top: 14px; color: var(--c-muted); font-size: 1.08rem; max-width: 32em; }

/* ---------- Galerie ---------- */
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery--quadrat img { aspect-ratio: 1 / 1; }
.gallery__h { margin-bottom: 24px; }
.gallery figcaption { margin-top: 8px; font-size: .85rem; color: var(--c-muted); }

/* ---------- Bewertungen: Zitate untereinander ---------- */
.reviews__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.reviews__list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--c-ink); }
.review { padding: 22px 0; border-bottom: 1px solid var(--c-line); }
.review__stars { display: flex; gap: 2px; color: #e7a614; }
.review__stars svg { width: 14px; height: 14px; }
.review blockquote { margin: 10px 0 10px; font-size: 1.15rem; line-height: 1.45; letter-spacing: -0.01em; max-width: 36em; }
.review__who { font-size: .85rem; color: var(--c-muted); }
.review__who strong { color: var(--c-ink); font-weight: 600; margin-right: 8px; }
.reviews__all { display: inline-block; margin-top: 18px; font-weight: 600; font-size: .95rem; text-underline-offset: 3px; }

/* ---------- Ablauf (echte Reihenfolge) ---------- */
.steps__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--c-ink); }
.steps__list li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.steps__n { font-weight: 700; color: var(--c-primary-ink); font-variant-numeric: tabular-nums; }
.steps__list p { margin-top: 4px; color: var(--c-muted); }

/* ---------- FAQ ---------- */
.faq__list { margin-top: 28px; border-top: 1px solid var(--c-ink); max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding: 0 0 20px; color: var(--c-muted); max-width: 44em; }

/* ---------- Standorte ---------- */
.places__list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--c-ink); }
.place { padding: 20px 0; border-bottom: 1px solid var(--c-line); display: grid; gap: 6px; }
.place h3 { font-size: 1.25rem; }
.place p { color: var(--c-muted); }
.place__tel { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--c-primary-ink); justify-self: start; }
.place__tel svg { width: 16px; height: 16px; }
.place__hours { list-style: none; margin: 4px 0 0; padding: 0; font-size: .88rem; color: var(--c-muted); }

/* ---------- Schluss ---------- */
.closer { margin-top: var(--space); padding-block: var(--space); background: var(--c-primary); color: var(--c-on-primary); }
.closer p { margin-top: 14px; opacity: .9; max-width: 34em; }
.closer__btns { display: grid; gap: 10px; margin-top: 28px; max-width: 420px; }

/* ---------- Auf einen Blick (Klartext) ---------- */
.glance { padding: var(--space) 0 0; }
.glance h2 { font-family: var(--font-body); letter-spacing: 0; font-size: .85rem; font-weight: 600; color: var(--c-muted); text-transform: none; }
.glance p { margin-top: 6px; max-width: 60em; font-size: .85rem; color: var(--c-muted); line-height: 1.6; }
.closer + .glance { padding-top: 40px; }

/* ---------- Footer ---------- */
.foot { margin-top: 32px; padding: 28px 0 110px; border-top: 1px solid var(--c-line); font-size: .88rem; color: var(--c-muted); }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot__credit { font-size: .78rem; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
/* THIEME-Badge, gleiche Form wie auf den Karriereseiten */
.thieme {
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px; justify-self: start;
  padding: 12px 18px 14px; border: 1px solid var(--c-line); border-radius: 8px;
  text-decoration: none !important; color: var(--c-muted); transition: border-color .15s ease;
}
.thieme:hover { border-color: var(--c-muted); }
.thieme span { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.thieme img { height: 26px; width: auto; }

/* ---------- Mobile Leiste ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--c-paper); border-top: 1px solid var(--c-line);
  transform: translateY(110%); transition: transform .25s ease;
}
.dock.is-on { transform: none; }
.dock .btn { flex: 1; min-height: 52px; }
.dock__call { flex: none; width: 52px; display: grid; place-items: center; border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink); }
.dock__call svg { width: 22px; height: 22px; }

/* ---------- Consent (nur wenn Pixel aktiv) ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25); max-width: 560px; font-size: .86rem; line-height: 1.5;
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.consent__h { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.consent__links { margin: 10px 0 14px; }
.consent__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Ablehnen und Akzeptieren bewusst identisch gestaltet (keine Lenkung) */
.btn--same { min-height: 46px; padding: 0 12px; font-size: .95rem; background: var(--c-ink); color: var(--c-paper); }

/* ---------- Dunkles Theme ---------- */
.theme-dark { --c-soft: #1b1d1e; }
.theme-dark .list__items, .theme-dark .reviews__list, .theme-dark .steps__list, .theme-dark .faq__list, .theme-dark .places__list { border-top-color: var(--c-muted); }

/* ---------- Ab Tablet ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .hero__title { padding-bottom: 40px; }
  .ask__box { margin-inline: 0; padding: 36px 40px 40px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .list__item { grid-template-columns: minmax(220px, 5fr) 7fr; gap: 40px; align-items: baseline; }
  .list--compact .list__items { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .list--compact .list__item { grid-template-columns: 1fr; }
  .gallery__track { grid-auto-columns: 44%; }
  .review { display: grid; grid-template-columns: 1fr 220px; gap: 0 40px; align-items: start; }
  .review__stars { grid-column: 2; grid-row: 1; justify-self: start; margin-top: 6px; }
  .review blockquote { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  .review__who { grid-column: 2; grid-row: 2; }
  .review__who strong { display: block; }
  .place { grid-template-columns: 1.2fr 1fr 1fr 1fr; align-items: baseline; gap: 16px; }
  .closer__btns { grid-template-columns: auto auto; justify-content: start; max-width: none; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .hero__stage { height: min(72vh, 720px); }
  .hero h1 { font-size: calc(clamp(3rem, 5.4vw, 5.6rem) * var(--head-scale)); }
  .hero__title { padding-bottom: 56px; }
  .hero__plain { padding: 96px 0 24px; }
  .ask { padding-top: 56px; }
  .ask__grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
  .ask__intro { position: sticky; top: 32px; padding-top: 8px; }
  .ask__lead { font-size: 1.3rem; }
  .team__grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
  .team__bild { margin-inline: 0; }
  .gallery__track { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .dock { display: none; }
  .foot { padding-bottom: 40px; }
  .foot .wrap { grid-template-columns: 1fr auto auto; align-items: center; column-gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}