:root {
  /* CI-Farben aus dem Logo: Anthrazit #2e2e2e, Gold #eaad35 */
  --dark: #232323;
  --anth: #2e2e2e;
  --anth-2: #3d3d3d;
  --gold: #eaad35;
  --gold-dark: #82590d; /* Gold für Text/Icons auf hellem Grund (mind. 4.5:1 auch auf --soft) */
  --soft: #efece5;
  --paper: #f7f6f3;
  --ink: #222222;
  --muted: #5e5e5e;
  --line: #dcd9d2;
  --field: #858279; /* Rahmen von Eingabefeldern: mind. 3:1 auf Weiß (WCAG 1.4.11) */
  --r: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 0; }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
:is(.header, .hero, .calc, .footer) :focus-visible { outline-color: var(--gold); }
/* Barrierefreiheit: Sprunglink und nur für Screenreader sichtbarer Text */
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 20px; border-radius: 10px; background: var(--gold); color: var(--dark); font-weight: 700; text-decoration: none; }
.skip:focus { top: 16px; }
.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; }
main:focus { outline: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.icon { width: 1.2em; height: 1.2em; flex: none; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); }
.lead { font-size: 18px; color: var(--muted); max-width: 600px; margin-top: 16px; }
section { padding: clamp(72px, 10vw, 128px) 0; }
.alt { background: var(--soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 24px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; background: var(--anth); color: #fff; }
.btn:hover { background: var(--anth-2); }
.btn-sun { background: var(--gold); color: var(--dark); }
.btn-sun:hover { background: #f3c25f; }
.btn-ghost { background: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: var(--anth); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: 80px; }
.brand { flex: none; }
.brand img { height: 40px; width: auto; }
.menu { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.menu a { text-decoration: none; }
.menu .btn { padding: 10px 18px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.menu-btn .icon { width: 28px; height: 28px; }

/* Hero */
/* Hintergrundbild über die ganze Fläche, links abgedunkelt für die Lesbarkeit */
.hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(22,22,22,.95) 0%, rgba(22,22,22,.86) 36%, rgba(22,22,22,.35) 64%, rgba(22,22,22,.08) 100%),
    url(../img/hero-haus.jpg) 70% 22% / cover no-repeat,
    var(--dark);
}
.hero .wrap { display: flex; align-items: center; min-height: max(560px, calc(100vh - 80px)); min-height: max(560px, calc(100svh - 80px)); padding-top: 64px; padding-bottom: 96px; }
.hero .wrap > div { max-width: 640px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 18px 0 20px; }
.hero h1 span { color: var(--gold); }
.hero .lead { color: rgba(255,255,255,.78); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 36px 0 0; padding: 0; list-style: none; font-size: 15px; opacity: .85; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks .icon { color: var(--gold); }

/* Warum SE Systems – Fotos sind nur ~400 px breit, daher nie breiter darstellen */
.why { background: #fff; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.photo-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.photo-card img { width: 100%; max-width: 400px; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.photo-card div { padding: 28px 30px 32px; }
.photo-card p { color: var(--muted); margin-top: 10px; }

/* Grids & cards */
/* Überschrift und Intro stehen nebeneinander, sobald Platz ist, sonst untereinander */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 64px; margin-bottom: 56px; }
.head > div { flex: 1 1 520px; }
.head .lead { flex: 0 1 400px; margin: 0; }
.grid { display: grid; gap: 32px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 36px; }
.card > .icon { width: 56px; height: 56px; padding: 13px; border-radius: 12px; background: var(--soft); color: var(--anth-2); margin-bottom: 20px; }
.card p { color: var(--muted); margin-top: 12px; }
.card ul { margin: 20px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.8; }
.card li::marker { color: var(--gold-dark); }
.plain { background: none; border: 0; border-top: 3px solid var(--anth); border-radius: 0; padding: 28px 0 0; }
.plain > .icon { background: none; padding: 0; width: 36px; height: 36px; color: var(--gold-dark); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 40px; font-weight: 800; color: var(--gold-dark); margin-bottom: 14px; }
.steps { counter-reset: step; }

/* Calculator */
.calc { background: var(--dark); color: #fff; }
.calc .eyebrow { color: var(--gold); }
.calc .lead { color: rgba(255,255,255,.7); }
.calc-box { display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden; background: var(--anth); }
.calc-box > * { padding: clamp(28px, 4vw, 52px); display: grid; gap: 28px; align-content: start; }
.calc-box label { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.calc output { color: var(--gold); }
.calc input[type=range] { width: 100%; accent-color: var(--gold); }
.calc input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold); }
.results { background: var(--anth-2); }
.results strong { display: block; font-size: clamp(38px, 5vw, 52px); color: var(--gold); line-height: 1.1; }
.results dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.results dl div { background: rgba(0,0,0,.16); border-radius: 10px; padding: 14px; }
.results dt { font-size: 13px; opacity: .7; }
.results dd { margin: 0; font-size: 21px; font-weight: 700; }
.note { font-size: 13px; opacity: .6; line-height: 1.5; }

/* FAQ */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(48px, 7vw, 104px); align-items: start; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 22px 0; font-weight: 650; font-size: 18px; }
details p { padding-bottom: 22px; color: var(--muted); }

/* Contact */
.contact { background: #fff; }
.lines { display: grid; gap: 14px; margin-top: 40px; }
.lines > * { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.lines a:hover { background: var(--soft); }
.lines .icon { color: var(--gold-dark); }
.lines small { display: block; color: var(--muted); font-size: 13px; }
.form { display: grid; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 44px); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label { display: block; font-size: 14px; font-weight: 600; }
.form input:not([type=checkbox]), .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); }
.form ::placeholder { color: #6b6b6b; opacity: 1; }
.form [aria-invalid=true] { border-color: #b3261e; box-shadow: inset 0 0 0 1px #b3261e; }
.required-note { font-size: 13px; color: var(--muted); }
.form textarea { min-height: 110px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.chips legend { padding: 0; margin-bottom: 8px; font-size: 14px; }
.chips label { font-weight: 500; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; padding: 8px 16px; border: 1px solid var(--field); border-radius: 999px; background: #fff; cursor: pointer; }
.chips input:checked + span { background: var(--anth); border-color: var(--anth); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--gold-dark); }
.consent { display: flex !important; gap: 10px; font-weight: 400 !important; color: var(--muted); }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--anth); }
.hp { position: absolute; left: -9999px; }
.status { font-size: 14px; min-height: 1.4em; }
.status.error { color: #b3261e; }
.status.ok { color: var(--gold-dark); font-weight: 600; }

/* Footer */
.footer { background: var(--dark); color: rgba(255,255,255,.75); padding: 40px 0; font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer a { text-decoration: none; padding: 4px 0; }
.footer a[aria-current] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer a:hover { color: #fff; }
.footer-logo { height: 32px; width: auto; margin-bottom: 20px; }

/* Rechtliche Seiten (Impressum, Datenschutz) */
.page-hero { background: linear-gradient(160deg, var(--anth), var(--dark) 70%); color: #fff; padding: clamp(56px, 8vw, 104px) 0 clamp(44px, 6vw, 72px); }
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { font-size: clamp(36px, 5vw, 58px); margin-top: 14px; }
.legal { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(64px, 9vw, 112px); }
.legal a { color: var(--gold-dark); }
.legal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.legal-card { background: #fff; overflow-wrap: break-word; hyphens: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 30px 32px; }
.legal-card.wide { grid-column: 1 / -1; }
.legal-card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); }
.legal-card h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-card p + p { margin-top: 12px; }
.legal-card small { display: block; color: var(--muted); font-size: 14px; }
.legal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 72px; align-items: start; }
.toc { position: sticky; top: 112px; display: grid; gap: 2px; font-size: 15px; }
.toc b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px; }
.toc a { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); border-color: var(--gold); }
.prose { max-width: 780px; overflow-wrap: break-word; hyphens: auto; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 64px 0 20px; padding-top: 32px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 19px; margin: 32px 0 10px; }
.prose h4 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose li { color: #3d3d3d; }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--gold-dark); }
.address-box { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 18px 22px; margin: 14px 0; }
.highlight { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; font-size: 15px; }

@media (max-width: 1200px) {
  .g4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .g3 { grid-template-columns: 1fr 1fr; }
  .g3 > :nth-child(3) { grid-column: 1 / -1; }
  /* Fotokarten untereinander, Bild links neben dem Text */
  .photos { grid-template-columns: 1fr; gap: 24px; }
  .photo-card { display: grid; grid-template-columns: minmax(0, 360px) 1fr; align-items: center; }
  .photo-card img { height: 100%; aspect-ratio: auto; }
}
@media (max-width: 1000px) {
  .split, .calc-box, .legal-grid { grid-template-columns: 1fr; }
  .legal-grid { gap: 40px; }
  .toc { position: static; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; }
  /* Schmal: Text oben, Häuser unten sichtbar */
  .hero {
    background:
      linear-gradient(180deg, rgba(22,22,22,.94) 0%, rgba(22,22,22,.84) 52%, rgba(22,22,22,.2) 100%),
      url(../img/hero-haus.jpg) 62% 75% / cover no-repeat,
      var(--dark);
  }
  .hero .wrap { align-items: flex-start; padding-bottom: 48px; }
  .menu { display: none; position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px clamp(20px, 5vw, 56px) 24px; background: var(--anth); }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; font-size: 17px; }
  .menu .btn { justify-content: center; margin-top: 12px; }
  .menu-btn { display: block; }
}
@media (max-width: 640px) {
  .g3, .g4, .form .row, .results dl, .legal-cards { grid-template-columns: 1fr; }
  .legal-card { padding: 24px; }
  .photo-card { display: block; }
  .photo-card img { max-width: none; height: auto; aspect-ratio: 2 / 1; }
  .brand img { height: 34px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
