/* Animations */

/* Hero Fade and Rise On Load */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-headline {
  animation: heroFadeIn 1s ease-out 0.2s backwards;
}

.hero-subtitle {
  animation: heroFadeIn 1s ease-out 0.4s backwards;
}

.hero-buttons {
  animation: heroFadeIn 1s ease-out 0.6s backwards;
}

.hero-visual {
  animation: heroFadeIn 1s ease-out 0.8s backwards;
}

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

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

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

/* Scroll animation trigger classes */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

.scroll-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

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

.scroll-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease-out;
}

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

/* Staggered animations for child elements */
.stagger-children > * {
  animation: fadeInUp 0.6s ease-out backwards;
}

.stagger-children > :nth-child(1) { animation-delay: 0.1s; }
.stagger-children > :nth-child(2) { animation-delay: 0.2s; }
.stagger-children > :nth-child(3) { animation-delay: 0.3s; }
.stagger-children > :nth-child(4) { animation-delay: 0.4s; }
.stagger-children > :nth-child(5) { animation-delay: 0.5s; }
.stagger-children > :nth-child(6) { animation-delay: 0.6s; }

/* Hover Lift Effect */
@keyframes liftHover {
  from {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }
  to {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

.card,
.btn-primary,
.btn-secondary,
.ecosystem-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Reduced motion support */
@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;
  }
}

/* Smooth transitions for interactive elements */
a,
button,
.card,
.btn {
  transition: all 0.2s ease;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Link underline animation */
a {
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* Button press effect */
.btn:active {
  transform: scale(0.98);
}

/* Card scale on hover */
.card:hover {
  transform: translateY(-4px) scale(1.01);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
