/* Animation Toggle Styles */
.anim-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.anim-toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.anim-toggle[hidden] { display: none; }
.anim-toggle:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 4px; }
.anim-toggle:disabled { cursor: default; }
.anim-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.anim-toggle[aria-pressed="true"] .icon-pause {
  display: none;
}
.anim-toggle[aria-pressed="true"] .icon-play {
  display: block !important;
}

/* Base Motion rules */
[data-motion-hidden] .anim-group * { animation-play-state: paused !important; }
html:not([data-motion-ready]) .anim-group * {
  animation: none !important;
  stroke-dashoffset: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  .anim-group *, .anim-group *::after {
    animation: none !important;
    transition: none !important;
    stroke-dashoffset: 0 !important;
  }
}
[data-motion="paused"] .anim-group *,
[data-motion="paused"] .anim-group::after,
.anim-group:not([data-in-view]) * {
  animation-play-state: paused !important;
}
[data-motion="paused"] .cycle-item::after,
[data-motion="paused"] .feat-ill svg,
[data-motion="paused"] .pc2:hover .feat-ill svg,
[data-motion="paused"] .cycle-item:hover::after {
  transition: none !important;
  transform: none !important;
}

/* 1. Noise to Process */
.ns-path {
  stroke-dasharray: 8 8;
  animation: flow-dash 4s linear infinite;
}
.ns-funnel {
  animation: pulse-funnel 4s ease-in-out infinite;
  transform-origin: 300px 50px;
}
.ns-signal {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw-signal 4s ease-in-out infinite;
}
.ns-node {
  animation: pulse-node 4s ease-in-out infinite;
}
.ns-node-4 {
  animation: pulse-node-scale 3s ease-in-out infinite;
}

@keyframes flow-dash {
  to { stroke-dashoffset: -32; }
}
@keyframes draw-signal {
  0% { stroke-dashoffset: 200; opacity: 0; }
  20% { opacity: 1; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  80% { opacity: 1; }
  100% { stroke-dashoffset: -200; opacity: 0; }
}
@keyframes pulse-funnel {
  0%, 100% { opacity: 0.8; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}
@keyframes pulse-node {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes pulse-node-scale {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* 2. Learning Cycle */
.cycle-connector path {
  animation: flow-dash 2s linear infinite reverse;
}
.cycle-return path {
  animation: flow-dash-rev 10s linear infinite;
}
@keyframes flow-dash-rev {
  to { stroke-dashoffset: 100; }
}
.cycle-item svg {
  transition: transform 0.3s, color 0.3s;
}
.anim-group[data-in-view] .cycle-item:nth-child(1) svg {
  animation: cycle-bounce 6s 0s infinite;
}
.anim-group[data-in-view] .cycle-item:nth-child(3) svg {
  animation: cycle-bounce 6s 1.5s infinite;
}
.anim-group[data-in-view] .cycle-item:nth-child(5) svg {
  animation: cycle-bounce 6s 3s infinite;
}
.anim-group[data-in-view] .cycle-item:nth-child(7) svg {
  animation: cycle-bounce 6s 4.5s infinite;
}
@keyframes cycle-bounce {
  0%, 15%, 100% { transform: translateY(0); color: inherit; }
  7.5% { transform: translateY(-4px); color: #fff; }
}

/* 3. Getting Started */
.gs-marker-path {
  stroke-dasharray: 10 250;
  stroke-dashoffset: 0;
  animation: gs-trace 3s ease-in-out infinite;
}
@keyframes gs-trace {
  0% { stroke-dashoffset: 260; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { stroke-dashoffset: -260; opacity: 0; }
}

/* 4. Prime Academy */
.acad-card-1 { animation: float-card 6s ease-in-out infinite; transform-origin: center; }
.acad-card-2 { animation: float-card 6s ease-in-out 0.2s infinite; transform-origin: center; }
.acad-card-3 { animation: float-card 6s ease-in-out 0.4s infinite; transform-origin: center; }
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 5. Live Sessions */
.ls-ripple-1 { animation: ripple 3s linear infinite; transform-origin: 150px 60px; }
.ls-ripple-2 { animation: ripple 3s linear 1.5s infinite; transform-origin: 150px 60px; }
@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.ls-center { animation: ls-pulse 3s ease-in-out infinite; transform-origin: 150px 60px; }
@keyframes ls-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 6. Feed & Community */
.fc-links {
  stroke-dasharray: 4 4;
  animation: flow-dash 2s linear infinite reverse;
}
.fc-node {
  transform-origin: center;
  animation: node-pop 4s ease-in-out infinite;
}
.fc-node:nth-child(2) { animation-delay: 0s; transform-origin: 100px 40px; }
.fc-node:nth-child(3) { animation-delay: 1s; transform-origin: 200px 80px; }
.fc-node:nth-child(4) { animation-delay: 2s; transform-origin: 150px 90px; }
.fc-node:nth-child(5) { animation-delay: 3s; transform-origin: 150px 30px; }
@keyframes node-pop {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.3); fill: #fff; }
  20% { transform: scale(1); }
}

/* 7. Prime Insights */
.pi-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: pi-trace 4s ease-in-out infinite;
}
@keyframes pi-trace {
  0% { stroke-dashoffset: 400; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -400; }
}
.pi-dot {
  animation: pi-dot-pop 4s ease-in-out infinite;
}
.pi-dot:nth-child(3) { animation-delay: 0s; transform-origin: 120px 100px; }
.pi-dot:nth-child(4) { animation-delay: 2s; transform-origin: 160px 40px; }
@keyframes pi-dot-pop {
  0%, 100% { transform: scale(1); fill: #c4b5fd; }
  50% { transform: scale(1.5); fill: #fff; }
}

/* 8. Market Scanners */
.ms-sweep-cone {
  transform-origin: 150px 60px;
  animation: sweep-rotate 4s linear infinite;
}
@keyframes sweep-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.ms-target {
  animation: ms-target-blink 4s linear infinite;
}
@keyframes ms-target-blink {
  0%, 80%, 100% { opacity: 0.3; stroke: #c4b5fd; }
  90% { opacity: 1; stroke: #fff; }
}

/* 9. Oracle */
.or-pupil {
  animation: eye-scan 6s ease-in-out infinite;
  transform-origin: 150px 60px;
}
@keyframes eye-scan {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 0); }
  30% { transform: translate(-5px, -3px); }
  50% { transform: translate(5px, 0); }
  60% { transform: translate(5px, 3px); }
  80% { transform: translate(0, 0); }
}
.or-eye {
  animation: eye-blink 6s ease-in-out infinite;
  transform-origin: 150px 60px;
}
@keyframes eye-blink {
  0%, 94%, 98%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}