/* M&M Rheinbau — Basis-Stylesheet. Keine externen Fonts, keine externen Skripte. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf8f3;
  --bg-card: #ffffff;
  --bg-dark: #1a1a1a;
  --bg-tint: #f3f0e8;
  --text: #1a1a1a;
  --text-muted: #5f5e5a;
  --text-light: #6e6d66;
  --accent: #0f6e56;
  --accent-dark: #0b5442;
  --accent-light: rgba(15, 110, 86, 0.08);
  --accent-on-dark: #149474;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--accent); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px;
  font-family: var(--sans); font-size: 14px; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Kopf und Navigation ---------- */

.site-header {
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 90;
}

.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}

.logo { display: flex; align-items: center; text-decoration: none; }
.logo svg { height: 42px; width: auto; display: block; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-burger {
  display: none; margin-left: auto; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 14px; color: var(--text); user-select: none;
}

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 0.35rem; }

.nav a {
  display: block; font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--accent-light); }

body[data-nav="start"] .nav a[data-nav="start"],
body[data-nav="leistungen"] .nav a[data-nav="leistungen"],
body[data-nav="referenzen"] .nav a[data-nav="referenzen"],
body[data-nav="foerderung"] .nav a[data-nav="foerderung"],
body[data-nav="ablauf"] .nav a[data-nav="ablauf"],
body[data-nav="ueber-uns"] .nav a[data-nav="ueber-uns"],
body[data-nav="kontakt"] .nav a[data-nav="kontakt"] { color: var(--accent); background: var(--accent-light); }

