/* ============================================================
   AerIQ Kommunen (kommunen.aeriq.de) – helles Behörden-Theme
   Eigenständiges Stylesheet. Markenfarbe Orange nur als Akzent.
   ============================================================ */

:root {
  /* Marke */
  --primary:        #a84d0e;   /* Orange, WCAG-AA auf Weiß (5,6:1) */
  --primary-dark:   #8f3f0a;
  --primary-light:  #c2410c;
  --primary-tint:   #fdf3ec;   /* sehr helles Orange für Flächen */
  --primary-border: #f0d8c6;

  /* Neutrale Töne – hell & klar */
  --ink:      #1f2937;   /* Überschriften */
  --body:     #374151;   /* Fließtext */
  --muted:    #6b7280;   /* Sekundärtext */
  --line:     #e5e7eb;   /* Trennlinien/Rahmen */
  --line-2:   #eef1f4;
  --bg:       #ffffff;
  --bg-soft:  #f8fafc;   /* Abschnittswechsel */
  --bg-panel: #f4f6f8;
  --radius:  10px;
  --radius-lg: 16px;
  --shadow:  0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 6px 20px rgba(16,24,40,.08);
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1,h2,h3,h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; }
strong { color: var(--ink); }
ul, ol { margin: 0 0 1rem 1.2rem; }
li { margin-bottom: .4rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--primary-tint); }
.narrow { max-width: 820px; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.lead { font-size: 1.15rem; color: var(--body); }
.text-muted { color: var(--muted); }

/* Skip-Link (Barrierefreiheit) */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color:#fff;
  padding: .6rem 1rem; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Kopfzeile / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 44px; width: auto; }
.brand-badge {
  font-size: .72rem; font-weight: 700; color: var(--primary);
  border: 1px solid var(--primary-border); background: var(--primary-tint);
  padding: .15rem .5rem; border-radius: 999px; letter-spacing: .03em;
  white-space: nowrap;
}
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; }
.nav-menu a {
  color: var(--body); font-weight: 500; font-size: .97rem; padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] {
  color: var(--primary); border-bottom-color: var(--primary); text-decoration: none;
}
/* CTA-Button in der Navigation: weißer Text auf Orange (überschreibt .nav-menu a) */
.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover {
  color: #fff; border-bottom: 0; text-decoration: none;
}
.nav-menu a.btn-primary[aria-current="page"] { color: #fff; border-bottom: 0; }
.nav-cta { }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display:block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; text-decoration: none; box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-tint); color: var(--primary-dark); text-decoration:none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration:none; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 4rem 0 3.5rem; max-width: 820px; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { font-size: 1.25rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-note { margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Karten-Raster ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-border); }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary); font-size: 1.35rem; margin-bottom: 1rem;
  border: 1px solid var(--primary-border);
}
.card--link { display: flex; flex-direction: column; }
.card--link .card-more { margin-top: auto; padding-top: .8rem; font-weight: 600; color: var(--primary); }

/* Ressort-/Nutzen-Liste mit Häkchen */
.checklist { list-style: none; margin-left: 0; }
.checklist li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 12px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* ---------- Problem/Lösung-Block ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: stretch; }
.panel { border-radius: var(--radius-lg); padding: 1.6rem; border: 1px solid var(--line); background:#fff; }
.panel--problem { background: var(--bg-panel); }
.panel--solution { background: var(--primary-tint); border-color: var(--primary-border); }
.panel h3 { font-size: 1.1rem; }
.panel-tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.panel--solution .panel-tag { color: var(--primary); }

/* ---------- Tabelle (Leistungsmatrix) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.matrix { width: 100%; border-collapse: collapse; min-width: 640px; background:#fff; }
table.matrix th, table.matrix td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
table.matrix thead th { background: var(--bg-soft); color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
table.matrix tbody tr:last-child td { border-bottom: 0; }
table.matrix tbody tr:hover { background: var(--bg-soft); }
table.matrix td strong { color: var(--ink); }

/* ---------- Statistik/Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.2rem; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat .lbl { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

/* ---------- Ablaufschritte ---------- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; }
.step-num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color:#fff; font-weight: 700; display:flex; align-items:center; justify-content:center;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.1rem; margin-bottom: .3rem; }

/* ---------- Platzhalter-Bild-Rahmen ---------- */
.figure { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); }
.figure img { width: 100%; }
.figure figcaption { padding: .7rem 1rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.ph-badge { font-size:.72rem; color: var(--muted); }

/* ---------- CTA-Band (hell, mit Orange-Akzent) ---------- */
.cta-band {
  background: var(--primary-tint); border: 1px solid var(--primary-border);
  border-top: 3px solid var(--primary);
  color: var(--body); border-radius: var(--radius-lg); padding: 2.4rem; text-align: center;
}
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--body); max-width: 640px; margin: .6rem auto 1.5rem; }

/* ---------- Formular ---------- */
.form-card { background:#fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.1rem; }
.form-label { display:block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .95rem; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background:#fff; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168,77,14,.12);
}
.form-textarea { min-height: 150px; resize: vertical; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }
.alert-success { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.alert-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }

/* Kontakt-Infoblock */
.info-row { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.2rem; }
.info-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; background: var(--primary-tint); color: var(--primary); display:flex; align-items:center; justify-content:center; border:1px solid var(--primary-border); }
.info-row h4 { margin-bottom: .15rem; }
.info-row p { margin: 0; color: var(--muted); }

/* ---------- Fußzeile (hell, klar) ---------- */
.site-footer {
  background: var(--bg-soft); color: var(--body);
  border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: var(--ink); font-size: 1rem; margin-bottom: .9rem; }
.site-footer a { color: var(--body); }
.site-footer a:hover { color: var(--primary); }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand img { height: 40px; margin-bottom: .9rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: var(--muted); display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; justify-content: space-between; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Utilities ---------- */
.mt-0{margin-top:0}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.text-center{text-align:center}
.reg { font-size: .6em; vertical-align: super; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 72px; right: -100%; width: min(80%, 320px); height: calc(100vh - 72px);
    background: #fff; border-left: 1px solid var(--line); flex-direction: column; align-items: flex-start;
    gap: .3rem; padding: 1.4rem; transition: right .28s ease; box-shadow: -8px 0 24px rgba(0,0,0,.06);
  }
  .nav-menu.open { right: 0; }
  .nav-menu a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
  .nav-menu .nav-cta { margin-top: .6rem; }
  .grid-2, .grid-3, .grid-4, .split, .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .cta-band { padding: 1.8rem; }
}
