/* ── TIMELINE — horizontale Karten, Scrollen bewegt sie seitwärts ───
   Desktop: Section wird gepinnt, vertikales Scrollen schiebt die Karten
   (NL.pinScroll in global.js). Mobil: Karten nativ wischbar.
   Kartennummer frei wählbar (01, 02 … oder Jahreszahlen).
   Letzte Karte optional .timeline-card--outro (CTA oder Kennzahlen).
   Schrift: timeline-card-num t-num-xl · timeline-card-title t-h3 (Outro t-h2) ·
            timeline-card-desc t-body · timeline-stat-val t-h2 ·
            timeline-stat-label label t-xs                               */
.timeline-outer { position: relative; }
.timeline {
  position: sticky; top: 0;
  height: 100svh; min-height: 620px;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(20px,4vw,48px));
  padding-bottom: clamp(32px,4vw,56px);
}
.timeline-head, .timeline-foot { flex-shrink: 0; padding: 0 var(--gutter-wide); }
.timeline-head { margin-bottom: var(--head-gap); }
.timeline-foot { margin-top: clamp(20px,3vw,36px); }

.timeline-viewport { flex: 0 1 auto; min-height: 0; padding-block: clamp(24px, (100svh - 720px) / 2, 120px); /* wächst mit der Fensterhöhe, ohne die Karten zu quetschen */ display: flex; align-items: center; overflow: hidden; }
.timeline-track {
  display: flex; align-items: stretch;
  list-style: none; width: max-content; will-change: transform;
  padding: 0 var(--gutter-wide);
}
.timeline-card {
  flex: 0 0 clamp(380px, 44vw, 600px);
  padding: 6px clamp(28px,3vw,56px);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.timeline-card:first-child { border-left: none; padding-left: 0; }
.timeline-card-num   { display: block; margin-bottom: clamp(24px,4vw,52px); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.timeline-card-title { font-weight: 600; color: var(--ink); margin-bottom: clamp(12px,1.4vw,20px); }
.timeline-card-desc  { color: var(--mid); max-width: 46ch; }

/* Outro-Karte */
.timeline-card--outro { justify-content: center; }
.timeline-card--outro .timeline-card-title { font-weight: 700; }
.timeline-card--outro .arc-btn { margin-top: clamp(18px,2.2vw,28px); align-self: flex-start; }
.timeline-stats { display: flex; gap: clamp(28px,3.4vw,44px); margin: clamp(18px,2.2vw,28px) 0 clamp(4px,1vw,10px); }
.timeline-stat  { display: flex; flex-direction: column; gap: 4px; }
.timeline-stat-val     { font-weight: 700; color: var(--ink); }
.timeline-stat-label   { color: var(--mute); }
.timeline-stat-divider { width: 1px; background: var(--line); flex-shrink: 0; }

/* Fortschritt */
.timeline-progress { display: block; width: 100%; height: 2px; background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 100px; overflow: hidden; }
.timeline-progress-bar { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 100px; transition: width .12s linear; }

@media (max-width: 860px) {
  .timeline-outer { height: auto !important; }
  .timeline { position: static; height: auto; min-height: 0; padding: clamp(48px,10vw,72px) 0; }
  /* Wischen rastet Karte für Karte ein, ein Wisch überspringt keine Karten */
  .timeline-viewport { display: block; padding-block: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter-wide); overscroll-behavior-x: contain; }
  .timeline-viewport::-webkit-scrollbar { display: none; }
  .timeline-track { transform: none !important; }
  .timeline-card  { flex-basis: 82vw; scroll-snap-align: start; scroll-snap-stop: always; }
}
