/* =========================================================================
   MeisterWerk Bau GmbH
   Visuelles System: drei Flaechentoene, zwei Displaystimmen,
   ein Akzent als Linienwerk.
   ========================================================================= */

/* ---------- 0. Schriften (lokal, kein CDN) ------------------------------- */

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; 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: "Newsreader";
  src: url("assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; 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;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; 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: "Newsreader";
  src: url("assets/fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; 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;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrumentsans-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; 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: "Instrument Sans";
  src: url("assets/fonts/instrumentsans-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; 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;
}

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Flaechen: drei Toene tragen den Rhythmus der Seite */
  --papier:   #F5F2EC;
  --kalk:     #E7E2D7;
  --beton:    #CBC5B8;
  --schiefer: #4B5054;
  --tiefe:    #14171A;
  --ziegel:   #A8412A;
  --frei:     #4F7A52;

  --linie:       var(--beton);
  --linie-fein:  rgba(75, 80, 84, 0.18);
  --schiefer-50: rgba(75, 80, 84, 0.55);
  --hell-30:     rgba(245, 242, 236, 0.30);
  --hell-60:     rgba(245, 242, 236, 0.60);

  /* Schrift */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Type-Scale */
  --fs-mega:  clamp(42px, 8vw, 122px);
  --fs-display: clamp(36px, 5.7vw, 88px);
  --fs-1:     clamp(31px, 4.1vw, 60px);
  --fs-2:     clamp(24px, 2.7vw, 39px);
  --fs-3:     clamp(19px, 1.8vw, 26px);
  --fs-4:     clamp(17px, 1.35vw, 20px);
  --fs-body:  17px;
  --fs-small: clamp(13px, 1vw, 14px);
  --fs-label: 15px;

  --lh-mega: 1.3;
  --lh-head: 1.3;
  --lh-sub:  1.4;
  --lh-text: 1.6;

  /* Raster */
  --maxw:    1560px;
  --pad:     clamp(20px, 5.4vw, 96px);
  --gutter:  clamp(16px, 1.8vw, 28px);
  --section: clamp(88px, 11vw, 168px);
  --radius:  2px;

  /* Bewegung */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-weit: cubic-bezier(0.16, 1, 0.3, 1);
  --dur:       200ms;

  --kopfhoehe: 78px;
}

@media (max-width: 900px) {
  :root { --fs-body: 16px; --kopfhoehe: 64px; }
}

/* ---------- 2. Reset ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kopfhoehe) + 24px);
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--schiefer);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

/* ---------- 3. Typografie ------------------------------------------------ */

h1, h2, h3, h4, .h1, .h2, .h3, .display, .mega {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.014em;
  font-optical-sizing: auto;
  color: var(--tiefe);
  margin: 0;
  text-wrap: balance;
}

.mega    { font-size: var(--fs-mega);    line-height: var(--lh-mega); }
.display { font-size: var(--fs-display); line-height: var(--lh-head); }
h1, .h1  { font-size: var(--fs-1); line-height: var(--lh-head); }
h2, .h2  { font-size: var(--fs-2); line-height: var(--lh-sub); }
h3, .h3  { font-size: var(--fs-3); line-height: var(--lh-sub); letter-spacing: -0.01em; }

/* Zweite Stimme: derselbe Schnitt kursiv, nie eine ganze Ueberschrift */
.kursiv {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

p { margin: 0 0 1.05em; max-width: 66ch; }
p:last-child { margin-bottom: 0; }

.lead { font-size: var(--fs-4); line-height: 1.45; max-width: 58ch; }
.klein { font-size: var(--fs-small); line-height: 1.5; }
.leise { color: var(--schiefer-50); }

/* Label */
.label, .eyebrow, th {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--fs-label);
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.008em;
  color: var(--schiefer);
}
.label--tiefe  { color: var(--tiefe); }
.label--ziegel { color: var(--ziegel); }

/* Zahlen */
.zahl {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--tiefe);
  line-height: 1.34;
}

