/* Dachwerk Brandt, Demo-Website (fiktiv). Stand: 03/2026
   Palette: Anthrazit / Ziegelrot / Warmgrau. Headlines in Fraunces,
   Rest bleibt System. Radien bewusst knapp, das ist ein Dachdecker
   und kein SaaS-Dashboard. */

@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("./fonts/fraunces-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #26272b;
  --ink-soft: #45464c;
  --ink-mute: #6d6e74;
  --paper: #f5f1ea;
  --paper-2: #ece6da;
  --cream: #fbf8f2;
  --line: #ddd5c6;
  --brick: #b34a2f;
  --brick-dark: #8f3a24;
  --brick-soft: #f3e0d8;
  --sun: #f2c14e;
  --green: #6c8f5a;
  --ok: #3e7c4f;
  --error: #b3372f;
  --shadow: 0 10px 30px rgba(38, 39, 43, 0.1);
  --shadow-lg: 0 18px 50px rgba(38, 39, 43, 0.16);
  --radius: 4px;
  --font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- Reset & Basis ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font: 400 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--brick-dark);
}
a:hover {
  color: var(--brick);
}
button {
  font: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--brick);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10000;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus-visible {
  top: 12px;
}

.wrap {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}
.wrap--narrow {
  width: min(880px, 100% - 2.5rem);
}

