/* ============================================================
   Entstehung von Seraphone: Artikel als Zeitleiste.
   Jede Station hat ihre kleine Illustration, die beim Sichtbarwerden
   in unregelmäßigen Schüben aufbaut. Alles aus dem Text des Artikels.
   ============================================================ */

:root {
  --st-arrive: cubic-bezier(0.16, 1, 0.3, 1);
  --st-travel: cubic-bezier(0.65, 0, 0.35, 1);
}

.is-off, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* ---------- Hero: Stationen als Kette ---------- */
.st-route {
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 0;
  margin-top: 36px;
}
.st-route li {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 194, 107, 0.35);
  background: rgba(245, 194, 107, 0.07);
  color: var(--orange-soft);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  margin-right: 22px;
}
.st-route li:not(:last-child)::after {
  content: "";
  position: absolute; left: 100%; top: 50%;
  width: 22px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(245, 194, 107, 0.6) 0 4px, transparent 4px 8px);
}
.st-route li:last-child { margin-right: 0; background: var(--orange); color: var(--ink); border-color: var(--orange); font-weight: 600; }

/* ---------- Zeitleiste ---------- */
.st-timeline { display: grid; gap: 80px; }
.st-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 420px);
  grid-template-areas: "rail text vis";
  gap: 0 36px;
  align-items: start;
}
.st-rail { grid-area: rail; position: relative; align-self: stretch; }
.st-text { grid-area: text; }
.st-vis { grid-area: vis; min-width: 0; }
.st-text h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 14px 0 18px; letter-spacing: -0.025em; }
.st-text p { color: var(--gray); font-size: 17px; line-height: 1.75; }
.st-text p + p { margin-top: 14px; }

.st-dot {
  position: absolute; left: 50%; top: 4px;
  width: 20px; height: 20px; margin-left: -10px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--orange);
  transition: background-color 0.5s var(--st-travel) 0.2s, box-shadow 0.5s var(--st-travel) 0.2s;
}
.st-rail.in .st-dot { background: var(--orange); box-shadow: 0 0 0 6px rgba(237, 152, 42, 0.2); }
.st-rail::after {
  content: "";
  position: absolute; left: 50%; top: 32px; bottom: -80px;
  width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, var(--orange), var(--line) 60%);
  transform-origin: top; transform: scaleY(0);
  transition: transform 1.5s var(--st-travel) 0.35s;
}
.st-rail.in::after { transform: scaleY(1); }
.st-last .st-rail::after { display: none; }

/* ---------- Foto ---------- */
.st-photo { margin: 0; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--line); }
.st-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.9s var(--st-arrive); }
.st-photo:hover img { transform: scale(1.04); }

/* ---------- Station 1: Mails ---------- */
.st-card { border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); overflow: hidden; }
.st-card-head {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--bg-alt); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
}
.st-mail {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 15px;
  opacity: 0; transform: translateX(-16px);
}
.st-mail:last-child { border-bottom: 0; }
.st-mail i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.st-mail em {
  font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; opacity: 0; transform: scale(0.7);
}
.st-mail em.open { background: rgba(237, 152, 42, 0.16); color: var(--orange-deep); }
.st-mail em.done { background: rgba(53, 194, 107, 0.16); color: #1F8F4B; }
.rv.in .st-mail { animation: st-in 0.7s var(--st-arrive) forwards; animation-delay: calc(var(--k, 0) * 0.28s + 0.25s); }
.rv.in .st-mail em { animation: st-pop 0.55s var(--ease-spring) forwards; animation-delay: calc(var(--k, 0) * 0.28s + 0.85s); }
@keyframes st-in { to { opacity: 1; transform: none; } }
@keyframes st-pop { to { opacity: 1; transform: none; } }

/* ---------- Station 2: Chat ---------- */
.st-chat {
  display: flex; flex-direction: column; gap: 10px;
  border-radius: 20px; padding: 20px;
  background: linear-gradient(160deg, #16354A, var(--night) 80%);
  box-shadow: 0 30px 70px rgba(16, 40, 53, 0.28);
}
.st-bub {
  align-self: flex-end; max-width: 90%;
  padding: 11px 15px; border-radius: 15px; border-bottom-right-radius: 4px;
  background: var(--orange); color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.45;
  opacity: 0; transform: translateY(10px) scale(0.97);
}
.rv.in .st-bub { animation: st-in 0.6s var(--ease-spring) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 0.3s); }
.st-think { align-self: flex-start; display: inline-flex; gap: 5px; padding: 10px 14px; border-radius: 14px; border-bottom-left-radius: 4px; background: rgba(255, 255, 255, 0.08); opacity: 0; }
.st-think i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange-soft); animation: st-think 1.2s ease-in-out infinite; }
.st-think i:nth-child(2) { animation-delay: 0.16s; }
.st-think i:nth-child(3) { animation-delay: 0.32s; }
.rv.in .st-think { animation: st-in 0.5s var(--st-arrive) forwards; animation-delay: 2.3s; }
@keyframes st-think { 0%, 70%, 100% { transform: translateY(0); opacity: 0.35; } 35% { transform: translateY(-5px); opacity: 1; } }