.kennzahl .zahl {
  font-size: clamp(44px, 6vw, 88px);
  display: block;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--beton);
}
.kennzahl .label { display: block; margin-top: 16px; }

/* ---------- 4. Akzentzeichen und Links ----------------------------------- */

a { color: inherit; text-decoration: none; }

/* Das Pluszeichen: zwei 1px-Balken, nie ein Icon-Font */
.plus {
  display: inline-block;
  position: relative;
  width: 9px; height: 9px;
  flex: none;
}
.plus::before, .plus::after {
  content: "";
  position: absolute;
  background: var(--ziegel);
}
.plus::before { left: 0; right: 0; top: 4px; height: 1px; }
.plus::after  { top: 0; bottom: 0; left: 4px; width: 1px; }

.link {
  position: relative;
  display: inline-block;
  color: var(--tiefe);
  padding-bottom: 2px;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); }

/* Der eine CTA-Stil der Seite */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.008em;
  color: var(--tiefe);
  position: relative;
  padding: 14px 0;
}
.cta::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--tiefe);
  transform: scaleX(1); transform-origin: left center;
  transition: transform 320ms var(--ease-weit);
}
.cta:hover::after, .cta:focus-visible::after { transform: scaleX(0); transform-origin: right center; }
.cta .plus { transition: transform 320ms var(--ease-weit); }
.cta:hover .plus { transform: rotate(90deg); }

.cta--hell { color: var(--papier); }
.cta--hell::after { background: var(--hell-60); }
.cta--hell .plus::before, .cta--hell .plus::after { background: var(--papier); }

/* ---------- 5. Fokus ----------------------------------------------------- */

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ziegel); outline-offset: 3px; }

.skiplink {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--tiefe); color: var(--papier); padding: 12px 20px;
}
.skiplink:focus { left: 12px; top: 12px; }

/* ---------- 6. Raster ---------------------------------------------------- */

.wrap {
  width: 100%; max-width: var(--maxw);
  margin-inline: auto; padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.sektion { padding-block: var(--section); position: relative; }
.sektion--knapp { padding-block: calc(var(--section) * 0.55); }
.sektion--eng-oben { padding-top: calc(var(--section) * 0.4); }

/* Flaechenwechsel traegt den Rhythmus */
.flaeche--kalk  { background: var(--kalk); }
.flaeche--tiefe { background: var(--tiefe); color: var(--hell-60); }
.flaeche--tiefe h1, .flaeche--tiefe h2, .flaeche--tiefe h3,
.flaeche--tiefe .zahl, .flaeche--tiefe .label--tiefe { color: var(--papier); }
.flaeche--tiefe .label { color: var(--hell-60); }
.flaeche--tiefe .kennzahl .zahl { border-color: var(--hell-30); }
.flaeche--tiefe p { color: var(--hell-60); }
.flaeche--tiefe .link { color: var(--papier); }

.c-1 { grid-column: span 1 / span 1; }   .c-2 { grid-column: span 2 / span 2; }
.c-3 { grid-column: span 3 / span 3; }   .c-4 { grid-column: span 4 / span 4; }
.c-5 { grid-column: span 5 / span 5; }   .c-6 { grid-column: span 6 / span 6; }
.c-7 { grid-column: span 7 / span 7; }   .c-8 { grid-column: span 8 / span 8; }
.c-9 { grid-column: span 9 / span 9; }   .c-10 { grid-column: span 10 / span 10; }
.c-11 { grid-column: span 11 / span 11; } .c-12 { grid-column: span 12 / span 12; }
.start-2 { grid-column-start: 2; } .start-3 { grid-column-start: 3; }
.start-4 { grid-column-start: 4; } .start-5 { grid-column-start: 5; }
.start-6 { grid-column-start: 6; } .start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; } .start-9 { grid-column-start: 9; }

@media (max-width: 900px) {
  .grid > [class*="c-"] { grid-column: 1 / -1; }
  .grid > [class*="start-"] { grid-column-start: 1; }
  .m-6 { grid-column: span 6 / span 6 !important; }
}

