/* Alte Meierei Drelsdorf – Stylesheet (Richtung C: klar und praktisch)
   Bilder mit .bild--entwurf sind Platzhalter und werden durch Bernds Originale ersetzt. */

@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/public-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- Farben und Maße ---------- */

:root {
  --grund: #fdf8e3;
  --flaeche: #f5edcc;
  --feld: #fffdf5;
  --tinte: #1f2328;
  --leise: #5f6066;
  --akzent: #8e3a2a;
  --akzent-dunkel: #74301f;
  --auf-akzent: #ffffff;
  --gruen: #2f6b4f;
  --rahmen: #ebe1bd;
  --rahmen-kraeftig: #d4c89f;
  --fehler: #b02a1a;
  --hauch-akzent: color-mix(in oklch, var(--akzent) 7%, var(--feld));
  --schatten: 0 10px 30px rgb(80 64 10 / 0.10);

  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4.5rem;
  --rand: clamp(16px, 4vw, 40px);
  --breite: 72rem;
  --r-klein: 10px;
  --r-gross: 14px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #12181d; --flaeche: #1b232a; --feld: #161e24; --tinte: #e9ece9; --leise: #a3aeb5;
    --akzent: #d27a60; --akzent-dunkel: #e2917a; --auf-akzent: #1a1310;
    --gruen: #7fc4a0; --rahmen: #29333b; --rahmen-kraeftig: #3a4650; --fehler: #f08a72;
    --schatten: 0 10px 30px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --grund: #12181d; --flaeche: #1b232a; --feld: #161e24; --tinte: #e9ece9; --leise: #a3aeb5;
  --akzent: #d27a60; --akzent-dunkel: #e2917a; --auf-akzent: #1a1310;
  --gruen: #7fc4a0; --rahmen: #29333b; --rahmen-kraeftig: #3a4650; --fehler: #f08a72;
  --schatten: 0 10px 30px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: var(--s3); }
html:has(dialog[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 400 1.0625rem/1.6 var(--sans); text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--akzent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--sans); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-block-start: var(--s2); }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }
.lesen { max-width: 40rem; }
.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.oben { font-size: 0.9375rem; color: var(--leise); }

.skip { position: absolute; inset-inline-start: var(--s2); inset-block-start: -4rem; background: var(--tinte); color: var(--grund); padding: var(--s1) var(--s2); border-radius: var(--r-klein); z-index: 30; }
.skip:focus { inset-block-start: var(--s2); }

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

