/* ─── Keyframes ─── */
@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.08); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

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

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes gradient-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(15deg); }
}

@keyframes line-draw {
  from { stroke-dashoffset: 400; }
  to { stroke-dashoffset: 0; }
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* ─── Scroll reveal (only when JS loaded) ─── */
html.no-js .reveal,
html.no-js .reveal-left,
html.no-js .reveal-right,
html.no-js .reveal-scale {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

html.js .reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

html.js .reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

html.js .reveal-left.visible,
html.js .reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

html.js .reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

html.js .reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero entrance */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 0.8s var(--ease-out) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

.hero-visual-wrap {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-visual-in 1s var(--ease-out) 0.3s forwards;
}

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-visual-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .hero-visual-wrap {
    transform: none;
    animation: hero-visual-in-mobile 1s var(--ease-out) 0.3s forwards;
  }

  @keyframes hero-visual-in-mobile {
    to { opacity: 1; transform: none; }
  }
}

/* SVG chart bars animate when visible */
.chart-bar {
  transform-origin: bottom;
  transform: scaleY(0);
}

.reveal-scale.visible .chart-bar {
  animation: bar-grow 0.8s var(--ease-out) forwards;
}

.reveal-scale.visible .chart-bar:nth-child(1) { animation-delay: 0.2s; }
.reveal-scale.visible .chart-bar:nth-child(2) { animation-delay: 0.35s; }
.reveal-scale.visible .chart-bar:nth-child(3) { animation-delay: 0.5s; }
.reveal-scale.visible .chart-bar:nth-child(4) { animation-delay: 0.65s; }
.reveal-scale.visible .chart-bar:nth-child(5) { animation-delay: 0.8s; }

.chart-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

.reveal-scale.visible .chart-line {
  animation: line-draw 1.4s var(--ease-out) 0.3s forwards;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
