/* =========================================================
   Bleichstraße 79 D – Designsystem
   Abgeleitet aus dem Materialkonzept: Wasserstrich-Klinker,
   Metall in Olivgrün, Eiche, Umbra.
   ========================================================= */

/* Raleway (Projektschrift), lokal gehostet – kein Google-Fonts-Abruf */
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin-ext-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  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;
}

:root {
  --kalk: #ecebe7;        /* Seitengrund: heller Klinker */
  --papier: #f7f7f4;      /* Flächen */
  --umbra: #3b3129;       /* Text */
  --umbra-2: #675d54;     /* Sekundärtext */
  --fuge: #d3cfc7;        /* Linien */
  --flasche: #2e3a2b;     /* Akzent, dunkle Flächen */
  --salbei: #a3a897;      /* Metallpaneel */
  --eiche: #b8874f;       /* kleiner Akzent */

  --font: "Raleway", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.4rem + 4.2vw, 5.6rem);

  /* Bewegung: kräftiges ease-out für Reaktionen, ease-in-out für Bewegung auf der Fläche */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --section: clamp(88px, 12vw, 176px);
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--kalk);
  color: var(--umbra);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; background: var(--flasche); color: #fff;
}
.skip:focus { top: 16px; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: 40px;
}

/* ---------- Typografie ---------- */

.display {
  font-size: var(--step-3);
  font-weight: 300;
  line-height: 1.15;           /* Raleway hat tiefe Unterlängen (g, p, y) */
  padding-bottom: 0.08em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 34em;
}

p + p { margin-top: 1em; }
p { max-width: 38em; }

h3 {
  font-size: var(--step-1);
  font-weight: 500;
 
  line-height: 1.25;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--flasche);
  background: var(--flasche); color: #fff;
  font: inherit; font-size: var(--step--1); font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--umbra); border-color: var(--umbra); color: #fff; }
.btn:active { transform: scale(.97); }
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--ease-out); }

/* ---------- Einblendungen beim Scrollen (einmalig, nur mit JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Bewusst zurückhaltend: kurzer Weg, kein Überblenden aus dem Nichts bei Bildern */
  .js [data-reveal] {
    opacity: 0; transform: translateY(8px);
    transition: opacity .7s ease-out, transform .7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 40ms);
  }
  .js [data-reveal="image"] {
    transform: none; opacity: 0;
    clip-path: inset(0 0 6% 0);
    transition: opacity .9s ease-out, clip-path .9s var(--ease-out);
  }
  .js [data-reveal="image"] img, .js video[data-reveal="image"] {
    scale: 1.025; transition: scale 1.4s var(--ease-out);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  .js [data-reveal="image"].is-in img, .js video[data-reveal="image"].is-in { scale: 1; }
  /* Nach dem Einblenden wieder normal zeichnen: keine eigene Grafikebene, sonst zeigen manche
     Browser (v. a. Firefox mit Farbmanagement) leicht farbversetzte Rechtecke hinter Texten */
  .js [data-reveal].is-done,
  .js [data-reveal="image"].is-done img, .js video[data-reveal="image"].is-done {
    transition: none; transform: none; clip-path: none; scale: none;
  }
}
/* Bei „Bewegungen reduzieren“: nur sanftes Einblenden, ohne Bewegung, Zoom oder Beschnitt */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 0; transition: opacity .8s ease-out; }
  .js [data-reveal].is-in { opacity: 1; }
  .js [data-reveal].is-done { transition: none; }
}
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--umbra); border-color: #fff; }
.btn--small { min-height: 40px; padding: 0 16px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background-color .3s ease, color .3s ease;
}
.site-header.is-solid {
  background: rgba(236, 235, 231, .94);
  backdrop-filter: blur(10px);
  color: var(--umbra);
}
.site-header__inner {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin-inline: auto;
  height: var(--header-h); padding-inline: var(--gutter);
}
.wordmark {
  padding-block: 10px;
  font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap; margin-right: auto;
}
.wordmark span { font-weight: 300; }
.wordmark:hover { color: inherit; }

.site-nav__list { display: flex; gap: clamp(12px, 1.8vw, 28px); }
.site-nav__list a {
  font-size: var(--step--1); text-decoration: none;
  padding-block: 6px; border-bottom: 1px solid transparent;
}
.site-nav__list a:hover { color: inherit; border-bottom-color: currentColor; }
.site-nav__list a[aria-current="true"] { border-bottom-color: currentColor; }
.site-nav__toggle { display: none; }

.site-header:not(.is-solid) .btn--small { background: transparent; border-color: rgba(255,255,255,.7); }
.site-header:not(.is-solid) .btn--small:hover { background: #fff; color: var(--umbra); }

.progress { height: 1px; background: transparent; }
.progress span {
  display: block; height: 1px; width: 100%;
  background: var(--flasche);
  transform-origin: 0 50%; transform: scaleX(0);
}
.site-header:not(.is-solid) .progress span { background: transparent; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  color: #fff;
  overflow: hidden;
  background: var(--umbra);
}
.hero__media { position: absolute; inset: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,26,22,.35) 0%, rgba(30,26,22,0) 22%, rgba(30,26,22,.08) 40%, rgba(30,26,22,.68) 100%);
}