/* ---------- 7. Sektionskopf --------------------------------------------- */

.kopfzeile {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: end;
  padding-top: 22px;
  margin-bottom: clamp(40px, 5vw, 76px);
  position: relative;
  --linie-x: 1;
}
.kopfzeile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--beton);
  transform: scaleX(var(--linie-x));
  transform-origin: left center;
}
.flaeche--tiefe .kopfzeile::before { background: var(--hell-30); }
.js .kopfzeile { --linie-x: 0; }
.kopfzeile__titel { grid-column: 1 / span 8; }
.kopfzeile__aktion { grid-column: 11 / -1; justify-self: end; text-align: right; }

@media (max-width: 900px) {
  .kopfzeile { grid-template-columns: 1fr; gap: 18px; }
  .kopfzeile__titel, .kopfzeile__aktion {
    grid-column: 1 / -1; justify-self: start; text-align: left;
  }
}

/* Ueberschrift in einer Spalte bekommt dieselbe Haarlinie wie eine Kopfzeile */
.kopfspalte { border-top: 1px solid var(--beton); padding-top: 22px; }

/* ---------- 8. Kopf und Navigation --------------------------------------- */

.kopf {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--kopfhoehe);
  display: flex; align-items: center;
  transition: background 400ms var(--ease), color 400ms var(--ease);
}
.kopf__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; width: 100%;
}
.marke {
  font-family: var(--font-text);
  font-weight: 700; font-size: 17px;
  letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--tiefe);
  transition: color 400ms var(--ease);
}
.nav { display: flex; gap: clamp(18px, 2vw, 34px); align-items: center; }
.nav a {
  font-family: var(--font-text);
  font-weight: 500; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.008em;
  color: var(--schiefer);
  position: relative; padding-bottom: 5px;
  transition: color 400ms var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--tiefe); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Kopf ueber dem Hero: heller Text, keine Flaeche */
.kopf[data-ueber-bild="true"] .marke { color: var(--papier); }
.kopf[data-ueber-bild="true"] .nav a { color: var(--hell-60); }
.kopf[data-ueber-bild="true"] .nav a:hover,
.kopf[data-ueber-bild="true"] .nav a[aria-current="page"] { color: var(--papier); }
.kopf[data-ueber-bild="true"] .nav-schalter { color: var(--papier); }

/* Nach dem Hero: Flaeche faehrt ein */
.kopf[data-fest="true"] {
  background: var(--papier);
  border-bottom: 1px solid var(--beton);
}

.nav-schalter {
  display: none; background: none; border: none; padding: 8px 0; cursor: pointer;
  font-family: var(--font-text); font-weight: 500; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.008em;
}

@media (max-width: 900px) {
  .nav-schalter { display: block; }
  .nav {
    position: fixed; inset: var(--kopfhoehe) 0 auto 0;
    background: var(--papier); border-bottom: 1px solid var(--beton);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 20px 24px; display: none;
  }
  .nav[data-offen="true"] { display: flex; }
  .nav a, .kopf[data-ueber-bild="true"] .nav a {
    padding: 16px 0; width: 100%;
    border-bottom: 1px solid var(--beton); color: var(--schiefer);
  }
}

/* Fortschrittslinie ganz oben */
.fortschritt {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 120; pointer-events: none;
}
.fortschritt__fuellung {
  height: 100%; width: 100%; background: var(--ziegel);
  transform: scaleX(0); transform-origin: left center;
}

/* ---------- 9. Hero ------------------------------------------------------ */

.hero { position: relative; height: 340vh; }
.hero__buehne {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; background: var(--tiefe);
}
.hero__medium { position: absolute; inset: 0; }
.hero__medium video, .hero__medium img, .hero__medium canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
/* Die Leinwand traegt die Bildsequenz und blendet erst auf,
   wenn genug Einzelbilder geladen sind. */
.hero__leinwand { opacity: 0; transition: opacity 500ms var(--ease); }
.hero__leinwand[data-bereit="true"] { opacity: 1; }
/* Zwei ruhige Abdunklungen: oben fuer die Navigation, unten fuer die Zeile.
   Die Bildmitte bleibt unberuehrt. */
