/* ============================================================
   Funnel-Engine: Layout & Komponenten.
   Farben, Radien und Schriften stehen in ../theme.css (pro Funnel).
   Diese Datei bleibt bei allen Funnels gleich.
   ============================================================ */

@font-face { font-family: 'Roboto'; font-weight: 700; font-display: swap; src: url(fonts/roboto-700.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 300 800; font-display: swap; src: url(fonts/open-sans.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
}

/* Mobile first: der Funnel füllt das Handy komplett.
   Auf dem Desktop dieselbe Darstellung als zentrierte Spalte. */
.device {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg-frame);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}
@media (min-width: 540px) {
  body { padding: 32px 0; }
  .device {
    max-width: 430px;
    min-height: calc(100dvh - 64px);
    border-radius: 32px;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.35);
    overflow: hidden;
  }
}

/* --- Kopf --- */
header.top { display: flex; justify-content: center; align-items: center; padding: 18px 20px 12px; }
header.top a { display: block; line-height: 0; }
header.top .logo { display: block; height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.progress { height: 4px; background: var(--line); margin: 0 20px 4px; border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.progress.hidden { visibility: hidden; }
main { flex: 1; display: flex; flex-direction: column; }

/* --- Banner & Meta --- */
.banner { background: var(--brand); color: var(--on-brand); padding: 22px 24px 24px; text-align: center; }
.banner .eyebrow { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.banner h1 { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.15; margin: 0; text-wrap: balance; }
.banner h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 0; text-wrap: balance; }
.meta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; padding: 16px 20px 4px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; }
.meta-item svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* --- Foto --- */
.photo {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #d8cfc5;
}

/* --- Bilder-Karussell ---
   Mehrere Fotos statt eines: Team und Betrieb wirken dadurch greifbarer.
   Gewischt wird per Scroll-Snap, das läuft auch ohne JS; funnel.js hängt nur
   die Punkte an. Die Kachel ist schmaler als die Spalte, damit das nächste
   Bild rechts hervorlugt – sonst sieht niemand, dass es weitergeht. */
.gallery { margin: 16px 0 6px; }
.gallery-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
  padding: 0 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 86%; scroll-snap-align: start; margin: 0; }