/* Die eine inszenierte Bewegung: die Fuge öffnet sich. */
@media (prefers-reduced-motion: no-preference) {
  .hero__media { animation: fuge 1.4s cubic-bezier(.7,0,.2,1) .1s both; }
  .hero__content { animation: rise .9s cubic-bezier(.2,.7,.2,1) 1.1s both; }
}
@keyframes fuge {
  from { clip-path: inset(0 49.8% 0 49.8%); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.hero__content {
  position: relative;
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding: 0 var(--gutter) clamp(32px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px); row-gap: 28px; align-items: end;
}
.hero__title {
  grid-column: 1 / -1;
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
}
.hero__lead { grid-column: 1 / span 6; }
.hero__lead p { font-size: var(--step-1); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__note {
  position: absolute; right: var(--gutter); bottom: 16px;
  font-size: 12px; opacity: .7;
}
.hero__pause {
  position: absolute; right: var(--gutter); bottom: 44px;
  background: none; border: 1px solid rgba(255,255,255,.55); color: #fff;
  font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.hero__pause:hover { background: #fff; color: var(--umbra); }

/* ---------- Sektionen ---------- */

.section { padding-block: var(--section); }

/* Projekt */
.projekt__text { grid-column: 1 / span 6; }
.projekt__text .display { margin-bottom: 40px; }
.projekt__text .lead { margin-bottom: 1em; }
.facts {
  grid-column: 8 / -1; align-self: end;
  border-top: 1px solid var(--umbra);
}
.facts div {
  display: grid; grid-template-columns: 9.5em 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--fuge);
}
.facts dt { color: var(--umbra-2); font-size: var(--step--1); padding-top: .2em; }
.facts dd { font-size: var(--step-1); line-height: 1.3; }

/* Lage */
.lage { background: var(--papier); }
.lage__text { grid-column: 1 / span 7; }
.lage__text .display { margin-bottom: 32px; }
.lage__text .lead { margin-bottom: 1em; }

.map {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px; margin-top: 64px;
  align-items: stretch; /* Liste schließt oben und unten bündig mit der Karte ab */
}
.map__stage {
  /* width: Safari/iOS dehnt Grid-Elemente mit aspect-ratio nicht auf die Spaltenbreite
     (bleibt sonst bei der SVG-Standardbreite von 300px stehen) */
  position: relative; width: 100%; aspect-ratio: 3000 / 1600;
  background: var(--kalk); overflow: hidden;
}
.map__stage svg { width: 100%; height: 100%; display: block; }
.map__status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--umbra-2); font-size: var(--step--1); }
/* Ortsliste wie auf der bisherigen Seite: kompakt, runde Nummern wie in der Karte, Zeilen auf Kartenhöhe verteilt */
.map__list {
  counter-reset: poi; display: flex; flex-direction: column;
  font-size: 13px; line-height: 1.25;
}
.map__list li { flex: 1 1 0; display: flex; min-height: 26px; counter-increment: poi; border-bottom: 1px solid var(--fuge); }
.map__list li.is-project { counter-increment: none; }
.map__list button, .map__head {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-columns: 18px minmax(0, 1fr) 4.4em 3.6em; column-gap: 10px; align-items: center;
  width: 100%; padding: 0 4px;
}
.map__head { cursor: default; color: var(--umbra-2); font-size: 11px; }
.map__list li.map__head { flex: 0 0 auto; min-height: 0; padding-bottom: 6px; counter-increment: none; display: grid; border-bottom-color: var(--umbra); }
.map__list li:not(.map__head) button::before {
  content: counter(poi); justify-self: center;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--umbra); color: #fff;
  font-size: 9.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .2s ease;
}
/* Projekt: Ring statt Nummer */
.map__list li.is-project button::before { content: ""; width: 14px; height: 14px; background: none; border: 2px solid var(--flasche); }
.map__list .poi { grid-column: 2; }
.map__list li.is-project .poi { grid-column: 2 / -1; font-weight: 600; }
.map__list .t { text-align: right; font-variant-numeric: tabular-nums; color: var(--umbra-2); }
.map__note { grid-column: 2; margin-top: -24px; font-size: 11px; color: var(--umbra-2); }
.map__list li:not(.is-active) button:hover { background: var(--kalk); }
.map__list button:focus-visible { outline: 2px solid var(--flasche); outline-offset: -2px; }
.map__list li.is-active button { background: var(--kalk); }
.map__list li.is-active:not(.is-project) button::before { background: var(--flasche); }
.map__list li.is-active .poi { font-weight: 600; }

.bleich-svg-marker { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform .18s ease; }
.bleich-svg-marker.is-active { transform: scale(1.35); }
.bleich-poi-marker .lp-st0 { fill: var(--umbra); } /* gleicher Ton wie die Nummern in der Ortsliste */
.bleich-poi-marker.is-active .lp-st0 { fill: var(--flasche); }
@media (prefers-reduced-motion: reduce) { .bleich-svg-marker { transition: none; } }

.strip {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(12px, 2vw, 24px);
  margin-top: 64px;
}
.strip img { width: 100%; height: clamp(320px, 34vw, 500px); object-fit: cover; }
figcaption { margin-top: 10px; font-size: var(--step--1); color: var(--umbra-2); }

.access { margin-top: 80px; }
.access__title { grid-column: 1 / span 4; }
.access__list { grid-column: 5 / -1; columns: 2 18em; column-gap: 40px; }
.access__list li { break-inside: avoid; padding: 12px 0; border-top: 1px solid var(--fuge); }

/* Architektur: Fassade im Raster statt randlos */
.architektur__intro { align-items: center; }
.architektur__text { grid-column: 1 / span 5; }
.architektur__text .display { margin-bottom: 32px; }
.architektur__text .lead { margin-bottom: 1em; }
.architektur__image { grid-column: 7 / -1; }
.architektur__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 55% 50%; }

