/* ==========================================================================
   DoEStat Landing Page — Stylesheet
   Konservatives, professionelles Design: Weiß/Grau mit Petrol-Akzent.
   Keine externen Fonts (System-Stack mit Inter-Fallback), kein Framework.
   ========================================================================== */

:root {
  --accent: #0e4d64;        /* Petrol/Dunkelblau — Primärakzent */
  --accent-hover: #0b3d50;
  --accent-light: #2e8ca0;
  --accent-pale: #e7f1f4;
  --text: #1f2933;
  --text-muted: #5b6770;
  --bg: #ffffff;
  --bg-alt: #f5f7f8;
  --border: #dfe4e8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 35, 45, 0.08), 0 6px 20px rgba(15, 35, 45, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Fixe Header-Höhe beim Anker-Sprung berücksichtigen */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* Impressum / Datenschutz: many short sections, so the h2 scale of the
   marketing page would dominate the text it introduces. */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin-top: 2em; }
.legal p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------- Buttons -------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost { color: var(--accent); border-color: var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); }

.btn-outline { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-pale); }

.btn-lg { padding: 15px 36px; font-size: 1.1rem; }

/* -------------------------------- Header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* App-Icon der Desktop-Anwendung. Die Bitmap ist ein weißes Tile mit
   transparenten Ecken; auf hellem Grund steht deshalb nur der Würfel.
   Feste width/height, damit beim Laden nichts springt. */
.brand-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: block;
}

.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand-by { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  /* Nav + Sprachumschalter rechtsbündig gruppieren */
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }

.site-nav .nav-cta {
  color: #fff;
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 8px;
}
.site-nav .nav-cta:hover { background: var(--accent-hover); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* --------------------------------- Hero ---------------------------------- */

.hero {
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  margin: 0 0 14px;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin: 18px 0 28px;
  max-width: 34em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Anwendungs-Screenshots (Hero und Feature-Abschnitt). width/height stehen am
   <img>, damit der Platz vor dem Laden reserviert ist; aspect-ratio hält das
   Verhältnis auch dann, wenn eine srcset-Variante mit anderer Höhe kommt. */
.app-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 1002;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}

.visual-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Screenshot-Reihe im Feature-Abschnitt: zwei nebeneinander, der dritte darf
   über die volle Breite laufen (er trägt drei Diagramme und braucht sie). */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.shot { margin: 0; }

.shot-wide { grid-column: 1 / -1; }

.shot figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ------------------------------- Sections -------------------------------- */

.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }

.section-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 44em;
  margin: 0 0 40px;
}

/* ------------------------------- Features -------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* ------------------------------- Vergleich -------------------------------- */