.hero__medium::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20, 23, 26, 0.52) 0%, rgba(20, 23, 26, 0) 30%),
    linear-gradient(to top, rgba(20, 23, 26, 0.62) 0%, rgba(20, 23, 26, 0) 46%);
}

/* Fadenkreuz aus zwei Haarlinien */
.hero__kreuz { position: absolute; inset: 0; pointer-events: none; }
.hero__kreuz span { position: absolute; background: var(--ziegel); }
/* Die beiden Werte setzt main.js aus der Lage des Textblocks.
   Die Prozentwerte hier sind nur der Ausgangspunkt, falls kein Skript laeuft. */
.hero__kreuz span:nth-child(1) {
  left: var(--pad); right: var(--pad); top: var(--kreuz-y, 62%); height: 1px;
  transform: scaleX(0); transform-origin: left center;
}
.hero__kreuz span:nth-child(2) {
  top: 0; bottom: 0; left: var(--kreuz-x, 38%); width: 1px;
  transform: scaleY(0); transform-origin: top center;
}

.hero__text {
  position: absolute;
  left: var(--pad); right: var(--pad);
  top: 63%;
}
/* Beide Zeilen liegen in derselben Rasterzelle, damit der Block so hoch
   ist wie die laengere von beiden und darunter nichts springt. */
.hero__zeilen { display: grid; }
.hero__claim {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 68px);
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: var(--papier);
  margin: 0;
  max-width: 15ch;
}
.hero__claim .kursiv { color: var(--papier); }
.hero__claim--zwei {
  opacity: 0;
  max-width: 23ch;
}
.hero__meta {
  position: absolute;
  left: var(--pad); bottom: 38px;
  display: flex; align-items: center; gap: 16px;
  color: var(--hell-60);
}
.hero__meta .label { color: var(--hell-60); }

@media (max-width: 900px) {
  .hero { height: 260vh; }
  .hero__text { top: auto; bottom: 96px; }
  .hero__claim { max-width: 13ch; }
  /* Auf schmalen Bildschirmen nimmt der Text fast die volle Breite ein,
     dort wuerde das Kreuz durch die Zeile schneiden. Deshalb ganz weg. */
  .hero__kreuz { display: none; }
  .hero__meta { bottom: 32px; }
}

/* Seitenkopf der Unterseiten */
.seitenkopf { padding-top: calc(var(--kopfhoehe) + clamp(56px, 8vw, 128px)); }
.seitenkopf .display { margin-top: 26px; }

/* ---------- 10. Bilder --------------------------------------------------- */

.bild { position: relative; overflow: hidden; background: var(--kalk); }
.bild img, .bild video { width: 100%; height: 100%; object-fit: cover; }
.bild--16-9 { aspect-ratio: 16 / 9; }
.bild--3-2  { aspect-ratio: 3 / 2; }
.bild--4-3  { aspect-ratio: 4 / 3; }
.bild--4-5  { aspect-ratio: 4 / 5; }
.bild--21-9 { aspect-ratio: 21 / 9; }
.bild--hoch { aspect-ratio: 3 / 4; }

.bildzeile {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--schiefer-50);
  max-width: 44ch;
}

/* Vollbild-Band mit eigener Parallaxe */
.band { position: relative; height: 82vh; overflow: hidden; background: var(--kalk); }
.band img { width: 100%; height: 118%; object-fit: cover; }
.band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 23, 26, 0.66) 0%, rgba(20, 23, 26, 0) 52%);
}
.band__text { z-index: 2; }
.band__text {
  position: absolute; left: var(--pad); bottom: clamp(32px, 5vw, 64px);
  color: var(--papier); max-width: 30ch;
}
@media (max-width: 900px) { .band { height: 62vh; } }

/* Ueberlappung: Bild schiebt sich in die Nachbarsektion */
.ueberlappung { margin-block: calc(var(--section) * -0.42) 0; position: relative; z-index: 2; }

