/*
  Chilia Veche - Scroll Animations
  Subtle fade-in and slide-up effects using Intersection Observer
  Respects prefers-reduced-motion for accessibility
*/

/* ============================================
   Animation States
   ============================================ */

/* Default state - elements before animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Visible state - triggered when element enters viewport */
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Animation Delays (Stagger Effect)
   ============================================ */

.animate-on-scroll:nth-child(1) {
  transition-delay: 0ms;
}

.animate-on-scroll:nth-child(2) {
  transition-delay: 100ms;
}

.animate-on-scroll:nth-child(3) {
  transition-delay: 200ms;
}

.animate-on-scroll:nth-child(4) {
  transition-delay: 300ms;
}

.animate-on-scroll:nth-child(5) {
  transition-delay: 400ms;
}

.animate-on-scroll:nth-child(6) {
  transition-delay: 500ms;
}

/* ============================================
   Fade-In Only (No Movement)
   ============================================ */

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
}

/* ============================================
   Slide from Left/Right
   ============================================ */

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.slide-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   Scale In (Subtle Zoom)
   ============================================ */

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Hero Animations (Immediate on Load)
   ============================================ */

.hero-fade-in {
  animation: heroFadeIn 1s ease-out forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fade-in {
    animation: none;
  }
}
