/* ==========================================================================
   Baukasten – Basis: Schrift (lokal), Gestaltungsvariablen, Grundformate
   ========================================================================== */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/jost-latin-300-normal.woff2") format("woff2");
  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: "Jost"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/jost-latin-ext-300-normal.woff2") format("woff2");
  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: "Jost"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("../fonts/jost-latin-300-italic.woff2") format("woff2");
  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: "Jost"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-400-normal.woff2") format("woff2");
  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: "Jost"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-ext-400-normal.woff2") format("woff2");
  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: "Jost"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jost-latin-500-normal.woff2") format("woff2");
  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: "Jost"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jost-latin-ext-500-normal.woff2") format("woff2");
  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; }

/* Metrisch angepasste Ausweichschrift: verhindert Layoutsprünge beim Laden von Jost (CLS) */
@font-face { font-family: "Jost Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 95.9%; ascent-override: 111.6%; descent-override: 39.1%; line-gap-override: 0%; }

:root {
  --papier: #ffffff;
  --tinte: #111111;
  --grau: #595959;        /* 7,0:1 auf Weiß */
  --linie: #d9d9d9;
  --flaeche: #f6f6f4;
  --fehler: #a4001d;      /* 7,9:1 auf Weiß */
  --fokus: #111111;
  --schrift: "Jost", "Jost Fallback", sans-serif;
  --mass: 40rem;          /* Lesebreite */
  --breit: 72rem;
  --rand: clamp(1.25rem, 5vw, 3.5rem);
  --abstand: clamp(4rem, 10vw, 8rem);
  --ueberblendung: 1400ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font-family: var(--schrift); font-weight: 400; font-size: 1.0625rem; line-height: 1.65;
  overflow-x: hidden; overflow-wrap: break-word;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0 0 1rem; letter-spacing: .01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; }
button { font: inherit; color: inherit; }
abbr[title] { text-decoration: none; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ==========================================================================
   Baukasten – One-Pager
   ========================================================================== */
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--tinte); color: var(--papier); padding: .75rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid transparent; }
@supports (backdrop-filter: blur(4px)) { .kopf { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); } }
.kopf-innen { max-width: var(--breit); margin: 0 auto; padding: .5rem var(--rand); display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap; min-height: 4rem; }
.schriftzug { font-weight: 400; font-size: 1.25rem; letter-spacing: .02em; text-decoration: none; margin-right: auto; padding: .5rem 0; white-space: nowrap; }
.kopf ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0 .25rem; }
.kopf nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 .5rem; text-decoration: none; font-size: .95rem; letter-spacing: .04em; }
.kopf nav a:hover { text-decoration: underline; }
.sprachwahl a { color: var(--grau); }
.sprachwahl a[aria-current] { color: var(--tinte); text-decoration: underline; }
@media (max-width: 40rem) {
  .hauptnav { order: 3; width: 100%; }
  .hauptnav ul { justify-content: flex-start; margin-left: -.5rem; }
  .kopf-innen { padding-top: .25rem; padding-bottom: .25rem; }
}

/* Auftakt */
.auftakt { max-width: var(--breit); margin: 0 auto; padding: clamp(3.5rem, 12vw, 9rem) var(--rand) clamp(2.5rem, 7vw, 5rem); }
.auftakt h1 { font-size: clamp(2.6rem, 9vw, 6.5rem); font-weight: 300; letter-spacing: .005em; margin-bottom: .75rem; }
.untertitel { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--grau); margin-bottom: 2rem; letter-spacing: .02em; }
.einleitung { max-width: var(--mass); font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 300; }

/* Projekttext */
.projekt { max-width: var(--breit); margin: 0 auto; padding: 0 var(--rand) var(--abstand); }
.fliesstext { max-width: var(--mass); }
.fliesstext p:last-child { margin-bottom: 0; }

