/* Holzbach Ventures: Szene F "Fünf Stationen" (#vorgehen). Präfix .st-, keine globalen Element-Selektoren.
   Zeitfunktion ausschließlich ease-in-out. Gepinnt nur ab 1024 px Breite und 660 px Höhe (250vh).
   Ohne JavaScript: Text als Liste, Ziffern im Endzustand, keine Abbildung. */

.st {
  position: relative;
  background: var(--papier);
  color: var(--tinte);
  border-top: 1px solid var(--hilfslinie);
}
.st-rahmen { position: relative; padding-block: var(--sektion); }

/* Kopf */
.st-kopf { position: relative; }
.st-titel {
  margin: 0;
  font-size: var(--s-h2-groesse, var(--gr-h2));   /* dieselbe H2-Größe und -Stärke wie die Seite */
  line-height: 1.04;
  font-weight: var(--s-h2-gewicht, 600);
  letter-spacing: -0.032em;
  text-wrap: balance;
}

/* Abbildung: nur mit Skript, Platz wird ohne Layout-Sprung reserviert */
.st-abb { margin: 0; position: relative; }
.st-flaeche { display: none; position: relative; }
.st-legende { display: none; color: var(--tinte-2); margin: 0; }
.st-canvas { position: absolute; left: -10px; top: -10px; max-width: none; pointer-events: none; }  /* größer als die Fläche (Passkreuze), daher nie skalieren */
.st-ueber { position: absolute; inset: 0; pointer-events: none; }

.st-beschriftung,
.st-chip,
.st-seite {
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  color: var(--tinte);
  opacity: 0;
  will-change: transform, opacity;
}
.st-beschriftung { padding: 1px 5px 2px; background: var(--papier); }
.st-chip {
  top: 12px;
  display: inline-flex; align-items: center; gap: 0;
  padding: 4px 9px 5px;
  background: var(--papier);
  border: 1px solid var(--tinte);
}
.st-chip-wert { display: inline-block; margin-left: 0.45em; font-weight: 600; }
.st-chip-trenner { display: inline-block; width: 1px; height: 0.95em; margin: 0 0.15em 0 0.6em; background: var(--tinte-3); }
.st-seite { top: auto; bottom: 10px; padding: 1px 4px 2px; background: var(--papier); color: var(--tinte-2); }

/* Ablauf: Schiene und Stationen */
.st-ablauf { position: relative; }
.st-liste { list-style: none; margin: 0; padding: 0 0 0 44px; display: grid; gap: 56px; }
.st-station { position: relative; }
.st-station::before {
  content: "";
  position: absolute; left: -44px; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--signal);
  border: 1.5px solid var(--signal);
  box-shadow: 0 0 0 3px var(--papier), 0 0 0 4px rgba(42, 60, 255, 0.38);
  transition: background-color var(--t-reveal) ease-in-out, border-color var(--t-reveal) ease-in-out, box-shadow var(--t-reveal) ease-in-out;
}
/* Mit Bewegung: noch nicht erreichte Stationen hohl, ohne Ring */
.st-bewegt .st-station:not(.is-on)::before {
  background: var(--papier);
  border-color: var(--tinte-3);
  box-shadow: 0 0 0 3px var(--papier), 0 0 0 4px rgba(42, 60, 255, 0);
}
.st-schiene { position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; pointer-events: none; }
.st-schiene-spur, .st-schiene-fuellung { position: absolute; }
.st-schiene-spur { left: 0.5px; top: 0; bottom: 0; width: 1px; background: var(--linie); }
.st-schiene-fuellung { left: 0; top: 0; width: 2px; height: 100%; background: var(--signal); transform-origin: 50% 0; transform: scaleY(1); }

.st-ziffer {
  display: block;
  height: 1em;
  font-size: clamp(3rem, 2.3rem + 3.4vw, 4.5rem);
  line-height: 1;
  font-weight: 760;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
  transition: font-stretch 0.8s ease-in-out, font-weight 0.8s ease-in-out, color 0.8s ease-in-out;
}
.st-bewegt .st-station:not(.is-on) .st-ziffer { font-stretch: 62%; font-weight: 250; color: var(--tinte-3); }
.st-bewegt .st-schiene-fuellung { transform: scaleY(0); }

.st-name {
  margin: 18px 0 8px;
  font-size: clamp(1.25rem, 1.08rem + 0.45vw, 1.5rem);
  line-height: 1.18;
  font-weight: 620;
  letter-spacing: -0.018em;
}
.st-text { margin: 0; font-size: 1rem; line-height: 1.58; color: var(--tinte-2); text-wrap: pretty; max-width: 34em; }
.st-nw { white-space: nowrap; }

