/* ==========================================
   animations.css
   Elegant scroll-triggered animations
   for suisseduction.ch
   ========================================== */

/* ---------- Body background prevents white gaps ---------- */
body {
  background-color: #222;
}

/* ---------- Respect motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero-content {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ---------- Hero entrance (on page load) ---------- */
.hero-content {
  animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

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

/* ---------- Scroll-triggered: base hidden state ---------- */
[data-animate] {
  opacity: 0;
}

/* ---------- Fade in up ---------- */
[data-animate="fade-in-up"] {
  transform: translateY(30px);
}
[data-animate="fade-in-up"].is-visible {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Fade in ---------- */
[data-animate="fade-in"] {
  transform: translateY(10px);
}
[data-animate="fade-in"].is-visible {
  animation: fadeIn 0.7s ease forwards;
}

/* ---------- Fade in from left ---------- */
[data-animate="fade-in-left"] {
  transform: translateX(-30px);
}
[data-animate="fade-in-left"].is-visible {
  animation: fadeInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Fade in from right ---------- */
[data-animate="fade-in-right"] {
  transform: translateX(30px);
}
[data-animate="fade-in-right"].is-visible {
  animation: fadeInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Scale in ---------- */
[data-animate="scale-in"] {
  transform: scale(0.9);
}
[data-animate="scale-in"].is-visible {
  animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---------- Staggered delays (applied when visible) ---------- */
[data-animate-delay="100"].is-visible { animation-delay: 0.1s; }
[data-animate-delay="150"].is-visible { animation-delay: 0.15s; }
[data-animate-delay="200"].is-visible { animation-delay: 0.2s; }
[data-animate-delay="250"].is-visible { animation-delay: 0.25s; }
[data-animate-delay="300"].is-visible { animation-delay: 0.3s; }
[data-animate-delay="350"].is-visible { animation-delay: 0.35s; }
[data-animate-delay="400"].is-visible { animation-delay: 0.4s; }
[data-animate-delay="450"].is-visible { animation-delay: 0.45s; }
[data-animate-delay="500"].is-visible { animation-delay: 0.5s; }
[data-animate-delay="550"].is-visible { animation-delay: 0.55s; }
[data-animate-delay="600"].is-visible { animation-delay: 0.6s; }
[data-animate-delay="650"].is-visible { animation-delay: 0.65s; }
[data-animate-delay="700"].is-visible { animation-delay: 0.7s; }
[data-animate-delay="800"].is-visible { animation-delay: 0.8s; }
[data-animate-delay="900"].is-visible { animation-delay: 0.9s; }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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