/* ==========================================================================
   EQUITY.SU — Animations & Effects
   Version: 1.0
   ========================================================================== */

/* -------------------------------------------------------------------
   1. SCROLL ANIMATIONS (Intersection Observer driven)
   ------------------------------------------------------------------- */

.animate-fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children reveal */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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


/* -------------------------------------------------------------------
   2. HOVER EFFECTS
   ------------------------------------------------------------------- */

/* Lift */
.hover-lift {
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Glow (amber) */
.hover-glow {
  transition: box-shadow var(--transition-slow);
}

.hover-glow:hover {
  box-shadow: var(--shadow-accent-hover);
}

/* Scale */
.hover-scale {
  transition: transform var(--transition-slow);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Border accent on hover */
.hover-border {
  transition: border-color var(--transition-slow);
}

.hover-border:hover {
  border-color: var(--accent-primary);
}


/* -------------------------------------------------------------------
   3. KEYFRAME ANIMATIONS
   ------------------------------------------------------------------- */

/* Shimmer (badge, skeleton) */
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card entrance */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Focus ring pulse */
@keyframes focusRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.4); }
  100% { box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.1); }
}

/* Skeleton pulse */
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.3; }
}

/* Infinite scroll (trust bar logos) */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* -------------------------------------------------------------------
   4. IMAGE & MEDIA TREATMENTS
   ------------------------------------------------------------------- */

/* Screenshot with border and shadow */
.screenshot {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

/* Gradient overlay on image */
.image-overlay {
  position: relative;
}

.image-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 11, 0.8) 0%, transparent 50%);
  pointer-events: none;
}

/* Lazy loading placeholder */
.image-placeholder {
  background: var(--bg-elevated);
  animation: pulse 2s infinite;
}


/* -------------------------------------------------------------------
   5. REDUCED MOTION (Accessibility)
   ------------------------------------------------------------------- */

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

  .animate-fade-in-up,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }

  .hover-lift:hover,
  .hover-scale:hover {
    transform: none;
  }
}
