/* 23-student-experience.css — Sektion „Student Journey“ (index.html, #student-experience)
   Stand 25.11.2026, 2. Fassung (die dunkle Fassung „von beiden Seiten“ hat Nico abgelehnt).
   Helle Fläche, eine geschwungene Linie mit vier Stationen, am Ende der Lime-Cursor.
   Position der Stationen setzt js/13-student-journey.js (left/top in % aus data-t).
   Kontrast: Text immer --ink / --grey bzw. -d-Varianten; Lime nur als Fläche mit dunkler Schrift. */

.sxj {
  position: relative;
  padding: 110px 0 70px;
  overflow: hidden;
}
.sxj-head { max-width: 680px; }
.sxj-head .huge-headline { margin-bottom: 18px; }
.sxj-lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 52ch;
  margin: 0;
}

/* Karte mit der Linie */
.sxj-map {
  position: relative;
  padding: 110px 0 150px;
}
.sxj-canvas {
  position: relative;
  aspect-ratio: 1200 / 300;
}
.sxj-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sxj-track,
.sxj-path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sxj-track {
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 2 9;
}
.sxj-path {
  stroke: url(#sxjGrad);
  stroke-width: 5;
}
.sxj-ready .sxj-path { transition: stroke-dashoffset 2.4s cubic-bezier(0.55, 0.1, 0.3, 1); }
.is-drawn .sxj-path { stroke-dashoffset: 0 !important; }

/* Stationen: Ankerpunkt sitzt auf der Linie (top aus JS), reicht bis unter die Kurve.
   Alle Beschriftungen stehen so auf einer gemeinsamen Grundlinie, eine gestrichelte
   Lotlinie verbindet Punkt und Text (2. Fassung, Nico: Platzierung „nicht optimal“). */
.sxj-stops { list-style: none; margin: 0; padding: 0; counter-reset: sxj; }
.sxj-stop {
  position: absolute;
  width: 0;
  bottom: -30px;
  counter-increment: sxj;
}
.sxj-stop::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 0;
  border-left: 2px dashed var(--line);
}
.sxj-me {
  position: absolute;
  width: 0;
  height: 0;
}
.sxj-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  border: 4px solid #102B3C;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.85);
  transition: background var(--dur-normal) var(--ease-smooth);
}
.is-drawn .sxj-stop:last-child .sxj-dot { background: var(--lime); }
.sxj-label {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 14px;
  transform: translateX(-50%);
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.sxj-stop:first-child .sxj-label { transform: translateX(-12px); text-align: left; }
.sxj-stop:last-child .sxj-label { transform: translateX(calc(-100% + 12px)); text-align: right; }
.sxj-label strong::before {
  content: counter(sxj, decimal-leading-zero);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--teal-d);
  margin-bottom: 2px;
}
.sxj-label strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sxj-label span {
  font-size: 15px;
  line-height: 1.45;
  color: var(--grey);
}

/* Nicos Cursor an der letzten Station */
.sxj-me {
  z-index: 3;
  pointer-events: none;
}
/* Pfeil zeigt von oben auf die Station (225° gedreht, Spitze sitzt über dem Punkt) */
.sxj-me svg {
  position: absolute;
  left: -12px;
  top: -44px;
  transform: rotate(225deg);
}
.sxj-me-tag {
  position: absolute;
  right: -24px;
  bottom: 48px;
  white-space: nowrap;
  background: var(--lime);
  color: #102B3C;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(16, 43, 60, 0.18);
}

/* Einblenden nacheinander, während die Linie läuft */
.sxj-ready .sxj-stop,
.sxj-ready .sxj-me {
  opacity: 0;
  transition: opacity 0.5s var(--ease-smooth);
}
.sxj-ready.is-drawn .sxj-stop,
.sxj-ready.is-drawn .sxj-me { opacity: 1; }
.sxj-ready.is-drawn .sxj-stop:nth-child(1) { transition-delay: 0.1s; }
.sxj-ready.is-drawn .sxj-stop:nth-child(2) { transition-delay: 0.85s; }
.sxj-ready.is-drawn .sxj-stop:nth-child(3) { transition-delay: 1.6s; }
.sxj-ready.is-drawn .sxj-stop:nth-child(4) { transition-delay: 2.3s; }
.sxj-ready.is-drawn .sxj-me { transition-delay: 2.7s; }

@media (prefers-reduced-motion: reduce) {
  .sxj-ready .sxj-path,
  .sxj-ready .sxj-stop,
  .sxj-ready .sxj-me { transition: none; }
}

/* Tablet: etwas kleinere Beschriftung */
@media (max-width: 1100px) {
  .sxj-label { width: 180px; }
  .sxj-label strong { font-size: 17px; }
  .sxj-label span { font-size: 14px; }
}