/* Zitat */
.zitat { max-width: var(--breit); margin: 0 auto var(--abstand); padding: 0 var(--rand); }
.zitat blockquote { margin: 0; max-width: 48rem; }
.zitat blockquote p { font-size: clamp(1.5rem, 3.6vw, 2.4rem); font-weight: 300; font-style: italic; line-height: 1.3; margin: 0; }
.zitat blockquote p::before { content: "“"; }
.zitat blockquote p::after { content: "”"; }
:lang(de) .zitat blockquote p::before { content: "„"; }
:lang(de) .zitat blockquote p::after { content: "“"; }
.zitat figcaption { margin-top: 1rem; color: var(--grau); font-size: .95rem; letter-spacing: .03em; }
.zitat figcaption::before { content: "— "; }

/* Werkserien */
.werke { border-top: 1px solid var(--linie); }
.serie { max-width: var(--breit); margin: 0 auto; padding: var(--abstand) var(--rand) 0; scroll-margin-top: 4rem; }
.serie-kopf { margin-bottom: 2rem; }
.serie h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.serie-text { max-width: var(--mass); }

/* Slideshow mit Überblendung */
.slides { display: grid; }
/* Echte Überblendung: das neue Bild blendet ÜBER dem voll deckenden alten Bild ein;
   das alte verschwindet erst danach. So scheint in der Mitte kein Weiß durch (kein Aufhellen). */
.slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; z-index: 0;
  transition: opacity 0s linear var(--ueberblendung), visibility 0s linear var(--ueberblendung), z-index 0s linear var(--ueberblendung); }
.slide.zuletzt { z-index: 1; transition: opacity 0s linear var(--ueberblendung), visibility 0s linear var(--ueberblendung); }
.slide.aktiv { opacity: 1; visibility: visible; z-index: 2;
  transition: opacity var(--ueberblendung) var(--ueberblendung-kurve, ease-in-out), visibility 0s, z-index 0s; }
.slide figure { margin: 0; }
.rahmen { aspect-ratio: 4 / 3; max-height: min(78vh, 52rem); width: 100%; display: flex; align-items: flex-end; justify-content: flex-start; }
.rahmen picture { height: 100%; width: 100%; display: flex; align-items: flex-end; justify-content: flex-start; }
.rahmen img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.werkangabe { margin-top: 1rem; font-size: .95rem; line-height: 1.5; min-height: 3em; }
.werk-titel { font-style: italic; }
.steuerung { display: flex; align-items: center; gap: .25rem; margin-top: .75rem; margin-left: -10px; }
.knopf { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; border-radius: 50%; }
.knopf:hover { background: var(--flaeche); }
.knopf .i-play { display: none; }
.knopf[data-pausiert] .i-play { display: block; }
.knopf[data-pausiert] .i-pause { display: none; }
.zaehler { margin: 0 .5rem; font-size: .9rem; color: var(--grau); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: center; }
.bildnachweis { margin: .5rem 0 0; font-size: .8rem; color: var(--grau); letter-spacing: .03em; }
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.aktiv, .slide.zuletzt { transition: none; }
}