/* Fassade als Bildfolge: nur ruhige Überblendung (keine Kamerafahrt – ruckelt je nach Browser) */
.kb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fuge); }
.kb__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease-in-out; }
.kb__slide.is-active { opacity: 1; }
.architektur__image .kb__slide img { width: 100%; height: 100%; aspect-ratio: auto; }
.kb__toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  background: rgba(59,49,41,.35); border: 1px solid rgba(255,255,255,.55); color: #fff;
  font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.kb__toggle:hover { background: #fff; color: var(--umbra); }

.pair {
  display: grid; grid-template-columns: 4fr 8fr; gap: clamp(12px, 2vw, 24px);
  margin-top: 96px; align-items: end;
}
.pair__a img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; }
.pair__b img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Imagefilm: dunkles Band über die volle Breite; schließt den Abschnitt Architektur ab */
.architektur:has(> .film) { padding-bottom: 0; }
.film { margin-top: var(--section); background: var(--flasche); color: #fff; }
.film__stage {
  position: relative; overflow: hidden;
  height: min(88vh, 56.25vw); min-height: 520px;
}
.film__still, .film__teaser, .film__stage iframe, .film__stage .film__player {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.film__still, .film__teaser { object-fit: cover; }
.film__teaser { opacity: 0; transition: opacity 1.2s ease; }
.film__teaser.is-ready { opacity: 1; }
.film__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(46,58,43,.92) 0%, rgba(46,58,43,.55) 30%, rgba(46,58,43,0) 62%),
    linear-gradient(to right, rgba(46,58,43,.45), rgba(46,58,43,0) 55%);
}
.film__content {
  position: absolute; inset: auto 0 0; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
  padding-bottom: clamp(36px, 6vw, 80px);
}
.film__text { max-width: 640px; }
.film__eyebrow {
  margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
.film__eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; margin-right: 12px; vertical-align: middle; background: var(--eiche); }
.film__title { margin: 0 0 16px; font-size: var(--step-3); font-weight: 300; line-height: 1.12; color: #fff; }
.film__lead { margin: 0; font-size: var(--step-0); line-height: 1.6; color: rgba(255,255,255,.88); }

.film__action { display: grid; justify-items: end; gap: 14px; flex-shrink: 0; }
.film__play {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 0; background: none; border: 0; color: #fff; font: inherit; cursor: pointer;
}
.film__play-ring {
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .25s ease, color .25s ease, transform .3s var(--ease-out), border-color .25s ease;
}
.film__play-ring svg { margin-left: 4px; }
.film__play-label { font-size: var(--step-0); font-weight: 500; letter-spacing: .02em; }
.film__play:hover .film__play-ring { background: #fff; color: var(--flasche); border-color: #fff; transform: scale(1.06); }
.film__play:active .film__play-ring { transform: scale(.96); }
.film__play:focus-visible { outline: none; }
.film__play:focus-visible .film__play-ring { outline: 2px solid #fff; outline-offset: 4px; }
.film__consent { margin: 0; max-width: 300px; text-align: right; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.7); }
.film__consent a { color: #fff; }
.film__pause {
  position: absolute; right: var(--gutter); top: 20px; z-index: 1;
  background: rgba(46,58,43,.35); border: 1px solid rgba(255,255,255,.55); color: #fff;
  font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.film__pause:hover { background: #fff; color: var(--umbra); }

/* Nach dem Klick: Player füllt die Bühne, Film im 16:9-Format */
.film.is-playing .film__stage { height: auto; min-height: 0; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--header-h)); margin-inline: auto; }
.film.is-playing .film__stage .film__player { object-fit: contain; background: #000; }

@media (max-width: 760px) {
  /* Handy: Bild oben (4:3), Text und Knopf darunter auf dunklem Grund */
  .film__stage { height: auto; min-height: 0; }
  .film__still, .film__teaser, .film__shade { inset: 0 0 auto; height: 75vw; }
  .film__shade { background: linear-gradient(to top, rgba(46,58,43,.7), rgba(46,58,43,0) 45%); }
  .film__content {
    position: relative; inset: auto; margin-top: 75vw;
    flex-direction: column; align-items: stretch; gap: 24px; padding-top: 24px; padding-bottom: 44px;
  }
  .film__action { justify-items: start; }
  .film__play-ring { width: 68px; height: 68px; }
  .film__consent { text-align: left; max-width: none; }
  .film__pause { top: 12px; }
  .film.is-playing .film__stage { height: auto; aspect-ratio: 16 / 9; }
  .film.is-playing .film__stage .film__player, .film.is-playing .film__stage iframe { height: 100%; }
}

/* Wohnen */
.wohnen__text { grid-column: 7 / -1; align-self: end; }
.wohnen .display { grid-column: 1 / span 6; }

/* Galerie: Bildband zum Ziehen, mehrere Bilder sichtbar */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 27vw, 420px);
  gap: clamp(10px, 1.4vw, 18px);
  margin-top: 64px;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery.is-dragging figure { pointer-events: none; }
.gallery figure { scroll-snap-align: start; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; -webkit-user-drag: none;
  transition: transform .5s var(--ease-out);
}
.gallery:not(.is-dragging) figure:hover img { transform: scale(1.02); }
.gallery figure { overflow: hidden; position: relative; } /* hält auch .sr-only-Texte im scrollenden Band (sonst Seitenüberlauf) */
.gallery figcaption { padding-top: 6px; }
/* Bildunterschrift als Auslöser der Lightbox (das Bild selbst bleibt zum Ziehen frei) */
.gallery__zoom {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0;
  background: none; border: 0; color: var(--umbra-2); font: inherit; font-size: var(--step--1);
  text-align: left; cursor: zoom-in;
  transition: color .2s ease;
}
.gallery__zoom:hover { color: var(--umbra); }
.gallery__zoom:focus-visible { outline: 2px solid var(--flasche); outline-offset: 2px; }
.gallery__zoom-icon {
  position: relative; flex: none; width: 13px; height: 13px;
  border: 1.5px solid currentColor; border-radius: 50%;
  transition: transform .2s var(--ease-out);
}
.gallery__zoom-icon::after {
  content: ""; position: absolute; right: -5px; bottom: -4px; width: 6px; height: 1.5px;
  background: currentColor; transform: rotate(45deg);
}
.gallery__zoom:hover .gallery__zoom-icon { transform: scale(1.12); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.gallery-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 36px;
}
.gallery-bar .disclaimer { margin: 0; }
.gallery-nav { display: flex; gap: 8px; flex: none; }
.gallery-nav button {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--umbra); background: transparent; color: var(--umbra);
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .16s var(--ease-out);
}
.gallery-nav button:hover { background: var(--umbra); color: #fff; }
.gallery-nav button:active { transform: scale(.96); }
.gallery-nav button:disabled { opacity: .3; cursor: default; background: transparent; color: var(--umbra); transform: none; }
.gallery-progress { flex: 1; height: 1px; background: var(--fuge); position: relative; max-width: 320px; }
.gallery-progress span { position: absolute; top: 0; bottom: 0; left: 0; background: var(--umbra); width: 20%; }
.disclaimer { margin-top: 16px; font-size: 12px; color: var(--umbra-2); }

/* Sonnenstudie: eigener Drehteller in Originalauflösung */
.sun { margin-top: var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); row-gap: 32px; align-items: center; }
.sun__text { grid-column: 1 / span 5; }
.sun__text h3 { margin-bottom: 12px; }
.sun__howto { margin-top: 32px; padding: 20px 0 0; border-top: 1px solid var(--fuge); color: var(--umbra); }
.sun__howto svg { width: 100%; max-width: 260px; height: auto; display: block; }
.sun__howto figcaption { display: grid; gap: 4px; margin-top: 12px; font-size: var(--step--1); color: var(--umbra-2); }
.sun__howto strong { font-weight: 600; color: var(--umbra); }
.sun__viewer { grid-column: 7 / -1; width: 100%; max-width: 640px; justify-self: end; }
.sun__stage {
  position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden;
  cursor: grab; touch-action: pan-y; user-select: none;
}
.sun__stage.is-dragging { cursor: grabbing; }
.sun__stage img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.sun__stage:focus-visible { outline: 2px solid var(--flasche); outline-offset: 3px; }
.sun__hint {
  position: absolute; left: 50%; bottom: 16px; translate: -50% 0;
  padding: 6px 12px; background: rgba(59, 49, 41, .78); color: #fff; font-size: 13px;
  transition: opacity .4s var(--ease-out);
  pointer-events: none;
}
.sun__hint::before, .sun__hint::after { content: "‹"; padding-right: 8px; }
.sun__hint::after { content: "›"; padding: 0 0 0 8px; }
.sun__hint.is-hidden { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sun__hint:not(.is-hidden) { animation: nudge 2.4s var(--ease-in-out) 1s 3; }
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-8px); }
  60% { transform: translateX(8px); }
}
.sun__controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 16px; font-size: var(--step--1); }
.sun__controls output { min-width: 8.5em; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  /* Regler über die volle Breite, Beschriftung und Uhrzeit darüber */
  .sun__controls { grid-template-columns: 1fr auto; row-gap: 4px; }
  .sun__controls input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
}
.sun__controls input[type="range"] { width: 100%; height: 36px; margin: 0; accent-color: var(--flasche); }