/* Mobil: Linie aus, Stationen als senkrechter Weg */
@media (max-width: 760px) {
  .sxj { padding: 72px 0 48px; }
  .sxj-lede { font-size: 16px; }
  .sxj-map { padding: 36px 0 0; }

  .sxj-canvas { aspect-ratio: auto; }
  .sxj-svg { display: none; }
  .sxj-stops {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-left: 34px;
  }
  .sxj-stops::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #008C95, #6857E8, #FF8A5B, #9BCB3B);
  }
  .sxj-stop,
  .sxj-me {
    position: relative;
    left: auto !important;
    top: auto !important;
    bottom: auto;
    width: auto;
    height: auto;
  }
  .sxj-stop::before { display: none; }
  .sxj-dot { left: -25px; top: 30px; }
  .sxj-label,
  .sxj-stop.is-low .sxj-label,
  .sxj-stop:first-child .sxj-label,
  .sxj-stop:last-child .sxj-label {
    position: static;
    margin-top: 0;
    transform: none;
    width: auto;
    text-align: left;
  }
  .sxj-me {
    display: flex;
    align-items: flex-start;
    margin: 18px 0 0 34px;
  }
  .sxj-me svg,
  .sxj-me-tag { position: static; }
  .sxj-me svg { transform: rotate(-5deg); }
  .sxj-me-tag { margin-top: 12px; white-space: normal; }
}


/* ---------- Rakete (25.11.2026, 2. Fassung) ----------
   Startet wie ein echter Start (erst langsam, dann schnell) auf einem geschwungenen
   Weg nach oben rechts und zieht eine Spur, die sich zeichnet und verblasst — passend
   zum „Weg“. Am Ziel funkeln drei Sterne auf. Alle 10 s, nur sichtbar und ohne
   reduced motion (Klasse .is-visible aus js/13-student-journey.js), unter 900 px aus.
   Bewegung per CSS offset-path; offset-rotate richtet die Spitze am Weg aus. */
.sxj > .wrap { position: relative; }
.sxj-rocket {
  position: absolute;
  right: 1%;
  top: -80px;
  width: 460px;
  height: 420px;
  pointer-events: none;
  z-index: 0;
}
.sxj-rocket-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sxj-rocket-trail path {
  fill: none;
  stroke: url(#sxjTrail);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
.sxj-rocket-fly {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: 168px;
  offset-path: path("M38 408 C 77 309, 153 259, 217 198 S 332 62, 447 17");
  offset-rotate: auto 90deg;   /* Rakete zeigt im SVG nach oben → 90° zur Wegrichtung */
  offset-anchor: 50% 40%;
  offset-distance: 0%;
  opacity: 0;
}
.sxj-rocket-svg { display: block; overflow: visible; }
.sxj-rocket-flame { transform-box: fill-box; transform-origin: 50% 0; }
.sxj-rocket-spark {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0;
  background: var(--apricot);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.sxj-rocket-spark.s1 { right: -6px; top: -4px; }
.sxj-rocket-spark.s2 { right: 34px; top: -26px; width: 10px; height: 10px; background: var(--lime); }
.sxj-rocket-spark.s3 { right: -26px; top: 30px; width: 9px; height: 9px; background: var(--electric); }

@media (prefers-reduced-motion: no-preference) {
  .sxj.is-visible .sxj-rocket-fly   { animation: sxj-launch 10s infinite 1s; }
  .sxj.is-visible .sxj-rocket-trail path { animation: sxj-trail 10s infinite 1s; }
  .sxj.is-visible .sxj-rocket-flame { animation: sxj-flame 0.16s ease-in-out infinite alternate; }
  .sxj.is-visible .sxj-rocket-spark { animation: sxj-spark 10s infinite 1s; }
  .sxj.is-visible .sxj-rocket-spark.s2 { animation-delay: 1.15s; }
  .sxj.is-visible .sxj-rocket-spark.s3 { animation-delay: 1.3s; }
}
/* 0–4 %: zündet (wackelt kurz am Start), 4–30 %: fliegt beschleunigend den Weg ab */
@keyframes sxj-launch {
  0%   { opacity: 0; offset-distance: 0%; transform: translateY(6px); }
  2%   { opacity: 1; transform: translate(-1px, 0); }
  3%   { transform: translate(1px, 0); }
  4%   { offset-distance: 0%; transform: none; animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.5); }
  30%  { opacity: 1; offset-distance: 100%; }
  33%  { opacity: 0; offset-distance: 100%; }
  100% { opacity: 0; offset-distance: 100%; }
}
@keyframes sxj-trail {
  0%, 4% { stroke-dashoffset: 1; opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.5); }
  5%      { opacity: 1; }
  30%     { stroke-dashoffset: 0; opacity: 1; }
  48%     { stroke-dashoffset: 0; opacity: 0; }
  100%    { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes sxj-spark {
  0%, 29% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  32%      { opacity: 1; transform: scale(1.1) rotate(45deg); }
  40%      { opacity: 0; transform: scale(0.4) rotate(90deg); }
  100%     { opacity: 0; }
}
@keyframes sxj-flame {
  from { transform: scaleY(0.7); }
  to   { transform: scaleY(1.2); }
}
@media (max-width: 900px) {
  .sxj-rocket { display: none; }
}