.kopf { border-block-end: 1px solid var(--rahmen); background: var(--grund); }
.kopf__innen { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 68px; }
.marke { font-weight: 600; color: var(--tinte); text-decoration: none; line-height: 1.2; }
.kopf__nav { display: none; }
.nav { display: flex; gap: var(--s3); margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.nav a { color: var(--leise); text-decoration: none; padding-block: 0.6rem; display: inline-block; }
.nav a:hover { color: var(--tinte); }
@media (min-width: 56rem) { .kopf__nav { display: block; margin-inline-start: auto; } }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.7rem 1.4rem;
  font: 600 1rem/1.2 var(--sans); text-align: center;
  border-radius: var(--r-klein); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.knopf:active { transform: scale(0.97); }
.knopf--voll { background: var(--akzent); color: var(--auf-akzent); }
.knopf--rand { background: var(--feld); color: var(--tinte); border-color: var(--rahmen-kraeftig); }
.knopf--klein { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.knopf--gross { min-height: 56px; padding-inline: 2rem; font-size: 1.0625rem; }
.knopf--breit { width: 100%; }
.knopf svg { width: 18px; height: 18px; flex: none; }
.knopf:disabled { opacity: 0.6; cursor: progress; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .knopf--voll:hover { background: var(--akzent-dunkel); }
  .knopf--rand:hover { border-color: var(--leise); }
}

/* ---------- Start: Bilder, Angebot, Karte ---------- */

.start { padding-block: var(--s3) var(--s5); }
.bildraster { position: relative; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); border-radius: var(--r-gross); overflow: hidden; }
.bildraster button { display: block; padding: 0; border: 0; background: var(--flaeche); cursor: zoom-in; min-height: 0; transition: transform 160ms var(--ease-out); }
.bildraster img { width: 100%; height: 100%; object-fit: cover; }
.bildraster button:nth-child(n+2) { display: none; }
.bildraster button:first-child img { aspect-ratio: 4 / 3; }
@media (min-width: 48rem) {
  .bildraster { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: clamp(320px, 44vw, 520px); }
  .bildraster button:first-child { grid-row: span 2; }
  .bildraster button:nth-child(-n+3) { display: block; }
  .bildraster button:first-child img { aspect-ratio: auto; }
}
.bildraster__alle {
  position: absolute; inset-block-end: 12px; inset-inline-end: 12px;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.5rem 1rem;
  background: var(--feld); color: var(--tinte); border: 1px solid var(--rahmen);
  border-radius: var(--r-klein); font: 600 0.9375rem/1 var(--sans); text-decoration: none;
  box-shadow: var(--schatten);
}
.bildraster__alle svg { width: 18px; height: 18px; }

.angebot { display: grid; gap: var(--s4); margin-block-start: var(--s4); }
@media (min-width: 60rem) { .angebot { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: var(--s5); align-items: start; } }
.angebot h1 { margin-block: 0.4rem var(--s2); }
.angebot__text > p:not(.oben) { color: var(--leise); max-width: 40rem; }

.eckdaten { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s3) 0 0; padding: 0; list-style: none; }
.eckdaten li { background: var(--flaeche); border-radius: 99px; padding: 0.45rem 0.9rem; font-size: 0.9375rem; }

.karte { display: grid; gap: 0.9rem; padding: var(--s3); background: var(--feld); border: 1px solid var(--rahmen); border-radius: var(--r-gross); box-shadow: var(--schatten); }
@media (min-width: 60rem) { .karte { position: sticky; inset-block-start: var(--s3); } }
.karte h2 { font-size: 1.25rem; }
.karte__schritte { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; counter-reset: k; font-size: 0.9375rem; }
.karte__schritte li { counter-increment: k; display: flex; gap: 0.6rem; align-items: center; }
.karte__schritte li::before { content: counter(k); flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--flaeche); font-weight: 600; font-size: 0.8125rem; }
.karte__klein { font-size: 0.875rem; color: var(--leise); text-align: center; }

/* ---------- Abschnitte ---------- */

.abschnitt { padding-block: var(--s6); border-block-start: 1px solid var(--rahmen); }
.abschnitt__kopf { display: grid; gap: 0.6rem; margin-block-end: var(--s4); max-width: 44rem; }
.abschnitt__kopf p { color: var(--leise); }