/* Geschoss für Geschoss: Schritte links, Animation rechts */
.floors { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); margin-top: var(--section); }
/* Die Isometrie öffnet sich, während die Geschoss-Blöcke vorbeiziehen (Timing in site.js) */
.floors__content { grid-column: 1 / span 6; padding-top: 18vh; padding-bottom: 38vh; }
.floors__intro { padding-bottom: 10vh; }
.floors__intro h3 { font-size: var(--step-3); font-weight: 300; line-height: 1.15; margin-bottom: 16px; }
.floors__intro p { font-size: var(--step-0); line-height: 1.6; }
.floors__steps { display: grid; gap: 0; }
.floors__step {
  padding: 18px 0 22px; margin-bottom: 6vh; border-top: 1px solid var(--fuge);
  color: var(--umbra-2); transition: color .5s var(--ease-out);
}
.floors__step.is-active { color: var(--umbra); }
.floors__level {
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em;
  color: var(--umbra-2); transform-origin: left center;
  transition: color .5s var(--ease-out), transform .5s var(--ease-out);
}
.floors__step.is-active .floors__level { color: var(--flasche); transform: translateX(6px); }
.floors__step h4 { font-size: var(--step-0); font-weight: 500; margin: 8px 0 12px; }
.floors__step dl { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 28px; margin-bottom: 12px; }
.floors__step dt { font-size: 12px; color: var(--umbra-2); }
.floors__step dd { font-size: var(--step--1); }
.floors__step dl div { display: grid; gap: 2px; }
.floors__step a { display: inline-block; padding-block: 10px; font-size: var(--step--1); font-weight: 500; text-decoration-color: var(--salbei); }
.floors__sticky {
  grid-column: 8 / -1; position: sticky; top: calc(var(--header-h) + 24px);
  height: calc(100vh - var(--header-h) - 48px); align-self: start;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--kalk); /* eigener Stacking-Kontext: Grund hier setzen, damit multiply das Weiß entfernt */
}
.floors__video { height: 100%; width: auto; max-width: 100%; min-width: 0; object-fit: contain; mix-blend-mode: multiply; }