/* ---------- Notdienst-Banner ---------- */
.alert-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: #e9e5dc;
  padding: 8px 14px;
  font-size: 0.88rem;
  text-align: center;
}
.alert-bar p {
  margin: 0;
}
.alert-bar strong {
  color: #fff;
}
.alert-bar a {
  color: var(--sun);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.alert-bar a:hover {
  color: #ffd97a;
}
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #e05545;
  box-shadow: 0 0 0 0 rgba(224, 85, 69, 0.55);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 85, 69, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(224, 85, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 85, 69, 0);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(245, 241, 234, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(38, 39, 43, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  flex: 0 0 auto;
  border-radius: 5px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.08rem;
  letter-spacing: 0;
}
.brand-text small {
  color: var(--ink-mute);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.main-nav {
  margin-left: auto;
}
.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.main-nav a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.nav-toggle {
  display: none;
}
.header-cta {
  flex: 0 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1.2;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn--primary {
  background: var(--brick);
  color: #fff;
  box-shadow: 0 6px 18px rgba(179, 74, 47, 0.32);
}
.btn--primary:hover {
  background: var(--brick-dark);
  color: #fff;
  box-shadow: 0 10px 24px rgba(179, 74, 47, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--light {
  background: var(--paper);
  color: var(--ink);
}
.btn--light:hover {
  background: #fff;
  color: var(--ink);
}
.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn--lg {
  padding: 14px 28px;
  font-size: 1.02rem;
}
.btn--sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-width: 1.5px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick-dark);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  background: currentColor;
  margin-right: 9px;
  vertical-align: 0.22em;
}
.eyebrow--light {
  color: var(--sun);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  margin-bottom: 0.45em;
}
.hero h1 .accent {
  color: var(--brick);
}
.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6rem 0 1.8rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-badges svg {
  width: 17px;
  height: 17px;
  color: var(--brick);
  flex: 0 0 auto;
}

.hero-stage {
  position: relative;
}
.hero-art {
  width: 100%;
  height: auto;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.replay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(251, 248, 242, 0.9);
}

/* --- Hero-SVG: Strichaufbau --- */
.hero-art .draw {
  stroke: var(--ink);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.9s cubic-bezier(0.5, 0, 0.3, 1) forwards;
  animation-delay: calc(0.25s + var(--i, 0) * 0.13s);
}
.hero-art .draw.thin {
  stroke-width: 2;
  stroke: var(--ink-soft);
}
.hero-art .draw.dot {
  fill: var(--ink);
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-art .fills > * {
  opacity: 0;
  animation: fill-in 0.9s ease forwards;
  animation-delay: 2.1s;
}
@keyframes fill-in {
  to {
    opacity: 1;
  }
}
.f-wall {
  fill: var(--cream);
}
.f-roof {
  fill: var(--brick);
  opacity: 0;
}
.f-dormer {
  fill: var(--cream);
}
.f-glass {
  fill: #cfe3ea;
}
.f-door {
  fill: var(--brick-dark);
}
.f-sun {
  fill: var(--sun);
}
.f-bush {
  fill: var(--green);
}

.hero-art .cloud {
  fill: #fff;
  opacity: 0;
  animation: cloud-in 1s ease forwards 2.5s;
}
@keyframes cloud-in {
  to {
    opacity: 0.9;
  }
}
.cloud--a {
  animation-name: cloud-in, drift;
  animation-duration: 1s, 46s;
  animation-delay: 2.5s, 2.5s;
  animation-iteration-count: 1, infinite;
  animation-timing-function: ease, ease-in-out;
}
.cloud--b {
  animation-name: cloud-in, drift;
  animation-duration: 1s, 34s;
  animation-delay: 2.7s, 2.7s;
  animation-iteration-count: 1, infinite;
  animation-timing-function: ease, ease-in-out;
  animation-direction: normal, reverse;
}
@keyframes drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(38px);
  }
}
.sun-rays {
  transform-origin: 92px 86px;
  animation: rays 36s linear infinite;
}
@keyframes rays {
  to {
    transform: rotate(360deg);
  }
}

/* Replay: Animationen zurücksetzen */
.hero-art.is-replaying .draw,
.hero-art.is-replaying .fills > *,
.hero-art.is-replaying .cloud {
  animation: none;
}
.hero-art.is-replaying .draw {
  stroke-dashoffset: 1;
}
.hero-art.is-replaying .fills > *,
.hero-art.is-replaying .cloud {
  opacity: 0;
}

/* ---------- Sections allgemein ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.section--tinted {
  background: var(--paper-2);
}
.section--dark {
  background: var(--ink);
  color: #ece8df;
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
}
.section-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section--dark .section-lede {
  color: #c8c3b8;
}

/* ---------- Scroll-Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Leistungen ---------- */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
/* 5 Karten ausgewogen verteilen: 3 oben, 2 breiter unten */
@media (min-width: 1000px) {
  .cards {
    grid-template-columns: repeat(6, 1fr);
  }
  .cards .card {
    grid-column: span 2;
  }
  .cards .card:nth-child(4),
  .cards .card:nth-child(5) {
    grid-column: span 3;
  }
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cfc4b0;
}
.card-icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  padding: 12px;
  border-radius: 4px;
  background: var(--brick-soft);
  color: var(--brick-dark);
  margin-bottom: 16px;
}
.card-icon svg {
  width: 100%;
  height: 100%;
}
.card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.4em;
}
.card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  flex-grow: 0;
}
.card .price {
  margin-top: auto;
  padding-top: 6px;
  color: var(--ink-mute);
  font-size: 0.88rem;
}
.card .price strong {
  color: var(--ink);
  font-size: 1rem;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: 12px;
  padding: 8px 2px;
  border: 0;
  background: none;
  color: var(--brick-dark);
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition:
    color 0.15s ease,
    gap 0.15s ease;
}
.card-cta:hover {
  color: var(--brick);
  gap: 11px;
}
.card--alert {
  background: var(--brick-soft);
  border-color: #e4c3b5;
}
.card--alert .card-icon {
  background: var(--brick);
  color: #fff;
}

