/* Archivo (SIL OFL 1.1, siehe assets/fonts/OFL.txt) – lokal eingebunden statt Google Fonts */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Handwerker Ostfriesland – Landingpage
   Palette nach Ostfriesischer Rose (Kobalt auf Porzellan), Klinker, Deich und Watt. */

:root {
  --porzellan: #F6F8F9;
  --weiss: #FFFFFF;
  --himmel: #D9E5EC;
  --kobalt: #1E3E8C;
  --kobalt-dunkel: #142B66;
  --kobalt-hell: #E4EAF6;
  --watt: #26313A;
  --watt-soft: #56636D;
  --linie: #C9D3DA;
  --deich: #5F7F4F;
  --klinker: #8E3226;
  --fehler: #A3261B;

  --font: "Archivo", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--porzellan);
  color: var(--watt);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; color: var(--watt); }
p { margin: 0; }
a { color: var(--kobalt); text-underline-offset: .18em; }
a:hover { color: var(--kobalt-dunkel); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: var(--radius);
  background: var(--kobalt); color: var(--weiss);
  font: 700 1rem/1 var(--font); font-stretch: 110%;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--kobalt-dunkel); color: var(--weiss); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-light { background: var(--weiss); color: var(--kobalt); }
.btn-light:hover { background: var(--kobalt-hell); color: var(--kobalt-dunkel); }

.btn-link {
  border: 0; background: none; padding: 8px 4px; cursor: pointer;
  font: 600 1rem var(--font); color: var(--watt-soft);
  text-decoration: underline; text-underline-offset: .2em;
}
.btn-link:hover { color: var(--watt); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--himmel) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--linie) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--watt); text-decoration: none;
  font-weight: 800; font-stretch: 125%; font-size: 1.0625rem; letter-spacing: -.005em;
}
.brand:hover { color: var(--watt); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark rect { fill: var(--kobalt); }
.brand-mark path { fill: none; stroke: var(--porzellan); stroke-width: 2.5; stroke-linejoin: round; }

.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a:not(.btn) { color: var(--watt); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.header-nav a:not(.btn):hover { color: var(--kobalt); }

@media (max-width: 760px) {
  .header-nav a:not(.btn) { display: none; }
  .brand span { font-size: .9375rem; }
}

/* ---------- Hero ---------- */
.hero { background: var(--himmel); position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(40px, 6vw, 72px);
}

.hero-copy { display: flex; flex-direction: column; min-width: 0; }

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .96;
  letter-spacing: -.02em;
  max-width: 15ch;
  text-wrap: balance;
}

.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--watt);
}

.house-hint {
  margin-top: 20px;
  min-height: 1.55em;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--kobalt);
}

.house-wrap { margin-top: auto; padding-top: 24px; }
.house { display: block; width: 100%; height: auto; overflow: visible; }