/* Nachhaltigkeit: einzige dunkle Fläche */
.nachhaltigkeit { background: var(--flasche); color: var(--kalk); }
.nachhaltigkeit .display { grid-column: 1 / span 7; }
.nachhaltigkeit__text { grid-column: 1 / span 8; }
.benefits {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px);
  margin-top: 72px;
}
.benefits article { border-top: 1px solid rgba(236,235,231,.4); padding-top: 20px; }
.benefits h3 { margin-bottom: 12px; }
.benefits p { font-size: var(--step--1); color: rgba(236,235,231,.85); }

/* Rechenbeispiel */
/* Gleiches 3-Spalten-Raster und gleiche Abstände wie die Zielgruppen-Spalten darüber */
.calc { margin-top: 96px; --calc-gap: clamp(24px, 3vw, 48px); }
.calc__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 20px; border-top: 1px solid rgba(236,235,231,.4); }
.calc__head h3 { font-size: var(--step-1); font-weight: 500; }
.calc__teaser { margin-top: 6px; font-size: var(--step--1); color: rgba(236,235,231,.8); }
.calc__toggle {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px;
  border: 1px solid rgba(236,235,231,.6); background: transparent; color: var(--kalk);
  font: inherit; font-size: var(--step--1); font-weight: 500; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out);
}
.calc__toggle:hover { background: var(--kalk); color: var(--flasche); }
.calc__toggle:active { transform: scale(.97); }
.calc__toggle:focus-visible { outline: 2px solid var(--kalk); outline-offset: 3px; }
.calc__chevron {
  width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease-out);
}
.calc__toggle[aria-expanded="true"] .calc__chevron { transform: translateY(2px) rotate(-135deg); }