/* ---------- Stationen 3 bis 5: Engpass wird Modul ---------- */
.st-map { display: grid; gap: 12px; }
.st-pair {
  display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 8px; align-items: center;
  opacity: 0; transform: translateY(12px);
}
.st-pair .need, .st-pair .mod { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; }
.st-pair .need { background: var(--bg-alt); border: 1px dashed #CBC5AE; color: var(--gray); }
.st-pair .mod { background: var(--card); border: 1.5px solid var(--orange); color: var(--ink); font-weight: 600; box-shadow: 0 8px 22px rgba(237, 152, 42, 0.14); opacity: 0; transform: scale(0.9); }
.st-pair .arrow { position: relative; display: block; height: 2px; background: var(--orange); transform-origin: left; transform: scaleX(0); }
.st-pair .arrow::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); transform: rotate(45deg); }
.rv.in .st-pair { animation: st-in 0.7s var(--st-arrive) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 0.25s); }
.rv.in .st-pair .arrow { animation: st-grow 0.7s var(--st-travel) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 0.75s); }
.rv.in .st-pair .mod { animation: st-pop 0.6s var(--ease-spring) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 1.25s); }
@keyframes st-grow { to { transform: scaleX(1); } }

/* ---------- Station 6: Ampel ---------- */
.st-lights { display: grid; gap: 12px; padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.st-lights .lt { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 16px; align-items: center; }
.st-lights .lt i { width: 38px; height: 38px; border-radius: 50%; background: #D9D5C3; transition: none; }
.st-lights .lt span { font-size: 15px; color: var(--gray); opacity: 0.55; }
.st-lights .lt b { display: block; font-family: var(--font-head); font-size: 17px; color: var(--ink); }
.rv.in .st-lights .lt i { animation: st-lit 0.7s var(--st-travel) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 0.35s); }
.rv.in .st-lights .lt span { animation: st-label 0.6s var(--st-arrive) forwards; animation-delay: calc(var(--k, 0) * 0.5s + 0.45s); }
.st-lights .lt.g { --c: #35C26B; --g: rgba(53, 194, 107, 0.22); }
.st-lights .lt.y { --c: #F5B01B; --g: rgba(245, 176, 27, 0.25); }
.st-lights .lt.r { --c: #E5484D; --g: rgba(229, 72, 77, 0.22); }
@keyframes st-lit { to { background: var(--c); box-shadow: 0 0 0 7px var(--g); } }
@keyframes st-label { to { opacity: 1; } }

/* ---------- Heute: ein Backoffice ---------- */
.st-backoffice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-backoffice span {
  padding: 14px 10px; text-align: center; border-radius: 12px;
  background: var(--ink); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px;
  opacity: 0; transform: translateY(10px) scale(0.92);
}
.rv.in .st-backoffice span { animation: st-in 0.65s var(--ease-spring) forwards; animation-delay: calc(var(--k, 0) * 0.3s + 0.25s); }

/* ---------- Schluss ---------- */
.st-end { margin: 72px 0 0 84px; padding-top: 36px; border-top: 1px solid var(--line); }
.st-end p { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .st-item {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas: "rail text" "rail vis";
    gap: 0 18px;
  }
  .st-vis { margin-top: 26px; max-width: 520px; }
  .st-end { margin-left: 52px; }
}
@media (max-width: 720px) {
  .st-timeline { gap: 64px; }
  .st-rail::after { bottom: -64px; }
  .st-text p { font-size: 16.5px; }
  .st-route li { margin-right: 14px; }
  .st-route li:not(:last-child)::after { width: 14px; }
  .st-end { margin-left: 0; }
  .st-pair { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .st-mail, .st-mail em, .st-bub, .st-think, .st-pair, .st-pair .mod, .st-backoffice span { opacity: 1; transform: none; animation: none !important; }
  .st-pair .arrow { transform: none; animation: none !important; }
  .st-lights .lt i { animation: none !important; background: var(--c); box-shadow: 0 0 0 7px var(--g); }
  .st-lights .lt span { opacity: 1; animation: none !important; }
  .st-rail::after { transform: none; transition: none; }
  .st-rail .st-dot { background: var(--orange); }
  .st-think i { animation: none; }
}

/* ---------- Titelbild: ragt aus dem dunklen Hero in den hellen Teil ---------- */
.st-cover-wrap { position: relative; z-index: 3; margin-top: -64px; }
.st-cover {
  margin: 0;
  border-radius: 22px; overflow: hidden;
  aspect-ratio: 21 / 9;
  box-shadow: 0 40px 80px rgba(10, 26, 34, 0.35);
  background: var(--night-2);
}
.st-cover picture { display: block; width: 100%; height: 100%; }
.st-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform: scale(1.06); transition: transform 2.2s var(--st-arrive); }
.st-cover.in img { transform: scale(1); }
@media (max-width: 720px) {
  .st-cover-wrap { margin-top: -40px; }
  .st-cover { aspect-ratio: 4 / 3; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-cover img { transform: none; transition: none; }
}
