/* ============================================
   AI Studio — Animation Utilities
   Works with GSAP ScrollTrigger + standalone CSS
   ============================================ */

/* ── Initial States (for GSAP to animate FROM) ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  will-change: opacity, transform;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  will-change: opacity, transform;
}

/* ── Active state after GSAP animation ── */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ── CSS-only Animations (fallback / decorative) ── */

/* Floating animation for hero preview */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-float {
  animation: heroFloat 6s ease-in-out infinite;
}

/* Gradient shift on hero background glow */
@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); }
}

.glow-pulse {
  animation: glowPulse 8s ease-in-out infinite;
}

/* Shimmer effect for CTA */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    #fff 0%,
    rgba(255, 255, 255, 0.6) 40%,
    #fff 60%,
    rgba(255, 255, 255, 0.6) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Subtle glow ring for cards on hover */
@keyframes cardGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(43, 75, 238, 0); }
  50% { box-shadow: 0 0 30px rgba(43, 75, 238, 0.15); }
}

.card-glow-hover:hover {
  animation: cardGlow 2s ease-in-out infinite;
}

/* Stagger delay utilities for GSAP fallback */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Smooth scrolling behavior */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .hero-float,
  .glow-pulse,
  .shimmer-text {
    animation: none;
  }

  .badge-dot-ping {
    animation: none;
  }
}

/* ── Typing cursor for chat card ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--primary);
  margin-left: 2px;
}

/* Parallax layer hint */
.parallax-layer {
  will-change: transform;
}
