/* ------------------------------------------------------------------ *
 * Quesvanta – Landingpage
 * Farb-/Radius-/Schatten-/Font-Tokens bewusst identisch zur Haupt-
 * anwendung (abfrage-kiosk/assets/admin.css, lib/db.php default_settings)
 * uebernommen, damit die Landingpage wie derselbe Produktfamilie wirkt.
 * ------------------------------------------------------------------ */

:root {
  --bg: #ffffff;
  --bg2: #f4f6fb;
  --card: #ffffff;
  --line: #e2e6f0;
  --text: #16233a;
  --muted: #66748c;
  --primary: #1f6feb;
  --primary-dark: #1552b5;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 4px 10px rgba(16,24,40,.06), 0 20px 48px rgba(16,24,40,.10);
  --ff: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --maxw: 1160px;

  /* Farbreihe fuer die Balken-Darstellung im Monitor-Mockup, identisch zur
     kategorialen Palette des echten Dashboards (abfrage-kiosk/admin.css). */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --viz-track: #eef0f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-bg { background: var(--bg2); }
.section h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 12px;
  text-align: center;
}
.section .lead {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 48px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.lg { padding: 17px 34px; font-size: 17px; }
.btn.block { width: 100%; }

/* ---------------- Rabatt-Banner (nur sichtbar, wenn ein Code gesetzt ist) ---------------- */
.promo-bar { background: var(--primary); }
.promo-bar a {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 24px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.promo-bar a:hover { text-decoration: underline; }
.promo-bar code { background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 6px; font-weight: 700; letter-spacing: .02em; }
.promo-bar-arrow { font-weight: 700; }

/* ---------------- Kopfzeile ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.topbar .brand { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.topbar nav a:hover { color: var(--text); }

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; margin: 0 0 20px; letter-spacing: -.01em; }
.hero .sub { font-size: 18px; color: var(--muted); margin: 0 0 32px; max-width: 52ch; }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .trust { font-size: 14px; color: var(--muted); }

/* ---------------- Datenhoheit-Trust-Leiste (statisch, direkt unter dem Hero) ---------------- */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); }
.trust-strip .wrap {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
  padding: 18px 24px; text-align: center;
}
.trust-badge { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Echte Mini-Vorschau des Kiosk-UI statt eines erfundenen Screenshots. */
.mockup {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.mockup .mockup-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.mockup .mockup-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mockup-kiosk {
  background: #fff;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.mockup-kiosk .mockup-q { font-size: 20px; font-weight: 700; margin: 0 0 18px; }
.mockup-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mockup-answers button {
  font-family: inherit; font-size: 14px; font-weight: 600; text-align: left;
  padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; color: var(--text); display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.mockup-answers button.picked { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------------- USP-Grid ---------------- */
.usp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.usp {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.usp .icon { font-size: 26px; margin-bottom: 10px; }
.usp h3 { font-size: 16px; margin: 0 0 6px; }
.usp p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------------- Demo ---------------- */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.demo-card, .stats-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.demo-card h3, .stats-card h3 { margin: 0 0 18px; font-size: 18px; }
.demo-answers { display: grid; gap: 10px; }
.demo-answers button {
  font-family: inherit; font-size: 15px; font-weight: 600; text-align: left;
  padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: transform .1s ease, border-color .12s ease;
}
.demo-answers button:hover { border-color: var(--primary); }
.demo-answers button:active { transform: scale(.98); }
.demo-answers button.picked { background: var(--primary); color: #fff; border-color: var(--primary); }
.demo-plz { margin-top: 16px; }
.demo-plz input {
  font-family: inherit; font-size: 16px; padding: 10px 14px; border-radius: 10px;
  border: 2px solid var(--line); width: 140px;
}
.demo-thanks { text-align: center; padding: 24px 0; }
.demo-thanks .emoji { font-size: 40px; margin-bottom: 10px; }
.demo-reset-hint { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* ---------------- PC-Monitor-Mockup fuer die Live-Demo-Auswertung ---------------- *
 * Rein optische Nachbildung eines Bildschirms um die echten, live aktualisierten
 * Demo-Zahlen herum – die Werte selbst kommen weiterhin unveraendert aus
 * api/demo.php (siehe assets/landing.js renderStats()), hier aendert sich nur die
 * Praesentation.
 */
.device-monitor { display: flex; flex-direction: column; align-items: center; width: 100%; }

.device-screen {
  width: 100%;
  background: #1b2432;
  border-radius: 16px;
  padding: 14px 14px 22px;
  box-shadow: var(--shadow-lg);
}

.stats-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px 22px;
  min-height: 300px;
  /* Der Bildschirm waechst nicht unbegrenzt mit dem Inhalt (KPI + Balken +
     Heatmap + ggf. PLZ-Karte) – stattdessen scrollt der Monitor-Bildschirm
     selbst, wie bei einer echten, hochgewachsenen Dashboard-Seite. */
  max-height: 560px;
  overflow-y: auto;
}
.stats-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin: 26px 0 10px; }
.stats-section-title:first-of-type { margin-top: 22px; }
.stats-card h3 { display: none; } /* Titel steckt jetzt in der Fenster-Kopfzeile darunter */

.stats-dash-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.stats-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.stats-dot:nth-child(1) { background: #ff5f57; }
.stats-dot:nth-child(2) { background: #febc2e; }
.stats-dot:nth-child(3) { background: #28c840; }
.stats-dash-title { margin: 0 0 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); }

.device-stand { display: flex; flex-direction: column; align-items: center; }
.device-neck { width: 16px; height: 20px; background: #1b2432; }
.device-foot { width: 130px; height: 10px; background: #1b2432; border-radius: 0 0 8px 8px; margin-top: -1px; }

/* KPI-Kachel + Balken-Diagramm: dieselbe Klassenstruktur wie im echten
   Quesvanta-Backend (admin.css .kpis/.kpi, .bars/.bar-row), damit die Demo
   optisch wie ein Ausschnitt aus dem echten Produkt wirkt. */
.stats-card .kpis { display: grid; gap: 10px; margin-bottom: 18px; }
.stats-card .kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.stats-card .kpi .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stats-card .kpi .v { font-size: 28px; font-weight: 800; margin-top: 2px; color: var(--text); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(88px, 150px) 1fr minmax(34px, auto); align-items: center; gap: 10px; }
.bar-label { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.bar-track { background: var(--viz-track); border-radius: 4px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--text); }

.stats-total { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* ---------------- Legende, Heatmap, PLZ-Karte im Monitor-Bildschirm ---------------- *
 * 1:1 aus abfrage-kiosk/assets/admin.css uebernommen (siehe assets/plz-heat.js),
 * damit Wochentag/Uhrzeit- und PLZ-Auswertung optisch exakt wie im echten
 * Quesvanta-Backend aussehen.
 */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 6px; flex: 0 0 auto; }
.legend b { font-weight: 700; color: var(--text); margin-left: 5px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; }

.heat { overflow-x: auto; }
.heat table { border-collapse: separate; border-spacing: 2px; width: auto; min-width: 100%; }
.heat th { padding: 3px 5px; border: 0; font-size: 11px; }
.heat td.cell {
  border: 0; border-radius: 4px; text-align: center; font-size: 11px;
  font-variant-numeric: tabular-nums; min-width: 26px; padding: 7px 3px;
}
.heat tbody tr:hover { background: transparent; }
.heat-legend { align-items: center; gap: 3px; }
.heat-legend span { margin: 0 6px; }

.plzmap-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.plzmap-bar span { color: var(--muted); font-size: 13px; }
.plzmap-back {
  font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
}
.plzmap-back:hover { border-color: var(--primary); }
.plzmap-canvaswrap { position: relative; display: flex; justify-content: center; }
.plzmap-canvaswrap canvas { display: block; border-radius: 10px; max-width: 100%; }
.plzmap-canvaswrap .tip {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font-size: 12.5px; line-height: 1.45; pointer-events: none;
  box-shadow: var(--shadow); max-width: 210px;
}
.plzmap-legend { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.plzmap-scale { display: inline-flex; align-items: center; gap: 3px; }
.plzmap-scale i { width: 20px; height: 11px; border-radius: 2px; display: inline-block; }
.plzmap-scale small { margin: 0 5px; }
.plzmap-note { flex-basis: 100%; font-size: 12px; opacity: .85; }

.plztiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.plztile { border-radius: 10px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); cursor: default; }
.plztile.dark { color: #fff; }
.plztile-plz { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plztile-n { font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; }

/* ---------------- Hero-Bild (falls hochgeladen statt CSS-Mockup) ---------------- */
.mockup.mockup-photo { padding: 10px; }
.mockup-photo img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* ---------------- Bildergalerie ---------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.gallery-item { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* ---------------- Vergleich ---------------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare .col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.compare .col.mine { border-color: var(--primary); box-shadow: var(--shadow); }
.compare h3 { margin: 0 0 14px; font-size: 17px; }
.compare ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.compare ul li { margin-bottom: 8px; }
.compare .col.mine ul { color: var(--text); }

/* ---------------- Anwendungsfaelle ---------------- */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.usecase { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.usecase .icon { font-size: 22px; }
.usecase h3 { margin: 10px 0 4px; font-size: 15px; }
.usecase p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------------- Ersparnis-Rechner ---------------- */
.savings-calc {
  max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px;
}
.savings-inputs { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.savings-inputs label { flex: 1; min-width: 160px; font-size: 13px; font-weight: 600; color: var(--muted); }
.savings-inputs input, .savings-inputs select {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--text);
}
.savings-result { border-top: 1px solid var(--line); padding-top: 18px; }
.savings-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; color: var(--muted); }
.savings-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.savings-row.savings-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-size: 16px; }
.savings-row.savings-total strong { color: var(--ok); font-size: 22px; font-weight: 800; }

/* ---------------- Preis ---------------- */
.price-card {
  max-width: 460px; margin: 0 auto; text-align: center;
  background: var(--card); border: 2px solid var(--primary); border-radius: var(--radius-lg);
  padding: 40px 32px; box-shadow: var(--shadow-lg);
}
.price-card .label { margin: 0; font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.price-card .amount { font-size: 44px; font-weight: 800; margin: 10px 0 4px; }
.price-card .amount small { font-size: 16px; font-weight: 500; color: var(--muted); }
.price-card .tagline { color: var(--muted); margin: 0 0 24px; }
.price-card ul { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; }
.price-card ul li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.price-card ul li:last-child { border-bottom: none; }
.price-card ul li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.price-discount-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.price-discount-hint code { background: var(--bg2); padding: 2px 7px; border-radius: 6px; font-weight: 700; }

.price-discount-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 8px 16px;
  background: var(--ok); color: #fff;
  border-radius: 999px; font-size: 13px; font-weight: 600;
}
.price-discount-badge strong { font-weight: 800; }
.price-discount-badge code { background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 6px; font-weight: 700; letter-spacing: .02em; }

/* ---------------- FAQ ---------------- */
.faq-group { max-width: 760px; margin: 0 auto 36px; }
.faq-group:last-child { margin-bottom: 0; }
.faq-cat { font-size: 15px; color: var(--primary); margin: 0 0 6px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 18px 4px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
/* Die Frage steckt aus Barrierefreiheits-/SEO-Gruenden in einer echten <h4> innerhalb
   von <summary> (siehe index.php) – hier auf die Optik eines normalen Klapptexts zurueckgesetzt. */
.faq-item summary h4 { margin: 0; font-weight: 600; font-size: 15px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--muted); flex: 0 0 auto; margin-left: 12px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ---------------- Kundenstimmen ---------------- *
 * Nur echte, im Admin eingetragene Bewertungen (siehe README "SEO") –
 * dieser Block rendert nie, wenn reviews_json leer ist.
 */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review-card {
  margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.review-stars { color: #f5a623; font-size: 18px; letter-spacing: 2px; margin-bottom: 10px; }
.review-card blockquote { margin: 0 0 14px; font-size: 14px; color: var(--text); font-style: normal; }
.review-card figcaption { font-size: 13px; color: var(--muted); }
.review-card figcaption strong { color: var(--text); }

/* ---------------- Footer ---------------- */
footer.site-footer { padding: 48px 0; text-align: center; color: var(--muted); font-size: 13px; }
footer.site-footer .links { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
footer.site-footer a { color: var(--muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--text); }

/* ---------------- Sticky-Kaufleiste (erscheint erst nach dem Hero) ---------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16,24,40,.08);
  transform: translateY(100%); transition: transform .25s ease;
}
.sticky-cta.on { transform: translateY(0); }
.sticky-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; }
.sticky-cta-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.sticky-cta-price { font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .topbar nav { display: none; }
  .section { padding: 56px 0; }
  .device-screen { padding: 10px 10px 16px; }
  .stats-card { padding: 16px; min-height: 0; }
  .device-foot { width: 100px; }
  .trust-strip .wrap { gap: 8px 16px; padding: 12px 16px; }
  .trust-badge { font-size: 12px; }
  .savings-inputs { flex-direction: column; }
}