.gallery figure img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #d8cfc5;
}
.gallery figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.35; }
.gallery-dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.gallery-dots button { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.gallery-dots button.on { background: var(--brand); transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) { .gallery-dots button { transition: none; } }

.content { padding: 4px 20px 28px; }
.teaser { font-family: var(--font-display); font-size: 1.2rem; text-align: center; line-height: 1.35; margin: 6px 0 14px; text-wrap: balance; }
.lede { font-size: .95rem; color: var(--muted); text-align: center; margin: 0 0 22px; }

/* --- Icon-Karten (Engagement + Quiz) --- */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.card {
  display: flex;
  flex-direction: column;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  background: var(--card-dark);
  color: var(--on-brand);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
  transition: transform .12s ease;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.card:active { transform: scale(.97); }
.card:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; }
.card-top { background: var(--brand); aspect-ratio: var(--card-aspect); display: flex; align-items: center; justify-content: center; }
.card-top svg { width: 56px; height: 56px; }
.card-top svg.wide { width: 68px; height: auto; }
.card.grey .card-top { background: var(--muted); }
.card-label {
  flex: 1;
  hyphens: auto;            /* lang="de" nötig; lange Wörter zusätzlich mit &shy; markieren */
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4em;
  padding: 12px 10px;
  font-size: calc(.95rem * var(--btn-scale));
  font-weight: 700;
  line-height: 1.3;
}

/* --- Bullets --- */
.bullets { display: flex; flex-direction: column; gap: 16px; margin: 4px 0 24px; }
.bullet { display: flex; gap: 14px; align-items: flex-start; }
.bullet .ic { flex-shrink: 0; width: 38px; height: 38px; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.bullet .ic svg { width: 100%; height: 100%; }
.bullet .ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bullet .txt { padding-top: 4px; }
.bullet .txt strong { display: block; font-size: .98rem; margin-bottom: 2px; }
.bullet .txt span { display: block; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.bullet.flat .txt strong { font-weight: 600; }

/* --- Buttons --- */
.btn-stack { display: flex; flex-direction: column; gap: 12px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: none;
  border-radius: var(--radius);
  padding: calc(15px * var(--btn-scale)) 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(1rem * var(--btn-scale));
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #f0f0f0; color: var(--ink); }
.btn-secondary:hover { filter: brightness(.95); }
.btn[disabled] { opacity: .6; cursor: default; }

/* --- Quiz --- */
.quiz-q { padding: 30px 20px 6px; text-align: center; }
.quiz-q h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 20px; text-wrap: balance; }
.quiz-q .hint { font-size: .85rem; color: var(--muted); margin: -10px 0 18px; }

/* --- Mehrfachauswahl --- */
.ms-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 24px; }
.ms-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--muted);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 15px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ms-option .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ms-option .dot svg { display: none; width: 14px; height: 14px; }
.ms-option.selected { background: var(--brand); }
.ms-option.selected .dot { background: #fff; color: var(--brand); }
.ms-option.selected .dot svg { display: block; }

/* --- Formular --- */
.form-block { padding: 28px 20px 8px; }
.form-block h2 { font-family: var(--font-display); font-size: 1.25rem; text-align: center; margin: 0 0 10px; text-wrap: balance; }
.trust { font-size: .88rem; color: var(--muted); text-align: center; margin: 0 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px; /* verhindert Auto-Zoom auf iOS */
  background: var(--field-bg);
  color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 20px; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; }
.consent a { color: var(--ink); }
.form-error { display: none; background: #fdecec; color: #9b1c1c; border-radius: var(--radius); padding: 12px 14px; font-size: .88rem; margin-bottom: 14px; }
.form-error.show { display: block; }
.contact-person { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.contact-person img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.contact-person strong { display: block; font-size: .92rem; }
.contact-person span { display: block; font-size: .82rem; color: var(--muted); }
.contact-person.above { flex-direction: column; text-align: center; gap: 10px; margin: 0 0 22px; padding: 0; border: 0; } /* Ansprechpartner zentriert über der Überschrift */
.contact-person.above img { width: 84px; height: 84px; }

/* --- Danke / Absage --- */
.end { padding: 70px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.end .check { width: 64px; height: 64px; border-radius: 50%; background: var(--success); display: flex; align-items: center; justify-content: center; }
.end h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 0; text-wrap: balance; }
.end p { font-size: .95rem; color: var(--muted); margin: 0; max-width: 34ch; }
.absage { flex: 1; background: var(--brand); color: var(--on-brand); padding: 90px 28px; text-align: center; }
.absage h2 { font-family: var(--font-display); font-size: 1.45rem; margin: 0 0 14px; text-wrap: balance; }
.absage p { font-size: .98rem; opacity: .92; max-width: 32ch; margin: 0 auto; }

/* --- Footer --- */
footer.legal { text-align: center; padding: 16px 20px 22px; font-size: .78rem; color: var(--muted); }
footer.legal a { color: inherit; }
footer.legal .who { display: block; margin-bottom: 6px; line-height: 1.4; }

/* --- Datenschutzhinweis --- */
.consent-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px; display: flex; justify-content: center; }
.consent-box { width: 100%; max-width: 430px; background: #fff; color: #262a29; border-radius: 20px; padding: 18px 18px 16px; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
.consent-box strong { display: block; font-size: .95rem; margin-bottom: 6px; }
.consent-box p { font-size: .84rem; color: #6d7170; margin: 0 0 14px; line-height: 1.45; }
.consent-box p a { color: #262a29; }
.consent-box .row { display: flex; gap: 10px; }
.consent-box button { flex: 1; border: none; border-radius: 12px; padding: 13px 10px; font-weight: 700; font-size: .9rem; cursor: pointer; font-family: inherit; }
.consent-box .ok { background: var(--brand); color: #fff; }
.consent-box .min { background: #f0f0f0; color: #262a29; }

/* --- Editor (nur mit ?edit in der URL sichtbar) --- */
body.edit-mode [contenteditable="true"] { cursor: text; outline: 1px dashed rgba(227,6,19,.6); outline-offset: 2px; border-radius: 3px; }
body.edit-mode [contenteditable="true"]:focus { outline: 2px solid var(--brand); background: rgba(227,6,19,.06); }
body.edit-mode img[data-swap] { cursor: pointer; outline: 2px dashed rgba(227,6,19,.7); outline-offset: -2px; }
body.has-toolbar { padding-bottom: 76px; }
#fx-toolbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 10px; background: rgba(38,42,41,.94); backdrop-filter: blur(6px); }
.fx-btn { border: none; border-radius: 999px; padding: 9px 14px; font: 600 .8rem system-ui, sans-serif; background: #fff; color: #262a29; cursor: pointer; white-space: nowrap; text-decoration: none; }
.fx-btn.on { background: #e30613; color: #fff; }
#fx-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 85; }
#fx-backdrop.open { display: block; }
#fx-panel {
  position: fixed; top: 0; right: 0; width: 320px; max-width: 92vw; height: 100%;
  background: #fff; color: #262a29; box-shadow: -12px 0 32px rgba(0,0,0,.2); z-index: 86;
  padding: 20px 20px 90px; overflow-y: auto; font: 14px system-ui, sans-serif;
  transform: translateX(100%); transition: transform .2s ease;
}
#fx-panel.open { transform: translateX(0); }
#fx-panel h3 { font-size: 1.05rem; margin: 0 0 4px; }
#fx-panel .sub { font-size: .78rem; color: #6d7170; margin: 0 0 18px; line-height: 1.4; }
#fx-panel .row { margin-bottom: 14px; }
#fx-panel label { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6d7170; margin-bottom: 5px; }
#fx-panel label .val { text-transform: none; letter-spacing: 0; color: #262a29; }
#fx-panel input[type="color"] { width: 100%; height: 36px; border: 1px solid #d4d5d4; border-radius: 6px; padding: 2px; cursor: pointer; }
#fx-panel input[type="range"] { width: 100%; }
#fx-panel select { width: 100%; padding: 8px 10px; border: 1px solid #d4d5d4; border-radius: 6px; font-size: .88rem; background: #fff; }
#fx-panel .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
#fx-panel .actions button { border: none; border-radius: 6px; padding: 11px 14px; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: inherit; }
#fx-panel .actions .primary { background: #e30613; color: #fff; }
#fx-panel .actions .plain { background: #f0f0f0; color: #262a29; }
#fx-panel .close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #6d7170; }
.fx-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 95; align-items: center; justify-content: center; padding: 20px; }
.fx-overlay.show { display: flex; }
.fx-box { background: #fff; color: #262a29; padding: 18px; border-radius: 12px; max-width: 460px; width: 100%; font: 14px system-ui, sans-serif; }
.fx-box p { margin: 0 0 10px; font-size: .85rem; }
.fx-box textarea { width: 100%; height: 240px; font: 12px ui-monospace, monospace; border: 1px solid #d4d5d4; border-radius: 6px; padding: 8px; margin-bottom: 10px; }
.fx-box button { background: #262a29; color: #fff; border: none; border-radius: 6px; padding: 9px 16px; font-weight: 700; font-size: .82rem; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .card, .progress > span, #fx-panel { transition: none; } }

/* --- Rechtsseiten (Impressum, Datenschutz) --- */
.legal-page { padding: 4px 24px 40px; }
.legal-page h1 { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; margin: 8px 0 4px; }
.legal-page .stand { color: var(--muted); font-size: .82rem; margin: 0 0 22px; }
.legal-page h2 { font-family: var(--font-display); font-size: 1.05rem; margin: 26px 0 8px; }
.legal-page h3 { font-size: .95rem; margin: 18px 0 6px; }
.legal-page p, .legal-page li { font-size: .93rem; line-height: 1.6; }
.legal-page p { margin: 0 0 12px; }
.legal-page ul { margin: 0 0 12px; padding-left: 20px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--brand); }
.legal-page .box { background: var(--field-bg); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.legal-page .box p:last-child { margin-bottom: 0; }
.legal-page .back { display: inline-block; margin-top: 26px; font-weight: 700; color: var(--brand); text-decoration: none; }