/* ---------- Zahlen ---------- */
.stats {
  background: var(--brick);
  color: #fff;
  padding: clamp(2.2rem, 5vw, 3.4rem) 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.stat > span {
  font-size: 0.9rem;
  opacity: 0.88;
}
.stats-note {
  margin: 1.6rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.72;
}

/* ---------- Referenzen ---------- */
.refs {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
.ref {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.ref:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.ref--wide {
  grid-column: 1 / -1;
}
/* Referenz-Grid absichtlich uneben: 7/5 oben, 5/7 unten,
   die letzte Karte liegt quer. Gleichförmige Raster sehen
   nach Baukasten aus. */
@media (min-width: 901px) {
  .refs {
    grid-template-columns: repeat(12, 1fr);
  }
  .refs .ref:nth-of-type(2) {
    grid-column: span 7;
  }
  .refs .ref:nth-of-type(3) {
    grid-column: span 5;
  }
  .refs .ref:nth-of-type(4) {
    grid-column: span 5;
  }
  .refs .ref:nth-of-type(5) {
    grid-column: span 7;
    flex-direction: row;
  }
  .refs .ref:nth-of-type(5) .ref-art {
    flex: 0 0 44%;
    aspect-ratio: auto;
  }
  .refs .ref:nth-of-type(5) .ref-art svg {
    height: 100%;
  }
  .refs .ref:nth-of-type(5) .ref-body {
    align-self: center;
  }
}
.ref-art {
  aspect-ratio: 320 / 200;
  background: #dbe7ec;
}
.ref-art svg {
  width: 100%;
  height: 100%;
}
.ref-body {
  padding: 20px 22px 22px;
}
.ref-body h3 {
  font-size: 1.12rem;
  margin-bottom: 0.35em;
}
.ref-body p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin-bottom: 0.9em;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tags li {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 11px;
}

/* --- Vorher/Nachher --- */
.ba {
  --pos: 50%;
}
.ba-frame {
  position: relative;
  aspect-ratio: 640 / 300;
  overflow: hidden;
}
.ba-layer {
  position: absolute;
  inset: 0;
}
.ba-layer svg {
  width: 100%;
  height: 100%;
}
.ba-after {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}
.ba-control {
  display: block;
  padding: 12px 18px 4px;
}
.ba-control input[type="range"] {
  width: 100%;
  accent-color: var(--brick);
  cursor: ew-resize;
  height: 28px;
}

/* ---------- Wizard (Termin) ---------- */
.wizard {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  box-shadow: var(--shadow);
}
.steps {
  display: flex;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  counter-reset: step;
}
.steps li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
  color: var(--ink-mute);
  font-size: 0.85rem;
  font-weight: 700;
}
.steps li::before {
  content: "";
  position: absolute;
  top: 17px;
  right: calc(50% + 26px);
  left: calc(-50% + 26px);
  height: 2px;
  background: var(--line);
}
.steps li:first-child::before {
  display: none;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 2px solid var(--line);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-mute);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}
.steps li.is-active {
  color: var(--ink);
}
.steps li.is-active .step-num {
  background: var(--brick);
  border-color: var(--brick);
  color: #fff;
}
.steps li.is-done {
  color: var(--ok);
}
.steps li.is-done .step-num {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.step-panel {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}
.step-panel[hidden] {
  display: none;
}
.step-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0;
  margin-bottom: 1.1rem;
  display: block;
  width: 100%;
}
.step-title:focus {
  outline: none;
}

.choice-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.choice {
  position: relative;
  display: block;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  inset: 0;
  cursor: pointer;
  margin: 0;
}
.choice-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 2px solid var(--line);
  border-radius: 4px;
  padding: 16px 16px 14px;
  height: 100%;
  background: var(--paper);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}
.choice:hover .choice-body {
  border-color: #c9bda8;
  transform: translateY(-2px);
}
.choice input:checked + .choice-body {
  border-color: var(--brick);
  background: var(--brick-soft);
}
.choice input:focus-visible + .choice-body {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}
.choice-icon {
  width: 34px;
  height: 34px;
  color: var(--brick-dark);
  margin-bottom: 6px;
}
.choice-icon svg {
  width: 100%;
  height: 100%;
}
.choice-body strong {
  font-size: 1rem;
}
.choice-body small {
  color: var(--ink-mute);
  font-size: 0.82rem;
  line-height: 1.4;
}
.choice--alert .choice-icon {
  color: var(--error);
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--paper-2);
  border-radius: 4px;
  padding: 12px 15px;
  font-size: 0.9rem;
  margin: 1.1rem 0 0;
}
.hint svg {
  flex: 0 0 auto;
  margin-top: 2px;
}
.hint--alert {
  background: #fbeae6;
  color: #7a2c1f;
}
.hint--alert a {
  color: #7a2c1f;
  font-weight: 700;
}