.table-wrap { overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.compare-table tbody th[scope="row"] {
  font-weight: 500;
  width: 34%;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.col-doestat { background: var(--accent-pale); }
.compare-table thead .col-doestat { background: var(--accent-light); }

.mark-yes { color: #1a7f37; font-weight: 700; }
.mark-part { color: #b07d18; font-weight: 700; }
.mark-no { color: var(--text-muted); font-weight: 700; }

.table-footnote {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ------------------------- Validierung / GxP ------------------------------ */

.validation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.validation-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
}

.validation-card h3 { margin-bottom: 10px; }
.validation-card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

.validation-tag {
  display: inline-block;
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.validation-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 22px;
  max-width: 60em;
}

/* ----------------------- Hersteller / Reseller ----------------------------- */

.vendor-grid,
.reseller-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.vendor-grid p,
.reseller-grid p { color: var(--text-muted); }
.reseller-grid h3 { margin-top: 28px; }

.reseller-benefits {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--text-muted);
}
.reseller-benefits li { margin-bottom: 8px; }

/* Liste der autorisierten Reseller — abgesetzt von der Vorteils-Liste, damit
   „wer verkauft DoEStat" nicht wie ein weiterer Werbepunkt aussieht. */
.reseller-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reseller-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.reseller-list strong { color: var(--text); }

.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-card p { margin: 0 0 12px; }
.contact-note { font-size: 0.88rem; color: var(--text-muted); }

/* --------------------------------- Preise --------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.price-card-featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: var(--shadow);
}

.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin: 0;
}

.price { margin: 6px 0 2px; }
.price-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.price-period { color: var(--text-muted); font-size: 1rem; }
.price-sub { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 18px; }

/* Einführungspreis-Kennzeichnung. Bewusst kein durchgestrichener
   Vergleichspreis: das wäre eine Preisermäßigung im Sinne der PAngV und
   müsste sich auf den niedrigsten Preis der letzten 30 Tage beziehen. */
.price-intro {
  margin: 2px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
}

.price-footnote {
  margin: 28px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 48em;
}

/* --------------------------- Mengenstaffel -------------------------------- */

.volume-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.volume-block h3 { margin-bottom: 8px; }
.volume-block p { color: var(--text-muted); margin: 0 0 18px; max-width: 48em; }

.volume-table {
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
  /* Schmal genug für Mobil — die Staffel hat nur drei Spalten und braucht
     nicht die min-width der grossen Vergleichstabelle. */
  min-width: 340px;
  max-width: 560px;
}

.volume-table th,
.volume-table td {
  padding: 11px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.volume-table thead th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.volume-table tbody th[scope="row"] { font-weight: 600; white-space: nowrap; }
.volume-table tbody td:last-child { font-variant-numeric: tabular-nums; }
.volume-table tbody tr:last-child th,
.volume-table tbody tr:last-child td { border-bottom: none; }

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex-grow: 1;
}

.price-card li {
  padding: 7px 0 7px 26px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price-card .btn { text-align: center; }

.price-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Kauf-Button: Beschriftung hängt daran, ob ein Stripe-Payment-Link
   konfiguriert ist. Default (kein JS, kein Link) ist das Angebots-mailto —
   deshalb ist die Checkout-Beschriftung ausgeblendet, nicht umgekehrt.
   main.js setzt .has-checkout am <body>, sobald CHECKOUT_URL gesetzt ist. */
.buy-label-checkout { display: none; }
body.has-checkout .buy-label-checkout { display: inline; }
body.has-checkout .buy-label-quote { display: none; }

.buy-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  display: none;
}
body.has-checkout .buy-note { display: block; }

/* -------------------------------- Download -------------------------------- */

.download-box { text-align: center; max-width: 720px; }
.download-box .section-lead { margin-left: auto; margin-right: auto; }

.download-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.signup {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.signup p { color: var(--text-muted); }

.signup-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}

.signup-form input[type="email"] {
  flex: 1 1 280px;
  max-width: 360px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.form-status { min-height: 1.4em; font-size: 0.92rem; color: var(--accent); margin: 4px 0; }

.form-privacy {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 34em;
  margin: 10px auto 0;
}

/* --------------------------------- Footer --------------------------------- */

.site-footer {
  background: #16242c;
  color: #b8c4cc;
  padding: 48px 0 28px;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 8px 0 0; }

.footer-brand-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-nav a { color: #b8c4cc; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

.footer-legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: #8a99a3;
}

.footer-legal a { color: #b8c4cc; }

.footer-version {
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------- Sprache (DE/EN-Umschaltung) ------------------------ */
/* main.js setzt html[data-lang]; hier wird die jeweils inaktive Sprache
   ausgeblendet. Ohne JS bleibt Deutsch (Default) sichtbar. */

[data-lang="de"] [lang="en"] { display: none !important; }
[data-lang="en"] [lang="de"] { display: none !important; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  cursor: default;
}

/* ----------------------------- Cookie-Banner ------------------------------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(15, 35, 45, 0.12);
}

.cookie-banner-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner-text { flex: 1 1 480px; }
.cookie-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner-actions .btn {
  padding: 10px 20px;
  font-size: 0.92rem;
}

/* ------------------------------- Responsive -------------------------------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-grid { grid-template-columns: 1fr; gap: 36px; margin-top: 36px; }
  /* Vier Preiskarten nebeneinander werden hier zu schmal für die
     Leistungslisten — auf zwei Spalten umbrechen, Reihenfolge bleibt
     aufsteigend nach Preis. */
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; margin: 0 auto; }
  .vendor-grid,
  .reseller-grid { grid-template-columns: 1fr; }
}

/* Sechs Nav-Punkte plus Sprachumschalter passen unterhalb von ~900px nicht
   mehr neben das Logo — dort auf das Burger-Menü umschalten.
   Bewusst auf #site-nav gemünzt: Impressum und Datenschutz haben nur den
   Zurück-Link und keinen Toggle-Button, ihre Navigation darf nie einklappen. */
/* „von Fribas Holding GmbH" ist deutlich länger als die frühere Zeile und
   drängt die Navigation auf mittleren Breiten zusammen — dort ausblenden.
   Der Herausgeber steht weiterhin im Footer und im Impressum. */
@media (max-width: 1080px) {
  .brand-by { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  #site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    box-shadow: var(--shadow);
  }

  #site-nav.open { display: flex; }

  #site-nav a { padding: 12px 4px; font-size: 1.05rem; }
  #site-nav .nav-cta { text-align: center; margin-top: 8px; }

  .feature-grid { grid-template-columns: 1fr; }
  .validation-grid { grid-template-columns: 1fr; }
  /* Einspaltig: die empfohlene Karte nach oben, sonst scrollt man an ihr
     vorbei. Bei zwei oder vier Spalten bleibt die Preisreihenfolge intakt. */
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; }
  .price-card-featured { order: -1; }
  .section { padding: 56px 0; }
  .hero { padding: 48px 0; }
}