/* Kleine Abbildung je Station (mobil) */
.st-mini { display: none; position: relative; margin-top: 26px; height: clamp(150px, 52vw, 230px); }

/* ---------- Schmal (unter 1024 px): Stationen gestapelt, je eine kleine Abbildung ---------- */
@media (max-width: 1023.98px) {
  .st-kopf { margin-bottom: 44px; }
  .st-liste { max-width: 40rem; }
}
@media (max-width: 1023.98px) and (scripting: enabled) {
  .st-mini { display: block; }
  .st-legende { display: block; position: absolute; left: 0; top: -32px; }
  .st-abb { height: 0; }
  .st-kopf { margin-bottom: 56px; }
}

/* ---------- Breit (ab 1024 px): fünf Spalten, eine durchgehende Strömung ---------- */
@media (min-width: 1024px) {
  .st-kopf { margin-bottom: clamp(28px, 4vh, 48px); }
  .st-liste {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: var(--spalte-abstand);
    row-gap: 0;
    padding: 46px 0 0;
  }
  .st-schiene { left: 7px; right: 0; top: 6px; bottom: auto; width: auto; height: 2px; }
  .st-schiene-spur { left: 0; right: 0; top: 0.5px; bottom: auto; width: auto; height: 1px; }
  .st-schiene-fuellung { left: 0; top: 0; width: 100%; height: 2px; transform-origin: 0 50%; transform: scaleX(1); }
  .st-bewegt .st-schiene-fuellung { transform: scaleX(0); }
  .st-station::before { left: 0; top: -46px; }
  .st-text { max-width: none; }
  .st-ziffer { font-size: clamp(2.75rem, 1rem + 3.4vw, 4.25rem); }
  .st-name { margin: 16px 0 8px; }
}
@media (min-width: 1024px) and (scripting: enabled) {
  .st-flaeche { display: block; height: clamp(200px, 30vh, 300px); }
  .st-legende { display: block; position: absolute; right: 0; bottom: 100%; margin-bottom: 18px; }
  .st-abb { margin-bottom: 24px; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .st-liste { column-gap: 24px; }
  .st-text { font-size: 0.9375rem; line-height: 1.52; }
}

/* ---------- Gepinnte Bühne: höchstens 250vh, natives Scrollen ----------
   Gepinnt erst ab 760 px Höhe, damit die Abbildung echte Präsenz hat (mindestens 220 px).
   .st-frei setzt das Skript, wenn die Bühne in diesem Fenster trotzdem nicht ohne Quetschen passt: dann ohne Pinning. */
@media (min-width: 1024px) and (min-height: 760px) and (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  .st:not(.st-frei) { height: 250vh; }
  .st:not(.st-frei) .st-buehne { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
  .st:not(.st-frei) .st-rahmen {
    height: 100%;
    display: flex; flex-direction: column; justify-content: center; justify-content: safe center;
    padding-top: calc(var(--s-kopf-h, 72px) + clamp(24px, 3.4vh, 44px));
    padding-bottom: clamp(24px, 3.4vh, 44px);
  }
  .st:not(.st-frei) .st-kopf { flex: none; margin-bottom: clamp(20px, 3.2vh, 44px); }
  .st:not(.st-frei) .st-abb { flex: 1 1 0; min-height: 220px; max-height: 440px; display: flex; flex-direction: column; margin-bottom: clamp(18px, 2.5vh, 28px); }
  .st:not(.st-frei) .st-flaeche { flex: 1 1 auto; height: auto; min-height: 0; }
  .st:not(.st-frei) .st-ablauf { flex: none; }
  .st:not(.st-frei) .st-liste { padding-top: 40px; }
  .st:not(.st-frei) .st-station::before { top: -40px; }
  .st:not(.st-frei) .st-ziffer { font-size: clamp(2.5rem, min(1rem + 3.4vw, 6.2vh), 4rem); }
  .st:not(.st-frei) .st-name { margin: 12px 0 6px; font-size: clamp(1.1875rem, 0.95rem + 0.4vw, 1.375rem); }
}
/* Nur bei knapper Fensterhöhe: etwas kleinere H2 und Texte, damit die Abbildung Präsenz behält */
@media (min-width: 1024px) and (min-height: 760px) and (max-height: 899.98px) and (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  .st:not(.st-frei) .st-titel { font-size: clamp(2rem, 0.9rem + 2.4vw, 3rem); }
  .st:not(.st-frei) .st-text { font-size: 0.9375rem; line-height: 1.5; }
}

/* Abbildung erst sichtbar, wenn die Szene gezeichnet hat */
.st-flaeche, .st-mini { opacity: 0; transition: opacity var(--t-reveal) ease-in-out; }
.st-bereit .st-flaeche, .st-bereit .st-mini { opacity: 1; }
