/* ============================================================
   Ingenieurbüro Dieter Freerichs – Energieberatung Ostelsheim
   Stylesheet · Stand 2026
   Schrift: Cambria (lokal) mit Caladea/Georgia als Rückfallebene.
   Hinweis: Wer Caladea selbst hosten möchte, legt die Dateien
   unter assets/fonts/ ab und aktiviert den @font-face-Block.
   ============================================================ */

/*
@font-face {
  font-family: "Caladea";
  src: url("../fonts/caladea-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Caladea";
  src: url("../fonts/caladea-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
*/

:root {
  --paper: #FAF6EE;
  --paper-2: #F3ECDD;
  --card: #FFFFFF;
  --ink: #2B2620;
  --ink-soft: #5A5343;
  --line: #E4DBC6;
  --line-strong: #CFC3A6;
  --brand: #E88C1E;
  --brand-strong: #D0790A;
  --brand-deep: #8F5106;
  --brand-soft: #F8E8CC;
  --on-brand: #2E1B02;
  --dark: #221E18;
  --dark-text: #F0E8D6;
  --serif: Cambria, Caladea, Georgia, "Times New Roman", serif;
  --radius: 8px;
  --shadow: 0 10px 30px -18px rgba(58, 46, 22, 0.35);
  --maxw: 1300px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.28rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 780px; }

::selection { background: var(--brand-soft); }

:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dark); color: #fff; padding: 10px 18px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Kopfbereich ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(30, 27, 22, 0.97);
  border-bottom: 1px solid rgba(240, 232, 214, 0.16);
  backdrop-filter: blur(4px);
}

.header-inner {
  display: flex; align-items: center; gap: 22px;
  min-height: 78px;
}

