/* bio.h-aero.com — gemeinsames Branding
   h-aero Navy #1a3550 · Akzentgrün (Energie/Bio) · responsiv, mobilfreundlich */

:root {
  --navy: #1a3550;
  --navy-dark: #122538;
  --navy-light: #2a4d6e;
  --green: #3fa66a;
  --green-dark: #2e8552;
  --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(--green-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(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.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(--green-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(--green-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: #e6f5ed; color: var(--green-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(--green);
  border-radius: var(--radius);
  padding: 22px;
}
.loop-step .step-num { color: var(--green-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(--green); }
.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(--green);
  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,
.btn-group.on-light .btn-secondary { color: var(--navy); border-color: var(--navy); } /* on-light: Knöpfe auf hellem Grund (ai_hinweise_25) */
.cta-final .btn-secondary:hover,
.btn-group.on-light .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 */
}

/* ---------- Forst: Im Einsatz · Messung · Schwerpunkt · EU-Hinweis (ai_hinweise_25) ---------- */
/* Fünferreihe: eine Zeile, gleiche Höhe; mobil waagerecht wischbar statt umbrechen */
.film { display: flex; gap: 8px; }
.film img { flex: 1 1 0; min-width: 0; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.film-wrap figcaption { margin-top: 10px; }
/* Raster: Desktop 3, Tablet 2, mobil 1 Spalte; einheitliches 4:3-Feld, Klick öffnet das ganze Bild */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.demo-shot { margin-bottom: 24px; }
.demo-note { color: var(--muted); font-size: 0.85rem; margin: 14px 0 0; }
/* Schwerpunkt-Kasten: hervorgehobene .card über volle Breite, nur bestehende Farben */
.card--focus { border-left: 4px solid var(--green); box-shadow: var(--shadow); margin-bottom: 20px; }
.card--focus p { color: var(--ink); }
/* EU-Förderhinweis, Vorlage HALO-FARM One-Pager (.eu); Blau #003399 = Pflichtfarbe des EU-Emblems */
.eu { display: flex; align-items: center; gap: 14px; margin-top: 32px; font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.eu svg { height: 40px; width: auto; flex: none; }
.eu .fb { flex: none; font-size: 0.9rem; line-height: 1.2; color: #003399; font-weight: 600; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .film { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .film img { flex: 0 0 78%; scroll-snap-align: start; }
  .gallery { grid-template-columns: 1fr; }
  .eu { flex-wrap: wrap; }
  .eu > div:last-child { flex-basis: 100%; } /* Text unter Flagge + „Finanziert von …“ */
}

/* HALO-FARM data chain (ai_hinweise_32, 26.10.2026) */
.hf-chain { list-style: none; padding: 0; margin: 28px 0 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; counter-reset: none; }
.hf-chain li a { display: block; height: 100%; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-decoration: none; position: relative; }
.hf-chain li a:hover { border-color: var(--green); box-shadow: var(--shadow); }
.hf-chain li:not(:last-child) a::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--green); font-weight: 700; background: var(--bg-soft); line-height: 1; }
.hf-chain b { display: block; font-size: 15px; color: var(--navy); }
.hf-chain span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.hf-station { margin-top: 44px; scroll-margin-top: 90px; }
.hf-station h3 { color: var(--navy); margin-bottom: 8px; }
.hf-station figure { margin: 0; }
.hf-station figure img, .hf-station figure video { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #111; display: block; }
.hf-station figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.hf-station .demo-shot { margin-top: 16px; }
.hf-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.hf-4col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.hf-4col img { aspect-ratio: 4 / 3; object-fit: cover; }
.hf-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.hf-real { background: #e3f4ea; color: var(--green-dark); }
.hf-plan { background: #fff3d6; color: #8a5a00; }
.funding-bmftr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 14px; color: var(--muted); }
.funding-bmftr .fb-logo { display: flex; flex-direction: column; gap: 4px; color: var(--ink); font-size: 13px; }
.funding-bmftr .fb-logo img { width: 190px; height: auto; }
@media (max-width: 900px) { .hf-chain { grid-template-columns: repeat(3, 1fr); } .hf-3col { grid-template-columns: 1fr; } .hf-4col { grid-template-columns: repeat(2, 1fr); } .hf-chain li:nth-child(3n) a::after { display: none; } }
@media (max-width: 560px) { .hf-chain { grid-template-columns: repeat(2, 1fr); } .hf-chain li a::after { display: none; } .hf-4col { grid-template-columns: 1fr; } }

/* HALO-FARM site map, station 1 (ai_hinweise_39, 26.10.2026) */
.hf-map { display: grid; grid-template-columns: 1fr 290px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.hf-map-canvas { min-height: 460px; background: #1b2530; }
.hf-map-panel { padding: 14px 16px; border-left: 1px solid var(--line); font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.hf-sites { display: grid; grid-template-columns: 1fr; gap: 4px; }
.hf-sites button, .hf-modes button, .hf-rot button, .hf-reset { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); border-radius: 8px; padding: 6px 10px; text-align: left; }
.hf-sites button b { display: inline-block; min-width: 54px; color: var(--navy); }
.hf-sites button span { color: var(--muted); font-size: 13px; }
.hf-sites button.on, .hf-modes button.on { border-color: var(--green); background: #e3f4ea; }
.hf-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hf-modes button { text-align: center; font-size: 13px; }
.hf-rot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.hf-rot button { text-align: center; padding: 5px 0; }
.hf-map-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
.hf-map-panel dt { color: var(--muted); }
.hf-map-panel dd { margin: 0; font-weight: 600; color: var(--ink); }
.hf-reset { text-align: center; font-size: 13px; }
.hf-map-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.hf-map .leaflet-tooltip { font-size: 11px; padding: 1px 5px; }
.hf-map-canvas { position: relative; }
.hf-map-ph { position: absolute; inset: 0; background: #e9eef2; }
.hf-map-ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.hf-map-ph-box { position: absolute; left: 14px; bottom: 14px; max-width: 300px; padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); text-align: center; }
.hf-map-ph-box p { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.hf-map-load { font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 8px; padding: 9px 16px; background: var(--green); color: #fff; }
.hf-map-load:hover { background: var(--green-dark); }
@media (max-width: 900px) { .hf-map { grid-template-columns: 1fr; } .hf-map-canvas { min-height: 340px; } .hf-map-panel { border-left: 0; border-top: 1px solid var(--line); } .hf-sites { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }

/* === 42: Technik & Sensoren · Produkte heute / im Pilot (28.10.2026) === */
.spec-wrap { overflow-x: auto; margin: 8px 0 10px; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.97rem; }
.spec-table th, .spec-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { background: var(--bg-soft); color: var(--navy); font-size: 1.02rem; }
.spec-table tbody th { font-weight: 600; color: var(--ink); width: 34%; }
.spec-table td { color: var(--muted); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-note { font-size: 0.9rem; color: var(--muted); max-width: 760px; margin: 0 0 32px; }
.spec-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.spec-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.92rem; color: var(--ink); }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.ab-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.ab-col--today { border-top: 4px solid var(--green); }
.ab-col--pilot { border-top: 4px solid #d9a21b; }
.ab-col h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.15rem; }
.ab-col .ab-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }
.ab-col ul { margin: 0; padding-left: 18px; }
.ab-col li { margin: 0 0 10px; color: var(--ink); }
.ab-col li span { color: var(--muted); }
.ab-col li span { display: block; font-size: 0.92rem; margin-top: 2px; }
@media (max-width: 760px) { .ab-grid { grid-template-columns: 1fr; } }