/* Aufklappen über grid-template-rows: weich und ohne feste Höhe */
.calc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.calc__body.is-open { grid-template-rows: 1fr; }
.calc__inner { overflow: hidden; min-height: 0; }
.calc__inner > .calc__tabs { margin-top: 28px; }
.calc__body:not(.is-open) .calc__inner { visibility: hidden; transition: visibility 0s .5s; }
.calc__tabs { display: inline-flex; border: 1px solid rgba(236,235,231,.5); }
.calc__tabs button {
  all: unset; cursor: pointer; padding: 10px 18px; font-size: var(--step--1); font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.calc__tabs button[aria-selected="true"] { background: var(--kalk); color: var(--flasche); }
.calc__tabs button:focus-visible { outline: 2px solid var(--kalk); outline-offset: 2px; }
.calc__inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px var(--calc-gap); margin-top: 28px; }
.calc__field { display: grid; gap: 10px; }
.calc__field[hidden] { display: none; }
.calc__field { min-width: 0; }
.calc__field label { font-size: var(--step--1); display: flex; justify-content: space-between; gap: 12px; }
.calc__field select {
  width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis;
  min-height: 48px; padding: 0 12px; font: inherit; color: var(--umbra); background: var(--kalk);
  border: 0; border-radius: 0;
}
.calc__field input[type="range"] { accent-color: var(--salbei); width: 100%; height: 36px; margin: 0; }
.calc__results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--calc-gap); margin-top: 32px; }
.calc__panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--calc-gap); }
.calc__panel .calc__results { grid-column: 1 / -1; }
.calc__panel--invest .calc__results { grid-column: 1 / span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc__panel--invest .calc__chart { grid-column: 3; margin-top: 32px; }
.calc__results div { padding: 16px 0; border-top: 1px solid rgba(236,235,231,.25); }
.calc__results dt { font-size: var(--step--1); color: rgba(236,235,231,.75); }
.calc__results dd { font-size: var(--step-1); font-variant-numeric: tabular-nums; margin-top: 4px; }
.calc__results .calc__key dd { font-size: var(--step-2); font-weight: 300; color: #fff; }
.calc__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 150px; padding-top: 16px; border-top: 1px solid rgba(236,235,231,.25); }
.calc__bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 8px; font-size: 12px; color: rgba(236,235,231,.8); }
.calc__bar-stack { display: flex; flex-direction: column; justify-content: flex-end; }
.calc__bar-stack span { display: block; transform-origin: bottom; transition: height .6s var(--ease-out); }
.calc__bar-stack .deg { background: var(--salbei); }
.calc__bar-stack .sonder { background: var(--eiche); }
.calc__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 12px; font-size: 12px; color: rgba(236,235,231,.8); }
.calc__legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.sw--deg { background: var(--salbei); }
.sw--sonder { background: var(--eiche); }
.calc__panel[hidden] { display: none; }
.calc__assumptions { margin-top: 28px; font-size: var(--step--1); }
.calc__assumptions summary { cursor: pointer; color: #fff; }
.calc__assumptions ul { margin-top: 12px; padding-left: 1.1em; list-style: disc; color: rgba(236,235,231,.8); }
.calc__assumptions li { margin: 4px 0; }
.calc__disclaimer { margin-top: 20px; max-width: 78ch; font-size: 12px; line-height: 1.55; color: rgba(236,235,231,.82); }
.calc__note { margin-top: 8px; font-size: 12px; color: rgba(236,235,231,.7); }

/* Wohnungen */
.wohnungen { background: var(--papier); padding-bottom: 0; }
.wohnungen__intro { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px; }
.wohnungen__status { font-size: var(--step-1); }
.wohnungen__status::before {
  content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .5em;
  background: var(--salbei); border-radius: 50%;
}
.wohnungen__status:empty { display: none; }

/* Kontakt */
.kontakt__intro { grid-column: 1 / span 7; margin-bottom: 24px; }
.kontakt__intro .display { margin-bottom: 24px; }
.form { grid-column: 7 / -1; align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; align-content: start; }

/* Fotos und Formular beginnen auf gleicher Höhe */
.people { grid-column: 1 / span 5; align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(16px, 2vw, 28px); }
.person { display: grid; gap: 16px; align-content: start; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; background: var(--papier); }
.person__name { font-size: var(--step-1); font-weight: 500; }
.person__role { color: var(--umbra-2); font-size: var(--step--1); margin-top: 2px; }
.person p + p { margin-top: 8px; }
.person a { display: inline-block; padding-block: 8px; font-size: var(--step--1); overflow-wrap: anywhere; }

.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: var(--step--1); font-weight: 500; }
.optional { font-weight: 400; color: var(--umbra-2); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1px solid var(--fuge); border-radius: 0; background: var(--papier);
  color: var(--umbra); font: inherit;
}
.field input:hover, .field select:hover { border-color: var(--umbra-2); }
.field input:focus, .field select:focus { outline: 2px solid var(--flasche); outline-offset: 0; border-color: var(--flasche); }
.field input[aria-invalid="true"] { border-color: #8a2b1f; }
.field--wide, .field--choice, .address, .consent, .form .btn, .form__msg { grid-column: 1 / -1; }
.field--choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.field--choice legend { width: 100%; margin-bottom: 8px; }
.field--choice label { font-weight: 400; display: flex; gap: 10px; align-items: center; }
.address { display: grid; grid-template-columns: 1fr 2fr; gap: 20px 16px; }
.address .field--wide { grid-column: 1 / -1; }
.address[hidden] { display: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step--1); color: var(--umbra-2); }
.consent input, .field--choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--flasche); flex: none; }
.form .btn { justify-self: start; }
.form__msg { font-size: var(--step--1); }
.form__msg.is-error { color: #8a2b1f; }
.form__msg.is-ok { color: var(--flasche); font-weight: 500; }

/* Platzhalter-Hinweise (nur Prototyp) */
.todo {
  margin-top: 16px; padding: 10px 14px; max-width: none;
  border: 1px dashed var(--eiche); color: #7a5527; background: rgba(184,135,79,.08);
  font-size: 13px;
}
.todo--dark { color: #e9cfa8; border-color: #e9cfa8; background: transparent; margin-top: 48px; }

/* Footer */
.site-footer { background: var(--umbra); color: #e6e1da; padding: 80px 0 120px; font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer__label { color: #fff; font-weight: 600; margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.site-footer p a { display: inline-block; padding-block: 6px; }
.site-footer p { line-height: 1.5; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2);
  color: #b7afa5; font-size: 13px;
}
.footer-bottom ul { display: flex; gap: 24px; }

/* ---------- Unterseiten: Impressum, Datenschutz ---------- */
.legal { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 var(--section); }
.legal__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px); row-gap: 48px; align-items: start;
}
.legal__head { grid-column: 1 / -1; padding-bottom: 32px; border-bottom: 1px solid var(--umbra); }
.legal__back { display: inline-block; margin-bottom: 20px; font-size: var(--step--1); text-decoration-color: var(--salbei); }
.legal__back::before { content: "‹"; margin-right: 8px; }
.legal__meta { margin-top: 12px; color: var(--umbra-2); font-size: var(--step--1); }

