/* Add hardware acceleration to make animations smoother */
.fade-left, .fade-right, .fade-up, .fade-down {
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Simplified, lighter animations */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-100px, 0, 0);  
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -50px, 0); 
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(100px, 0, 0);  
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 50px, 0); 
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Shorter animation duration and better timing function */
.fade-left.animate {
  animation: fadeInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-right.animate {
  animation: fadeInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-up.animate {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-down.animate {
  animation: fadeInDown 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Hero animations */
.hero-content .section-title {
  animation: fadeInLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-image img {
  animation: fadeInDown 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-text {
  animation: fadeInLeft 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Feature boxes with reduced delays */
.features.animate .feature-box:nth-child(1) {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.05s;
}

.features.animate .feature-box:nth-child(2) {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

.features.animate .feature-box:nth-child(3) {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.15s;
}

.features.animate .feature-box:nth-child(4) {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.2s;
}

/* Optional: Disable animations on mobile devices for better performance */
@media (prefers-reduced-motion: reduce) {
  .fade-left, .fade-right, .fade-up, .fade-down,
  .hero-content .section-title, .hero-image img, .hero-text {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}