/* Otlio Animations */

/* ========== KEYFRAMES ========== */

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

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

/* Fade in from right */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Subtle blur in */
@keyframes blurIn {
  from { opacity: 0; filter: blur(10px); transform: translateY(15px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

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

/* Gentle float */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 104, 255, 0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(34, 104, 255, 0.15); }
}

/* Heart pop */
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Count up slide */
@keyframes countSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient shift for backgrounds */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== UTILITY CLASSES ========== */

/* Elements waiting to be animated (hidden by default) */
.anim-ready {
  opacity: 0;
  will-change: transform, opacity;
}

/* Triggered states */
.anim-ready.is-visible {
  animation-fill-mode: forwards;
}

.anim-fade-up.is-visible {
  animation: fadeInUp 0.6s ease forwards;
}

.anim-fade-left.is-visible {
  animation: fadeInLeft 0.6s ease forwards;
}

.anim-fade-right.is-visible {
  animation: fadeInRight 0.6s ease forwards;
}

.anim-scale-in.is-visible {
  animation: scaleIn 0.5s ease forwards;
}

.anim-blur-in.is-visible {
  animation: blurIn 0.7s ease forwards;
}

/* Stagger delays for child elements */
.anim-stagger > .anim-ready:nth-child(1) { animation-delay: 0ms; }
.anim-stagger > .anim-ready:nth-child(2) { animation-delay: 80ms; }
.anim-stagger > .anim-ready:nth-child(3) { animation-delay: 160ms; }
.anim-stagger > .anim-ready:nth-child(4) { animation-delay: 240ms; }
.anim-stagger > .anim-ready:nth-child(5) { animation-delay: 320ms; }
.anim-stagger > .anim-ready:nth-child(6) { animation-delay: 400ms; }
.anim-stagger > .anim-ready:nth-child(7) { animation-delay: 480ms; }
.anim-stagger > .anim-ready:nth-child(8) { animation-delay: 560ms; }

/* Hover micro-interactions */
.anim-hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.anim-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.anim-hover-scale {
  transition: transform 0.2s ease;
}
.anim-hover-scale:hover {
  transform: scale(1.03);
}

/* Button press effect */
.anim-press:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* Shimmer loading skeleton */
.anim-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

[data-theme="dark"] .anim-shimmer {
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 200% 100%;
}

/* Heart like animation */
.anim-heart-pop {
  animation: heartPop 0.4s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .anim-ready { opacity: 1; }
  .anim-ready.is-visible { animation: none; opacity: 1; }
  .anim-hover-lift:hover { transform: none; }
  .anim-hover-scale:hover { transform: none; }
  .anim-shimmer { animation: none; }
}