/* ---------- 11. Projektkacheln ------------------------------------------- */

.kachel { display: block; color: inherit; position: relative; }
.kachel .bild { margin-bottom: 24px; }
.kachel img { transition: transform 900ms var(--ease-weit); }
.kachel:hover img { transform: scale(1.04); }
.kachel__kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 1px solid var(--beton);
  position: relative;
}
.kachel__kopf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--ziegel);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 500ms var(--ease-weit);
}
.kachel:hover .kachel__kopf::after { transform: scaleX(1); }
.kachel h3 { margin-bottom: 10px; }
.kachel__zusatz { color: var(--ziegel); }

/* ---------- 12. Listen, Argumente, Schritte ------------------------------ */

.liste li { border-top: 1px solid var(--beton); padding: 18px 0; max-width: 62ch; }
.liste li:last-child { border-bottom: 1px solid var(--beton); }

.argument { border-top: 1px solid var(--beton); padding-top: 26px; }
.argument .nr { color: var(--ziegel); display: block; margin-bottom: 18px; }
.argument h3 { margin-bottom: 14px; }

.schritt { border-top: 1px solid var(--beton); padding-top: 24px; }
.schritt .label { display: block; margin-bottom: 18px; color: var(--ziegel); }
.schritt h3 { margin-bottom: 12px; }

/* Ablauf mit angeheftetem Bild */
.ablauf__bild { position: relative; }
.ablauf__bild .bild { position: sticky; top: calc(var(--kopfhoehe) + 40px); }
.ablauf__phasen > li {
  border-top: 1px solid var(--beton);
  padding: clamp(28px, 4vw, 52px) 0;
  transition: opacity 400ms var(--ease);
}
.ablauf__phasen > li:last-child { border-bottom: 1px solid var(--beton); }
.js .ablauf__phasen > li[data-aktiv="false"] { opacity: 0.32; }
.ablauf__phasen .label { color: var(--ziegel); display: block; margin-bottom: 16px; }

/* Einstiege */
.einstieg {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--tiefe);
  padding-top: 30px; color: inherit; height: 100%;
  transition: border-color 300ms var(--ease);
}
.einstieg h3 { font-size: var(--fs-2); margin-bottom: 20px; }
.einstieg p { margin-bottom: 30px; flex: 1; }
.einstieg:hover { border-color: var(--ziegel); }

/* Personen */
.person p { margin: 0; }
.person__name { margin-top: 22px; }
.person__rolle { margin-top: 8px; color: var(--schiefer-50); }
.portrait--placeholder {
  aspect-ratio: 4 / 5; background: var(--kalk);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--beton);
}
.portrait--placeholder span {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(38px, 4vw, 60px); color: var(--schiefer-50); letter-spacing: 0.02em;
}

/* Stellenanzeige */
.stelle {
  display: block; border-top: 1px solid var(--beton);
  padding: clamp(24px, 3vw, 38px) 0; color: inherit;
  position: relative;
}
.stelle:last-of-type { border-bottom: 1px solid var(--beton); }
.stelle__kopf { margin-bottom: 14px; color: var(--ziegel); }
.stelle h3 { transition: transform 400ms var(--ease-weit); }
.stelle:hover h3 { transform: translateX(10px); }

/* Zitat */
.zitat { border-left: 1px solid var(--ziegel); padding-left: 30px; }
.zitat blockquote {
  margin: 0;
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 2.4vw, 34px); line-height: 1.3;
  color: var(--tiefe);
}
.zitat figcaption { margin-top: 22px; }