.legal__toc { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 32px); }
.legal__toc ol { counter-reset: toc; font-size: var(--step--1); }
.legal__toc li { counter-increment: toc; }
.legal__toc a {
  display: grid; grid-template-columns: 2em 1fr; padding: 6px 0; text-decoration: none; color: var(--umbra-2);
  transition: color .2s ease;
}
.legal__toc a::before { content: counter(toc); font-variant-numeric: tabular-nums; }
.legal__toc a:hover, .legal__toc a[aria-current="true"] { color: var(--flasche); }
.legal__toc a[aria-current="true"] { font-weight: 600; }

.legal__body { grid-column: 5 / span 7; }
.legal__body section { padding: 32px 0; border-top: 1px solid var(--fuge); scroll-margin-top: calc(var(--header-h) + 24px); }
.legal__body section:first-of-type { border-top: 0; padding-top: 0; }
.legal__body h2 { font-size: var(--step-1); font-weight: 500; margin-bottom: 14px; display: flex; gap: 14px; }
.legal__body h2 span { color: var(--umbra-2); font-weight: 300; min-width: 1.4em; font-variant-numeric: tabular-nums; }
.legal__body p, .legal__body li { max-width: 62ch; }
.legal__body p + p { margin-top: .8em; }
.legal__body ul { margin: .8em 0; padding-left: 1.2em; list-style: disc; }
.legal__body li { margin: 3px 0; }
.legal__body .todo { margin: 0 0 32px; }
.legal__flag { margin-bottom: 12px; padding: 8px 12px; border-left: 2px solid var(--eiche); background: rgba(184,135,79,.1); color: #6e4a1c; font-size: var(--step--1); }

/* Impressum: Angaben als ruhiges Zwei-Spalten-Raster, Projektbeteiligte daneben */
.legal__body--cards { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); }
.legal__body--cards section, .legal__body--cards section:first-of-type { padding: 24px 0 28px; border-top: 1px solid var(--fuge); }
.legal__body--cards h2 { font-size: var(--step-0); font-weight: 600; margin-bottom: 10px; }
.legal__partners { grid-column: 10 / -1; padding: 28px; background: var(--papier); }
.legal__partners h2 { font-size: var(--step-0); font-weight: 600; margin-bottom: 16px; }
.legal__partners dl div { padding: 14px 0; border-top: 1px solid var(--fuge); }
.legal__partners dt { font-size: 12px; color: var(--umbra-2); margin-bottom: 4px; }
.legal__partners dd { font-size: var(--step--1); line-height: 1.55; }

.site-footer--compact { padding: 28px 0 32px; }
.site-footer--compact .footer-bottom { margin-top: 0; padding-top: 0; border-top: 0; }
.footer-bottom a[aria-current="page"] { color: #fff; }

@media (max-width: 900px) {
  .legal__toc { position: static; grid-column: 1 / -1; padding: 20px; background: var(--papier); }
  .legal__toc ol { columns: 2 14em; column-gap: 24px; }
  .legal__body, .legal__body--cards, .legal__partners { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .legal__body--cards { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: #f3f1ed; overflow: hidden;
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(24, 21, 18, .94); }
.lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; }
html.has-lightbox { overflow: hidden; }
.lightbox__figure {
  grid-column: 2; margin: 0; display: grid; justify-items: center; gap: 14px;
  padding: 64px 0 24px; touch-action: pan-y;
}
.lightbox__img {
  max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto;
  object-fit: contain; user-select: none; -webkit-user-drag: none;
  transition: opacity .25s ease;
}
.lightbox__img.is-loading { opacity: .25; }
.lightbox__caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; width: 100%;
  max-width: 1200px; font-size: var(--step--1);
}
.lightbox__count { opacity: .65; font-variant-numeric: tabular-nums; }
.lightbox__btn, .lightbox__close {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(243, 241, 237, .45); background: rgba(24, 21, 18, .35); color: inherit;
  font: inherit; font-size: 24px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out);
}
.lightbox__btn:hover, .lightbox__close:hover { background: #f3f1ed; color: var(--umbra); }
.lightbox__btn:active, .lightbox__close:active { transform: scale(.95); }
.lightbox__btn:focus-visible, .lightbox__close:focus-visible { outline: 2px solid #f3f1ed; outline-offset: 3px; }
.lightbox__btn--prev { grid-column: 1; grid-row: 1; justify-self: center; }
.lightbox__btn--next { grid-column: 3; grid-row: 1; justify-self: center; }
.lightbox__close { position: absolute; top: 12px; right: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in .25s ease-out; }
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  /* Handy: Bild über die volle Breite, Pfeile unten, Wischen zum Blättern */
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; align-items: center; }
  .lightbox__figure { grid-column: 1 / -1; grid-row: 1; padding: 64px 12px 8px; }
  .lightbox__img { max-height: calc(100dvh - 210px); }
  .lightbox__btn--prev, .lightbox__btn--next { grid-row: 2; margin-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .lightbox__btn--prev { grid-column: 1; justify-self: end; margin-right: 8px; }
  .lightbox__btn--next { grid-column: 2; justify-self: start; margin-left: 8px; }
}

/* Mobile Schnellzugriff */
.quickbar { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .site-nav__toggle {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
    background: none; border: 1px solid currentColor; color: inherit; font: inherit; font-size: var(--step--1); cursor: pointer;
  }
  .site-nav__list {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--kalk); color: var(--umbra);
  }
  .site-nav__list.is-open { display: flex; }
  .site-nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--fuge); font-size: var(--step-0); }
  .site-header .btn--small { display: none; }

  .map { grid-template-columns: 1fr; gap: 24px; }
  .map__list { display: block; columns: 2 22em; column-gap: 32px; }
  .map__list li { min-height: 34px; break-inside: avoid; }
  .map__list li button { min-height: 34px; }
  .map__note { grid-column: 1; margin-top: 0; }
}