/* Kontakt / Formular */
.kontakt { max-width: var(--breit); margin: 0 auto; padding: var(--abstand) var(--rand); scroll-margin-top: 4rem; }
.kontakt h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.kontakt-text { max-width: var(--mass); margin-bottom: 2.5rem; }
.formular, .danke { max-width: 34rem; }
.feld { margin-bottom: 1.5rem; }
.feld label { display: block; margin-bottom: .35rem; font-size: .95rem; letter-spacing: .02em; }
.optional { color: var(--grau); }
.feld-hinweis { margin: -.15rem 0 .25rem; font-size: .9rem; color: var(--grau); }
.projekt h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-bottom: 1.25rem; }
.feld input[type="text"], .feld input[type="email"], .feld textarea {
  width: 100%; font: inherit; color: inherit; background: var(--papier);
  border: 0; border-bottom: 1px solid var(--tinte); border-radius: 0; padding: .6rem 0; min-height: 44px;
}
.feld textarea { border: 1px solid var(--tinte); padding: .6rem .75rem; resize: vertical; min-height: 8rem; }
.feld input:focus-visible, .feld textarea:focus-visible { outline: 2px solid var(--fokus); outline-offset: 4px; }
.feld [aria-invalid="true"] { border-color: var(--fehler); border-bottom-width: 2px; }
.feld-fehler, .formular-meldung { color: var(--fehler); font-size: .95rem; margin: .4rem 0 0; }
.formular-meldung { margin: 0 0 1.5rem; padding: .75rem 1rem; border-left: 3px solid var(--fehler); background: #fff5f6; }
.feld-check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; }
.feld-check input { width: 24px; height: 24px; margin: .15rem 0 0; accent-color: var(--tinte); }
.feld-check label { font-size: .95rem; line-height: 1.5; }
.feld-check .feld-fehler { grid-column: 2; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.senden { font: inherit; letter-spacing: .04em; background: var(--tinte); color: var(--papier); border: 1px solid var(--tinte); padding: .85rem 1.75rem; min-height: 48px; cursor: pointer; }
.senden:hover { background: #333; }
.senden:focus-visible { outline-offset: 4px; }
.senden[disabled] { opacity: .6; cursor: progress; }
.danke h3, .danke p:first-child { font-size: 1.35rem; font-weight: 300; }
.danke:focus { outline: none; }

/* Textseiten (Impressum, Datenschutz, Danke, 404) */
.textseite-inhalt { max-width: var(--breit); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--rand) var(--abstand); }
.textseite-inhalt > * { max-width: var(--mass); }
.textseite-inhalt h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); margin-bottom: 2rem; }
.textseite-inhalt h2 { font-size: 1.3rem; font-weight: 400; margin-top: 2.5rem; }
.textseite-inhalt ul { padding-left: 1.2rem; }
.hinweis { color: var(--grau); font-size: .95rem; }
.zurueck { margin-top: 3rem; }

/* Fuß */
.fuss { border-top: 1px solid var(--linie); }
.fuss-innen { max-width: var(--breit); margin: 0 auto; padding: 2rem var(--rand) 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--grau); }
.fuss p { margin: 0; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; color: var(--grau); }
.fuss a:hover { color: var(--tinte); }

/* Vorschau-Leiste (nur lokale Vorschau) */
.vorschau-leiste { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; padding: .5rem 1rem; background: #fff3b0; border-bottom: 1px solid #c9b200; font-size: .85rem; }
.vorschau-leiste a[aria-current] { font-weight: 500; }
body:has(.vorschau-leiste) .kopf { top: 0; position: relative; }

@media print {
  .kopf, .steuerung, .formular, .skip-link { display: none !important; }
  .slide { position: static; opacity: 1 !important; visibility: visible !important; page-break-inside: avoid; }
  .slides { display: block; }
}

/* Schlusssatz nach dem Formular (optionaler Abschnitt "schluss") */
.schluss { max-width: var(--breit); margin: 0 auto; padding: 0 var(--rand) var(--abstand); }
.schluss .fliesstext { max-width: var(--mass); }

/* Optionales Kopfbild über der Überschrift (site.json → kopfbild): ruhig, ohne Rahmen und Schatten */
.kopfbild { display: block; margin: 0 0 clamp(1.5rem, 4vw, 3rem); }
.kopfbild img { display: block; width: 100%; height: auto; max-height: 55vh; object-fit: contain; object-position: left center; }
.auftakt:has(.kopfbild) { padding-top: clamp(1rem, 4vw, 3rem); }

/* erzeugt aus site.json und den Werkbildern */
:root { --ueberblendung: 2500ms; --ueberblendung-kurve: linear; }
#serie-1 .rahmen { aspect-ratio: 1500 / 1000; }
#serie-2 .rahmen { aspect-ratio: 1500 / 1000; }