/* ---------- 13. Buttons und Formulare ------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.008em;
  padding: 19px 32px; border: 1px solid var(--tiefe); border-radius: var(--radius);
  background: var(--tiefe); color: var(--papier); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--ziegel); border-color: var(--ziegel); }
.btn--offen { background: transparent; color: var(--tiefe); }
.btn--offen:hover { background: var(--tiefe); color: var(--papier); }
.btn--hell { background: transparent; border-color: var(--hell-60); color: var(--papier); }
.btn--hell:hover { background: var(--papier); color: var(--tiefe); border-color: var(--papier); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.feld { display: block; margin-bottom: 30px; }
.feld > .label { display: block; margin-bottom: 10px; }

input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], select, textarea {
  width: 100%; font-family: var(--font-text); font-size: var(--fs-body);
  color: var(--tiefe); background: transparent; border: none;
  border-bottom: 1px solid var(--beton); border-radius: 0;
  padding: 12px 0; transition: border-color var(--dur) var(--ease); appearance: none;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-bottom-color: var(--schiefer); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-bottom-color: var(--ziegel); outline: none;
}
input::placeholder, textarea::placeholder { color: var(--schiefer-50); }
select { padding-right: 24px; cursor: pointer; }
input[type="file"] { border-bottom: 1px solid var(--beton); padding: 14px 0; font-size: var(--fs-small); }

.bestaetigung {
  border-left: 1px solid var(--frei);
  padding: 24px 28px; background: var(--kalk); margin-top: 8px;
}
.bestaetigung[hidden] { display: none; }
.bestaetigung h3 { font-size: var(--fs-4); margin-bottom: 8px; }
.bestaetigung p { font-size: var(--fs-small); margin: 0; }

/* ---------- 13b. Auswahlfelder ------------------------------------------- */

.feldsatz { border: none; padding: 0; margin: 0 0 30px; }
.feldsatz > legend { padding: 0; margin-bottom: 14px; }

/* Auswahl als Schaltflaechen: echte Radiofelder, nur visuell ersetzt */
.wahl { display: flex; flex-wrap: wrap; gap: 10px; }
.wahl input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; margin: 0; pointer-events: none;
}
.wahl label {
  display: inline-flex; align-items: center;
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); line-height: 1.45;
  text-transform: uppercase; letter-spacing: 0.008em;
  padding: 12px 19px;
  border: 1px solid var(--beton); border-radius: var(--radius);
  color: var(--schiefer); cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.wahl label:hover { border-color: var(--schiefer); color: var(--tiefe); }
.wahl input:checked + label {
  background: var(--tiefe); border-color: var(--tiefe); color: var(--papier);
}
.wahl input:focus-visible + label { outline: 2px solid var(--ziegel); outline-offset: 3px; }
.wahl input:disabled + label { opacity: 0.4; cursor: not-allowed; }

/* ---------- 13c. Anrufknopf ---------------------------------------------- */

.anruf {
  position: fixed;
  right: clamp(16px, 2.4vw, 34px);
  bottom: clamp(16px, 2.4vw, 34px);
  z-index: 110;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 15px 22px;
  background: var(--tiefe); color: var(--papier);
  border: 1px solid var(--tiefe); border-radius: var(--radius);
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); line-height: 1;
  text-transform: uppercase; letter-spacing: 0.008em;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              opacity 320ms var(--ease), transform 320ms var(--ease);
}
.anruf:hover { background: var(--ziegel); border-color: var(--ziegel); }
.anruf__hoerer { width: 15px; height: 15px; flex: none; display: block; }
.anruf__nummer { white-space: nowrap; }

/* Ohne Skript steht der Knopf sofort. Mit Skript faehrt er nach dem Hero ein. */
.js .anruf { opacity: 0; transform: translateY(14px); pointer-events: none; }
.js .anruf[data-sichtbar="true"] { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 600px) {
  .anruf { padding: 14px 18px; min-height: 48px; }
  .anruf__nummer { font-size: 13px; }
}

/* ---------- 14. Status und Tabellen -------------------------------------- */

.punkt {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--beton); margin-right: 10px; vertical-align: 1px; flex: none;
}
.punkt--frei { background: var(--frei); }
.punkt--reserviert { background: var(--ziegel); }
.punkt--verkauft { background: var(--beton); }

.status {
  display: inline-flex; align-items: center;
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.008em;
}