@media (max-width: 900px) {
  .projekt__text, .facts, .lage__text, .access__title, .access__list,
  .architektur__image, .architektur__text, .wohnen .display, .wohnen__text,
  .nachhaltigkeit .display, .nachhaltigkeit__text, .kontakt__intro, .form, .people,
  .hero__lead, .sun__text, .sun__viewer { grid-column: 1 / -1; }
  .sun__viewer { justify-self: stretch; max-width: none; }
  /* Bis 900 px: Isometrie als festes Band oben, Geschoss-Blöcke scrollen darunter durch */
  .floors { grid-template-columns: minmax(0, 1fr); }
  .floors__sticky {
    grid-column: 1; grid-row: 1; z-index: 2;
    top: var(--header-h); height: min(44svh, 420px);
    margin-inline: calc(var(--gutter) * -1); padding: 12px var(--gutter);
    border-bottom: 1px solid var(--fuge);
  }
  .floors__content { grid-column: 1; grid-row: 2; padding-top: 32px; padding-bottom: 20vh; }
  .floors__intro { padding-bottom: 6vh; }
  .floors__step { margin-bottom: 5vh; }
  .floors__step dl { grid-template-columns: repeat(2, auto); gap: 8px 20px; }
  .calc__inputs, .calc__results, .calc__panel,
  .calc__panel--invest .calc__results { grid-template-columns: 1fr; }
  .calc__panel--invest .calc__results, .calc__panel--invest .calc__chart { grid-column: 1; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip figure:first-child { grid-column: 1 / -1; }
  .strip img { height: auto; aspect-ratio: 4 / 5; }
  .strip figure:first-child img { aspect-ratio: 16 / 10; }
  .pair { grid-template-columns: 1fr; }
  .pair__a img { aspect-ratio: 4 / 3; }
  .benefits { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-auto-columns: 72vw; }
  .gallery-progress { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { padding-bottom: 64px; }
  .hero { min-height: calc(100svh - 56px); }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .form, .address { grid-template-columns: 1fr; }
  .people { gap: 24px 12px; }
  .floors__intro h3 { font-size: var(--step-2); }
  .floors__intro p { font-size: var(--step-0); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__note { bottom: auto; top: calc(var(--header-h) + 8px); }
  .quickbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; inset: auto 0 0; z-index: 40;
    background: var(--flasche); padding-bottom: env(safe-area-inset-bottom);
  }
  .quickbar a {
    display: grid; place-items: center; min-height: 56px;
    color: #fff; text-decoration: none; font-size: var(--step--1); font-weight: 500;
    border-left: 1px solid rgba(255,255,255,.18);
  }
  .quickbar a:first-child { border-left: 0; }
}

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

/* ---------- WordPress-Ergänzungen ---------- */
/* Fangfeld des Formulars (Spam-Schutz): für Menschen unsichtbar */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }

/* Unterseiten mit Inhalt aus dem Editor */
.legal__body--full { grid-column: 1 / span 8; }
.legal__body--editor > *:first-child { margin-top: 0; }
.legal__body--editor h2 {
  font-size: var(--step-1); font-weight: 500; line-height: 1.3;
  margin: 40px 0 14px; padding-top: 28px; border-top: 1px solid var(--fuge);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal__body--editor h2:first-child { padding-top: 0; border-top: 0; }
.legal__body--editor h3 { font-size: var(--step-0); font-weight: 600; margin: 24px 0 8px; }
.legal__body--editor p, .legal__body--editor li { max-width: 62ch; }
.legal__body--editor p + p { margin-top: .8em; }
.legal__body--editor ul, .legal__body--editor ol { margin: .8em 0; padding-left: 1.2em; list-style: disc; }
.legal__body--editor ol { list-style: decimal; }
.legal__body--editor li { margin: 3px 0; }
.legal__body--editor a { text-decoration-color: var(--salbei); }
@media (max-width: 900px) {
  .legal__body--full { grid-column: 1 / -1; }
}