/* ==============================================
   OnWave Lab — Animations
   Scroll reveals, logo, interactive elements
   ============================================== */

/* ---- Scroll Reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-cubic), transform 0.6s var(--ease-out-cubic);
}

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

.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-cubic), transform 0.6s var(--ease-out-cubic);
}

.stagger--visible > *:nth-child(1) { transition-delay: 0s; }
.stagger--visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger--visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger--visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger--visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger--visible > *:nth-child(6) { transition-delay: 0.5s; }
.stagger--visible > *:nth-child(7) { transition-delay: 0.6s; }
.stagger--visible > *:nth-child(8) { transition-delay: 0.7s; }

.stagger--visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Logo Idle Animation ---- */

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(200, 169, 110, 0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(200, 169, 110, 0.6)); }
}

@keyframes waveShift {
  0% { transform: translateX(0); }
  100% { transform: translateX(4px); }
}

.logo-svg .power-btn {
  animation: logoPulse 3s ease-in-out infinite;
}

.logo-svg .wave-path {
  animation: waveShift 4s ease-in-out infinite alternate;
}

/* ---- Logo Boot Sequence Helpers ---- */

.power-btn--surge {
  filter: drop-shadow(0 0 20px rgba(200, 169, 110, 0.8));
}

.wave-text--trace {
  transition: opacity 0.6s ease;
}

.logo--static .power-btn,
.logo--static .wave-path {
  animation: none;
}

.logo--booted .power-btn {
  animation: logoPulse 3s ease-in-out infinite;
}

.logo--booted .wave-path {
  animation: waveShift 4s ease-in-out infinite alternate;
}

/* ---- Process Line Draw ---- */

.process__line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.5s var(--ease-out-cubic);
}

.process__line--drawn {
  stroke-dashoffset: 0;
}

/* ---- Count Up (for ROI calculator) ---- */

@keyframes countFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Hero fade-in after logo animation ---- */

.hero__content {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out-cubic), transform 0.8s var(--ease-out-cubic);
}

.hero__content--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Comparison Table Row Animation ---- */

.comparison-table tr {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s var(--ease-out-cubic), transform 0.4s var(--ease-out-cubic);
}

.comparison-table.stagger--visible tr {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger > *,
  .hero__content {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .logo-svg .power-btn,
  .logo-svg .wave-path {
    animation: none;
  }

  .process__line {
    stroke-dashoffset: 0;
    transition: none;
  }

  .comparison-table tr {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