.house .gull { fill: none; stroke: var(--watt-soft); stroke-width: 2; stroke-linecap: round; }
.house .windows rect { fill: #F4F6F7; }
.house .windows rect.glass { fill: #93ADBE; }
.house .windows path { stroke: #F4F6F7; stroke-width: 3; }

.mill-sails { transform-origin: 752px 290px; animation: mill 18s linear infinite; }
@keyframes mill { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mill-sails { animation: none; } }

.part { cursor: pointer; outline: none; }
.part .hl {
  fill: var(--kobalt); fill-opacity: 0;
  stroke: var(--kobalt); stroke-opacity: 0; stroke-width: 3; stroke-linejoin: round;
  pointer-events: all;
  transition: fill-opacity .15s, stroke-opacity .15s;
}
.part.is-hover .hl { fill-opacity: .2; stroke-opacity: 1; }
.part.is-selected .hl { fill-opacity: .38; stroke-opacity: 1; }
.part:focus-visible .hl { fill-opacity: .2; stroke-opacity: 1; stroke-dasharray: 7 5; }

.ground { height: 44px; background: var(--deich); }

/* Formular ragt über den Deich in die nächste Sektion */
.hero-form { position: relative; z-index: 2; margin-bottom: -140px; align-self: start; scroll-margin-top: 80px; }

/* ---------- Panel / Formular ---------- */
.panel {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 4px solid var(--kobalt);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 32px);
  box-shadow: 0 24px 48px -32px rgba(20, 43, 102, .45);
}

.panel-head { display: grid; gap: 14px; margin-bottom: 20px; }
.panel-title { font-size: 1.5rem; font-weight: 800; font-stretch: 115%; line-height: 1.1; letter-spacing: -.01em; }

.progress { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.progress li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding-top: 8px; border-top: 3px solid var(--linie);
  font-size: .8125rem; font-weight: 600; color: var(--watt-soft);
}
.progress li span {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--linie); color: var(--watt); font-size: .75rem; font-weight: 700;
}
.progress li.is-current, .progress li.is-done { border-top-color: var(--kobalt); color: var(--watt); }
.progress li.is-current span, .progress li.is-done span { background: var(--kobalt); color: var(--weiss); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { padding: 0; margin-bottom: 14px; font-weight: 700; font-size: 1.0625rem; }

/* Gewerk-Kacheln */
.trade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trade-opt { position: relative; display: block; cursor: pointer; }
.trade-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.trade-opt span {
  display: block; height: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--linie); border-radius: var(--radius);
  background: var(--weiss);
  transition: border-color .12s, background-color .12s;
}
.trade-opt strong { display: block; font-size: .96875rem; font-weight: 700; line-height: 1.25; }
.trade-opt small { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.35; color: var(--watt-soft); }
.trade-opt:hover span { border-color: var(--kobalt); }
.trade-opt input:checked + span { border-color: var(--kobalt); background: var(--kobalt); color: var(--weiss); }
.trade-opt input:checked + span small { color: #D3DCF0; }
.trade-opt input:focus-visible + span { outline: 3px solid var(--kobalt); outline-offset: 2px; }

/* Felder */
.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field-row .field-plz { max-width: none; }
.field-label { font-size: .875rem; font-weight: 700; }
.opt { font-weight: 500; color: var(--watt-soft); }

input:not([type="radio"]):not([type="checkbox"]), textarea, select {
  width: 100%; min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--linie); border-radius: var(--radius);
  background: var(--porzellan);
  font: 500 1rem/1.4 var(--font); color: var(--watt);
}
textarea { resize: vertical; min-height: 64px; }
input::placeholder, textarea::placeholder { color: #8A96A0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--kobalt); background: var(--weiss); box-shadow: 0 0 0 3px var(--kobalt-hell); }
input[aria-invalid="true"] { border-color: var(--fehler); }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-block; padding: 6px 11px;
  border: 1.5px solid var(--linie); border-radius: 999px;
  font-size: .875rem; font-weight: 600; background: var(--weiss);
  transition: border-color .12s, background-color .12s;
}
.pill:hover span { border-color: var(--kobalt); }
.pill input:checked + span { background: var(--kobalt-hell); border-color: var(--kobalt); color: var(--kobalt-dunkel); }
.pill input:focus-visible + span { outline: 3px solid var(--kobalt); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 4px 0 8px; font-size: .8125rem; line-height: 1.45; color: var(--watt-soft); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--kobalt); }

