/* Campus c "Bahnsteig": Erzaehlung entlang eines Zuges.
   Ein Zug faehrt in den Hero ein, in den Fenstern Menschen vom Campus.
   Beim Scrollen faehrt eine Lok durch fuenf Halte. Waerme, Menschen, Orange.
   Animationen nur mit transform und opacity. Ohne JS und bei reduzierter
   Bewegung steht alles im Endzustand. */

:root {
  --flaeche: #f4f3f0;
  --flaeche-2: #e9e7e2;
  --zug: #333534;
  --zug-hell: #424443;
  --nacht: #1f2120;
  --led: #ffb000;
}

/* ---------- Hero: Bahnsteig ---------- */
.bahnsteig {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(247,166,0,.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fff 48%, var(--flaeche) 100%);
  padding-top: clamp(24px, 2.6vw, 40px);
}
.bs-oben { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .6fr); gap: clamp(28px, 4vw, 64px); align-items: end; }
.bahnsteig h1 { font-size: clamp(44px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -0.03em; }
.bs-h1-akzent { position: relative; white-space: nowrap; }
.bs-h1-akzent::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .04em; height: .26em; z-index: -1;
  background: var(--orange); border-radius: .08em; transform-origin: left center;
  animation: bs-strich .9s cubic-bezier(.3,.7,.2,1) .5s both;
}
@keyframes bs-strich { from { transform: scaleX(0); } }
.bahnsteig h1 { position: relative; z-index: 0; }
.bs-lead { margin-top: 18px; font-size: clamp(18px, 1.35vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 60ch; }
.bs-knoepfe { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

/* Abfahrtstafel mit Bahnhofsuhr */
.tafel {
  background: var(--nacht); color: #fff; border-radius: var(--r-mittel); padding: 20px 22px 18px;
  box-shadow: 0 30px 60px -36px rgba(31,33,32,.7);
}
.tafel-kopf { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.tafel-titel { font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.uhr {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 3px #d6d6d4;
}
.uhr::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: repeating-conic-gradient(from -1.5deg, #2b2b29 0 3deg, transparent 3deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 13px, #000 13.5px); mask: radial-gradient(circle, transparent 13px, #000 13.5px);
}
.uhr i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 2px; }
.uhr-h { width: 3px; height: 11px; margin-left: -1.5px; background: #2b2b29; transform: rotate(var(--h, 300deg)); }
.uhr-m { width: 2.4px; height: 16px; margin-left: -1.2px; background: #2b2b29; transform: rotate(var(--m, 54deg)); }
.uhr-s { width: 1.4px; height: 16px; margin-left: -.7px; background: #e2231a; animation: uhr-sekunde 60s steps(60) infinite; animation-delay: var(--s, 0s); }
.uhr-s::after { content: ""; position: absolute; left: 50%; top: -2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #e2231a; }
@keyframes uhr-sekunde { to { transform: rotate(360deg); } }

.tafel-liste { margin: 0; }
.tz { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.1); transform-origin: 50% 0; animation: tz-klapp .6s cubic-bezier(.3,.8,.3,1) both; animation-delay: calc(1.3s + var(--t) * .14s); }
.tz:last-child { border-bottom: 0; padding-bottom: 0; }
.tz dt { font-size: 14px; color: #c9c9c6; }
.tz dd { margin: 0; font-size: 18px; font-weight: 600; color: #fff; }
.tz-gross dd { font-size: 22px; color: var(--led); }
@keyframes tz-klapp { from { transform: perspective(500px) rotateX(-90deg); } }

/* Gleis mit Zug */
.gleis {
  --halt: 0px;
  position: relative; margin-top: clamp(24px, 2.6vw, 36px);
  font-size: clamp(7.6px, .5vw + 2.6px, 9.6px);
  height: 33em;
  padding-left: max(var(--rand), calc((100vw - 1360px) / 2 + var(--rand)));
}
.gleis::before { /* Schienen hinter dem Bahnsteig */
  content: ""; position: absolute; left: 0; right: 0; bottom: 3.4em; height: 1.2em;
  background: linear-gradient(180deg, #8d8f8e 0 22%, transparent 22% 60%, #8d8f8e 60% 80%, transparent 80%);
}
.zug { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 1.3em; width: max-content; padding-top: 1em; transform: translateX(var(--halt)); animation: einfahrt 3s cubic-bezier(.12,.62,.22,1) .15s both; }
@keyframes einfahrt { from { transform: translateX(calc(100vw + 20em)); } to { transform: translateX(var(--halt)); } }
.zug > * + *::before { /* Kupplung */
  content: ""; position: absolute; left: -1.4em; bottom: 4.6em; width: 1.5em; height: 1.4em; background: #1b1c1c; border-radius: .3em;
}

.zug-lok, .zug-wagen {
  position: relative; flex: none; height: 27em;
  background: linear-gradient(180deg, #5a5c5b 0 1.6em, var(--zug-hell) 1.6em 2.4em, var(--zug) 2.4em 100%);
  box-shadow: inset 0 -1.6em 0 rgba(0,0,0,.25);
}
.zug-lok { width: 37em; border-radius: 13em 1.4em .6em .6em / 15em 1.4em .6em .6em; }
.zug-wagen { width: 64em; border-radius: 1.6em 1.6em .6em .6em; }

.zug-streifen { position: absolute; left: 0; right: 0; top: 19.6em; height: 1.9em; background: var(--orange); }
.zug-lok .zug-streifen { left: 3.4em; border-radius: 1em 0 0 1em; }

.lok-scheibe {
  position: absolute; left: 3.2em; top: 3.6em; width: 13.5em; height: 9em; border-radius: 8em 1em 1em 1.4em / 7em 1em 1em 1.4em;
  background: linear-gradient(160deg, #cfe3ef 0%, #8fb1c6 38%, #314a59 70%, #1d2a32 100%);
  box-shadow: inset 0 0 0 .5em #1d1e1e;
}
.lok-licht {
  position: absolute; left: 2.6em; top: 23em; width: 2.6em; height: 1.6em; border-radius: 1em; background: #fff3c4;
  box-shadow: 0 0 1.2em .5em rgba(255,214,102,.7), -6em 0 7em 2em rgba(255,214,102,.28);
}
.lok-luefter { position: absolute; left: 19.5em; top: 4.4em; width: 14.5em; height: 7.6em; border-radius: .8em; background: repeating-linear-gradient(90deg, #2a2c2b 0 .5em, #3c3e3d .5em 1.3em); }
.lok-logo { position: absolute; left: 20em; top: 13.4em; width: auto; height: 4.6em; }

.fenster {
  position: absolute; top: 5.2em; width: 14em; height: 11.4em; overflow: hidden;
  border-radius: 1.8em; background: #1d1e1e; box-shadow: inset 0 0 0 .45em #1d1e1e;
}
.fenster img { position: absolute; inset: .45em; width: calc(100% - .9em); height: calc(100% - .9em); border-radius: 1.4em; object-fit: cover; object-position: var(--pos, 50% 25%); transform: scale(1.06); animation: fenster-ruck 3s cubic-bezier(.12,.62,.22,1) .15s both; }
@keyframes fenster-ruck { from { transform: translateX(-9%) scale(1.22); } to { transform: scale(1.06); } }
.fenster::after { /* Scheibe spiegelt leicht, nur am Rand oben links */
  content: ""; position: absolute; inset: .45em; border-radius: 1.4em; pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.28) 0 9%, transparent 22%);
}
.f-1 { left: 3em; }
.f-2 { left: 31.5em; }
.f-3 { left: 47.5em; }

.tuer { position: absolute; z-index: 1; left: 19.2em; top: 3.4em; width: 10em; height: 22.2em; overflow: hidden; border-radius: .9em .9em 0 0; background: #ffe2a3; box-shadow: inset 0 0 0 .35em #1d1e1e; }
.tuer-licht {
  position: absolute; inset: 0; display: grid; place-items: center; padding-top: 6em;
  background: radial-gradient(90% 60% at 50% 30%, #fff6dc, #ffc94a 70%, #f7a600);
  font-size: 1.35em; font-weight: 600; line-height: 1.1; text-align: center; color: #2b2b29;
  opacity: 0; animation: tuer-licht .6s ease 3.35s both;
}
@keyframes tuer-licht { to { opacity: 1; } }
.tuer-l, .tuer-r {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(180deg, #505251, #3e403f);
  box-shadow: inset 0 0 0 .25em #2a2c2b;
}
.tuer-l::before, .tuer-r::before { content: ""; position: absolute; top: 2.2em; left: 1em; right: 1em; height: 8.6em; border-radius: .7em; background: linear-gradient(160deg, #a9c2d1, #3a5262); }
.tuer-l { left: 0; animation: tuer-auf-l 1s cubic-bezier(.5,0,.2,1) 3.1s both; }
.tuer-r { right: 0; animation: tuer-auf-r 1s cubic-bezier(.5,0,.2,1) 3.1s both; }
@keyframes tuer-auf-l { to { transform: translateX(-96%); } }
@keyframes tuer-auf-r { to { transform: translateX(96%); } }
.tuer-zu .tuer-l, .tuer-zu .tuer-r { animation: none; }

.w-anzeige { position: absolute; left: 31.5em; top: .9em; width: 30em; height: 3.1em; overflow: hidden; border-radius: .5em; background: #111; box-shadow: inset 0 0 0 .2em #2a2c2b; }
.w-lauf { display: flex; width: max-content; height: 100%; align-items: center; animation: lauf 16s linear 3.4s infinite; }
.w-lauf b { padding-right: 6em; font-size: 1.45em; font-weight: 600; color: var(--led); white-space: nowrap; letter-spacing: .03em; }
@keyframes lauf { to { transform: translateX(-50%); } }
.gleis.ruht .w-lauf, .gleis.ruht .uhr-s { animation-play-state: paused; }

.drehgestell { position: absolute; bottom: -2.4em; width: 13em; height: 4.4em; display: flex; justify-content: space-between; padding: 0 .4em; }
.drehgestell::before { content: ""; position: absolute; left: 0; right: 0; top: .6em; height: 1.8em; background: #1b1c1c; border-radius: .4em; }
.drehgestell i { position: relative; width: 4.4em; height: 4.4em; border-radius: 50%; background: radial-gradient(circle, #9a9c9b 0 18%, #1b1c1c 19% 30%, #575958 31% 58%, #1b1c1c 59%); animation: rad 3s cubic-bezier(.12,.62,.22,1) .15s both; }
.drehgestell i::after { content: ""; position: absolute; left: 50%; top: 6%; width: .5em; height: 44%; margin-left: -.25em; background: #9a9c9b; border-radius: .2em; }
@keyframes rad { from { transform: rotate(1800deg); } to { transform: rotate(0deg); } }
.dg-a { left: 3em; }
.dg-b { right: 3em; }

/* Bahnsteigkante vor dem Zug */
.kante { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 4.6em; background: linear-gradient(180deg, #e3e2de 0, #d4d3cf 100%); box-shadow: 0 -.25em 0 #c2c1bc; }
.kante-linie { position: absolute; left: 0; right: 0; top: 1.4em; height: .7em; background: repeating-linear-gradient(90deg, #fff 0 4em, transparent 4em 5em); }

.bs-haken { display: flex; flex-wrap: wrap; gap: 10px 34px; padding: 22px 0 30px; font-weight: 500; font-size: 17px; }
.bs-haken li { display: flex; align-items: center; gap: 10px; }
.bs-haken li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%232b2b29' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

@media (max-width: 999px) {
  .bs-oben { grid-template-columns: 1fr; align-items: start; }
  .tafel { max-width: 560px; }
}
@media (max-width: 699px) {
  /* mobil: Zug direkt unter der Headline, damit er im ersten Bild einfaehrt */
  .bahnsteig { display: flex; flex-direction: column; padding-top: 18px; }
  .bs-oben, .bs-text { display: contents; }
  .bahnsteig h1 { order: 1; padding-inline: var(--rand); font-size: clamp(38px, 10.4vw, 48px); max-width: none; }
  .gleis { order: 2; margin-top: 20px; --halt: -26em; padding-left: var(--rand); }
  .bs-lead { order: 3; padding-inline: var(--rand); margin-top: 18px; font-size: 18px; }
  .bs-knoepfe { order: 4; padding-inline: var(--rand); margin-top: 20px; }
  .bs-knoepfe .knopf { width: 100%; }
  .tafel { order: 5; margin: 28px var(--rand) 0; }
  .bahnsteig > .wrap { order: 6; }
  .bs-haken { flex-direction: column; gap: 10px; }
}

/* ---------- Reise: fuenf Halte ---------- */
.reise { background: #fff; }
.strecke { --p: 1; --gleis-h: 0px; position: relative; margin-top: clamp(40px, 5vw, 64px); }
.st-gleis { position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; margin-left: -5px; border-radius: 5px; background: repeating-linear-gradient(180deg, var(--flaeche-2) 0 14px, #d2d0ca 14px 18px); }
.st-fuellung { position: absolute; inset: 0; border-radius: 5px; background: var(--orange); transform-origin: top; transform: scaleY(var(--p)); }
.st-lok { position: absolute; left: 50%; top: 0; width: 40px; height: 48px; margin: -24px 0 0 -20px; transform: translateY(calc(var(--p) * var(--gleis-h))); filter: drop-shadow(0 8px 12px rgba(31,33,32,.3)); }
.st-lok svg { width: 100%; height: 100%; display: block; }

.st-liste { position: relative; display: grid; gap: clamp(48px, 6vw, 96px); }
.station { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); align-items: center; }
.st-halt { grid-column: 2; grid-row: 1; justify-self: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 6px var(--orange); z-index: 1; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.st-karte { grid-column: 1; grid-row: 1; position: relative; background: #fff; border-radius: var(--r-mittel); padding: clamp(24px, 2.6vw, 36px); box-shadow: 0 2px 6px rgba(43,43,41,.06), 0 30px 60px -36px rgba(43,43,41,.34); }
.st-foto { grid-column: 3; grid-row: 1; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-mittel); position: relative; }
.st-foto img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.station:nth-child(even) .st-karte { grid-column: 3; }
.station:nth-child(even) .st-foto { grid-column: 1; }

.st-schild { display: flex; align-items: stretch; width: fit-content; margin-bottom: 16px; border-radius: 10px; overflow: hidden; background: var(--nacht); box-shadow: inset 0 0 0 3px var(--nacht), inset 0 0 0 5px rgba(255,255,255,.85); font-size: inherit; letter-spacing: 0; }
.st-nr { display: grid; place-items: center; padding: 0 14px; white-space: nowrap; background: var(--orange); color: #1c1c1b; font-weight: 600; font-size: 15px; }
.st-name { padding: 10px 18px 11px; color: #fff; font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; line-height: 1.1; }
.st-karte > p:not(.st-schild) { font-size: 18px; line-height: 1.55; color: var(--text-2); }
.st-info { margin-top: 14px; font-weight: 500; color: var(--text) !important; }
.st-info strong { display: block; font-size: 22px; }
.st-zahl { font-size: clamp(56px, 6vw, 88px) !important; font-weight: 600; line-height: 1 !important; color: var(--text) !important; letter-spacing: -0.03em; margin-bottom: 8px; }
.station-ziel .knopf { margin-top: 22px; }
.st-stempel {
  position: absolute; right: clamp(18px, 2vw, 28px); top: clamp(18px, 2vw, 28px); padding: 6px 12px; border: 3px solid #1d7a43; border-radius: 8px;
  color: #1d7a43 !important; font-weight: 700; font-size: 15px !important; text-transform: uppercase; letter-spacing: .08em; transform: rotate(-8deg);
}

/* Zustand vor dem Erreichen (nur mit JS) */
html.js .strecke.aktiv .station:not(.erreicht) .st-halt { box-shadow: inset 0 0 0 6px #d2d0ca; }
html.js .strecke.aktiv .station.erreicht .st-halt { transform: scale(1.25); }
html.js .strecke.aktiv .st-karte, html.js .strecke.aktiv .st-foto { transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
html.js .strecke.aktiv .station:not(.erreicht) .st-karte { transform: translateY(18px); }
html.js .strecke.aktiv .station:not(.erreicht) .st-foto { opacity: .35; transform: scale(.96); }
html.js .strecke.aktiv .station:not(.erreicht) .st-stempel { opacity: 0; transform: rotate(-8deg) scale(1.8); }
html.js .strecke.aktiv .st-stempel { transition: opacity .3s ease .3s, transform .45s cubic-bezier(.3,1.5,.5,1) .3s; }

@media (max-width: 799px) {
  .st-gleis { left: 14px; }
  .st-lok { width: 30px; height: 36px; margin: -18px 0 0 -15px; }
  .station { grid-template-columns: 44px minmax(0, 1fr); gap: 16px 14px; align-items: start; }
  .st-halt { grid-column: 1; justify-self: start; margin-left: -1px; margin-top: 22px; }
  .st-karte, .station:nth-child(even) .st-karte { grid-column: 2; grid-row: 2; }
  .st-foto, .station:nth-child(even) .st-foto { grid-column: 2; grid-row: 1; aspect-ratio: 16 / 10; }
  .st-halt { grid-row: 1; }
  .st-name { font-size: 20px; padding: 9px 14px 10px; }
}

/* ---------- Finder als Fahrkarte ---------- */
.finder-karte { position: relative; }
@media (min-width: 700px) {
  .finder-fuss { position: relative; border-top: 2px dashed var(--linie); }
  .finder-fuss::before, .finder-fuss::after { content: ""; position: absolute; top: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--flaeche); }
  .finder-fuss::before { left: -40px; }
  .finder-fuss::after { right: -40px; }
}

/* ---------- Weiterbildungen: Zuglaufschild ---------- */
.wb-zusatz { display: inline-block; padding: 6px 12px; border-radius: 8px; background: var(--nacht); color: var(--led) !important; font-weight: 600 !important; letter-spacing: .02em; }

/* ---------- Kursstarts als Abfahrtstafel ---------- */
#kursstarts .ks-karte { background: var(--nacht); color: #fff; border-radius: var(--r-gross); padding: clamp(20px, 2.6vw, 36px); box-shadow: 0 40px 70px -44px rgba(31,33,32,.8); }
.ks-tafelkopf { display: grid; grid-template-columns: 150px 170px 1fr; gap: 18px; padding: 0 6px 12px; border-bottom: 2px solid rgba(255,255,255,.16); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #c9c9c6; }
#kursstarts .ks-liste { display: block; columns: auto; gap: 0; }
#kursstarts .ks-zeile { display: grid; grid-template-columns: 150px 170px 1fr; grid-template-areas: "datum ort kurse"; gap: 18px; align-items: center; padding: 14px 6px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); background: none; border-radius: 0; box-shadow: none; min-height: 0; }
#kursstarts .ks-zeile:last-child { border-bottom: 0; }
#kursstarts .ks-datum { display: flex; align-items: baseline; gap: 6px; background: none; padding: 0; color: var(--led); min-width: 0; width: auto; height: auto; border-radius: 0; flex-direction: row; }
#kursstarts .ks-tag { font-size: 28px; font-weight: 600; color: var(--led); line-height: 1; }
#kursstarts .ks-monat { font-size: 18px; font-weight: 600; color: var(--led); text-transform: none; }
#kursstarts .ks-jahr { font-size: 15px; color: #c9c9c6; }
#kursstarts .ks-ort { align-self: center; font-size: 20px; font-weight: 600; color: #fff; }
#kursstarts .ks-kurse { align-self: center; margin: 0; font-size: 16px; color: #dcdcd9; }
html.js #kursstarts .ks-liste.staffel > * { transform: perspective(600px) rotateX(-70deg); transform-origin: 50% 0; }
html.js #kursstarts .ks-liste.staffel.ist-da > * { transform: none; }
.ks-stand { margin-top: 14px; }
@media (max-width: 699px) {
  .ks-tafelkopf { display: none; }
  #kursstarts .ks-zeile { grid-template-columns: 1fr; grid-template-areas: "datum" "ort" "kurse"; gap: 4px; }
}

/* ---------- Standorte als Bahnhofsschilder ---------- */
.so-name { display: inline-flex; width: fit-content; justify-self: start; align-self: start; padding: 10px 18px 11px; border-radius: 10px; background: var(--nacht); color: #fff; box-shadow: inset 0 0 0 3px var(--nacht), inset 0 0 0 5px rgba(255,255,255,.85); }

/* ---------- Reduzierte Bewegung: Endzustand ---------- */
@media (prefers-reduced-motion: reduce) {
  .zug, .fenster img, .drehgestell i, .tuer-l, .tuer-r, .tuer-licht, .w-lauf, .tz, .bs-h1-akzent::after, .uhr-s { animation: none !important; }
  .tuer:not(.tuer-zu) .tuer-l { transform: translateX(-96%); }
  .tuer:not(.tuer-zu) .tuer-r { transform: translateX(96%); }
  .tuer-licht { opacity: 1; }
}
