/* =========================================================
   CyTutor 小辅星球 · motion
   Scroll reveal, floating chips, reduced-motion fallbacks
   ========================================================= */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(31, 174, 154, 0.24);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(31, 174, 154, 0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes soft-glow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
}

/* Reveal only when JS is available; no-JS users see everything. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.hero-glow-a {
  animation: soft-glow 7s ease-in-out infinite;
}

.hero-glow-b {
  animation: soft-glow 9s ease-in-out infinite reverse;
}

.float-chip {
  will-change: transform;
}

.orbit {
  animation: orbit-drift 18s linear infinite;
}

.orbit-2 {
  animation-duration: 24s;
  animation-direction: reverse;
}

@keyframes orbit-drift {
  0% {
    transform: rotate(-16deg);
  }
  100% {
    transform: rotate(344deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .float-chip,
  .orbit,
  .hero-glow-a,
  .hero-glow-b,
  .pulse-dot {
    animation: none !important;
  }

  .chart-line {
    transition: none !important;
  }

  .chart-point {
    opacity: 1 !important;
  }
}
