/* =============================================================
   animations.css — Keyframes & Scroll Animations
   Siti Fatima Painter Portfolio
   ============================================================= */

/* ═══════════════════════════════════════════════════════════
   @KEYFRAMES
   ═══════════════════════════════════════════════════════════ */

/* Paintbrush reveal — diagonal wipe from left to right */
@keyframes brushReveal {
  from {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* Fade up — opacity + vertical translate */
@keyframes fadeInUp {
  from {
    opacity:   0;
    transform: translateY(30px);
  }
  to {
    opacity:   1;
    transform: translateY(0);
  }
}

/* Simple fade */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Gentle pulse */
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Slide in from the left */
@keyframes slideInLeft {
  from {
    opacity:   0;
    transform: translateX(-30px);
  }
  to {
    opacity:   1;
    transform: translateX(0);
  }
}

/* Shimmer — used on loading skeletons */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Subtle float — for decorative elements */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL-TRIGGERED ANIMATION BASE
   ═══════════════════════════════════════════════════════════ */

.animate-on-scroll {
  opacity:    0;
  transform:  translateY(30px);
  transition: opacity   var(--transition-slow),
              transform var(--transition-slow);
}

.animate-on-scroll.visible {
  opacity:   1;
  transform: translateY(0);
}

/* ── Stagger Delays ─────────────────────────────────────────── */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ── Slide-In Variant ───────────────────────────────────────── */
.animate-slide-left {
  opacity:    0;
  transform:  translateX(-30px);
  transition: opacity   var(--transition-slow),
              transform var(--transition-slow);
}

.animate-slide-left.visible {
  opacity:   1;
  transform: translateX(0);
}

/* ── Brush Reveal Variant ───────────────────────────────────── */
.animate-brush-reveal {
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: clip-path var(--transition-slow);
}

.animate-brush-reveal.visible {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ═══════════════════════════════════════════════════════════
   UTILITY ANIMATION CLASSES (one-shot, apply immediately)
   ═══════════════════════════════════════════════════════════ */

.anim-fade-in-up {
  animation: fadeInUp var(--transition-slow) both;
}

.anim-fade-in {
  animation: fadeIn var(--transition-normal) both;
}

.anim-slide-in-left {
  animation: slideInLeft var(--transition-slow) both;
}

.anim-pulse {
  animation: pulse 2.5s ease-in-out infinite;
}

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

/* Reduce motion for 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-on-scroll,
  .animate-slide-left,
  .animate-brush-reveal {
    opacity:   1;
    transform: none;
    clip-path: none;
  }
}
