@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

/* Sonnenfeld Energie – Sonnenbahn über dem Dach */

:root {
  --nacht: #0F1E3D;
  --daemmer: #1B305C;
  --sonne: #F5B820;
  --sonne-hell: #FFD25C;
  --glut: #8A5A00;
  --weiss: #FFFFFF;
  --kalk: #EEF2F8;
  --schiefer: #46536D;
  --himmel: #A9BAD9;
  --linie: #D3DAE6;
  --fehler: #A1261B;
  --fehler-hell: #FFB4A8;

  --font-head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;

  --fs-xs: 0.875rem;
  --fs-s: 1rem;
  --fs-m: 1.25rem;
  --fs-l: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --fs-xxl: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2.5rem;
  --s-6: 4rem;
  --s-7: 6rem;

  --wrap: 72rem;
  --measure: 38rem;
  --radius: 4px;
  --hair: 1px solid var(--linie);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --fg: var(--nacht);
  --fg-2: var(--schiefer);
  --bg: var(--weiss);
  --rule: var(--linie);
  --accent-text: var(--glut);
  --focus: var(--nacht);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-s);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.12;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}
h1 { font-size: var(--fs-xl); font-weight: 800; max-width: 18ch; }
h2 { font-size: var(--fs-l); font-weight: 700; max-width: 24ch; }
h3 { font-size: var(--fs-m); font-weight: 700; }

p { margin: 0 0 var(--s-3); max-width: var(--measure); }
.lead { font-size: var(--fs-m); line-height: 1.5; color: var(--fg-2); }
.note { font-size: var(--fs-xs); color: var(--fg-2); }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-3); top: -4rem;
  z-index: 100;
  padding: var(--s-2) var(--s-3);
  background: var(--sonne);
  color: var(--nacht);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s-3); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.num { font-family: var(--font-head); font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Flächen ---------- */

.surface-dark {
  --fg: var(--weiss);
  --fg-2: var(--himmel);
  --bg: var(--nacht);
  --rule: #34497A;
  --accent-text: var(--sonne);
  --focus: var(--sonne);
  color: var(--fg);
  background: var(--bg);
}
.surface-kalk { --bg: var(--kalk); --rule: #C9D2E1; background: var(--bg); }

.section { padding-block: var(--s-7); }
.section + .section:not(.surface-dark):not(.surface-kalk) { border-top: var(--hair); }
.section__head { margin-bottom: var(--s-5); }
.section__head p { color: var(--fg-2); }

/* ---------- Kopf ---------- */

.site-header {
  --fg: var(--weiss);
  --fg-2: var(--himmel);
  --focus: var(--sonne);
  --accent-text: var(--sonne);
  position: sticky; top: 0; z-index: 50;
  background: var(--nacht);
  color: var(--weiss);
  border-bottom: 1px solid #263C6B;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  min-height: 4.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--weiss);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-m);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { width: 2.25rem; height: auto; flex: none; }
.brand__sub { font-weight: 500; color: var(--himmel); }

.nav-toggle {
  display: none;
  align-items: center; gap: var(--s-2);
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-3);
  font: 600 var(--fs-s)/1 var(--font-body);
  color: var(--weiss);
  background: transparent;
  border: 1px solid var(--himmel);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block; width: 1.125rem; height: 2px;
  background: currentColor; position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: var(--s-4); }
.nav__list {
  display: flex; gap: var(--s-1);
  list-style: none; margin: 0; padding: 0;
}
.nav__list a {
  display: block;
  padding: var(--s-2) var(--s-2);
  color: var(--weiss);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav__list a:hover { border-bottom-color: var(--himmel); }
.nav__list a[aria-current="page"] { border-bottom-color: var(--sonne); color: var(--sonne); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 3rem;
  padding: var(--s-2) var(--s-4);
  font: 600 var(--fs-s)/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--sun { background: var(--sonne); color: var(--nacht); }
.btn--sun:hover { background: var(--sonne-hell); }
.btn--ink { background: var(--nacht); color: var(--weiss); }
.btn--ink:hover { background: var(--daemmer); }
.btn--line { background: transparent; color: var(--fg); border-color: currentColor; }
.btn--line:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--small { min-height: 2.5rem; padding: var(--s-1) var(--s-3); font-size: var(--fs-xs); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }

.link-arrow {
  font-weight: 600;
  white-space: nowrap;
}
.link-arrow::after { content: " →"; display: inline-block; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Kopfbereich mit Rechner ---------- */

.hero { padding-block: var(--s-6) var(--s-6); overflow: hidden; }
.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-5);
  align-items: end;
  margin-bottom: var(--s-5);
}
.hero__top .lead { margin-bottom: 0; }
.hero__art { color: var(--himmel); }
.hero__art svg { width: 100%; height: auto; }
.art-line { fill: none; stroke: currentColor; stroke-width: 1.25; }
.art-sun-path { fill: none; stroke: var(--sonne); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.art-sun { fill: var(--sonne); }
.art-panel { fill: none; stroke: var(--sonne); stroke-width: 1; }
.art-label { fill: var(--himmel); font: 500 12px var(--font-body); }

.rechner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid #34497A;
  border-radius: var(--radius);
  background: var(--daemmer);
}
.rechner__inputs {
  padding: var(--s-4);
  border-right: 1px solid #34497A;
  display: grid; gap: var(--s-4);
  align-content: start;
}
.rechner__title { font-size: var(--fs-m); margin: 0; }
.rechner__results { padding: var(--s-4); display: grid; gap: var(--s-4); align-content: start; }
.rechner__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.rechner__foot p { margin: 0; font-size: var(--fs-xs); color: var(--himmel); }

.field { display: grid; gap: var(--s-2); }
.field__label { font-size: var(--fs-xs); font-weight: 600; color: var(--fg); }
.field__row { display: flex; align-items: center; gap: var(--s-2); }
.field__unit { font-size: var(--fs-xs); color: var(--fg-2); }
.field__input {
  width: 100%; max-width: 9rem;
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-3);
  font: 500 var(--fs-s)/1.2 var(--font-head);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  background: var(--nacht);
  border: 1px solid var(--himmel);
  border-radius: var(--radius);
}
.field__input:hover { border-color: var(--weiss); }
.field__range {
  width: 100%;
  accent-color: var(--sonne);
  min-height: 2.75rem;
  background: transparent;
}
.field__value { font-family: var(--font-head); font-weight: 700; min-width: 3ch; text-align: right; }

.segmented { display: inline-flex; border: 1px solid var(--himmel); border-radius: var(--radius); padding: 2px; margin: 0; }
.segmented legend { padding: 0; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  display: inline-flex; align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--s-3);
  font-size: var(--fs-xs); font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.segmented label:hover { background: var(--nacht); }
.segmented input:checked + label { background: var(--sonne); color: var(--nacht); }
.segmented input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s-2); }
.fieldset-plain legend { font-size: var(--fs-xs); font-weight: 600; padding: 0; margin-bottom: var(--s-2); }

