/* ===== EinfachWarm – Stylesheet ===== */
:root {
  --navy: #12304D;
  --navy-2: #1C4269;
  --orange: #E8601C;
  --orange-2: #F28C28;
  --blue: #1E7BD8;
  --cream: #FFF8F0;
  --tint: #F3F7FB;
  --text: #1F2D3A;
  --muted: #5B6B7C;
  --line: #E1E8EF;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(18, 48, 77, .08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

.eyebrow {
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: .6em;
}
.accent {
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Kleine Zeile über dem Titel, gehört zur Hauptüberschrift (Suchwort für Google) */
h1 .eyebrow { display: block; line-height: 1.6; margin-bottom: .9rem; }

/* Firmenname in der Schreibweise des Logos */
.wordmark { font-weight: 600; }
.wordmark strong { font-weight: 800; color: var(--orange); }

/* Buttons */
.btn {
  display: inline-block; padding: .85em 1.5em; border-radius: 999px; border: 2px solid var(--orange);
  background: var(--orange); color: var(--white); font-weight: 700; text-decoration: none;
  font-size: 1rem; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232, 96, 28, .3); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); box-shadow: none; }
.btn-small { padding: .55em 1.1em; font-size: .92rem; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Header */
.site-header {
  /* z-index über dem Förderrechner (900), aber unter dessen Hinweisfenstern (ab 1020) */
  position: sticky; top: 0; z-index: 950;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 200px; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a:not(.btn) { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .98rem; }
.main-nav a:not(.btn):hover { color: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--navy); border-radius: 2px; transition: .2s; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 140, 40, .18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(30, 123, 216, .10), transparent 40%),
    var(--cream);
  padding: 72px 0 80px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .95rem; }