.field-error { margin: -6px 0 14px; font-size: .875rem; font-weight: 600; color: var(--fehler); }
.field .field-error { margin: 2px 0 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.panel-actions .btn { margin-left: auto; min-width: 140px; }
.panel-note { margin-top: 14px; font-size: .8125rem; color: var(--watt-soft); }

.panel-done { display: grid; gap: 12px; }
.panel-done:focus { outline: none; }
.done-mark { width: 48px; height: 48px; }
.done-mark circle { fill: var(--kobalt-hell); }
.done-mark path { fill: none; stroke: var(--kobalt); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.done-summary { font-size: .9375rem; color: var(--watt-soft); }
.panel-done .btn-link { justify-self: start; padding-left: 0; }

/* ---------- Sektionen ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.625rem);
  font-weight: 800; font-stretch: 118%;
  line-height: 1.05; letter-spacing: -.015em;
  text-wrap: balance;
}

.section-steps { padding-top: calc(140px + clamp(48px, 6vw, 80px)); }
.section-steps .wrap { max-width: var(--wrap); }
.steps {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px);
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 64px; max-width: 34ch; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  font-size: 3.25rem; font-weight: 800; font-stretch: 125%; line-height: 1;
  color: var(--kobalt);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; left: 56px; right: calc(-1 * clamp(24px, 4vw, 48px) + 12px);
  border-top: 2px dashed var(--linie);
}
.steps h3 { font-size: 1.1875rem; font-weight: 700; font-stretch: 105%; margin-bottom: 8px; }
.steps p { color: var(--watt-soft); }

.section-trades { background: var(--weiss); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; }
.section-head p { color: var(--watt-soft); max-width: 36em; }

.trade-list {
  margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--watt);
}
.trade-item { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--linie); display: grid; grid-template-rows: auto 1fr auto; gap: 6px; }
.trade-item dt { font-size: 1.1875rem; font-weight: 800; font-stretch: 112%; }
.trade-item dd { margin: 0; color: var(--watt-soft); font-size: .96875rem; max-width: 34ch; }
.trade-item dd.trade-cta { margin-top: 8px; }
.trade-item a { font-weight: 700; font-size: .9375rem; }

.section-region { padding-bottom: clamp(48px, 7vw, 88px); }
.region-text { margin-top: 16px; max-width: 40em; color: var(--watt-soft); }
.towns {
  margin-top: 36px;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-weight: 300; font-stretch: 125%;
  line-height: 1.35;
  color: var(--kobalt);
  word-spacing: .55em;
  max-width: none;
}

.section-pros { background: var(--kobalt); color: var(--weiss); }
.section-pros h2 { color: var(--weiss); max-width: 16ch; }
.pros-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
.pros-grid > div > p { margin-top: 20px; max-width: 34em; color: #D3DCF0; }
.pros-list ul { list-style: none; margin: 0 0 28px; padding: 0; }
.pros-list li { padding: 14px 0 14px 32px; border-bottom: 1px solid rgba(255,255,255,.22); position: relative; font-weight: 600; }
.pros-list li::before {
  content: ""; position: absolute; left: 2px; top: 19px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--weiss); border-bottom: 2.5px solid var(--weiss); transform: rotate(-45deg);
}

.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; }
.faq { border-top: 2px solid var(--watt); }
.faq details { border-bottom: 1px solid var(--linie); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px 0; font-weight: 700; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--kobalt); border-bottom: 2px solid var(--kobalt);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { padding: 0 0 20px; max-width: 60ch; color: var(--watt-soft); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--watt); color: #C3CCD3; padding: 40px 0; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.brand-footer { color: var(--weiss); }
.brand-footer .brand-mark path { stroke: var(--weiss); }
.footer-nav { display: flex; gap: 24px; justify-content: flex-end; flex-wrap: wrap; }
.footer-nav a { color: var(--weiss); font-weight: 600; font-size: .9375rem; }
.footer-small { grid-column: 1 / -1; font-size: .8125rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .trade-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .house-wrap { margin: 0 calc(-1 * var(--gutter)); padding: 24px var(--gutter) 0; border-bottom: 36px solid var(--deich); }
  .ground { display: none; }
  .hero-form {
    margin: 0 calc(-1 * var(--gutter));
    padding: 24px var(--gutter) 8px;
    background: var(--porzellan);
  }
  .section-steps { padding-top: clamp(48px, 8vw, 80px); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding: 0 0 0 64px; max-width: 46ch; }
  .steps li::before { font-size: 2.5rem; }
  .steps li:not(:last-child)::after { display: none; }
  .section-head, .pros-grid, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .trade-list { grid-template-columns: minmax(0, 1fr); }
  .trade-item { padding-right: 0; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 340px) {
  .trade-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---------- Ergänzungen: dynamische Fragen, Hinweise ---------- */
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--watt-soft) 50%), linear-gradient(135deg, var(--watt-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; cursor: pointer; }
.field-hint { display: block; margin: -8px 0 14px; font-size: .8125rem; line-height: 1.45; color: var(--watt-soft); }
.field .field-hint { margin: 0; }
.field.is-invalid .field-label { color: var(--fehler); }
.field.is-invalid .pill span, .field.is-invalid input { border-color: var(--fehler); }
.progress li { font-size: .75rem; }
@media (max-width: 420px) { .progress li { flex-direction: column; align-items: flex-start; gap: 4px; } }

.steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) and (min-width: 961px) { .steps.steps-4 li { max-width: none; } }

.section-benefits { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.benefits { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.benefits li { border-top: 3px solid var(--kobalt); padding-top: 16px; }
.benefits h3 { font-size: 1.125rem; font-weight: 700; font-stretch: 105%; margin-bottom: 6px; }
.benefits p { color: var(--watt-soft); font-size: .96875rem; }

.section-partners { padding-top: 0; }
.partner-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.partner-list li { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.partner-list strong { font-weight: 700; }
.partner-list span { font-size: .875rem; color: var(--watt-soft); }
.partner-list p { font-size: .9375rem; color: var(--watt-soft); }

.section-privacy { background: var(--weiss); border-top: 1px solid var(--linie); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; }
.privacy-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.privacy-list dt { font-weight: 700; margin-bottom: 4px; }
.privacy-list dd { margin: 0; color: var(--watt-soft); }

@media (max-width: 960px) {
  .steps.steps-4 { grid-template-columns: minmax(0, 1fr); }
  .benefits, .partner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .benefits, .partner-list, .privacy-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Rechtliche Seiten ---------- */
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; font-stretch: 118%; margin: 24px 0 16px; }
.legal h2 { font-size: 1.1875rem; margin: 32px 0 8px; }
.legal p { color: var(--watt-soft); }
.legal-todo { padding: 12px 16px; border-left: 4px solid var(--fehler); background: var(--weiss); color: var(--watt) !important; font-weight: 600; }