.check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--sonne); margin: 0; }

.assumptions { border-top: 1px solid #34497A; padding-top: var(--s-3); }
.assumptions summary { cursor: pointer; font-size: var(--fs-xs); font-weight: 600; color: var(--sonne); }
.assumptions__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-3); }

/* Kennzahlen */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.figure { border-top: 1px solid var(--rule); padding-top: var(--s-3); margin: 0; }
.figure__value {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-xxl);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.figure__unit { font-size: var(--fs-m); font-weight: 700; color: var(--accent-text); margin-left: 0.15em; letter-spacing: 0; }
.figure__label { display: block; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--fg-2); }
.figure--wide { grid-column: 1 / -1; }
.figure--compact .figure__value { font-size: var(--fs-l); }

/* Balken und Skala */
.bar {
  display: flex; height: 0.75rem;
  border-radius: 2px; overflow: hidden;
  background: transparent;
  border: 1px solid var(--rule);
  margin-top: var(--s-3);
}
.bar__fill { background: var(--sonne); width: 12%; transition: width .4s var(--ease); }
.bar__rest { flex: 1; background: repeating-linear-gradient(90deg, transparent 0 6px, var(--rule) 6px 7px); }
.bar-legend { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--fg-2); }
.bar-legend i { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: var(--s-1); vertical-align: middle; background: var(--sonne); }
.bar-legend i.is-rest { background: transparent; border: 1px solid var(--fg-2); }

.scale { position: relative; margin-top: var(--s-4); padding-top: var(--s-3); }
.scale__track { position: relative; height: 2px; background: var(--rule); }
.scale__fill { position: absolute; left: 0; top: -1px; height: 4px; background: var(--sonne); width: 49%; transition: width .4s var(--ease); }
.scale__mark {
  position: absolute; top: -0.5rem;
  width: 2px; height: 1.125rem;
  background: var(--sonne);
  left: 49%;
  transition: left .4s var(--ease);
}
.scale__ticks {
  display: flex; justify-content: space-between;
  list-style: none; margin: var(--s-2) 0 0; padding: 0;
  font-size: var(--fs-xs); color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- Bilanz ---------- */

.ledger {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  margin: 0; padding: 0; list-style: none;
}
.ledger .figure { border-top: 3px solid var(--nacht); }
.ledger .figure__label { font-size: var(--fs-s); color: var(--fg-2); max-width: 22ch; }

/* ---------- Leistungen ---------- */

.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.service {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  gap: var(--s-4);
  align-items: center;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--rule);
}
.service__art { color: var(--nacht); }
.service__art svg { width: 5rem; height: auto; }
.service__art .art-accent { stroke: var(--glut); }
.service h3 { font-size: var(--fs-l); margin-bottom: var(--s-2); }
.service p { margin: 0; color: var(--fg-2); }