.tabelle-huelle { width: 100%; overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 13px;
  text-align: left; padding: 0 28px 14px 0;
  border-bottom: 1px solid var(--tiefe); white-space: nowrap;
}
td {
  padding: 13px 28px 13px 0; border-bottom: 1px solid var(--beton);
  font-size: var(--fs-small); color: var(--tiefe); white-space: nowrap;
}
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

tbody tr.ist-verkauft td { color: var(--schiefer-50); text-decoration: line-through; }
tbody tr.ist-verkauft td:last-child { text-decoration: none; }
tbody tr.ist-frei { cursor: pointer; }
tbody tr.ist-frei td { transition: background 160ms var(--ease); }
tbody tr.ist-frei:hover td { background: var(--kalk); }
tbody tr.ist-frei:focus-visible { outline: 2px solid var(--ziegel); outline-offset: -2px; }
tbody tr.ist-gewaehlt td { background: var(--kalk); }
tbody tr.ist-gewaehlt td:first-child { box-shadow: inset 2px 0 0 var(--ziegel); }

.werkzeuge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 36px;
}
.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter__knopf {
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.008em;
  padding: 11px 19px; border: 1px solid var(--beton); border-radius: var(--radius);
  background: transparent; color: var(--schiefer); cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.filter__knopf:hover { border-color: var(--schiefer); color: var(--tiefe); }
.filter__knopf[aria-pressed="true"] {
  border-color: var(--tiefe); background: var(--tiefe); color: var(--papier);
}

th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 9px;
  border-right: 1px solid var(--ziegel); border-bottom: 1px solid var(--ziegel);
  transform: rotate(45deg) translateY(-2px); opacity: 0;
}
th[data-sort]:hover::after { opacity: 0.45; }
th[data-sort][aria-sort="ascending"]::after { opacity: 1; transform: rotate(225deg) translateY(-3px); }
th[data-sort][aria-sort="descending"]::after { opacity: 1; transform: rotate(45deg) translateY(-2px); }

td .status, .tabellen-legende .status { font-size: 13px; }
.tabellen-legende { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; }

/* Lageplan */
.karte svg { width: 100%; height: auto; display: block; border: 1px solid var(--beton); }
.karte__text {
  font-family: var(--font-text); font-weight: 500;
  font-size: 12px; letter-spacing: 0.008em; text-transform: uppercase;
  fill: var(--schiefer);
}
.karte__text--marke { fill: var(--ziegel); }

/* ---------- 15. Footer --------------------------------------------------- */

.fuss { background: var(--tiefe); color: var(--hell-60); padding-block: clamp(72px, 9vw, 128px) 44px; }
.fuss .marke { color: var(--papier); }
.fuss a { color: var(--hell-60); }
.fuss a:hover { color: var(--papier); }
.fuss__titel {
  font-family: var(--font-text); font-weight: 500;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.008em;
  color: var(--papier); margin-bottom: 22px;
}
.fuss__gross {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-1); line-height: var(--lh-head); letter-spacing: -0.02em;
  color: var(--papier); max-width: 16ch; margin: 0 0 36px;
}
.fuss__gross .kursiv { color: var(--papier); }
.fuss__unten {
  margin-top: clamp(56px, 7vw, 96px); padding-top: 26px;
  border-top: 1px solid var(--hell-30);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between;
  font-size: var(--fs-small);
}

/* ---------- 16. Bewegung ------------------------------------------------- */

.js .an-auf   { opacity: 0; transform: translateY(28px); }
.js .an-maske { clip-path: inset(0 0 101% 0); }
.js .an-linie { transform: scaleX(0); transform-origin: left center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .an-auf { opacity: 1 !important; transform: none !important; }
  .js .an-maske { clip-path: none !important; }
  .js .an-linie { transform: none !important; }
  .js .ablauf__phasen > li[data-aktiv="false"] { opacity: 1; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 17. Hilfsklassen --------------------------------------------- */

.hr { height: 1px; background: var(--beton); border: none; margin: 0; }
.nur-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stapel > * + * { margin-top: var(--mt, 24px); }
