/* KI-Beratung: menschliches Timing fuer alles ausser den Canvas-Szenen.
   Unregelmaessige Verzoegerungen, starke Bremskurven, nichts im Gleichtakt.
   Fortlaufendes (Schwebende Bubbles, Token im Petrinetz) laeuft nur im Sichtbereich. */

[data-live]:not(.is-live) *,
[data-live]:not(.is-live) *::before,
[data-live]:not(.is-live) *::after { animation-play-state: paused !important; }

@keyframes kbx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero: die vier Schritte als Sprungmarken ---------- */
.kbh-steps { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 34px; }
.kbh-steps > span { display: inline-flex; }
.kbh-steps a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.04);
  color: #fff; font-weight: 600; font-size: 14.5px;
  transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--ease-out);
}
.kbh-steps a:hover { border-color: var(--orange-soft); background: rgba(245, 194, 107, 0.1); transform: translateY(-2px); text-decoration: none; }
.kbh-steps b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--orange-soft); color: var(--ink); font-family: var(--font-head); font-size: 13px;
}

/* ---------- Schritt 1: Punkte tauchen in Schueben auf, links zuerst, rechts spaeter ---------- */
.expect-grid .expect-col li { opacity: 0; }
.expect-grid.in .expect-col li { animation: kbx-in 0.65s var(--ease-out) both; animation-delay: var(--t, 0s); }
.expect-col li:nth-child(1) { --t: 0.25s; } .expect-col li:nth-child(2) { --t: 0.43s; } .expect-col li:nth-child(3) { --t: 0.52s; }
.expect-col li:nth-child(4) { --t: 1.05s; } .expect-col li:nth-child(5) { --t: 1.17s; }
.expect-col.no li:nth-child(1) { --t: 0.85s; } .expect-col.no li:nth-child(2) { --t: 1.0s; } .expect-col.no li:nth-child(3) { --t: 1.5s; }
.expect-col.no li:nth-child(4) { --t: 1.58s; } .expect-col.no li:nth-child(5) { --t: 2.1s; }

/* Haken in den Listen: nacheinander, mit Luft dazwischen */
.feature-split.in .check-list li { animation: kbx-in 0.6s var(--ease-out) both; }
.feature-split.in .check-list li:nth-child(1) { animation-delay: 0.3s; }
.feature-split.in .check-list li:nth-child(2) { animation-delay: 0.46s; }
.feature-split.in .check-list li:nth-child(3) { animation-delay: 1.0s; }
.feature-split.in .check-list li:nth-child(4) { animation-delay: 1.12s; }
.feature-split:not(.in) .check-list li { opacity: 0; }

/* ---------- Schritt 3: Karten der Roadmap kommen wellenweise, nicht gleichzeitig ---------- */
.roadmap .rm-head, .roadmap .rm-card { opacity: 0; }
.roadmap.in .rm-head, .roadmap.in .rm-card { animation: kbx-in 0.7s var(--ease-out) both; animation-delay: var(--t, 0s); }
.rm-wave:nth-child(1) .rm-head { --t: 0.05s; } .rm-wave:nth-child(1) .rm-card:nth-child(2) { --t: 0.2s; } .rm-wave:nth-child(1) .rm-card:nth-child(3) { --t: 0.31s; }
.rm-wave:nth-child(2) .rm-head { --t: 0.6s; } .rm-wave:nth-child(2) .rm-card:nth-child(2) { --t: 0.78s; } .rm-wave:nth-child(2) .rm-card:nth-child(3) { --t: 1.2s; }
.rm-wave:nth-child(3) .rm-head { --t: 1.3s; } .rm-wave:nth-child(3) .rm-card:nth-child(2) { --t: 1.46s; } .rm-wave:nth-child(3) .rm-card:nth-child(3) { --t: 1.55s; }

/* ---------- Schritt 4: die Bubbles ---------- */
.pj-cosmos .cosmos-bubble,
.pj-cosmos .cosmos-bubble:nth-child(5n) {
  opacity: 0; scale: 0.82; animation: none; font-size: 13.5px;
  transition: opacity 0.6s var(--ease-out) var(--ed, 0s), scale 0.9s var(--ease-spring) var(--ed, 0s), border-color 0.2s, color 0.2s;
}
.pj-cosmos.in .cosmos-bubble,
.pj-cosmos.in .cosmos-bubble:nth-child(5n) { opacity: 1; scale: 1; }
.pj-cosmos .cosmos-bubble.hot { border-color: var(--orange); background: #FFF8EA; }
.pj-cosmos.in.is-live .cosmos-bubble { animation: kbx-f1 var(--fd, 8s) var(--fl, 0s) infinite cubic-bezier(0.65, 0, 0.35, 1); }
.pj-cosmos.in.is-live .cosmos-bubble:nth-child(3n + 2) { animation-name: kbx-f2; }
.pj-cosmos.in.is-live .cosmos-bubble:nth-child(3n) { animation-name: kbx-f3; }
@keyframes kbx-f1 { 0%, 34% { transform: translateY(0); } 46%, 60% { transform: translateY(-9px); } 74% { transform: translateY(2px); } 86%, 100% { transform: translateY(0); } }
@keyframes kbx-f2 { 0%, 40% { transform: translate(0, 0); } 52% { transform: translate(0, -6px); } 60%, 68% { transform: translate(3px, -8px); } 82% { transform: translate(0, 1px); } 100% { transform: translate(0, 0); } }
@keyframes kbx-f3 { 0%, 50% { transform: translateY(0); } 58%, 64% { transform: translateY(-11px); } 78% { transform: translateY(-3px); } 90%, 100% { transform: translateY(0); } }

.fs-media img { transition: transform 0.9s var(--ease-out); }
.fs-media:hover img { transform: scale(1.03); }

/* ---------- Ergebnis: vier Dinge, die bei Ihnen liegen ---------- */
.kbr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kbr-item { padding: 24px 22px 26px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 6px; }
.kbr-item b { font-family: var(--font-head); font-size: 18px; line-height: 1.25; }
.kbr-item > span { font-size: 14.5px; color: var(--gray); }
.kbr-ic { width: 40px; height: 40px; margin-bottom: 12px; color: var(--orange-deep); }
.kbr-ic path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.rv.in .kbr-ic path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s cubic-bezier(0.65, 0, 0.35, 1); transition-delay: calc(var(--d, 0s) + 0.25s); }

/* Aufklappen der Fragen */
.acc-item[open] .acc-body { animation: kbx-in 0.5s var(--ease-out) both; }

@media (max-width: 1024px) {
  .kbr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
}
@media (max-width: 560px) {
  .kbr-grid { grid-template-columns: 1fr; }
  .kbh-steps a { font-size: 13.5px; padding-right: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .expect-grid .expect-col li, .roadmap .rm-head, .roadmap .rm-card, .feature-split:not(.in) .check-list li { opacity: 1; }
  .expect-grid.in .expect-col li, .roadmap.in .rm-head, .roadmap.in .rm-card, .feature-split.in .check-list li, .acc-item[open] .acc-body { animation: none; }
  .pj-cosmos .cosmos-bubble, .pj-cosmos .cosmos-bubble:nth-child(5n) { opacity: 1; scale: 1; transition: none; }
  .pj-cosmos.in.is-live .cosmos-bubble { animation: none; }
  .ei-ico path, .kbr-ic path { stroke-dashoffset: 0; }
}

[id^="schritt-"] { scroll-margin-top: 70px; }