.vorteile { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.vorteile li { background: var(--flaeche); border-radius: var(--r-klein); padding: 1.25rem; display: grid; gap: 0.3rem; align-content: start; }
.vorteile p { color: var(--leise); font-size: 0.9375rem; }

.schrittfolge { display: grid; gap: 12px; margin: 0 0 var(--s4); padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 48rem) { .schrittfolge { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.schrittfolge li { counter-increment: s; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.9rem; border: 1px solid var(--rahmen); border-radius: var(--r-klein); padding: 1.1rem; }
.schrittfolge li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tinte); color: var(--grund); font-weight: 600; font-size: 0.9375rem; }
.schrittfolge p { color: var(--leise); font-size: 0.9375rem; }

/* ---------- Bilder + Entwurfsmarke ---------- */

.bild { position: relative; margin: 0; background: var(--flaeche); border-radius: var(--r-klein); overflow: hidden; }
.bild img { width: 100%; }
/* Entwurfsbilder tragen den Stempel „ENTWURF – Bild ersetzen“ schon im Bild.
   Die gestrichelte Linie markiert sie zusätzlich. Wenn das Original da ist:
   Datei austauschen und die Klasse bild--entwurf entfernen. */
.bild--entwurf { outline: 2px dashed #e0b400; outline-offset: -2px; }
.bild--entwurf img { object-position: left top; }

/* ---------- Galerie ---------- */

.galerie__titel { margin-block: var(--s4) var(--s2); display: flex; align-items: baseline; gap: 0.6rem; }
.galerie__titel:first-of-type { margin-block-start: 0; }
.galerie__titel small { font-weight: 400; font-size: 0.9375rem; color: var(--leise); letter-spacing: 0; }
.galerie { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .galerie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 72rem) { .galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.galerie button { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--flaeche); border-radius: var(--r-klein); overflow: hidden; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out); }
.galerie button:active, .bildraster button:active { transform: scale(0.98); }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .galerie button:hover img { transform: scale(1.03); } }

/* ---------- Lupe (Großansicht) ---------- */

