/* kats.h-aero.com — Katastrophenschutz-Landingpage
   Basis: Bio-CSS (bio.h-aero.com), h-aero Navy #1a3550 · Akzent Amber statt Grün (ai_hinweise_02) */

:root {
  --navy: #1a3550;
  --navy-dark: #122538;
  --navy-light: #2a4d6e;
  --green: #3fa66a;
  --green-dark: #2e8552;          /* Bio-Erbe: bleibt definiert, wird in KatS NICHT verwendet */
  --accent: #d97a1a;              /* Amber — Flächen, Rahmen, Chips */
  --accent-dark: #a85a0c;         /* Amber dunkel — Text/Links auf Weiß + Buttonflächen (WCAG AA) */
  --accent-tint: #fdf1e3;         /* Amber sehr hell — Badge-Hintergrund */
  --ink: #1c2733;
  --muted: #5b6b7a;
  --line: #e2e8ee;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --radius: 12px;
  --maxw: 1100px;
  --shadow: 0 6px 24px rgba(26, 53, 80, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 38px; width: auto; }
.brand .brand-text { font-weight: 600; letter-spacing: 0.02em; font-size: 0.95rem; color: #cdd9e5; }
.site-nav a {
  color: #d7e2ec;
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.95rem;
}
.site-nav a:hover { color: #fff; }

/* ---------- Sprachumschalter DE|EN (ai_hinweise_20) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; font-size: 0.9rem; }
.lang-switch a { color: #d7e2ec; text-decoration: none; opacity: 0.6; padding: 2px 4px; }
.lang-switch a[aria-current="true"] { opacity: 1; font-weight: 700; color: #fff; }
.lang-switch a:hover { opacity: 1; color: #fff; }
.lang-switch span { color: #6b8299; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--navy-dark);
}
.hero-media { position: relative; }
.hero-media img { width: 100%; max-height: 620px; object-fit: cover; object-position: center 18%; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,37,56,0.30) 0%, rgba(18,37,56,0.78) 100%);
  display: flex;
  align-items: flex-end;
}
.hero-overlay .container { padding-top: 48px; padding-bottom: 48px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 12px; line-height: 1.15; }
.hero .subline { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 720px; color: #e6eef5; margin: 0 0 28px; }

/* Dach-Hero: identischer Bild-Crop wie die Detailseiten (gleiche Höhe + geerbtes object-position) */
.hero--dach .hero-media img { max-height: 620px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-dark); color: #fff; }
.btn-primary:hover { background: #8d4a09; }
.btn-secondary { background: transparent; color: #fff; border-color: #ffffff66; }
.btn-secondary:hover { border-color: #fff; }
.btn-group { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--bg-soft); }
section h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--navy);
  margin: 0 0 8px;
}
section .lead { color: var(--muted); max-width: 760px; margin: 0 0 32px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 10px;
}

/* ---------- Kacheln (Dach) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 180px;
}
.tile h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.2rem; }
.tile p { color: var(--muted); margin: 0 0 18px; flex: 1; }
.tile .tile-link { font-weight: 600; text-decoration: none; color: var(--accent-dark); }
.tile.is-soon { opacity: 0.72; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.badge-active { background: var(--accent-tint); color: var(--accent-dark); }
.badge-soon { background: #eef2f6; color: var(--muted); }

/* ---------- Loop (Detect→Diagnose→Seal→Re-inspect) ---------- */
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.loop-step {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
}
.loop-step .step-num { color: var(--accent-dark); font-weight: 700; font-size: 0.85rem; }
.loop-step h3 { margin: 6px 0 6px; color: var(--navy); font-size: 1.1rem; }
.loop-step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Key messages / cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Value / Hook ---------- */
.value-hook {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.value-hook .figure {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  display: block;
  margin: 8px 0;
}
.value-hook .figure span { color: var(--accent); }
.value-hook .note { color: #b9c7d6; font-size: 0.9rem; margin-top: 12px; }

/* ---------- Figure / illustrative visuals ---------- */
figure { margin: 0; }
figure img { border-radius: var(--radius); border: 1px solid var(--line); }
figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 8px; font-style: italic; }
.visual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* ---------- Process steps (Ablauf) ---------- */
.steps { counter-reset: step; display: grid; gap: 14px; max-width: 760px; }
.steps li {
  list-style: none;
  position: relative;
  padding: 16px 16px 16px 60px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  background: var(--accent-dark);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
}

/* ---------- Referenzen ---------- */
.refs { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--muted); }
.refs .ref-stat { font-weight: 700; color: var(--navy); }

/* ---------- Final CTA ---------- */
.cta-final {
  background: var(--bg-soft);
  text-align: center;
}
.cta-final .btn-secondary { color: var(--navy); border-color: var(--navy); }
.cta-final .btn-secondary:hover { background: var(--navy); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #aebfce;
  padding: 36px 0;
  font-size: 0.9rem;
}
.site-footer a { color: #cdd9e5; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; min-height: 0; padding-top: 12px; padding-bottom: 12px; gap: 8px; }
  .site-nav { width: 100%; text-align: center; } /* Nav mittig wie .brand darüber (ai_hinweise_19) */
  .site-nav a { margin: 0 11px; }
  .lang-switch { margin-left: 0; margin-top: 4px; } /* im Column-Header mittig unter der Nav (ai_hinweise_20) */
  section { padding: 48px 0; }
  .value-hook { padding: 28px 20px; }
  /* Mobil: Bild wird absoluter Hintergrund, der Overlay treibt die Höhe -> h1 kann nie mehr oben clippen (ai_hinweise_15) */
  .hero-media picture { display: contents; } /* picture erzeugt keine Box -> .hero-media img greift weiter (ai_hinweise_17) */
  .hero-media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; max-height: none;
    object-fit: cover; object-position: center 30%; /* 30% (war 28%): Ballon der Mobil-Zuschnitte auch auf breiteren Phones oben (ai_hinweise_17) */
  }
  .hero-overlay {
    position: relative;      /* überschreibt mobil das absolute aus der Basis -> Overlay treibt die Höhe */
    min-height: 360px;       /* wächst mit dem Text, falls die h1 länger umbricht */
    background: linear-gradient(180deg, rgba(18,37,56,0.25) 0%, rgba(18,37,56,0.82) 100%);
  }
}

/* Biodiversität-Hero: Plattform liegt mittig -> Fokus etwas tiefer für ausgewogene Komposition */
@media (min-width: 641px) {
  .hero--biodiv img { object-position: center 70%; }
}

/* Mobil-Hero-Politur (ai_hinweise_12): Text klebt nicht mehr am Rand, kleinere Headline */
@media (max-width: 640px) {
  .hero-overlay .container { padding-left: 22px; padding-right: 22px; padding-top: 30px; padding-bottom: 30px; }
  .hero h1 { font-size: 1.5rem; line-height: 1.25; }
  .hero .subline { font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }
  .btn { padding: 12px 20px; font-size: 0.95rem; }
}

/* h1 nach oben (5px unter Hero-Oberkante), Hüllen-Logo frei halten (ai_hinweise_18) — nur Dach/Moor/Biodiv */
@media (max-width: 640px) {
  .hero--htop .hero-overlay { align-items: stretch; }            /* Container füllt die Hero-Höhe */
  .hero--htop .hero-overlay .container { display: flex; flex-direction: column; padding-top: 5px; }
  .hero--htop h1 { margin-bottom: auto; }                         /* h1 oben, Subline+Buttons bleiben unten */
}

/* ================================================================
   KatS-Ergänzungen (ai_hinweise_02) — additiv, Bio-Regeln unverändert
   ================================================================ */

/* ---------- Hero: Radarkomposit ist bunt -> kräftigeres Overlay für weißen Text ---------- */
.hero--kats .hero-overlay {
  background: linear-gradient(180deg, rgba(18,37,56,0.45) 0%, rgba(18,37,56,0.88) 100%);
}
.hero--kats .hero-media img { object-position: center 50%; }

/* ---------- Kennzahl-Chips im Hero ---------- */
.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.kpis li {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--radius);
  padding: 10px 16px;
  min-width: 118px;
}
.kpis strong { display: block; color: #fff; font-size: 1.25rem; line-height: 1.2; }
.kpis span { color: #d9e4ee; font-size: 0.82rem; }

/* ---------- Zeitleiste: .steps mit Datum statt laufender Nummer ---------- */
.steps--dates { max-width: 820px; }
.steps--dates li { display: flex; gap: 16px; align-items: baseline; padding: 14px 18px; }
.steps--dates li::before { content: none; }             /* Counter-Kreis aus */
.steps--dates .step-num {
  flex: 0 0 auto;
  min-width: 66px;
  font-weight: 700;
  color: var(--accent-dark);
}
.steps--dates li.is-event { border-color: var(--accent); border-left: 4px solid var(--accent); }

/* ---------- Bild links, Karten rechts (Nahfeld-Abschnitt) ---------- */
.media-split { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; }
.media-split .cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Karte neben einer Figur: nicht auf Bildhöhe strecken */
.visual-grid > .card { align-self: start; }

/* ---------- Breite Einzelkarte (Ausblick) ---------- */
.card--wide { border-left: 4px solid var(--accent); }

@media (max-width: 860px) {
  .media-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpis li { min-width: 0; padding: 8px 12px; }
  .kpis strong { font-size: 1.05rem; }
  .kpis span { font-size: 0.74rem; }
  .steps--dates li { flex-direction: column; gap: 2px; padding: 12px 14px; }
}

/* ---------- Sprachumschalter: zehn Sprachen (ai_hinweise_23) ---------- */
/* Rein additiv - die Basisregeln oben (Zeilen 73-77) bleiben unveraendert.
   Zehn Eigennamen passen nicht mehr in eine Zeile neben die Navigation, deshalb
   umbrechender Block statt Aufklapper: alle Sprachen bleiben sichtbar und ohne
   Interaktion erreichbar (wichtig fuer Screenreader und fuer den Tofu-Test). */
.lang-switch {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1px 9px;
  max-width: 250px;
  font-size: 0.75rem;
  line-height: 1.45;
}
/* System-Schriften fuer Devanagari und CJK - keine Webfonts, keine externen Requests.
   Greift schon jetzt, damit ne/zh/ja/hi im Umschalter nicht als Tofu-Kaesten erscheinen. */
.lang-switch a {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial,
               "Noto Sans Devanagari", "Nirmala UI", Mangal,
               "Noto Sans CJK SC", "Microsoft YaHei", "Yu Gothic UI", "Yu Gothic",
               "Hiragino Sans", "Meiryo", sans-serif;
  white-space: nowrap;
}
@media (max-width: 860px) {
  /* Eigene Zeile unter der Navigation, mittig - passt zum Column-Header aus ai_hinweise_20 */
  .lang-switch { max-width: none; justify-content: center; gap: 2px 12px; }
}

/* ---------- Schriftsysteme (ai_hinweise_24) ---------- */
html[lang="ne"], html[lang="hi"] {
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari", "Segoe UI", system-ui, sans-serif;
  line-height: 1.75;                      /* Devanagari braucht Luft fuer Shirorekha + Matras */
}
html[lang="ne"] h1, html[lang="hi"] h1,
html[lang="ne"] h2, html[lang="hi"] h2 { line-height: 1.3; letter-spacing: 0; }
html[lang="zh"] { font-family: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif; line-height: 1.8; }
html[lang="ja"] { font-family: "Yu Gothic UI", "Yu Gothic", "Meiryo", "Hiragino Sans", "Noto Sans CJK JP", system-ui, sans-serif; line-height: 1.8; }
html[lang="zh"] body, html[lang="ja"] body { word-break: normal; overflow-wrap: anywhere; }
html[lang="zh"] em, html[lang="ja"] em { font-style: normal; font-weight: 600; }   /* kein Kursiv in CJK */
html[lang="zh"] h1, html[lang="ja"] h1 { letter-spacing: 0.02em; }

/* ---------- Umschalter als eigene Kopfzeile (ai_hinweise_24) ---------- */
.site-header .container { flex-wrap: wrap; row-gap: 0; }
.site-header .lang-switch { order: -1; flex-basis: 100%; max-width: none; justify-content: flex-end;
  font-size: 0.72rem; line-height: 1.3; padding: 4px 0 2px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 6px; }
@media (max-width: 860px) { .site-header .lang-switch { justify-content: center; } }