/* ---------- Rechenweg ---------- */

.method { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-5); align-items: start; }
.sheet {
  margin: 0;
  background: var(--weiss);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.sheet__row {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule);
}
.sheet__row:last-child { border-bottom: 0; }
.sheet dt { font-weight: 600; font-size: var(--fs-xs); }
.sheet dd { margin: 0; font-family: var(--font-head); font-variant-numeric: tabular-nums; font-size: var(--fs-s); }
.sheet dd small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); color: var(--fg-2); margin-top: var(--s-1); }

/* ---------- Ablauf auf der Sonnenbahn ---------- */

.arc-steps { position: relative; }
.arc-steps__art { color: var(--linie); margin-bottom: calc(-1 * var(--s-4)); }
.arc-steps__art svg { width: 100%; height: auto; }
.arc-steps__art .art-sun-path { stroke: var(--glut); }
.arc-steps__dot { fill: var(--sonne); stroke: var(--nacht); stroke-width: 1.5; }
.arc-steps__list {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-3);
  list-style: none; margin: 0; padding: 0;
}
.arc-steps__list li { border-top: 1px solid var(--rule); padding-top: var(--s-3); }
.arc-steps__list h3 { font-size: var(--fs-m); margin-bottom: var(--s-2); }
.arc-steps__list p { font-size: var(--fs-xs); color: var(--fg-2); margin: 0; }

/* ---------- Zwei Spalten ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.checklist li { padding: var(--s-3) 0 var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1.45em;
  width: 0.625rem; height: 0.625rem; border-radius: 50%;
  border: 2px solid var(--glut);
}

/* ---------- Referenzen ---------- */

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-5); list-style: none; margin: 0; padding: 0; }
.project { border-top: 3px solid var(--nacht); padding-top: var(--s-3); }
.project h3 { margin-bottom: var(--s-1); }
.project__meta { font-size: var(--fs-xs); color: var(--fg-2); margin-bottom: var(--s-3); }
.project__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; }
.project__figures div { border-left: 1px solid var(--rule); padding-left: var(--s-3); }
.project__figures dt { font-size: var(--fs-xs); color: var(--fg-2); }
.project__figures dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-m); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Kontaktband ---------- */

.band { padding-block: var(--s-7); }
.band__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-5); align-items: end; }
.band address { font-style: normal; line-height: 1.8; }
.band address a { color: var(--weiss); }
.band__phone { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-l); color: var(--sonne); text-decoration: none; white-space: nowrap; }

/* ---------- Formulare ---------- */

.form { display: grid; gap: var(--s-4); max-width: 40rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form__field { display: grid; gap: var(--s-2); }
.form__field label { font-size: var(--fs-xs); font-weight: 600; }
.form__input {
  width: 100%;
  min-height: 3rem;
  padding: var(--s-2) var(--s-3);
  font: 400 var(--fs-s)/1.4 var(--font-body);
  color: var(--nacht);
  background: var(--weiss);
  border: 1px solid #7A869C;
  border-radius: var(--radius);
  transition: border-color .2s var(--ease);
}
.form__input:hover { border-color: var(--nacht); }
textarea.form__input { min-height: 8rem; resize: vertical; }
.form__hint { font-size: var(--fs-xs); color: var(--fg-2); }
.form__field[data-state="error"] .form__input { border: 2px solid var(--fehler); }
.form__field[data-state="error"] label::after { content: " – bitte ausfüllen"; color: var(--fehler); font-weight: 500; }
.form__status { margin: 0; font-size: var(--fs-s); font-weight: 600; min-height: 1.6em; }
.form__status[data-state="error"] { color: var(--fehler); }
.form__status[data-state="sent"] { color: var(--nacht); border-left: 4px solid var(--sonne); padding-left: var(--s-3); }
.surface-dark .form__status[data-state="error"] { color: var(--fehler-hell); }
.surface-dark .form__status[data-state="sent"] { color: var(--weiss); }

/* ---------- Seitenkopf Unterseiten ---------- */

.page-head { padding-block: var(--s-6); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-5); align-items: end; }

/* ---------- Fußzeile ---------- */