.hero-facts li::before { content: "✓"; color: var(--orange); font-weight: 800; margin-right: 6px; }
.hero-facts strong { color: var(--navy); }
.house-illu { width: 100%; max-width: 460px; margin-left: auto; overflow: visible; }
/* Wärme: Lichtschein im Haus und leichter Glanz am Umriss, 4 Sekunden pro Durchgang */
.house-illu .glow { animation: inner-glow 4s ease-in-out infinite; }
.house-illu .halo { animation: halo-glow 4s ease-in-out infinite; }
.house-illu .air path { opacity: .7; animation: blow 2.4s ease-out infinite; }
.house-illu .air path:nth-child(2) { animation-delay: .8s; }
.house-illu .air path:nth-child(3) { animation-delay: 1.6s; }
.house-illu .fan { transform-origin: 52px 265px; animation: spin 2.4s linear infinite; }
@keyframes inner-glow { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes halo-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 140, 30, 0)); } 50% { filter: drop-shadow(0 0 12px rgba(255, 140, 30, .65)); } }
@keyframes blow { 0% { transform: translateX(10px); opacity: 0; } 30% { opacity: .85; } 100% { transform: translateX(-16px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .house-illu * { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Vorteile */
.benefits { background: var(--navy); color: #DCE6F0; padding: 40px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.benefit-num { display: block; font-size: 1.45rem; font-weight: 800; color: var(--orange-2); margin-bottom: 4px; }
.benefit p { margin: 0; font-size: .96rem; }

/* Sections */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p:last-child { color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FFE9D6, #FFF4EA);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Ablauf */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; }
.steps li { position: relative; background: var(--white); border-radius: var(--radius); padding: 64px 22px 24px; box-shadow: var(--shadow); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 20px; left: 22px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  padding-bottom: 2px; /* gleicht aus, dass Ziffern optisch etwas zu tief sitzen */
  font-variant-numeric: tabular-nums; font-weight: 800; color: var(--white);
  background: var(--blue);
}
/* Kreise von kalt (blau) nach warm (rot-orange) */
.steps li:nth-child(1)::before { background: #1E7BD8; }
.steps li:nth-child(2)::before { background: #4A93D1; }
.steps li:nth-child(3)::before { background: #E0A020; }
.steps li:nth-child(4)::before { background: #F28C28; }
.steps li:nth-child(5)::before { background: #E8481C; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Marken */
.brand-card {
  border-radius: var(--radius); padding: 36px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--white), var(--cream));
}
.brand-card h3 { font-size: 1.7rem; margin-bottom: 0; }
.brand-sub { color: var(--orange); font-weight: 600; margin-bottom: 18px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0 8px 32px; position: relative; border-top: 1px solid var(--line); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.note { margin-top: 28px; color: var(--muted); font-style: italic; text-align: center; }

/* Eingebettete Rechner */
.widget-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-height: 120px; overflow-x: auto; }
@media (max-width: 600px) { .widget-box { padding: 12px; } }

/* FAQ */
.faq details { background: var(--white); border-radius: 12px; margin-bottom: 12px; border: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 700; color: var(--navy); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--orange); font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--muted); }

/* Kontakt */
.contact { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #DCE6F0; }
.contact h2 { color: var(--white); }
.contact-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; }
.contact-list li { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.contact-list span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-2); font-weight: 700; }
.contact-list a { color: var(--white); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white); color: var(--text); border-radius: 18px; padding: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; color: var(--navy); margin-bottom: 16px; }
.contact-form input:not([type=checkbox]), .contact-form select, .contact-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #FBFCFD;
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(232, 96, 28, .15); background: var(--white);
}
.contact-form .invalid { border-color: #C62828 !important; }
.contact-form label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.contact-form label.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--orange); flex-shrink: 0; }
.contact-form label.check.invalid span { color: #C62828; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: #2E7D32; }
.form-status.err { color: #C62828; }
.form-hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }

/* Footer */
.site-footer { background: #0B1F33; color: #A9B8C7; padding: 48px 0 24px; font-size: .95rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-inner img { width: 200px; margin-bottom: 10px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: #DCE6F0; text-decoration: none; }
.footer-nav a:hover { color: var(--orange-2); }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 32px; padding-top: 20px; font-size: .85rem; }

/* Unterseiten (Impressum, Datenschutz) */
.legal { padding: 64px 0 96px; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.placeholder { background: #FFF3CD; padding: 0 4px; border-radius: 4px; }

/* Responsive */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .main-nav .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero { padding: 48px 0 56px; }
  .hero-inner, .contact-inner, .grid-2 { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .house-illu { max-width: 320px; margin: 0 auto; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand img { width: 170px; }
  .grid-3, .grid-4, .steps, .form-row { grid-template-columns: 1fr; }
  .form-row { gap: 0; }
  .contact-form { padding: 24px 18px; }
  .brand-card { padding: 26px 22px; }
}

/* ===== Umschalter Hell / Dunkel ===== */
.header-inner { gap: 14px; }
.brand { margin-right: auto; }
.theme-toggle {
  order: 3; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--line); background: transparent; color: var(--navy);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--orange); color: var(--orange); transform: rotate(15deg); }
.theme-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
@media (max-width: 860px) { .theme-toggle { order: 0; } }

/* ===== Dunkles Design (Anthrazit) ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --anthrazit: #2F3437;        /* Seitenhintergrund */
  --anthrazit-hell: #3A4044;   /* Karten, Formular */
  --anthrazit-tief: #24282B;   /* abgesetzte Bereiche */
  --hell: #F1F3F4;
  --text: #DDE1E4;
  --muted: #A7AFB6;
  --line: #4B5257;
  --tint: #292D30;
  --cream: #33383C;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
[data-theme="dark"] body { background: var(--anthrazit); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: var(--hell); }
[data-theme="dark"] .site-header { background: rgba(47, 52, 55, .92); }
[data-theme="dark"] .main-nav a:not(.btn) { color: var(--text); }
[data-theme="dark"] .main-nav a:not(.btn):hover { color: var(--orange-2); }
[data-theme="dark"] .nav-toggle span { background: var(--hell); }
[data-theme="dark"] .theme-toggle { color: var(--hell); }
[data-theme="dark"] .theme-toggle:hover { color: var(--orange-2); border-color: var(--orange-2); }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .btn-ghost { color: var(--hell); border-color: var(--hell); }
[data-theme="dark"] .btn-ghost:hover { background: var(--hell); color: var(--anthrazit); }
[data-theme="dark"] .hero-facts strong { color: var(--hell); }
[data-theme="dark"] .benefits { background: var(--anthrazit-tief); }
[data-theme="dark"] .card,
[data-theme="dark"] .steps li,
[data-theme="dark"] .faq details,
[data-theme="dark"] .contact-form { background: var(--anthrazit-hell); color: var(--text); }
[data-theme="dark"] .card-icon { background: rgba(232, 96, 28, .18); }
[data-theme="dark"] .card-icon svg { stroke: var(--orange-2); }
[data-theme="dark"] .brand-card { background: linear-gradient(180deg, var(--anthrazit-hell), var(--cream)); }
[data-theme="dark"] .faq summary { color: var(--hell); }
[data-theme="dark"] .contact { background: linear-gradient(160deg, #1E2124 0%, var(--anthrazit-tief) 100%); }
[data-theme="dark"] .contact-form label { color: var(--hell); }
[data-theme="dark"] .contact-form label.check { color: var(--muted); }
[data-theme="dark"] .contact-form input:not([type=checkbox]),
[data-theme="dark"] .contact-form select,
[data-theme="dark"] .contact-form textarea { background: var(--anthrazit); color: var(--text); }
[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form select:focus,
[data-theme="dark"] .contact-form textarea:focus { background: var(--anthrazit-tief); }
[data-theme="dark"] .form-status.ok { color: #7FD992; }
[data-theme="dark"] .form-status.err,
[data-theme="dark"] .contact-form label.check.invalid span { color: #FF8F85; }
[data-theme="dark"] .site-footer { background: #1B1E20; }
[data-theme="dark"] .placeholder { color: #1F2D3A; }
/* Die eingebetteten Heizreport-Rechner bringen eigene helle Farben mit – ihr Kasten bleibt daher hell */
[data-theme="dark"] .widget-box { background: #FFFFFF; color: #1F2D3A; color-scheme: light; }
/* Zeichnung im Kopfbereich */
[data-theme="dark"] .house-illu [fill="none"][stroke="#12304D"] { stroke: var(--hell); }
[data-theme="dark"] .house-illu rect[fill="#E6EEF5"] { fill: #454C51; }
@media (max-width: 860px) {
  [data-theme="dark"] .main-nav { background: var(--anthrazit); }
}

/* ===== Umschalter Sie / Du ===== */
.anrede-toggle {
  order: 2; flex-shrink: 0; display: inline-flex; padding: 3px; height: 42px; align-items: stretch;
  border: 1.5px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--muted);
}
.anrede-toggle span { display: grid; place-items: center; padding: 0 11px; border-radius: 999px; transition: background .15s, color .15s; }
.anrede-toggle:hover { border-color: var(--orange); }
.anrede-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
:root:not([data-anrede="du"]) .anrede-toggle .a-sie,
:root[data-anrede="du"] .anrede-toggle .a-du { background: var(--orange); color: #fff; }
@media (max-width: 860px) { .anrede-toggle { order: 0; } }
@media (max-width: 600px) {
  .header-inner { gap: 8px; }
  .brand img { width: 138px; }
  .anrede-toggle { height: 38px; font-size: .78rem; }
  .anrede-toggle span { padding: 0 8px; }
  .theme-toggle { width: 38px; height: 38px; }
}

/* ===== Heizreport-Rechner: umgewandelte Überschriften (siehe main.js) =====
   Sieht aus wie vorher als <h1>. Die Rechner stehen auch im dunklen Design auf
   weißem Grund, deshalb hier immer Dunkelblau (vorher wurde die Fördersumme im
   dunklen Design hellgrau auf Weiß und war kaum zu sehen). */
.widget-box .ew-h1 {
  display: block; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em; color: #12304D; margin: 0 0 .5em;
}
.foerderRechnerContainer .foerderRechner-resultCol .ew-h1 {
  font-size: 3.5rem; margin: 0 0 .25em; white-space: nowrap;
}
.foerderRechnerContainer .ew-h1 svg {
  width: 1.1em; height: 1.1em; vertical-align: -.25em; fill: #3371b7; overflow: hidden;
}