.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: #FFFFFF;
  margin-right: auto;
}
.brand img { width: 52px; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.06rem; letter-spacing: 0.01em; }
.brand-text small { font-size: 0.82rem; color: #C7BEA9; letter-spacing: 0.06em; }

.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.main-nav a {
  display: block; padding: 10px 14px;
  color: #EFE7D3; text-decoration: none;
  font-size: 1rem; border-radius: 6px;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.09); color: #FFFFFF; }
.main-nav a[aria-current="page"] {
  color: #F2AC4B;
  box-shadow: inset 0 -2px 0 var(--brand);
  border-radius: 6px 6px 0 0;
}

.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle {
  border: 0; background: none; font: inherit; color: #C7BEA9;
  cursor: pointer; padding: 10px 6px 10px 0; margin-left: -8px; line-height: 1;
}
.sub-toggle::after {
  content: ""; display: inline-block; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 0.15s ease;
}
.has-sub.open .sub-toggle::after { transform: rotate(225deg) translateY(-2px); }

.sub {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px !important;
  display: none !important;
  flex-direction: column; gap: 0;
}
.has-sub.open .sub { display: flex !important; }
.sub::before { content: ""; position: absolute; left: -8px; right: -8px; top: -16px; height: 16px; }
.sub li { width: 100%; }
.sub a { padding: 10px 12px; border-radius: 6px; font-size: 0.98rem; color: var(--ink); }
.sub a:hover { background: var(--paper-2); color: var(--brand-deep); }
.sub li.divider { border-top: 1px solid var(--line); margin: 6px 4px; }
.sub .sub-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.sub .sub-all a { color: var(--brand-deep); font-weight: 700; }

.nav-toggle {
  display: none;
  border: 1.5px solid #EFE7D3; background: none; color: #EFE7D3;
  font: inherit; font-size: 0.95rem; border-radius: 6px;
  padding: 8px 14px; cursor: pointer; align-items: center; gap: 8px;
}
.nav-toggle .bars {
  display: inline-block; width: 16px; height: 2px; background: currentColor;
  position: relative;
}
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after { top: 5px; }

.header-cta { flex: none; }

/* ---------- Schaltflächen ---------- */

.btn {
  display: inline-block;
  background: #F09E2F;
  color: #231404;
  border: 1px solid #C27208;
  border-radius: var(--radius);
  padding: 13px 26px;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #DD830C; color: #231404; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }

.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: #fff; color: var(--ink); }

.btn-small { padding: 9px 18px; font-size: 0.95rem; }

/* ---------- Abschnitte ---------- */

.section { padding-block: clamp(56px, 8vw, 92px); }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-dark { background: var(--dark); color: var(--dark-text); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #F2AC4B; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-deep);
  margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--brand); }
.section-dark .eyebrow { color: #F2AC4B; }
.section-dark .eyebrow::before { background: #F2AC4B; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-dark .section-head p { color: var(--dark-text); }

/* ---------- Startseite: Bühne ---------- */

.hero { padding-block: clamp(40px, 6vw, 72px) clamp(18px, 3vw, 34px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero .lead { font-size: clamp(1.12rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 22px; font-size: 0.98rem; color: var(--ink-soft); }
.hero-note strong { color: var(--ink); }
.hero-art { min-width: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* ---------- Logoleiste ---------- */

.trust { padding-block: 4px 46px; }
.trust-inner { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 30px); flex-wrap: wrap; }
.trust-label { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); flex: none; }
.trust-logos { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.trust-logos a {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.trust-logos a:hover { border-color: var(--brand); transform: translateY(-2px); }
.trust-logos img { max-height: 44px; width: auto; }

/* ---------- Karten ---------- */

.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px 28px;
  display: flex; flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.card { text-decoration: none; color: inherit; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 1rem; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--brand-deep); }
.card .more::after { content: " →"; }

.card-num {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em;
  color: var(--brand-deep); margin-bottom: 14px;
}

.icon-badge {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; flex: none;
}
.icon-badge svg { width: 28px; height: 28px; }

.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li { padding: 7px 0 7px 26px; position: relative; font-size: 1rem; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--brand-strong); border-bottom: 2.5px solid var(--brand-strong);
  transform: rotate(-45deg);
}
.card-list a { color: var(--ink); text-decoration: none; }
.card-list a:hover { color: var(--brand-deep); text-decoration: underline; }

/* ---------- Ablaufschritte ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 24px; position: relative; counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 1rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--brand-deep); margin-bottom: 12px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: 0.98rem; color: var(--ink-soft); margin: 0; }

/* ---------- Über-mich-Vorschau ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.portrait-frame { position: relative; max-width: 420px; }
.portrait-frame img {
  border-radius: 12px; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.portrait-frame::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 2px solid var(--brand); border-radius: 14px; z-index: -1;
}
.about-facts { list-style: none; padding: 0; margin: 20px 0 26px; }
.about-facts li { padding: 8px 0 8px 30px; position: relative; }
.about-facts li::before {
  content: ""; position: absolute; left: 2px; top: 16px;
  width: 13px; height: 8px;
  border-left: 3px solid var(--brand-strong); border-bottom: 3px solid var(--brand-strong);
  transform: rotate(-45deg);
}

/* ---------- Interaktive Hausgrafik ---------- */

.house-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.house-figure { margin: 0; min-width: 0; }
.house-figure svg { width: 100%; height: auto; display: block; }
.house-figure figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 10px; }

.hs { cursor: pointer; }
.hs circle.dot { transition: transform 0.15s ease; transform-origin: center; transform-box: fill-box; }
.hs:hover circle.dot, .hs:focus circle.dot, .hs.hl circle.dot { transform: scale(1.22); }
.hs:focus { outline: none; }
.hs:focus circle.dot { stroke: var(--ink); stroke-width: 3; }

.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.legend a {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.legend a:hover { border-color: var(--brand); transform: translateX(4px); }
.legend .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.legend .lbl strong { display: block; font-size: 1.02rem; }
.legend .lbl small { color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- Leistungsseiten ---------- */

.page-head { padding-block: clamp(40px, 6vw, 64px) clamp(28px, 4vw, 44px); }
.breadcrumb { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--brand-deep); }
.breadcrumb .sep { margin-inline: 8px; color: var(--line-strong); }
.page-head .lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 46em; }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 56px); align-items: start; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.check-list li { padding: 9px 0 9px 34px; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 17px;
  width: 14px; height: 8px;
  border-left: 3px solid var(--brand-strong); border-bottom: 3px solid var(--brand-strong);
  transform: rotate(-45deg);
}
.check-list strong { color: var(--ink); }

.info-box {
  background: var(--brand-soft);
  border: 1px solid #E9C98F;
  border-left: 5px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 22px 26px;
  margin: 1.6em 0;
}
.info-box h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--on-brand); }
.info-box p { font-size: 0.99rem; color: #4A3006; }
.info-box .stand { display: block; margin-top: 10px; font-size: 0.85rem; color: #7A5A20; }

.aside-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 28px; position: sticky; top: 104px;
}
.aside-card h3 { font-size: 1.15rem; }
.aside-card .tel {
  display: block; font-size: 1.35rem; font-weight: 700; color: var(--ink);
  text-decoration: none; margin: 10px 0 4px;
}
.aside-card .tel:hover { color: var(--brand-deep); }
.aside-card p { font-size: 0.96rem; color: var(--ink-soft); }
.aside-card .btn { width: 100%; text-align: center; margin-top: 16px; }

.related { border-top: 1px solid var(--line); margin-top: clamp(36px, 5vw, 56px); padding-top: 30px; }
.related h2 { font-size: 1.3rem; }
.related-links { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; list-style: none; }
.related-links a {
  display: inline-block; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 20px; text-decoration: none; color: var(--ink);
  font-size: 0.98rem;
}
.related-links a:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ---------- Bildplatzhalter für eigene Fotos ---------- */

.photo-slot {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 34px 26px;
  text-align: center;
  margin: 1.6em 0;
}

/* ---------- Kontakt ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 56px); align-items: start; }

.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 30px; }
.contact-card dl { margin: 0; }
.contact-card dt { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 18px; }
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 4px 0 0; font-size: 1.05rem; }
.contact-card dd a { color: var(--ink); text-decoration: none; font-weight: 700; }
.contact-card dd a:hover { color: var(--brand-deep); }

form.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.98rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--serif); font-size: 1.02rem; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--brand-soft); border-color: var(--brand-strong);
}
.field textarea { min-height: 160px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 22px; }
.consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand-strong); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; font-size: 1rem; display: none; }
.notice.show { display: block; }
.notice-ok { background: #E8F1DC; border: 1px solid #9CBB72; color: #2E4A10; }
.notice-err { background: #F9E3DE; border: 1px solid #D89684; color: #6E2312; }

/* ---------- Abschluss-Band ---------- */

.cta-band { text-align: left; }
.cta-band .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--dark-text); margin: 0; max-width: 36em; }
.cta-band .actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; flex: none; }
.cta-call { margin: 0; font-size: 0.95rem; color: var(--dark-text); }
.cta-call a {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 1.3rem;
  text-decoration: none; margin-top: 4px;
}
.cta-call a svg { width: 22px; height: 22px; color: #F2AC4B; flex: none; }
.cta-call a:hover { color: #F2AC4B; }

/* ---------- Fußbereich ---------- */

.site-footer { background: var(--dark); color: var(--dark-text); padding-top: clamp(44px, 6vw, 64px); }
.footer-grid { display: grid; grid-template-columns: 4fr 3fr 3fr; gap: clamp(28px, 5vw, 56px); padding-bottom: 44px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; letter-spacing: 0.04em; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 54px; height: 54px; }
.footer-brand strong { color: #fff; display: block; line-height: 1.3; }
.footer-brand small { color: var(--dark-text); font-size: 0.85rem; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--dark-text); text-decoration: none; }
.site-footer a:hover { color: #F2AC4B; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(240, 232, 214, 0.18);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.92rem;
}
.footer-legal { display: flex; gap: 20px; }

/* ---------- Rechtstexte ---------- */

.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.12rem; margin-top: 1.4em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal strong { color: var(--ink); }

/* ---------- Einblendung beim Scrollen ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsiv ---------- */

@media (max-width: 1020px) {
  .header-cta { display: none; }
}

@media (max-width: 960px) {
  .hero-grid, .about-grid, .house-wrap, .contact-grid, .split { grid-template-columns: 1fr; }
  .hero-art { max-width: 620px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-card { position: static; }
  .portrait-frame { max-width: 360px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: static; }
  .main-nav > ul {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 20px 20px;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .main-nav.open > ul { display: flex; }
  .main-nav a { padding: 12px 10px; font-size: 1.06rem; }
  .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); border-radius: 0 6px 6px 0; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub {
    position: static; display: none !important;
    min-width: 0; width: 100%;
    border: 0; border-left: 2px solid var(--line);
    border-radius: 0; box-shadow: none;
    margin: 0 0 8px 12px; padding: 0 0 0 8px !important;
  }
  .has-sub.open .sub { display: flex !important; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .legend a { padding: 14px 16px; }
  .cards-3, .cards-2, .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text strong { font-size: 0.95rem; }
  .brand-text small { font-size: 0.76rem; }
  .trust-logos img { max-height: 42px; }
  .portrait-frame::after { inset: 10px -10px -10px 10px; }
}


/* ---------- Ergänzungen (Feedback-Runde 1) ---------- */

/* Schaltflächen auf dunklem Grund: hellere Stufe für mehr Kontrast */
.section-dark .btn { background: #F6AB40; border-color: #F6AB40; color: #231404; }
.section-dark .btn:hover { background: #FFBE5F; color: #231404; }

/* Scroll-Hinweis unter der Bühne */
.scroll-cue {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 34px;
  color: var(--ink-soft); text-decoration: none;
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.scroll-cue .chev {
  width: 32px; height: 32px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  position: relative;
}
.scroll-cue .chev::after {
  content: ""; position: absolute; left: 50%; top: 44%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--brand-strong); border-bottom: 2px solid var(--brand-strong);
  transform: translate(-50%, -50%) rotate(45deg);
}
.scroll-cue:hover { color: var(--brand-deep); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue .chev { animation: cue-bounce 2.2s ease-in-out infinite; }
  @keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
}

/* Icons in der Grafik-Legende */
.legend .lg-icon { margin-left: auto; padding-left: 10px; color: var(--brand-deep); opacity: 0.75; flex: none; display: flex; }
.legend .lg-icon svg { width: 26px; height: 26px; }
.legend a:hover .lg-icon { opacity: 1; color: var(--brand-strong); }

/* Icon im Kopf der Leistungsseiten */
.page-icon { margin-bottom: 18px; }

/* Mobiles Menü unter dunklem Kopf: Links wieder dunkel auf weißem Grund */
@media (max-width: 860px) {
  .main-nav > ul a { color: var(--ink); }
  .main-nav > ul a:hover { background: var(--paper-2); color: var(--ink); }
  .main-nav > ul a[aria-current="page"] { color: var(--brand-deep); }
  .sub-toggle { color: var(--ink-soft); padding-right: 12px; }
}

/* Breite Bildschirme (ab 16:9-Desktops) */
@media (min-width: 1560px) {
  :root { --maxw: 1420px; }
  body { font-size: 1.125rem; }
}

/* Touch-Geräte: Schwebe-Effekte neutralisieren, Ziele großzügig */
@media (hover: none) {
  .card:hover, .legend a:hover, .trust-logos a:hover, .btn:hover { transform: none; }
  .main-nav a { padding-block: 13px; }
}


/* ---------- Ergänzungen (Feedback-Runde 2) ---------- */

/* Hinweis zum Leistungsumfang */
.scope-note { font-size: 0.98rem; color: var(--ink-soft); max-width: 46em; margin-top: 12px; }

/* Grundsatz-Panel auf der Startseite */
.principles {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 0 12px 12px 0;
  padding: clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.principles h2 { margin-bottom: 12px; }
.principles > div > p { color: var(--ink-soft); }
.principles .check-list { margin: 0; }
.principles .check-list li { padding-block: 8px; }
@media (max-width: 960px) { .principles { grid-template-columns: 1fr; } }


/* ---------- Ergänzungen (Feedback-Runde 3) ---------- */

/* Vierer-Raster für die Beratungsbausteine */
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards-4 { grid-template-columns: 1fr; } }

/* Förderrechner */
.fr-panel { margin-top: 26px; }
.fr-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.fr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.fr-grid .field label { font-size: 0.95rem; line-height: 1.45; }
.fr-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 0 12px 12px 0;
  padding: 20px 28px;
  margin-top: 18px;
}
.fr-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 1rem;
}
.fr-row:last-child { border-bottom: 0; }
.fr-row span:last-child { white-space: nowrap; font-weight: 700; }
.fr-total { border-top: 2px solid var(--line-strong); margin-top: 4px; }
.fr-total small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.fr-total strong { font-size: 1.55rem; color: var(--brand-deep); white-space: nowrap; }
.fr-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 16px; max-width: 62em; }
@media (max-width: 720px) {
  .fr-grid { grid-template-columns: 1fr; }
  .fr-form { padding: 20px; }
  .fr-row { flex-direction: column; gap: 2px; }
}
