/* ============================================
   Leritrix LLC — Animation Stylesheet
   ============================================ */

/* --- Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 20px) scale(0.95); }
  66% { transform: translate(25px, -15px) scale(1.05); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -25px); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Animation Triggers --- */
.hero__cursor {
  animation: blink 1s step-end infinite;
}

.hero__gradient-orb--1 {
  animation: orbFloat1 12s ease-in-out infinite;
}

.hero__gradient-orb--2 {
  animation: orbFloat2 15s ease-in-out infinite;
}

.hero__gradient-orb--3 {
  animation: orbFloat3 10s ease-in-out infinite;
}

/* Trust bar marquee */
.trust-bar__logos {
  animation: marquee 30s linear infinite;
}

.trust-bar__track:hover .trust-bar__logos {
  animation-play-state: paused;
}

/* --- Intersection Observer Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.animate-delay-1 {
  transition-delay: 100ms;
}

.animate-on-scroll.animate-delay-2 {
  transition-delay: 200ms;
}

.animate-on-scroll.animate-delay-3 {
  transition-delay: 300ms;
}

.animate-on-scroll.animate-delay-4 {
  transition-delay: 400ms;
}

.animate-on-scroll.animate-delay-5 {
  transition-delay: 500ms;
}

.animate-on-scroll.animate-delay-6 {
  transition-delay: 600ms;
}

/* Slide variants */
.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-slide-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-slide-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
  opacity: 1;
  transform: scale(1);
}

/* Hero entry animations */
.hero__badge {
  animation: fadeInDown 0.6s ease 0.2s both;
}

.hero__title {
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero__description {
  animation: fadeInUp 0.7s ease 0.6s both;
}

.hero__actions {
  animation: fadeInUp 0.7s ease 0.8s both;
}

.hero__stats {
  animation: fadeIn 0.8s ease 1.2s both;
}

/* --- Card hover micro-interactions --- */
.service-card__icon svg {
  transition: stroke var(--transition-base), transform var(--transition-base);
}

.service-card:hover .service-card__icon svg {
  transform: scale(1.1);
}

/* --- Loading spinner --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spinSlow 0.6s linear infinite;
  display: inline-block;
}

.btn--loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn--loading .spinner {
  margin-right: 8px;
}

/* --- Reduced Motion Fallbacks --- */
@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-slide-right,
  .animate-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__badge,
  .hero__title,
  .hero__description,
  .hero__actions,
  .hero__stats {
    animation: none;
    opacity: 1;
  }

  .trust-bar__logos {
    animation: none;
  }

  .hero__cursor {
    animation: none;
    opacity: 1;
  }
}