.lupe { border: 0; padding: 0; margin: auto; background: transparent; color: #f1f2ee; width: min(100vw - 2 * var(--rand), 80rem); max-width: none; max-height: 100dvh; overflow: visible; }
.lupe::backdrop { background: rgb(10 14 17 / 0.92); }
@media (prefers-reduced-motion: no-preference) { .lupe[open] { animation: lupe-auf 220ms var(--ease-out); } }
@media (prefers-reduced-motion: reduce) { .lupe[open] { animation: blende 150ms ease; } }
@keyframes lupe-auf { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes blende { from { opacity: 0; } to { opacity: 1; } }
.lupe__bild { margin: 0; display: grid; justify-items: center; gap: 0.75rem; }
.lupe__bild img { max-height: calc(100dvh - 9rem); width: auto; max-width: 100%; border-radius: var(--r-klein); touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
.lupe__bild figcaption { font-size: 1rem; text-align: center; }
.lupe__leiste { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-block-start: 0.75rem; font-size: 0.9375rem; color: #c5cbc6; }
.lupe__knoepfe { display: flex; gap: var(--s1); }
.lupe__knoepfe button { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0; background: rgb(255 255 255 / 0.1); color: #fff; border: 1px solid rgb(255 255 255 / 0.25); border-radius: var(--r-klein); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.lupe__knoepfe button:active { transform: scale(0.97); }
.lupe__knoepfe button:focus-visible { outline-color: #fff; }
.lupe__knoepfe svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .lupe__knoepfe button:hover { background: rgb(255 255 255 / 0.18); } }

/* ---------- Geschichte ---------- */

.geschichte { display: grid; gap: var(--s4); }
@media (min-width: 60rem) { .geschichte { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: var(--s5); align-items: start; } }
.zeitleiste { list-style: none; margin: 0; padding: 0; }
.zeitleiste > li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 var(--s2); padding-block: 1.1rem; border-block-start: 1px solid var(--rahmen); }
.zeitleiste > li:last-child { border-block-end: 1px solid var(--rahmen); }
.jahr { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--akzent); }
.zeitleiste h3 { margin-block-end: 0.25rem; }
.zeitleiste p { color: var(--leise); font-size: 0.9375rem; }
.geschichte__bilder { display: grid; gap: var(--s2); }
.geschichte__bilder figure { margin: 0; display: grid; gap: 0.4rem; }
.geschichte__bilder figcaption { font-size: 0.875rem; color: var(--leise); }
details.mehr { margin-block-start: var(--s3); }
details.mehr summary { cursor: pointer; font-weight: 600; color: var(--akzent); min-height: 44px; display: flex; align-items: center; }
details.mehr[open] summary { margin-block-end: var(--s1); }
details.mehr p { color: var(--leise); font-size: 0.9375rem; max-width: 40rem; }

/* ---------- Kontakt ---------- */

.kontakt { display: grid; gap: var(--s4); }
@media (min-width: 60rem) { .kontakt { grid-template-columns: 22rem minmax(0, 1fr); column-gap: var(--s5); } }
.kontakt__links { display: grid; gap: 12px; align-content: start; }
.direkt { display: grid; gap: 12px; margin: 0; }
.direkt div { display: grid; gap: 0.1rem; background: var(--flaeche); border-radius: var(--r-klein); padding: 1rem 1.25rem; }
.direkt dt { font-size: 0.875rem; color: var(--leise); }
.direkt dd { margin: 0; font-weight: 600; font-size: 1.125rem; overflow-wrap: anywhere; }
.direkt dd a { color: var(--tinte); }

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

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.formular { display: grid; gap: var(--s3); align-content: start; }
.feld { display: grid; gap: 0.45rem; }
.feld > label, .feld > legend { font-weight: 600; font-size: 1rem; line-height: 1.4; }
.feld--wahl > legend { margin-block-end: 0.6rem; }
.optional { font-weight: 400; color: var(--leise); }
.hinweis { font-size: 0.9375rem; color: var(--leise); line-height: 1.45; }
.feld input:not([type="radio"], [type="checkbox"]), .feld textarea, .feld select {
  width: 100%; min-height: 52px; padding: 0.7rem 0.9rem;
  font: 400 1.0625rem/1.4 var(--sans); color: var(--tinte);
  background: var(--feld); border: 1px solid var(--rahmen-kraeftig); border-radius: var(--r-klein);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.feld textarea { min-height: 9rem; resize: vertical; }
.feld input::placeholder { color: color-mix(in oklch, var(--leise) 75%, transparent); }
.feld input:focus-visible, .feld textarea:focus-visible, .feld select:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--akzent) 22%, transparent); }
.feld--zwei { display: grid; gap: var(--s3); }
@media (min-width: 40rem) { .feld--zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.auswahl { position: relative; }
.auswahl select { appearance: none; padding-inline-end: 2.75rem; cursor: pointer; }
.auswahl::after { content: ""; position: absolute; inset-inline-end: 1.1rem; inset-block-start: 50%; width: 0.55rem; height: 0.55rem; border-inline-end: 2px solid var(--leise); border-block-end: 2px solid var(--leise); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.wahl { display: grid; gap: 8px; }
.wahl--zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) { .wahl--spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wahl--drei { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.option {
  display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.7rem 1rem;
  background: var(--feld); border: 1px solid var(--rahmen-kraeftig); border-radius: var(--r-klein);
  font-size: 1.0625rem; line-height: 1.35; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}
.option:active { transform: scale(0.985); }
.option input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--akzent); cursor: pointer; }
.option:has(input:checked) { border-color: var(--akzent); background: var(--hauch-akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.option:has(input:focus-visible) { outline: 3px solid var(--akzent); outline-offset: 2px; }
.option input:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) { .option:hover { border-color: var(--leise); } .option:has(input:checked):hover { border-color: var(--akzent); } }

.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; font-size: 1rem; line-height: 1.5; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--akzent); cursor: pointer; }
.check--karte { padding: 0.9rem 1rem; background: var(--feld); border: 1px solid var(--rahmen-kraeftig); border-radius: var(--r-klein); transition: border-color 160ms ease, background-color 160ms ease; }
.check--karte:has(input:checked) { border-color: var(--akzent); background: var(--hauch-akzent); }
.check--karte:has(input:focus-visible) { outline: 3px solid var(--akzent); outline-offset: 2px; }
.check--karte input:focus-visible { outline: none; }

.fehler { color: var(--fehler); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.feld[data-fehler] input:not([type="radio"], [type="checkbox"]), .feld[data-fehler] select, .feld[data-fehler] textarea { border-color: var(--fehler); }
.feld[data-fehler] .option, .feld[data-fehler] .check--karte { border-color: color-mix(in oklch, var(--fehler) 55%, var(--rahmen)); }
.honig { display: none; }
.status { padding: var(--s2); border-radius: var(--r-klein); background: var(--feld); border: 1px solid var(--fehler); font-size: 1rem; }
.status[hidden] { display: none; }
.formular__fuss { display: grid; gap: var(--s2); justify-items: start; }
.formular__fuss .hinweis { max-width: 34rem; }
@media (max-width: 39.99rem) { .formular__fuss .knopf { width: 100%; } }

/* ---------- Selbstauskunft ---------- */

.seite-kopf { padding-block: var(--s5) var(--s4); display: grid; gap: var(--s2); }
.seite-kopf h1 { font-size: clamp(2rem, 5vw, 3rem); }
.seite-kopf .lesen { color: var(--leise); }
.vertraulich { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s1) 0 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.vertraulich li { display: flex; align-items: center; gap: 0.45rem; background: var(--flaeche); border-radius: 99px; padding: 0.45rem 0.9rem; }
.vertraulich svg { width: 16px; height: 16px; color: var(--gruen); flex: none; }

.auskunft { display: grid; gap: var(--s3); padding-block-end: var(--s6); }
@media (min-width: 64rem) { .auskunft { grid-template-columns: 16rem minmax(0, 44rem); column-gap: var(--s6); align-items: start; } }
.auskunft__leiste {
  position: sticky; inset-block-start: 0; z-index: 5;
  margin-inline: calc(var(--rand) * -1); padding: 0.75rem var(--rand);
  background: color-mix(in oklch, var(--grund) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-block: 1px solid var(--rahmen);
}
@media (min-width: 64rem) {
  .auskunft__leiste { inset-block-start: var(--s3); margin: 0; padding: var(--s3); background: var(--feld); border: 1px solid var(--rahmen); border-radius: var(--r-gross); box-shadow: var(--schatten); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.fortschritt__text { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem var(--s2); font-size: 0.9375rem; color: var(--leise); }
.fortschritt__text strong { color: var(--tinte); }
.fortschritt[data-komplett] [data-fertig-text] { color: var(--gruen); font-weight: 600; }
@media (min-width: 64rem) { .fortschritt__text { flex-direction: column; } }
.fortschritt__balken { height: 6px; margin-block-start: 0.5rem; background: var(--flaeche); border-radius: 3px; overflow: hidden; }
.fortschritt__balken span { display: block; height: 100%; background: var(--akzent); border-radius: 3px; transform-origin: left center; transform: scaleX(0); }
@media (prefers-reduced-motion: no-preference) { .fortschritt__balken span { transition: transform 250ms var(--ease-out); } }
.fortschritt[data-komplett] .fortschritt__balken span { background: var(--gruen); }
.abschnittsliste { display: none; margin: var(--s3) 0 0; padding: 0; list-style: none; }
@media (min-width: 64rem) { .abschnittsliste { display: grid; gap: 0.1rem; } }
.abschnittsliste a { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; color: var(--leise); text-decoration: none; font-size: 0.9375rem; }
.abschnittsliste a:hover { color: var(--tinte); }
.abschnittsliste .nr { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--flaeche); font-weight: 600; font-size: 0.8125rem; color: var(--leise); transition: background-color 200ms ease, color 200ms ease; }
.abschnittsliste .nr svg { display: none; width: 14px; height: 14px; }
.abschnittsliste a[data-fertig] { color: var(--tinte); }
.abschnittsliste a[data-fertig] .nr { background: var(--gruen); color: var(--grund); }
.abschnittsliste a[data-fertig] .nr span { display: none; }
.abschnittsliste a[data-fertig] .nr svg { display: block; }

.block { display: grid; gap: var(--s3); padding-block: var(--s5); border-block-start: 1px solid var(--rahmen); }
.block:first-of-type { padding-block-start: var(--s2); border-block-start: 0; }
.block__titel { display: flex; align-items: center; gap: 0.75rem; font-size: clamp(1.35rem, 2.6vw, 1.6rem); }
.block__titel .nr { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tinte); color: var(--grund); font-size: 0.9375rem; letter-spacing: 0; }
.erklaerung { padding: var(--s3); background: var(--flaeche); border-radius: var(--r-klein); font-size: 1rem; color: var(--leise); }
.erklaerung strong { display: block; margin-block-end: 0.35rem; color: var(--tinte); }

/* ---------- Hinweisbox (Entwurf) ---------- */

.entwurf-box { padding: var(--s3); border: 2px dashed #e0b400; border-radius: var(--r-klein); background: color-mix(in oklch, #ffd84a 14%, var(--grund)); font-size: 1rem; }
.entwurf-box strong { display: block; margin-block-end: 0.3rem; }

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

.seite { padding-block: var(--s5) var(--s6); }
.seite h1 { margin-block-end: var(--s4); }
.seite h2 { font-size: 1.25rem; margin-block: var(--s4) var(--s1); }
.seite address { font-style: normal; }
.seite ul { padding-inline-start: 1.25rem; }
.seite li + li { margin-block-start: 0.35rem; }
.danke { display: grid; gap: var(--s2); justify-items: start; }
.danke h1 { margin: 0; }

/* ---------- Handy: Knopf zur Selbstauskunft bleibt sichtbar ---------- */

.mobil-cta { display: none; }
@media (max-width: 59.99rem) {
  .mobil-cta {
    display: block; position: fixed; z-index: 20; inset-inline: 0; inset-block-end: 0;
    padding: 0.75rem var(--rand) calc(0.75rem + env(safe-area-inset-bottom));
    background: color-mix(in oklch, var(--grund) 94%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-block-start: 1px solid var(--rahmen);
    transition: transform 200ms var(--ease-out);
  }
  .mobil-cta[data-weg] { transform: translateY(110%); }
  body:has(.mobil-cta) { padding-block-end: 5.5rem; }
}

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

.fuss { padding-block: var(--s5) var(--s4); background: var(--flaeche); font-size: 0.9375rem; color: var(--leise); }
.fuss__innen { display: grid; gap: var(--s3); }
@media (min-width: 48rem) { .fuss__innen { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.fuss__marke { font-weight: 600; color: var(--tinte); font-size: 1rem; margin-block-end: 0.2rem; }
.fuss ul { display: flex; flex-wrap: wrap; gap: 0.25rem var(--s3); list-style: none; margin: 0; padding: 0; }
.fuss a { color: var(--tinte); display: inline-block; padding-block: 0.5rem; }
.fuss__unten { margin-block-start: var(--s4); padding-block-start: var(--s3); border-block-start: 1px solid var(--rahmen); font-size: 0.875rem; }

/* ---------- Wohnungen A–F ---------- */

.wohnungen { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .wohnungen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .wohnungen { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.wohnung {
  display: grid; place-items: center; gap: 0.2rem; min-height: 96px; padding: 1rem;
  background: var(--feld); color: var(--tinte); text-decoration: none; text-align: center;
  border: 1px solid var(--rahmen-kraeftig); border-radius: var(--r-gross);
  font-weight: 600; font-size: 1.125rem;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease;
}
.wohnung:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .wohnung:hover { border-color: var(--akzent); box-shadow: var(--schatten); } }

/* ---------- Detailseite einer Wohnung ---------- */

.wohnung-seite { display: grid; gap: var(--s4); margin-block-start: var(--s2); }
@media (min-width: 60rem) { .wohnung-seite { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: var(--s5); align-items: start; } }
.wohnung-seite__haupt { display: grid; gap: var(--s3); align-content: start; }
.wohnung-seite__haupt h1, .wohnung-seite__haupt h2 { margin: 0; }
.bild-platzhalter {
  display: grid; place-items: center; aspect-ratio: 16 / 10;
  background: var(--flaeche); border: 2px dashed var(--rahmen-kraeftig); border-radius: var(--r-gross);
  color: var(--leise); font-weight: 600;
}
.eckdaten-liste { display: grid; margin: 0; }
.eckdaten-liste div { display: flex; justify-content: space-between; gap: var(--s2); padding-block: 0.6rem; border-block-end: 1px solid var(--rahmen); font-size: 0.9375rem; }
.eckdaten-liste dt { color: var(--leise); }
.eckdaten-liste dd { margin: 0; font-weight: 600; }
.wohnung-seite__andere { margin-block-start: var(--s6); }
.wohnung-seite__andere h2 { font-size: 1.25rem; margin-block: 0 var(--s2); }
.wohnung--klein { min-height: 64px; font-size: 1rem; }
.wohnung[aria-current="page"] { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.oben a { color: var(--leise); }

/* Frei / vermietet */
.wohnung small { display: block; font-size: 0.8125rem; font-weight: 400; }
.wohnung--frei { background: #ffd400; border-color: #e6bf00; color: #1f2328; }
.wohnung--frei small { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .wohnung--frei:hover { background: #ffdf33; border-color: #1f2328; } }
.wohnung--frei[aria-current="page"] { background: #ffd400; border-color: #1f2328; color: #1f2328; box-shadow: inset 0 0 0 1px #1f2328; }
.wohnung--vermietet { background: transparent; color: var(--leise); border-style: dashed; }
@media (hover: hover) and (pointer: fine) { .wohnung--vermietet:hover { color: var(--tinte); border-style: solid; } }
.vermietet-hinweis { margin: var(--s2) 0 12px; font-weight: 600; }

/* Betrag mit Euro-Zeichen */
.betrag { position: relative; max-width: 16rem; }
.feld .betrag input { padding-inline-end: 2.5rem; font-variant-numeric: tabular-nums; }
.betrag__einheit { position: absolute; inset-inline-end: 1rem; inset-block-start: 50%; transform: translateY(-50%); color: var(--leise); font-weight: 600; pointer-events: none; }

/* Warteliste unter den Wohnungen */
.unsichtbar { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.warteliste {
  display: grid; gap: 12px; margin-block-start: var(--s4); padding: var(--s3); max-width: 44rem;
  color: #1f2328; border-radius: var(--r-klein);
  /* Rot-weiß diagonal schraffierter Rahmen, innen weiß (Text bleibt lesbar) */
  border: 14px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(45deg, #8e3a2a 0 12px, #fff 12px 24px) border-box;
}
.warteliste .hinweis { color: #5f6066; }
.warteliste a { color: #1f2328; }
.warteliste input { background: #fff; color: #1f2328; border-color: #d4c89f; }
.warteliste .knopf--voll { background: #8e3a2a; color: #fff; }
.warteliste__text h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.abschnitt--warteliste .warteliste { margin-block-start: 0; }
.warteliste__text p { margin: 0; }
.warteliste__zeile { display: grid; gap: 12px; }
@media (min-width: 36rem) { .warteliste__zeile { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.warteliste .feld { margin: 0; }
.warteliste .hinweis { margin: 0; }

/* Selbstauskunft: „Wie läuft es jetzt weiter?“ unter dem Absenden-Knopf */
.weiter { max-width: 34rem; padding: var(--s2) 1.25rem; background: var(--flaeche); border-radius: var(--r-klein); border-inline-start: 4px solid var(--akzent); }
.weiter h3 { margin: 0 0 0.25rem; font-size: 1.0625rem; }
.weiter p { margin: 0; }

/* Wohnungsseite: Gesamtmiete hervorheben */
.eckdaten-liste .eckdaten-liste__gesamt { font-size: 1.125rem; border-block-end-width: 2px; border-block-end-color: var(--tinte); }
.eckdaten-liste__gesamt dt { color: var(--tinte); font-weight: 700; }
.eckdaten-liste__gesamt dd { font-weight: 800; }

/* Entwurf: Bildnummer unten rechts (von main.js gesetzt, nur mit data-bildnummern am <html>) */
.hat-nr { position: relative; }
.bild-nr {
  position: absolute; inset-block-end: 6px; inset-inline-end: 6px; z-index: 2;
  padding: 0 0.3rem; border-radius: 4px;
  background: rgb(0 0 0 / 0.55); color: #fff;
  font-size: 0.6875rem; font-weight: 400; line-height: 1.5; letter-spacing: 0.02em; pointer-events: none;
}
[data-bildnummern] .bildraster__alle { inset-inline-end: auto; inset-inline-start: 12px; }
.wohnung-seite__haupt .galerie { padding: 0; }

/* Startseite: Hinweis auf die freie Wohnung */
.frei-hinweis {
  display: grid; gap: 0.15rem; margin-block-start: var(--s3); padding: 1rem 1.25rem; max-width: 40rem;
  background: #ffd400; color: #1f2328; text-decoration: none;
  border: 1px solid #e6bf00; border-radius: var(--r-klein);
  transition: transform 160ms var(--ease-out), border-color 160ms ease;
}
.frei-hinweis:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .frei-hinweis:hover { border-color: #1f2328; } }
.frei-hinweis__titel { font-weight: 600; font-size: 1.125rem; }
.frei-hinweis__daten { font-size: 0.9375rem; }
.frei-hinweis__link { font-weight: 600; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 3px; }
.wohnungen { grid-auto-rows: 1fr; }
.wohnungen > li { display: grid; }
.wohnung-seite__andere .wohnungen { padding: 0; }

/* ==========================================================================
   Apple-Feinschliff (12.11.2026): Farben und Aufbau bleiben gleich.
   ========================================================================== */

/* Sofortige Reaktion beim Antippen: keine 300-ms-Verzögerung */
a, button, label, summary, input, select, textarea { touch-action: manipulation; }

/* Kopfzeile bleibt oben stehen und ist leicht durchscheinend; der Inhalt läuft darunter durch.
   Nicht auf der Selbstauskunft – dort steht schon die Fortschrittsleiste oben. */
body:not(:has(.auskunft__leiste)) .kopf {
  position: sticky; inset-block-start: 0; z-index: 15;
  background: color-mix(in oklch, var(--grund) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
html:not(:has(.auskunft__leiste)) { scroll-padding-block-start: calc(68px + var(--s3)); }
@media (min-width: 60rem) { body:not(:has(.auskunft__leiste)) .karte { inset-block-start: calc(68px + var(--s3)); } }

/* Schrift: Abstand je nach Größe – große Titel enger, kleine Texte minimal weiter */
h1 { letter-spacing: -0.025em; line-height: 1.08; }
.oben, .hinweis, .karte__klein, .wohnung small, .fuss, .lupe__leiste { letter-spacing: 0.01em; }

/* Bildansicht: das Bild folgt dem Finger */
.lupe__bild img { will-change: transform; }

/* Weniger Transparenz gewünscht: feste Flächen statt Milchglas */
@media (prefers-reduced-transparency: reduce) {
  body:not(:has(.auskunft__leiste)) .kopf, .mobil-cta, .auskunft__leiste { background: var(--grund); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Mehr Kontrast gewünscht: feste Flächen mit deutlicher Kante */
@media (prefers-contrast: more) {
  body:not(:has(.auskunft__leiste)) .kopf, .mobil-cta { background: var(--grund); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--tinte); }
  .knopf--rand, .option, .feld input:not([type="radio"], [type="checkbox"]), .feld textarea, .feld select { border-color: var(--tinte); }
}