.field-group {
  margin-bottom: 1.4rem;
}
.group-label {
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.group-label small {
  color: var(--ink-mute);
  font-weight: 500;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.chip {
  position: relative;
  display: inline-block;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}
.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 2px solid var(--line);
  background: var(--paper);
  font-weight: 700;
  font-size: 0.92rem;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.chip:hover span {
  border-color: #c9bda8;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip input:focus-visible + span {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}
.chip--wide span {
  min-width: 200px;
}

.form-grid {
  display: grid;
  gap: 16px 18px;
  grid-template-columns: repeat(2, 1fr);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-inline-size: 0;
}
.field--full {
  grid-column: 1 / -1;
}
.field--split {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
}
.field--split > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-inline-size: 0;
}
.field label {
  font-weight: 700;
  font-size: 0.92rem;
}
.field label small {
  color: var(--ink-mute);
  font-weight: 500;
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 4px;
  padding: 10px 13px;
  background: var(--paper);
  width: 100%;
  transition: border-color 0.15s ease;
}
.field input:hover,
.field textarea:hover {
  border-color: #c9bda8;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(179, 74, 47, 0.18);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}
.field textarea {
  resize: vertical;
  min-height: 76px;
}
.field-error {
  color: var(--error);
  font-size: 0.84rem;
  font-weight: 600;
  margin: 4px 0 0;
}
.field-error[hidden] {
  display: none;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  cursor: pointer;
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brick);
  flex: 0 0 auto;
}
.consent small {
  color: var(--ink-mute);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 1.8rem;
}
.wizard-nav .btn:only-child,
#btn-next:first-child,
#btn-submit:first-child {
  margin-left: auto;
}
#btn-next,
#btn-submit {
  margin-left: auto;
}

/* --- Bestätigung --- */
.confirm[hidden] {
  display: none;
}
.confirm-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 1.4rem;
}
.confirm-check {
  color: var(--ok);
  flex: 0 0 auto;
}
.confirm-head h3 {
  margin: 0 0 2px;
  font-size: 1.3rem;
}
.confirm-head p {
  margin: 0;
  color: var(--ink-soft);
}
.confirm-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 20px;
  margin: 0 0 1rem;
}
.confirm-summary dt {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-mute);
}
.confirm-summary dd {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
#btn-restart {
  margin-top: 0.6rem;
}

/* ---------- Einzugsgebiet ---------- */
.gebiet-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.section--dark h2 {
  color: #fff;
}
.legend {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.94rem;
  color: #d6d1c6;
}
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.legend-dot--hq {
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.3);
}
.legend-dot--core {
  background: #e8927c;
}
.legend-dot--out {
  background: #8fa8bd;
}

