/* Projekte: gleiche Farben, Schrift und Haltung wie Startseite und Ratgeber (ruhig, minimalistisch, viel Weißraum).
   Die Schrift Jost liegt im Ordner "fonts" der Hauptseite (selbst gehostet, keine externen Aufrufe).
   Farbvariablen und Dunkelmodus sind dieselben wie in index.html. Die Pläne stehen in den Originalfarben der Planung
   auf weißem Zeichenblatt (--blatt, auch im Dunkelmodus); --zubau ist das Rot der Planung für alles Neue. */

@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/jost-300.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-400.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jost-500.woff2") format("woff2"); }
@font-face { font-family: "Jost Custom"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-custom-regular.woff2") format("woff2"); }
@font-face { font-family: "Jost Custom"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/jost-custom-bold.woff2") format("woff2"); }

:root {
  --kalk: #F6F6F3;
  --nebel: #E7E9E4;
  --linie: #CFD3CC;
  --schiefer: #27302D;
  --stein: #626B66;
  --gail: #44665F;
  --on-gail: #F6F6F3;
  --blatt: #FFFFFF;
  --zubau: #FF0000;
  --sans: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --marke: "Jost Custom", "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --rand: clamp(1.25rem, 5vw, 4rem);
  --max: 78rem;
  --read: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --kalk: #161B19; --nebel: #1F2623; --linie: #34403B; --schiefer: #E8EBE6; --stein: #A2ADA6; --gail: #8DB5AC; --on-gail: #161B19; --blatt: #FFFFFF; --zubau: #FF0000; }
}
:root[data-theme="dark"] { --kalk: #161B19; --nebel: #1F2623; --linie: #34403B; --schiefer: #E8EBE6; --stein: #A2ADA6; --gail: #8DB5AC; --on-gail: #161B19; --blatt: #FFFFFF; --zubau: #FF0000; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--kalk);
  color: var(--schiefer);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
picture { display: block; }
a { color: var(--gail); text-underline-offset: 0.2em; }
a:hover { color: var(--schiefer); }
:focus-visible { outline: 2px solid var(--gail); outline-offset: 3px; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 0; background: var(--schiefer); color: var(--kalk); padding: .5rem 1rem; z-index: 30; }
.skip:focus { left: var(--rand); top: .75rem; }

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

/* Kopf (wie auf der Hauptseite und im Ratgeber) */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--kalk) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linie); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 2rem; min-height: 4rem; padding-block: .5rem; }
.brand { font-family: var(--marke); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; font-size: clamp(.9rem, 3.6vw, 1.1rem); line-height: 1.2; white-space: nowrap; color: var(--schiefer); }
.brand:hover { color: var(--schiefer); }
.brand .ar { font-size: 1.5em; font-weight: 700; line-height: 0; }
.site-nav ul { display: flex; gap: .25rem 1.6rem; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.site-nav a { color: var(--stein); text-decoration: none; padding-block: .35rem; border-bottom: 1px solid transparent; white-space: nowrap; }
.site-nav a:hover { color: var(--schiefer); }
.site-nav a[aria-current="page"] { color: var(--schiefer); border-bottom-color: var(--gail); }
.sprache { display: inline-flex; border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; font-size: .9rem; }
.sprache button { font: inherit; background: none; border: 0; color: var(--stein); padding: .3rem .7rem; cursor: pointer; }
.sprache button[aria-pressed="true"] { background: var(--schiefer); color: var(--kalk); }
@media (max-width: 47.99rem) {
  .brand { order: 1; }
  .sprache { order: 2; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
}
@media (min-width: 48rem) { .site-nav { flex: 1; } .site-nav ul { justify-content: center; } }

/* Typografie (Überschriften wie auf der Hauptseite: Versalien, gesperrt) */
h1, h2, h3 { font-family: var(--sans); color: var(--schiefer); margin: 0; }
h1 { font-weight: 500; text-transform: uppercase; letter-spacing: .07em; line-height: 1.05; font-size: clamp(1.9rem, 9.2vw, 7.4rem); overflow-wrap: break-word; }
h2 { font-weight: 300; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
.eyebrow { font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--stein); margin: 0 0 1rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.crumbs { font-size: .875rem; color: var(--stein); }
.crumbs a { color: var(--stein); text-decoration: none; }
.crumbs a:hover { color: var(--schiefer); text-decoration: underline; }
.crumbs span { margin-inline: .5rem; }

/* Einstieg */
.hero { padding-block: clamp(1.5rem, 3vw, 2.25rem) clamp(1.75rem, 4vw, 2.75rem); }
.hero .crumbs { margin-bottom: clamp(2rem, 6vw, 4.5rem); }
.hero-kopf { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.lead { font-weight: 300; font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.35; max-width: 34ch; color: var(--stein); }

/* Legende */
.legende { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0 0 .85rem; padding: 0; list-style: none; font-size: .9rem; color: var(--stein); }
.legende li { display: inline-flex; align-items: center; gap: .55rem; }
.sw { display: inline-block; width: 1.9rem; height: 1rem; border: 1px solid var(--linie); background: linear-gradient(#111, #111) center / 100% 3px no-repeat, #fff; }
.sw.n { background: linear-gradient(var(--zubau), var(--zubau)) center / 100% 5px no-repeat, #fff; }

/* Zeichenblatt */
.blatt { position: relative; display: block; width: 100%; margin: 0; padding: clamp(.75rem, 2.4vw, 2rem); background: var(--blatt); border: 1px solid var(--linie); font: inherit; color: inherit; text-align: inherit; cursor: zoom-in; }
button.blatt { -webkit-appearance: none; appearance: none; border-radius: 0; }
.blatt:hover { border-color: color-mix(in srgb, var(--stein) 55%, var(--linie)); }
.lagen { position: relative; }
.lagen img { display: block; width: 100%; height: auto; }
.lagen img.n { position: absolute; inset: 0; height: 100%; }
.lagen .l { transition: opacity .6s ease; }
.zoom-hinweis { position: absolute; right: .6rem; bottom: .5rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--stein); opacity: 0; transition: opacity .2s; pointer-events: none; }
.blatt:hover .zoom-hinweis, .blatt:focus-visible .zoom-hinweis { opacity: 1; }
/* Foto oder Visualisierung statt Zeichenblatt: ohne Papierrand */
.blatt.foto { padding: 0; }
.stapel.folge { margin-top: clamp(2rem, 5vw, 3.5rem); }
/* Modus: nur den Zubau hervorheben */
[data-modus="neu"] .l.b { opacity: .13; }
@media (prefers-reduced-motion: reduce) { .lagen .l { transition: none; } html { scroll-behavior: auto; } }

.fig { margin: 0; }
.fig figcaption { display: grid; gap: .15rem 2rem; padding-top: .9rem; font-size: .95rem; line-height: 1.5; color: var(--stein); }
.fig figcaption b { font-weight: 500; color: var(--schiefer); }
@media (min-width: 48rem) { .wrap > .fig figcaption, .stapel > .fig figcaption { grid-template-columns: 10rem minmax(0, 40rem); } }
/* zwei gleich hohe Zeichenblätter nebeneinander */
.zwei.paar { align-items: stretch; }
.zwei.paar .fig { display: flex; flex-direction: column; }
.zwei.paar .blatt { flex: 1 1 auto; display: flex; align-items: center; }
.zwei.paar .lagen { width: 100%; }

/* Abschnitte */
.abschnitt { padding-block: clamp(2.75rem, 8vw, 6rem) 0; }
.kopf-abschnitt { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.zwei { display: grid; gap: clamp(1.75rem, 4vw, 3rem) clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 62rem) {
  .zwei.text-plan { grid-template-columns: 4fr 7fr; }
  .zwei.text-daten { grid-template-columns: 7fr 5fr; }
  .zwei.plan-plan { grid-template-columns: 7fr 5fr; }
  .zwei.paar { grid-template-columns: 1fr 1fr; }
  .zwei.text-plan .sticky { position: sticky; top: 6rem; }
}
.stapel { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.sticky p { max-width: 30rem; line-height: 1.7; margin-top: 1.1rem; }
.sticky .satz { font-weight: 300; font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.3; letter-spacing: -.005em; margin: 0 0 .25rem; max-width: 20ch; }

/* Beschreibung und Eckdaten */
.beschr p { max-width: 38rem; margin-bottom: 1.1rem; line-height: 1.7; }
.beschr .satz { font-weight: 300; font-size: clamp(1.35rem, 2.8vw, 1.8rem); line-height: 1.3; letter-spacing: -.005em; margin-bottom: 1.5rem; max-width: 24ch; }
.eckdaten { margin: 0; border-top: 1px solid var(--schiefer); }
.eckdaten div { display: grid; gap: .1rem 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--linie); }
.eckdaten dt { color: var(--stein); font-size: .9rem; }
.eckdaten dd { margin: 0; font-size: 1.05rem; line-height: 1.45; }
@media (min-width: 40rem) { .eckdaten div { grid-template-columns: 8.5rem 1fr; } }

/* Zahlen */

/* Abschluss */
.abschluss { margin-top: clamp(3.5rem, 9vw, 7rem); padding-block: clamp(3rem, 8vw, 5.5rem); border-block: 1px solid var(--linie); }
.abschluss .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.75rem 3rem; }
.abschluss h2 { text-transform: uppercase; font-weight: 500; letter-spacing: .07em; font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 1rem; }
.abschluss p { font-weight: 300; font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.4; max-width: 32ch; color: var(--stein); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; }
.btn { display: inline-block; padding: .85rem 1.5rem; background: var(--schiefer); color: var(--kalk); text-decoration: none; border-radius: 2px; font-weight: 500; }
.btn:hover { color: var(--kalk); filter: brightness(.95); }
.zurueck { color: var(--schiefer); }

/* Schwebender Schalter */
.modus { position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); z-index: 15; display: inline-flex; align-items: center; gap: .6rem; font: inherit; font-size: .9rem; line-height: 1; color: var(--schiefer); background: color-mix(in srgb, var(--kalk) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--linie); border-radius: 999px; padding: .65rem 1rem .65rem .8rem; cursor: pointer; box-shadow: 0 2px 14px rgba(0, 0, 0, .08); }
.modus:hover { border-color: var(--stein); }
.modus .punkt { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--zubau); background: transparent; transition: background .2s; }
.modus[aria-pressed="true"] .punkt { background: var(--zubau); }
.modus .t-aus { display: none; }
.modus[aria-pressed="true"] .t-an { display: none; }
.modus[aria-pressed="true"] .t-aus { display: inline; }
.no-js .modus { display: none; }
.modus { transition: opacity .25s ease; }
.modus.weg { opacity: 0; pointer-events: none; }

/* Großansicht */
dialog.gross { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--blatt); color: #27302D; }
dialog.gross::backdrop { background: rgba(10, 14, 12, .6); }
dialog.gross .scroll { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
dialog.gross .inh { width: max(190vw, 1500px); padding: 4.5rem 2rem 3rem; }
dialog.gross .inh.hoch { width: max(120vw, 1050px); }
dialog.gross .inh.foto { width: min(2000px, max(100vw, 1100px)); padding-inline: 0; }
dialog.gross .inh.foto.hoch { width: min(1100px, 100vw); margin-inline: auto; }
dialog.gross .lagen { cursor: grab; }
dialog.gross .titel { position: fixed; left: 1.25rem; top: 1.1rem; z-index: 2; font-size: .9rem; color: #4D5A54; background: rgba(255, 255, 255, .92); padding: .25rem .6rem; border-radius: 2px; }
dialog.gross .zu { position: fixed; right: 1rem; top: .9rem; z-index: 2; font: inherit; font-size: .9rem; color: var(--schiefer); background: var(--kalk); border: 1px solid var(--linie); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; }
dialog.gross .zu:hover { border-color: var(--stein); }

/* Alt/Neu-Vergleich: zwei Fotos gleicher Groesse nebeneinander, auch auf dem Handy */
.vgl { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.4rem, 1.6vw, 1rem); align-items: start; }
.vgl .blatt.foto { aspect-ratio: 3 / 4; overflow: hidden; }
.vgl .lagen, .vgl .lagen img { height: 100%; }
.vgl .lagen img { object-fit: cover; }
.vgl .fig figcaption { padding-top: .6rem; font-size: .9rem; display: block; }
.marke { position: absolute; left: .55rem; top: .55rem; z-index: 1; padding: .18rem .6rem; border-radius: 2px; font-size: .75rem; font-weight: 500; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; background: rgba(255, 255, 255, .94); color: #27302D; pointer-events: none; }
.marke.neu { background: var(--gail); color: var(--on-gail); }
.umfang div { align-items: baseline; }
@media (min-width: 40rem) { .umfang div { grid-template-columns: 11rem 1fr; } }

/* Fuß (wie im Ratgeber) */
.site-footer { border-top: 1px solid var(--linie); margin-top: 0; padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .9rem; color: var(--stein); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--stein); text-decoration: none; }
.site-footer a:hover { color: var(--schiefer); text-decoration: underline; }

@media print {
  .site-header, .site-footer, .modus, .abschluss, .crumbs, .zoom-hinweis { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .blatt { border-color: #bbb; break-inside: avoid; }
}
