:root {
  --ink: #17212b;
  --muted: #52616b;
  --line: #d9e2dc;
  --paper: #ffffff;
  --mist: #f8faf7;
  --soft-green: #e7f3ee;
  --green: #1f8a70;
  --green-dark: #166553;
  --amber: #f2b84b;
  --brick: #d96459;
  --shadow: 0 18px 60px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 226, 220, 0.9);
  background: rgba(248, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
}

.brand-wordmark {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.brand-line {
  display: inline-flex;
  align-items: baseline;
  min-height: 54px;
  font-size: 2.05rem;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-line > span:not(.brand-initial) {
  color: var(--muted);
  font-weight: 500;
}

.brand-initial {
  margin-right: 0;
  font-size: 3.35rem;
  font-weight: 800;
  line-height: 0.86;
}

.brand-initial-p {
  color: #17212b;
}

.brand-initial-f {
  color: #d21f2b;
}

.brand-initial-e {
  color: #c99700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.main-nav a,
.header-action {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--soft-green);
  color: var(--green-dark);
}

.header-action {
  background: var(--ink);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: start;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(24px, 3vw, 40px) clamp(18px, 4vw, 56px) 48px;
  background:
    radial-gradient(circle at 16% 22%, rgba(31, 138, 112, 0.12), transparent 31%),
    linear-gradient(135deg, #ffffff 0%, #f8faf7 44%, #edf5f1 100%);
}

.hero-copy {
  max-width: 760px;
  align-self: center;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.headline-line {
  white-space: nowrap;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.button.primary {
  background: var(--brick);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.estimate-panel {
  width: 100%;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.15;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--green-dark);
  font-weight: 900;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin: 18px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
}

.toggle span {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
}

.result-preview {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(242, 184, 75, 0.5);
  border-left: 6px solid var(--amber);
  border-radius: 8px;
  background: #fff8e8;
}

.result-preview span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.result-preview strong {
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  line-height: 1.05;
}

.result-preview small {
  color: var(--muted);
  font-size: 0.86rem;
}

.quote-wide {
  width: 100%;
  background: var(--green);
  color: #fff;
}

.price-section,
.process-section,
.quote-section {
  padding: clamp(46px, 7vw, 84px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

.section-heading h2,
.quote-section h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.price-section {
  background: #fff;
}

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

.price-card {
  display: grid;
  gap: 14px;
  min-height: 332px;
  padding: 22px;
}

.price-card.featured {
  border-color: rgba(31, 138, 112, 0.45);
  background: linear-gradient(180deg, #ffffff 0%, #edf8f3 100%);
}

.price-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.price-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.price-card p {
  margin: 0;
  color: var(--muted);
}

.price-card strong {
  align-self: end;
  color: var(--green-dark);
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.05;
}

.price-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--soft-green);
  color: var(--green-dark);
  font-weight: 900;
}

.process-section {
  background: var(--mist);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.process-list article {
  min-height: 210px;
  padding: 22px;
}

.process-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 900;
}

.process-list h3 {
  margin-bottom: 8px;
}

.process-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.quote-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--ink);
  color: #fff;
}

.quote-section p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.quote-section .eyebrow {
  color: var(--amber);
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer img {
  width: 48px;
  height: 48px;
}

.footer-brand {
  display: grid;
  gap: 2px;
}

.footer-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.footer-wordmark span:not(.footer-initial) {
  color: var(--muted);
  font-weight: 500;
}

.footer-initial {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 0.9;
}

.footer-initial-p {
  color: #17212b;
}

.footer-initial-f {
  color: #d21f2b;
}

.footer-initial-e {
  color: #c99700;
}

.footer-brand > span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.2;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .price-grid,
  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    gap: 12px;
    min-height: auto;
  }

  .brand img {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }

  .brand {
    gap: 10px;
  }

  .brand-line {
    min-height: 34px;
    font-size: 1.08rem;
  }

  .brand-initial {
    font-size: 1.75rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .header-action {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding-top: 32px;
  }

  h1 {
    font-size: clamp(1.6rem, 7.8vw, 2.5rem);
  }

  .button,
  .hero-actions {
    width: 100%;
  }

  .form-grid,
  .price-grid,
  .process-list {
    grid-template-columns: 1fr;
  }

  .estimate-panel {
    padding: 16px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-preview strong {
    font-size: 1.9rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ------------------------------------------------------------------
   Project additions (funnel, form controls, legal pages, a11y)
   ------------------------------------------------------------------ */

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

.visually-hidden,
.honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.main-nav a,
.header-action,
.button,
.price-card a,
.chip,
.fill-option,
.toggle-row {
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button:hover { filter: brightness(0.96); }
.button.primary:hover { background: #c95a4f; }
.button.secondary:hover { background: var(--soft-green); border-color: rgba(31, 138, 112, 0.45); }
.quote-wide:hover { background: var(--green-dark); }
.header-action:hover { background: #0f161d; }
.button { cursor: pointer; }

/* Trust badge must never wrap ("DE-weit") */
.trust-badge { white-space: nowrap; }

/* German flag badge (replaces "DE-weit" text) */
.trust-badge-flag { padding: 0; min-width: 0; min-height: 0; background: transparent; }
.trust-badge-flag svg {
  display: block;
  width: 40px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

/* Estimate panel is a div now; the form/partials live inside it. */
.estimate-panel { scroll-margin-top: 120px; }
.estimate-panel.htmx-request { opacity: 0.7; }

.field { position: relative; }
.field > span:first-child { display: flex; justify-content: space-between; gap: 8px; }
.field small,
legend small { font-weight: 500; color: var(--muted); }

fieldset.field {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-hint { position: relative; min-height: 20px; font-weight: 600; }
.plz-ok { color: var(--green-dark); }
.plz-bad { color: var(--brick); }

.plz-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 33, 43, 0.12);
}

.plz-suggest button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.plz-suggest button:hover { background: var(--soft-green); }

.field-error {
  color: var(--brick);
  font-size: 0.82rem;
  font-weight: 700;
}

.has-error input,
.has-error select,
.has-error .chip-list,
.has-error .fill-options { border-color: var(--brick); }

.form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 100, 89, 0.5);
  border-left: 6px solid var(--brick);
  border-radius: 8px;
  background: #fdf1ef;
  color: var(--ink);
  font-weight: 700;
}

/* Range slider */
input[type="range"] {
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--green);
  cursor: pointer;
}

.range-value {
  color: var(--green-dark);
  font-weight: 900;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

/* Object chips */
.chip-list,
.fill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chip,
.fill-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.chip input,
.fill-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip:has(input:checked),
.fill-option:has(input:checked) {
  border-color: var(--green);
  background: var(--soft-green);
  color: var(--green-dark);
}

.chip:has(input:focus-visible),
.fill-option:has(input:focus-visible) {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.fill-options { justify-content: stretch; }
.fill-option { flex: 1 1 0; justify-content: center; }

/* Floor row */
.floor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.floor-row[hidden] { display: none; }

.floor-row .toggle-row { margin: 0; cursor: pointer; }

.toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.toggle { background: #c7d1cb; transition: background-color 140ms ease; }
.toggle span { right: auto; left: 4px; transition: transform 140ms ease; }
.toggle-input:checked ~ .toggle { background: var(--green); }
.toggle-input:checked ~ .toggle span { transform: translateX(20px); }
.toggle-input:focus-visible ~ .toggle { outline: 3px solid var(--green); outline-offset: 2px; }

.result-preview { margin-top: 18px; }
.result-preview.is-pending strong { color: var(--muted); font-size: 1.35rem; }

.quote-wide { cursor: pointer; }

.form-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-footnote a { color: var(--green-dark); font-weight: 700; text-decoration: underline; }

/* Scanning state */
.scan-steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.scan-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  opacity: 0.45;
  animation: scan-step 600ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.scan-steps li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
  flex: 0 0 auto;
}

@keyframes scan-step {
  to { opacity: 1; color: var(--ink); border-color: rgba(31, 138, 112, 0.45); background: var(--soft-green); }
}

.scan-bar {
  height: 8px;
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.scan-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  animation: scan-bar 3300ms ease-in-out forwards;
}

@keyframes scan-bar { to { width: 100%; } }

/* Result */
.result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0 0 6px;
}

.result-summary div { display: grid; gap: 2px; }
.result-summary dt { color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.result-summary dd { margin: 0; font-weight: 750; }

.result-drivers {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-drivers li { padding-left: 18px; position: relative; }
.result-drivers li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
}

.expectation-question {
  margin: 0 0 10px;
  font-weight: 800;
}

.expectation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.expectation-actions .button { white-space: normal; }

/* Contact */
.form-grid.single { grid-template-columns: 1fr; }

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.consent input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--green); }
.consent a { color: var(--green-dark); font-weight: 700; text-decoration: underline; }

.thanks-text { color: var(--ink); font-size: 1.02rem; }

/* Card frames (Aktuelle Anfragen + Ablauf) */
.price-card,
.process-list article {
  border: 1.5px solid #b7c5bd;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(23, 33, 43, 0.05);
}

.price-card.featured { border-color: var(--green); }

/* Location line in price cards */
.price-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 0 !important;
  color: var(--green-dark) !important;
  font-size: 0.86rem;
  font-weight: 800;
}
.price-meta::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

/* Closing CTA spacing */
.quote-section .eyebrow { margin-bottom: 16px; }
.quote-section h2 { margin-bottom: 18px; }
.quote-section p { line-height: 1.6; }

/* Sections */
.section-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer { justify-content: space-between; flex-wrap: wrap; }
.footer-identity { display: flex; align-items: center; gap: 16px; }
.footer-nav { display: flex; gap: 6px; }
.footer-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.footer-nav a:hover { background: var(--soft-green); color: var(--green-dark); }

/* Legal pages */
.legal {
  max-width: 820px;
  padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 56px) 72px;
}

.legal h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin-bottom: 28px; }
.legal h2 { margin-top: 28px; margin-bottom: 8px; font-size: 1.2rem; }
.legal p { color: var(--ink); overflow-wrap: anywhere; }
.legal a { color: var(--green-dark); font-weight: 700; text-decoration: underline; }
.legal-updated { color: var(--muted); font-size: 0.86rem; margin-top: 32px; }

@media (max-width: 640px) {
  .floor-row,
  .result-summary,
  .expectation-actions { grid-template-columns: 1fr; }
  .fill-options { flex-direction: column; }
  .site-footer { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .scan-steps li { animation-duration: 1ms; }
  .scan-bar span { animation-duration: 1ms; width: 100%; }
}
