/* ===== Scroll Reveal ===== */

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

/* Reveal animation only when JS observer active - disabled for max compatibility */

/* ===== Stagger ===== */

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

/* Stagger hidden state - disabled for max compatibility */

.stagger.is-visible > * {
  animation: stagger-in 0.6s var(--ease-out) forwards;
}

.stagger.is-visible > *:nth-child(1) { animation-delay: 0ms; }
.stagger.is-visible > *:nth-child(2) { animation-delay: 80ms; }
.stagger.is-visible > *:nth-child(3) { animation-delay: 160ms; }
.stagger.is-visible > *:nth-child(4) { animation-delay: 240ms; }
.stagger.is-visible > *:nth-child(5) { animation-delay: 320ms; }
.stagger.is-visible > *:nth-child(6) { animation-delay: 400ms; }
.stagger.is-visible > *:nth-child(7) { animation-delay: 480ms; }
.stagger.is-visible > *:nth-child(8) { animation-delay: 560ms; }
.stagger.is-visible > *:nth-child(9) { animation-delay: 640ms; }
.stagger.is-visible > *:nth-child(10) { animation-delay: 720ms; }

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

/* ===== Fade In Up (for hero elements) ===== */

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.8s var(--ease-out) forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; }
.fade-in-up-delay-2 { animation-delay: 0.2s; }
.fade-in-up-delay-3 { animation-delay: 0.35s; }
.fade-in-up-delay-4 { animation-delay: 0.5s; }

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

/* ===== Scale In ===== */

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  animation: scale-enter 0.7s var(--ease-out) forwards;
}

.scale-in-delay { animation-delay: 0.3s; }

@keyframes scale-enter {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Pulse ===== */

.pulse-dot {
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 hsl(221 83% 53% / 0.4); }
  70% { box-shadow: 0 0 0 14px hsl(221 83% 53% / 0); }
  100% { box-shadow: 0 0 0 0 hsl(221 83% 53% / 0); }
}

/* ===== Metric Appear ===== */

.metric-appear {
  animation: metric-up 0.6s var(--ease-out) both;
}

@keyframes metric-up {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Active Node ===== */

.scene .node.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px hsl(221 83% 53% / 0.15), var(--shadow-md);
}

/* ===== Pricing Featured Pulse ===== */

.pricing-featured.pulse-once {
  animation: pricing-pulse 600ms ease-out;
}

@keyframes pricing-pulse {
  0% { box-shadow: 0 0 0 0 hsl(221 83% 53% / 0.3), var(--shadow-accent); }
  50% { box-shadow: 0 0 0 10px hsl(221 83% 53% / 0), var(--shadow-accent); }
  100% { box-shadow: 0 0 0 2px var(--accent), var(--shadow-accent); }
}

/* ===== Timeline Node Reveal ===== */

.timeline-node {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

/* Timeline hidden state - disabled for max compatibility */

.timeline.is-visible .timeline-node {
  opacity: 1;
  transform: translateX(0);
}

.timeline.is-visible .timeline-node:nth-child(2) { transition-delay: 100ms; }
.timeline.is-visible .timeline-node:nth-child(3) { transition-delay: 200ms; }
.timeline.is-visible .timeline-node:nth-child(4) { transition-delay: 300ms; }
.timeline.is-visible .timeline-node:nth-child(5) { transition-delay: 400ms; }
.timeline.is-visible .timeline-node:nth-child(6) { transition-delay: 500ms; }

/* ===== Stepper Animate ===== */

.stepper-step {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

/* Stepper hidden state - disabled for max compatibility */

.stepper.is-visible .stepper-step {
  opacity: 1;
  transform: translateY(0);
}

.stepper.is-visible .stepper-step:nth-child(2) { transition-delay: 100ms; }
.stepper.is-visible .stepper-step:nth-child(3) { transition-delay: 200ms; }
.stepper.is-visible .stepper-step:nth-child(4) { transition-delay: 300ms; }
.stepper.is-visible .stepper-step:nth-child(5) { transition-delay: 400ms; }

/* ===== Card Hover Glow ===== */

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, hsl(221 83% 53% / 0.08), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.card:hover::after {
  opacity: 1;
}

/* ===== Link Underline Animation ===== */

.link-animated {
  position: relative;
}

.link-animated::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.link-animated:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===== Float Animation ===== */

.float {
  animation: float 4s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 1.5s; }

/* ===== Reduced Motion ===== */

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

  .reveal,
  .stagger > *,
  .timeline-node,
  .stepper-step,
  .fade-in-up,
  .scale-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
