/* =====================================================================
   Scroll-Chronik „140 Jahre in Bildern“
   ===================================================================== */

/* Stimmung je Kapitel (wird per JS über body[data-epoche] umgeschaltet) */
body.chronik {
  --ep-bg: var(--creme);
  --ep-text: var(--text);
  --ep-akzent: var(--rot);
  --ep-karte: #fffdf8;
  background: var(--ep-bg);
  color: var(--ep-text);
  transition: background-color 0.9s ease, color 0.9s ease;
  overflow-x: clip;
}
body.chronik[data-epoche="1"] { --ep-bg: #ebdfc6; --ep-akzent: #9b3a1f; --ep-karte: #f6eedd; }
body.chronik[data-epoche="2"] { --ep-bg: #e4e1da; --ep-akzent: #a52422; --ep-karte: #f4f2ee; }
body.chronik[data-epoche="3"] { --ep-bg: #f5e6d1; --ep-akzent: var(--rot); --ep-karte: #fffaf2; }
body.chronik[data-epoche="4"] { --ep-bg: #e3f0fa; --ep-akzent: var(--rot); --ep-karte: #ffffff; }
body.chronik[data-epoche="5"] { --ep-bg: var(--creme); }

/* ---------- Fortschrittsbalken + Navigation ---------- */
.fortschritt { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60; background: transparent; }
.fortschritt__balken { height: 100%; width: 100%; background: var(--rot); transform-origin: 0 50%; transform: scaleX(0); }

.ch-navi {
  position: fixed; inset: 4px 0 auto 0; z-index: 55;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px var(--rand);
  pointer-events: none;
}
.ch-navi a { pointer-events: auto; }
.ch-navi__zurueck {
  background: rgb(255 253 248 / 90%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 0.45em 1em; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}
.ch-navi__logo img { height: 38px; width: auto; filter: drop-shadow(0 2px 6px rgb(255 255 255 / 80%)); }

/* ---------- Große Jahreszahl im Hintergrund ---------- */
.hg-jahr {
  position: fixed; left: 50%; top: 50%; z-index: 0;
  transform: translate(-50%, -50%) rotate(-4.5deg);
  font-size: clamp(7rem, 30vw, 24rem);
  font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  color: var(--ep-akzent);
  opacity: 0;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.6s ease, color 0.9s ease;
  user-select: none;
}
body.zeige-hg-jahr .hg-jahr { opacity: 0.07; }

/* ---------- Intro ---------- */
.ch-intro {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 90px var(--rand) 40px;
  background:
    url("../img/himmel-oben-1000.webp") top center / cover no-repeat,
    var(--himmel);
}
.ch-intro__titel {
  font-size: clamp(3.2rem, 13vw, 8rem);
  line-height: 0.95;
  color: var(--rot);
  margin: 0.2em 0 0.3em;
  animation: hoch 0.9s 0.1s both;
}
.ch-intro__titel span { color: var(--anthrazit); }
.ch-intro__text { max-width: 560px; font-size: clamp(1.05rem, 2.6vw, 1.25rem); font-weight: 600; color: var(--anthrazit); animation: hoch 0.9s 0.3s both; }
.ch-intro__scroll { margin-top: 3em; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; color: var(--anthrazit); animation: hoch 0.9s 0.6s both; }
.ch-intro__pfeil {
  width: 26px; height: 42px; border: 3px solid var(--anthrazit); border-radius: 14px; position: relative;
}
.ch-intro__pfeil::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 9px; margin-left: -2px;
  border-radius: 2px; background: var(--rot);
  animation: scrollrad 1.6s infinite;
}
@keyframes scrollrad { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes hoch { from { opacity: 0; transform: translateY(18px); } }

.etikett {
  display: inline-block;
  padding: 0.25em 0.9em;
  background: var(--rot); color: #fff;
  font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em;
  transform: rotate(-3deg);
  margin: 0;
}

/* ---------- Zeitstrahl ---------- */
.zeitstrahl { position: relative; z-index: 1; padding-bottom: 40px; }
.zeitstrahl__linie {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 6px; margin-left: -3px;
  background: rgb(52 50 51 / 12%);
  border-radius: 3px;
}
.zeitstrahl__fuellung {
  position: absolute; inset: 0 0 auto 0; height: 0;
  background: linear-gradient(180deg, #e8531f, var(--rot) 30%, var(--rot));
  border-radius: 3px;
}
.zeitstrahl__fuellung::after {        /* kleine Flamme an der Spitze */
  content: "";
  position: absolute; left: 50%; bottom: -10px;
  width: 22px; height: 22px; margin-left: -11px;
  border-radius: 50% 0 50% 50%;
  background: radial-gradient(circle at 60% 60%, #ffd23f 0 25%, #ff7b1c 45%, var(--rot) 75%);
  transform: rotate(-45deg);
  box-shadow: 0 0 18px 6px rgb(255 120 30 / 45%);
}

/* ---------- Kapitel ---------- */
.epoche { position: relative; padding: clamp(60px, 10vw, 120px) var(--rand) 0; }
.epoche__kopf {
  position: relative; z-index: 2;
  text-align: center;
  margin: 0 auto clamp(40px, 7vw, 80px);
  overflow: hidden;
  margin-left: calc(-1 * var(--rand)); margin-right: calc(-1 * var(--rand));
  padding: 10px 0;
}
.epoche__nr {
  display: inline-block; margin: 0 0 0.2em;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.9rem;
  color: var(--ep-akzent);
  background: var(--ep-bg); padding: 0.3em 0.9em; border-radius: 999px;
  transition: background-color 0.9s;
}
.epoche__band { font-size: clamp(1.9rem, 6.5vw, 3.6rem); margin: 0; }
.epoche__zeit {
  display: inline-block; margin: 0.4em 0 0;
  font-size: clamp(1.2rem, 3.4vw, 1.7rem); font-weight: 800; color: var(--anthrazit);
  background: var(--ep-bg); padding: 0.1em 0.8em; border-radius: 999px;
  transition: background-color 0.9s;
}

/* ---------- Station ---------- */
.station {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto clamp(70px, 11vw, 140px);
}
.station::before {                     /* Punkt auf dem Zeitstrahl */
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: var(--ep-bg);
  border: 5px solid rgb(52 50 51 / 25%);
  z-index: 2;
  transition: all 0.5s cubic-bezier(.2,.9,.3,1.4);
}
.station.ist-da::before {
  background: #ffd23f;
  border-color: var(--rot);
  box-shadow: 0 0 0 6px rgb(201 31 33 / 15%), 0 0 24px 4px rgb(255 140 40 / 55%);
  transform: scale(1.15);
}
.station__text { grid-column: 1; grid-row: 1; text-align: right; }
.station > figure, .station > .fotos { grid-column: 3; grid-row: 1; }
.station:nth-of-type(even) .station__text { grid-column: 3; text-align: left; }
.station:nth-of-type(even) > figure, .station:nth-of-type(even) > .fotos { grid-column: 1; }

.station__jahr {
  margin: 0 0 0.1em;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--ep-akzent);
  transition: color 0.9s;
}
.station h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); color: var(--anthrazit); margin-bottom: 0.6em; }
.station__text p:not(.station__jahr) { margin: 0 0 0.8em; font-size: 1.05rem; }

/* Breite Stationen: Text oben, Bilder darunter über die volle Breite */
.station--breit { grid-template-columns: 1fr; }
.station--breit::before { top: 0; margin-top: -40px; }
.station--breit .station__text,
.station--breit:nth-of-type(even) .station__text {
  grid-column: 1; grid-row: auto; text-align: center;
  max-width: 680px; margin: 0 auto 28px;
  background: var(--ep-bg); padding: 10px 16px; border-radius: var(--radius);
  position: relative; z-index: 2;
  transition: background-color 0.9s;
}
.station--breit > .fotos, .station--breit > figure,
.station--breit:nth-of-type(even) > .fotos, .station--breit:nth-of-type(even) > figure { grid-column: 1; grid-row: auto; position: relative; z-index: 2; }

/* Einsatz-Stationen: kleines Blaulicht-Etikett */
.station--einsatz .station__jahr::after {
  content: "Einsatz";
  display: inline-block; vertical-align: middle;
  margin: 0 0.6em;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: #2f6fd0; padding: 0.3em 0.7em; border-radius: 999px;
  box-shadow: 0 0 0 0 rgb(47 111 208 / 60%);
}
.station--einsatz.ist-da .station__jahr::after { animation: blaulicht 1.2s 3; }
@keyframes blaulicht { 0%, 100% { box-shadow: 0 0 0 0 rgb(47 111 208 / 0%); } 50% { box-shadow: 0 0 16px 6px rgb(47 111 208 / 55%); } }

/* Gedenken */
.station--gedenken { grid-template-columns: 1fr; }
.station--gedenken::before { background: var(--anthrazit) !important; border-color: var(--anthrazit) !important; box-shadow: none !important; top: 0; margin-top: -40px; }
.station--gedenken .station__text {
  grid-column: 1 !important; text-align: center !important;
  max-width: 620px; margin: 0 auto;
  background: var(--anthrazit); color: #eee6de;
  padding: 34px 30px; border-radius: var(--radius);
  position: relative; z-index: 2;
}
.station--gedenken h3 { color: #fff; }
.station--gedenken .station__jahr { color: #d8c9b8; }
.gedenken { list-style: none; padding: 0; margin: 0.6em 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-weight: 700; color: #fff; }

/* ---------- Fotos ---------- */
.foto { margin: 0; position: relative; }
.foto__knopf {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 16px 40px rgb(52 40 30 / 25%);
  border: 8px solid #fff;
  border-bottom-width: 8px;
}
.foto img { width: 100%; height: auto; transition: transform 0.6s ease; }
.foto__knopf:hover img { transform: scale(1.03); }
.foto figcaption { margin-top: 10px; font-size: 0.92rem; font-weight: 600; color: var(--text-leise); }
.station:not(:nth-of-type(even)) > figure.foto figcaption { text-align: left; }

.fotos--zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.fotos--zwei .foto:nth-child(2) { margin-top: 40px; }
.fotos--galerie { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.fotos--galerie .foto:nth-child(odd) { transform: rotate(-1.5deg); }
.fotos--galerie .foto:nth-child(even) { transform: rotate(1.5deg) translateY(14px); }
.fotos--drei { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .fotos--galerie { grid-template-columns: 1fr 1fr; }
  .fotos--drei { grid-template-columns: 1fr 1fr; }
  .fotos--drei .foto--gross { grid-column: 1 / -1; }
}


/* Vorher/Nachher-Vergleich */
.vergleich { margin: 48px auto 0; max-width: 900px; position: relative; z-index: 2; --pos: 50%; }
.vergleich__bilder {
  position: relative; overflow: hidden; border-radius: 6px;
  border: 8px solid #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 16px 40px rgb(52 40 30 / 25%);
}
.vergleich__bilder > img { width: 100%; }
.vergleich__vorher { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.vergleich__vorher img { width: 100%; height: 100%; object-fit: cover; }
.vergleich__griff {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px; background: #fff;
  box-shadow: 0 0 10px rgb(0 0 0 / 35%);
  pointer-events: none;
}
.vergleich__griff::after {
  content: "◂ ▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--rot); color: #fff; font-weight: 800; font-size: 0.9rem; white-space: nowrap;
  padding: 0.5em 0.6em; border-radius: 999px; box-shadow: 0 2px 10px rgb(0 0 0 / 30%);
}
.vergleich__marke {
  position: absolute; top: 12px; z-index: 2;
  background: rgb(52 50 51 / 80%); color: #fff; font-weight: 800; padding: 0.15em 0.6em; border-radius: 6px;
}
.vergleich__marke--links { left: 12px; }
.vergleich__marke--rechts { right: 12px; }
.vergleich__regler {
  position: absolute; left: 8px; right: 8px; top: 8px; height: calc(100% - 60px);
  width: calc(100% - 16px); margin: 0; opacity: 0; cursor: ew-resize;
}
.vergleich figcaption { text-align: center; margin-top: 12px; font-weight: 600; color: var(--text-leise); }
.no-js .nur-js { display: none; }

/* ---------- Zahl-Zwischenspiele ---------- */
.zahl {
  position: relative; z-index: 2;
  max-width: 640px;
  margin: 0 auto clamp(70px, 11vw, 140px);
  text-align: center;
  background: var(--rot);
  color: #fff;
  padding: 34px 28px 30px;
  transform: rotate(-2deg);
  box-shadow: 0 18px 50px rgb(201 31 33 / 30%);
}
.zahl__wert { margin: 0; font-size: clamp(3.6rem, 13vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.zahl__text { margin: 0.5em auto 0; max-width: 460px; font-size: 1.1rem; font-weight: 600; }

/* ---------- Einblenden ---------- */
.js .station__text, .js .station > figure, .js .station > .fotos, .js .zahl, .js .vergleich {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.js .station__text { transform: translateX(-40px); }
.js .station:nth-of-type(even) .station__text { transform: translateX(40px); }
.js .station > figure, .js .station > .fotos { transform: translateX(50px) rotate(2deg); transition-delay: 0.12s; }
.js .station:nth-of-type(even) > figure, .js .station:nth-of-type(even) > .fotos { transform: translateX(-50px) rotate(-2deg); }
.js .station--breit .station__text, .js .station--gedenken .station__text { transform: translateY(30px); }
.js .station--breit > .fotos, .js .station--breit > figure { transform: translateY(50px); }
.js .zahl { transform: rotate(-2deg) scale(0.85); }
.js .vergleich { transform: translateY(40px); }
.js .station.ist-da .station__text,
.js .station.ist-da > figure, .js .station.ist-da > .fotos, .js .vergleich.ist-da { opacity: 1; transform: none; }
.js .zahl.ist-da { opacity: 1; transform: rotate(-2deg); }

/* ---------- Finale ---------- */
.finale {
  position: relative; z-index: 1;
  overflow: hidden;
  text-align: center;
  padding: clamp(80px, 14vw, 160px) var(--rand) clamp(80px, 12vw, 140px);
  background:
    linear-gradient(180deg, var(--ep-bg) 0%, rgb(251 243 228 / 0%) 30%),
    url("../img/landschaft-rot-1788.webp") bottom center / cover no-repeat;
  transition: background-color 0.9s;
}
.finale__jahr {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-4.5deg);
  margin: 0; font-size: clamp(8rem, 34vw, 26rem); font-weight: 800; letter-spacing: -0.05em;
  color: rgb(201 31 33 / 9%); pointer-events: none;
}
.finale__logo { position: relative; width: min(70vw, 380px); margin: 0 auto 20px; }
.finale__titel { position: relative; font-size: clamp(2.2rem, 7vw, 4rem); color: var(--anthrazit); }
.finale__text { position: relative; max-width: 620px; margin: 0 auto 1.6em; font-size: 1.15rem; }
.finale .knopf { position: relative; }
.finale__dank {
  position: relative; max-width: 620px; margin: 3em auto 0; font-size: 0.85rem; color: #fff;
  background: rgb(52 50 51 / 55%); padding: 0.8em 1em; border-radius: var(--radius-klein);
}
.knopf--gross { font-size: 1.15rem; padding: 1em 1.8em; }

.ch-fuss {
  position: relative; z-index: 1;
  background: var(--anthrazit); color: #d9d2cc; text-align: center; font-size: 0.88rem;
  padding: 22px var(--rand);
}
.ch-fuss p { margin: 0.2em 0; }
.ch-fuss a { color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  max-width: min(96vw, 1400px); max-height: 94vh; padding: 0; border: 0; border-radius: 10px;
  background: #1d1b1c; color: #eee;
}
.lightbox::backdrop { background: rgb(20 18 19 / 88%); }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox__text { margin: 0; padding: 10px 16px 14px; font-weight: 600; text-align: center; }
.lightbox__zu {
  position: absolute; right: 8px; top: 8px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgb(0 0 0 / 60%); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}

/* ---------- Handy: Zeitstrahl links ---------- */
@media (max-width: 760px) {
  .zeitstrahl__linie { left: 22px; }
  .epoche { padding-left: 0; padding-right: 0; }
  .epoche__kopf { margin-left: 0; margin-right: 0; }
  .station,
  .station--breit, .station--gedenken {
    grid-template-columns: 1fr;
    padding-left: 52px; padding-right: 16px;
    gap: 22px;
  }
  .station::before, .station--breit::before, .station--gedenken::before { left: 22px; top: 0.6em; margin-top: 0; }
  .station .station__text, .station:nth-of-type(even) .station__text,
  .station > figure, .station:nth-of-type(even) > figure,
  .station > .fotos, .station:nth-of-type(even) > .fotos { grid-column: 1; grid-row: auto; text-align: left; }
  .station--breit .station__text, .station--breit:nth-of-type(even) .station__text { text-align: left; margin: 0; padding: 0; background: none; }
  .station--gedenken .station__text { text-align: left !important; padding: 24px 20px; }
  .gedenken { justify-content: flex-start; }
  .js .station__text, .js .station:nth-of-type(even) .station__text { transform: translateY(30px); }
  .js .station > figure, .js .station > .fotos,
  .js .station:nth-of-type(even) > figure, .js .station:nth-of-type(even) > .fotos { transform: translateY(40px); }
  .fotos--zwei .foto:nth-child(2) { margin-top: 24px; }
  .zahl { margin-left: 40px; margin-right: 12px; }
  .vergleich { margin-top: 10px; }
  .ch-navi__zurueck { font-size: 0.82rem; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .ch-intro__titel, .ch-intro__text, .ch-intro__scroll, .ch-intro__pfeil::after { animation: none; }
  .js .station__text, .js .station > figure, .js .station > .fotos, .js .zahl, .js .vergleich { opacity: 1 !important; transform: none !important; transition: none; }
  .js .zahl { transform: rotate(-2deg) !important; }
}

/* Nachträge */
.epoche__kopf .band { width: 124%; margin-left: -12%; }
.finale__text {
  background: rgb(255 253 248 / 90%);
  padding: 1em 1.4em;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(90 10 10 / 15%);
}

/* Stationen ohne Bild: Text als Karte */
.station--nurtext .station__text {
  background: var(--ep-karte);
  padding: 26px 30px 18px;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%), 0 12px 32px rgb(52 40 30 / 12%);
  transition: background-color 0.9s;
}
.station--nurtext { margin-bottom: clamp(50px, 8vw, 100px); }
@media (max-width: 760px) { .station--nurtext .station__text { padding: 20px 20px 12px; } }

.gedenken__hinweis {
  margin: 1.4em auto 0 !important;
  max-width: 480px;
  font-size: 0.86rem !important;
  font-style: italic;
  color: #c9bdb2;
}