.site-footer { padding-block: var(--s-6) var(--s-5); border-top: 1px solid #263C6B; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-5); }
.site-footer h2 { font-size: var(--fs-s); margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); font-size: var(--fs-xs); }
.site-footer a { color: var(--weiss); }
.site-footer address { font-style: normal; font-size: var(--fs-xs); line-height: 1.8; color: var(--himmel); }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid #263C6B;
  font-size: var(--fs-xs); color: var(--himmel);
}
.footer__base p { margin: 0; }

/* ---------- Styleguide ---------- */

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.swatch { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; font-size: var(--fs-xs); }
.swatch__chip { height: 5rem; border-bottom: 1px solid var(--rule); }
.swatch__text { padding: var(--s-2) var(--s-3); }
.swatch__text strong { display: block; }
.chip-nacht { background: var(--nacht); }
.chip-daemmer { background: var(--daemmer); }
.chip-sonne { background: var(--sonne); }
.chip-glut { background: var(--glut); }
.chip-weiss { background: var(--weiss); }
.chip-kalk { background: var(--kalk); }
.chip-schiefer { background: var(--schiefer); }
.chip-himmel { background: var(--himmel); }
.type-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--s-3); align-items: baseline; padding-block: var(--s-3); border-bottom: 1px solid var(--rule); }
.type-row code { font-size: var(--fs-xs); color: var(--fg-2); }
.t-xs { font-size: var(--fs-xs); }
.t-s { font-size: var(--fs-s); }
.t-m { font-size: var(--fs-m); font-family: var(--font-head); font-weight: 700; }
.t-l { font-size: var(--fs-l); font-family: var(--font-head); font-weight: 700; }
.t-xl { font-size: var(--fs-xl); font-family: var(--font-head); font-weight: 800; line-height: 1.1; }
.t-xxl { font-size: var(--fs-xxl); font-family: var(--font-head); font-weight: 800; line-height: 1; }
.demo-panel { padding: var(--s-4); border-radius: var(--radius); }
.stack > * + * { margin-top: var(--s-4); }

/* ---------- Bewegung: nur Eintritt und Hover ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

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

/* ---------- Breakpoints ---------- */

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-header .header__inner { flex-wrap: wrap; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column; align-items: stretch;
    gap: var(--s-3);
    padding-bottom: var(--s-4);
  }
  .site-nav[data-open="true"] { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    font-size: var(--fs-s);
    padding: var(--s-3) 0;
    border-bottom: 1px solid #263C6B;
  }
  .nav__list a[aria-current="page"] { border-bottom-color: var(--sonne); }
  .nav__cta { align-self: flex-start; }
}

@media (max-width: 960px) {
  .hero__top,
  .rechner,
  .method,
  .split,
  .band__grid,
  .page-head__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 32rem; }
  .rechner__inputs { border-right: 0; border-bottom: 1px solid #34497A; }
  .arc-steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s-4); }
  .arc-steps__art { display: none; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .section, .band { padding-block: var(--s-6); }
  .hero { padding-block: var(--s-5); }
  .wrap { padding-inline: var(--s-3); }
  .ledger { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .service { grid-template-columns: 4rem minmax(0, 1fr); }
  .service__art svg { width: 3.5rem; }
  .service .link-arrow { grid-column: 2; }
  .arc-steps__list { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .sheet__row { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .brand__sub { display: none; }
}

@media (max-width: 420px) {
  .figures { grid-template-columns: minmax(0, 1fr); }
  .project__figures { grid-template-columns: minmax(0, 1fr); }
  .project__figures div { border-left: 0; border-top: 1px solid var(--rule); padding: var(--s-2) 0 0; }
  .assumptions__grid { grid-template-columns: minmax(0, 1fr); }
  .rechner__inputs, .rechner__results { padding: var(--s-3); }
}

/* === speicher: Vergleichsbalken === */
.compare {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
  list-style: none; margin: 0; padding: 0;
}
.compare .figure { border-top: 3px solid var(--nacht); }
.compare .figure__label { font-size: var(--fs-s); }
.bar__fill--ohne { width: 12%; }
.bar__fill--mit { width: 26%; }
.compare__sum { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--fg-2); }
.compare__sum strong { font-family: var(--font-head); font-variant-numeric: tabular-nums; color: var(--fg); }
@media (max-width: 640px) {
  .compare { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
}

/* === impressum: Rechtstexte === */
.legal > * { max-width: var(--measure); }
.legal address { font-style: normal; line-height: 1.8; margin-bottom: var(--s-3); }
.legal h3 { margin-top: var(--s-5); }
.legal ul { padding-left: var(--s-4); margin: 0 0 var(--s-3); }
.legal li { margin-bottom: var(--s-2); }