.nav .cta a { background: var(--accent); color: #fff; padding: 9px 18px; }
.nav .cta a:hover { background: var(--accent-dark); color: #fff; }

.has-sub { position: relative; }

.subnav {
  position: absolute; top: 100%; left: 0; min-width: 290px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  padding: 0.5rem; display: none; flex-direction: column; gap: 1px;
}
.has-sub:hover > .subnav, .has-sub:focus-within > .subnav { display: flex; }
.subnav a { font-size: 13.5px; padding: 8px 12px; }
.subnav .sub-label {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-light);
  padding: 10px 12px 4px;
}

/* ---------- Abschnitte ---------- */

section { padding: 4.5rem 0; }
section.tight { padding: 3rem 0; }
.section-tint { background: var(--bg-tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-card { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark h2, .section-dark h3, .section-dark h4, .section-dark .micro { color: #fff; }
.section-dark p, .section-dark li { color: rgba(255, 255, 255, 0.68); }
.section-dark .eyebrow { color: rgba(255, 255, 255, 0.5); }

.eyebrow {
  font-family: var(--sans); font-size: 11.5px; color: var(--text-muted);
  letter-spacing: 0.28em; text-transform: uppercase;
  margin-bottom: 1.25rem; font-weight: 500;
}

h1 { font-size: clamp(34px, 5.2vw, 54px); font-weight: 400; line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 400; line-height: 1.18; letter-spacing: -0.02em; }
h3 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 500; letter-spacing: -0.01em; }
h4, h3.micro { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); font-weight: 400; }

.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-muted); line-height: 1.6; }
p { font-family: var(--sans); font-size: 15.5px; color: var(--text-muted); line-height: 1.7; }
p.serif { font-family: var(--serif); font-size: 17px; }
p + p { margin-top: 0.9rem; }
.section-head { margin-bottom: 2.75rem; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 + p { margin-top: 1rem; }

.divider { width: 44px; height: 1px; background: var(--accent); margin: 2rem 0; }
.divider.center { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 4rem;
  background-image:
    radial-gradient(ellipse 900px 640px at 82% 0%, rgba(15, 110, 86, 0.09), transparent 70%),
    radial-gradient(ellipse 760px 560px at 0% 70%, rgba(15, 110, 86, 0.05), transparent 70%);
}
.hero h1 { margin-bottom: 1.5rem; }
.hero .lead { max-width: 640px; }
.hero-inner { max-width: 800px; }
.hero.center .hero-inner { margin: 0 auto; text-align: center; }
.hero.center .lead { margin-left: auto; margin-right: auto; }
.hero.center .btn-row, .hero.center .chips { justify-content: center; }

.page-hero { padding: 3.25rem 0 2.5rem; }
.page-hero h1 { margin-bottom: 1.1rem; }
.page-hero .lead { max-width: 700px; }

.breadcrumb { font-family: var(--sans); font-size: 12.5px; color: var(--text-light); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.4rem; }

/* ---------- Buttons und Chips ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500;
  text-decoration: none; padding: 12px 22px; border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--text); background: var(--bg-card); }
.section-dark .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.section-dark .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px;
}
.chip.solid { background: var(--accent-light); border-color: transparent; color: var(--accent); }

.badge {
  display: inline-block; font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-light);
  padding: 5px 11px; border-radius: 13px; margin-bottom: 1rem;
}
.badge.neutral { color: var(--text-muted); background: var(--bg-tint); }

/* ---------- Karten und Raster ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.6rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card h3.micro { margin-bottom: 0.4rem; }
.card h3 + p { margin-top: 0; }
.card .num {
  font-family: var(--serif); font-style: italic; font-size: 26px;
  color: var(--accent); margin-bottom: 0.5rem;
}
a.card { display: block; text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s; }
a.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
a.card .more {
  display: inline-block; margin-top: 1rem;
  font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--accent);
}

.section-dark .card { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); }
.section-dark .card .num,
.section-dark .stat .value,
.section-dark h1 em, .section-dark h2 em, .section-dark h3 em { color: var(--accent-on-dark); }
.section-dark ul.checks li::before { background: var(--accent-on-dark); }
.section-dark .divider { background: var(--accent-on-dark); }
.section-dark a.card:hover { border-color: rgba(255, 255, 255, 0.25); }

/* ---------- Listen ---------- */

ul.checks, ul.plain { list-style: none; }
ul.checks li, ul.plain li {
  font-family: var(--sans); font-size: 15px; color: var(--text-muted);
  line-height: 1.6; padding: 0.42rem 0 0.42rem 1.6rem; position: relative;
}
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
ul.plain li::before { content: "\2014"; position: absolute; left: 0; top: 0.42rem; color: var(--accent); }
ul.checks li strong, ul.plain li strong { color: var(--text); font-weight: 600; }
.section-dark ul.checks li strong { color: #fff; }

/* ---------- Tabellen (Leistungsstufen, Vergleich) ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%; border-collapse: collapse; min-width: 660px;
  font-family: var(--sans); font-size: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); font-weight: 600; background: var(--bg-tint);
}
tbody th { font-weight: 600; color: var(--text); width: 22%; }
td { color: var(--text-muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
td strong, th strong { color: var(--text); }
.col-highlight { background: var(--accent-light); }
table caption {
  caption-side: bottom; text-align: left; padding-top: 0.9rem;
  font-family: var(--sans); font-size: 12.5px; color: var(--text-light);
}

/* ---------- Callout ---------- */

.callout {
  border-left: 3px solid var(--accent); background: var(--accent-light);
  border-radius: 0 10px 10px 0; padding: 1.25rem 1.4rem; margin: 1.75rem 0;
}
.callout h4, .callout .micro { margin-bottom: 0.4rem; color: var(--text); }
.callout p { font-size: 14.5px; }
.callout.muted { border-left-color: var(--border-strong); background: var(--bg-tint); }

/* ---------- Prozess-Schritte ---------- */

.steps { list-style: none; counter-reset: step; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 2rem 3.5rem; border-left: 1px solid var(--border); margin-left: 1rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: -1rem; top: -0.2rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: 0.5rem; }

/* ---------- Kennzahlen ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
}
.stat .value {
  font-family: var(--serif); font-size: 30px; font-weight: 400;
  color: var(--accent); letter-spacing: -0.02em; line-height: 1.1;
}
.stat .label {
  font-family: var(--sans); font-size: 12.5px; color: var(--text-muted);
  margin-top: 0.4rem; line-height: 1.45;
}
.section-dark .stat { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); }
.section-dark .stat .label { color: rgba(255, 255, 255, 0.62); }

/* Noch nicht final belegte Angaben — vor Veroeffentlichung ersetzen. */
.tbd { color: var(--text-light); font-style: italic; }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem 1.35rem; margin-bottom: 12px;
}
.faq summary {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--text); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { margin-bottom: 0.75rem; }

/* ---------- CTA-Band ---------- */

.cta-band { text-align: center; }
.cta-band .inner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 3rem 2.5rem; max-width: 680px; margin: 0 auto;
}
.cta-band h2 { margin-bottom: 1rem; }
.cta-band .btn-row { justify-content: center; }
.mail-link {
  font-family: var(--serif); font-size: clamp(18px, 2.6vw, 23px);
  font-style: italic; color: var(--text); text-decoration: none;
  border-bottom: 1.5px solid var(--accent); padding-bottom: 3px;
}
.mail-link:hover { color: var(--accent); }

/* ---------- Fuss ---------- */

.site-footer { background: var(--bg-dark); color: rgba(255, 255, 255, 0.6); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; }
.site-footer .footer-heading {
  font-family: var(--sans);
  color: #fff; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 1rem; font-weight: 600; line-height: 1.4;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer li a { display: inline-block; padding: 3px 0; }
.site-footer a, .site-footer p {
  font-family: var(--sans); font-size: 13.5px; color: rgba(255, 255, 255, 0.6);
  text-decoration: none; line-height: 1.6;
}
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
.footer-bottom span, .footer-bottom a { font-family: var(--sans); font-size: 12.5px; color: rgba(255, 255, 255, 0.58); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Rechtstexte ---------- */

.legal h2 { font-size: 22px; margin: 2.25rem 0 0.85rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; margin: 1.4rem 0 0.4rem; }
.legal p, .legal li { font-size: 14.5px; }
.legal ul { margin: 0.5rem 0 0.5rem 1.25rem; }
.legal li { font-family: var(--sans); color: var(--text-muted); margin-bottom: 0.3rem; }

/* Nur fuer Screenreader: haelt die Ueberschriften-Hierarchie lueckenlos */
.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;
}

/* ---------- Vertrauensleiste (Startseite) ---------- */

.proof-strip {
  list-style: none; display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.proof-strip li { display: flex; flex-direction: column; gap: 0.3rem; }
.proof-key {
  font-family: var(--serif); font-size: 21px; font-style: italic;
  color: var(--accent); line-height: 1.1;
}
.proof-val {
  font-family: var(--sans); font-size: 13.5px; color: var(--text-muted); line-height: 1.5;
}

/* ---------- Fokus: sichtbare Indikatoren fuer Tastaturbedienung ---------- */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent-on-dark); }
.btn-primary:focus-visible, .nav .cta a:focus-visible { outline-color: var(--text); }

/* Der Umschalter ist optisch versteckt - der Fokus muss am Label sichtbar werden. */
.nav-toggle:focus-visible + .nav-burger {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Sprungziel unter dem klebenden Kopf freistellen */
#main { scroll-margin-top: 84px; }
#main:focus { outline: none; }

/* Breite Tabellen sind mit der Tastatur scrollbar und brauchen daher Fokus */
.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  a.card:hover { transform: none; }
}

/* ---------- Mobil ---------- */

@media (max-width: 900px) {
  .nav-burger { display: block; }
  .nav { display: none; width: 100%; margin-left: 0; order: 3; }
  .nav-toggle:checked ~ .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-top: 0.75rem; }
  .nav a {
    padding: 11px 4px; border-bottom: 1px solid var(--border); border-radius: 0;
    min-height: 44px; display: flex; align-items: center;
  }
  .nav-burger { min-height: 44px; display: flex; align-items: center; }
  .nav .cta a { border-radius: 10px; text-align: center; margin-top: 0.75rem; border-bottom: none; }
  .subnav {
    position: static; display: flex; border: none; box-shadow: none;
    background: transparent; padding: 0 0 0 1rem; min-width: 0;
  }
  .subnav a { font-size: 13.5px; color: var(--text-light); }
}

@media (max-width: 640px) {
  section { padding: 3.25rem 0; }
  .hero { padding: 3rem 0; }
  .card { padding: 1.5rem 1.3rem; }
  .cta-band .inner { padding: 2.25rem 1.6rem; }
  .steps > li { padding-left: 2.75rem; }
}

@media print {
  .site-header, .site-footer, .btn-row { display: none; }
  body { background: #fff; }
}