.map-wrap {
  position: relative;
}
.map {
  width: 100%;
  height: auto;
  background: #1d1e22;
  border-radius: 6px;
  border: 1px solid #3a3b40;
  box-shadow: var(--shadow-lg);
}
.map-land {
  fill: #2a2c31;
}
.map-weser {
  stroke: #46647a;
  stroke-width: 26;
  stroke-linecap: round;
  opacity: 0.9;
}
.map-weser-inner {
  stroke: #5d84a0;
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0.75;
}
.map-city {
  fill: rgba(179, 74, 47, 0.16);
  stroke: rgba(232, 146, 124, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.map-zone {
  fill: none;
  stroke: rgba(242, 193, 78, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 3 6;
}
.map-city-label {
  fill: #98938a;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.spot {
  cursor: pointer;
}
.spot-dot {
  fill: #e8927c;
  transition: r 0.15s ease;
}
.spot--out .spot-dot {
  fill: #8fa8bd;
}
.spot-ring {
  fill: rgba(232, 146, 124, 0.16);
  transition: fill 0.15s ease;
}
.spot--out .spot-ring {
  fill: rgba(143, 168, 189, 0.14);
}
.spot:hover .spot-ring,
.spot:focus-visible .spot-ring {
  fill: rgba(242, 193, 78, 0.3);
}
.spot:hover .spot-dot,
.spot:focus-visible .spot-dot {
  fill: var(--sun);
}
.spot--hq .spot-ring {
  fill: rgba(242, 193, 78, 0.24);
  animation: hq-pulse 2.6s ease-out infinite;
  transform-origin: 322px 238px;
}
.spot-house {
  fill: var(--sun);
}
@keyframes hq-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}
.spot:focus-visible {
  outline: none;
}
.spot:focus-visible .spot-ring {
  stroke: var(--sun);
  stroke-width: 2;
}
.map-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 9px 13px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  max-width: 220px;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.15s ease;
}
.map-tip[hidden] {
  display: none;
}
.map-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  transform: translateX(-50%) rotate(45deg);
}
.map-tip strong {
  font-size: 0.9rem;
}
.map-tip span {
  color: var(--ink-mute);
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
}
.faq details {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 20px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq details[open] {
  border-color: #cfc4b0;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--brick-dark);
}
.faq-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--brick-soft);
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--brick-dark);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq details[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq details p {
  color: var(--ink-soft);
  padding-bottom: 18px;
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- CTA-Streifen ---------- */
.cta-strip {
  background: var(--brick-dark);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-inner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 0.25em;
}
.cta-inner p {
  margin: 0;
  opacity: 0.92;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c8c3b8;
  padding: clamp(2.6rem, 5vw, 4rem) 0 1.6rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.4fr 1fr 0.9fr 1fr;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid #3a3b40;
}
.footer-brand .brand {
  margin-bottom: 0.9rem;
}
.footer-brand .brand-text strong {
  color: #fff;
}
.footer-brand .brand-text small {
  color: #98938a;
}
.footer-brand p {
  font-size: 0.92rem;
}
.site-footer h3 {
  font-family: var(--font);
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer address {
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.8;
}
.site-footer a {
  color: #e8dfce;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.site-footer a:hover {
  color: var(--sun);
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 0.94rem;
}
.footer-list li span {
  color: #98938a;
  margin-left: 6px;
}
.footer-legal {
  padding-top: 1.5rem;
  font-size: 0.84rem;
  color: #98938a;
}
.footer-legal p {
  margin-bottom: 0.4em;
}
.footer-legal strong {
  color: #d6d1c6;
}

/* ---------- Demo-Ribbon (Standard) ---------- */
.demo-ribbon {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 18, 22, 0.85);
  color: #fff;
  font:
    500 12px/1 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.demo-ribbon:hover,
.demo-ribbon:focus-visible {
  opacity: 1;
}
@media print {
  .demo-ribbon {
    display: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .main-nav a {
    padding: 8px 9px;
    font-size: 0.9rem;
  }
}
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    border-radius: 4px;
  }
  .nav-toggle .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
  .header-cta {
    display: none;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(38, 39, 43, 0.14);
    display: none;
    margin: 0;
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }
  .main-nav a {
    padding: 13px 24px;
    border-radius: 0;
    font-size: 1rem;
  }

  .hero-grid,
  .gebiet-grid {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    order: -1;
  }
  .refs {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .alert-detail {
    display: none;
  }
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .steps li .step-label {
    font-size: 0.74rem;
  }
  .stats-grid {
    gap: 18px;
  }
  .confirm-summary {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .confirm-summary dd {
    margin-bottom: 10px;
  }
  .chip--wide {
    flex: 1 1 100%;
  }
  .chip--wide span {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .wizard-nav {
    flex-wrap: wrap;
  }
  .wizard-nav .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-art .draw {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .hero-art .fills > *,
  .hero-art .cloud {
    opacity: 1 !important;
    animation: none !important;
  }
  .cloud--a,
  .cloud--b {
    opacity: 0.9 !important;
  }
  .sun-rays {
    animation: none !important;
  }
  .pulse-dot,
  .spot--hq .spot-ring {
    animation: none !important;
  }
  .spot--hq .spot-ring {
    opacity: 1;
    transform: none;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .replay {
    display: none;
  }
}
