/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

/* ========== TEXT APPEARANCE ANIMATIONS ========== */

/* Fade in up with stagger */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade in right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale up fade in */
@keyframes scaleUpFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide in bounce */
@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Letter by letter reveal */
@keyframes letterReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== SCROLL ANIMATIONS ========== */

/* Slide in from left on scroll */
@keyframes slideInScrollLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right on scroll */
@keyframes slideInScrollRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Zoom in on scroll */
@keyframes zoomInScroll {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Rotate in on scroll */
@keyframes rotateInScroll {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* ========== HOVER ANIMATIONS ========== */

/* Glow effect */
@keyframes glow {
  0%, 100% {
    box-shadow: 0px 4px 6px rgba(0, 166, 62, 0.15);
  }
  50% {
    box-shadow: 0px 10px 30px rgba(0, 166, 62, 0.35), 0px 0px 20px rgba(0, 166, 62, 0.2);
  }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 166, 62, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(0, 166, 62, 0);
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Floating with rotation */
@keyframes floatRotate {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Gradient shift */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ========== HIGH-END ANIMATIONS ========== */

/* Parallax effect */
@keyframes parallaxUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Card flip animation */
@keyframes cardFlip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

/* Underline animation */
@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Text color transition */
@keyframes textColorShift {
  0%, 100% {
    color: #101828;
  }
  50% {
    color: #00A63E;
  }
}

/* ========== UTILITY ANIMATION CLASSES ========== */

/* Hero text animations */
.hero .badge {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero h1 {
  animation: fadeInUp 1s ease-out 0.4s both;
  line-height: 1.1;
}

.hero h3 {
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero p {
  animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-btn {
  animation: slideInBounce 1s ease-out 1s both;
}

/* Reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-on-scroll.reveal-ready {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-on-scroll.is-visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered reveal on scroll */
.reveal-on-scroll:nth-child(1) { animation-delay: 0s; }
.reveal-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.reveal-on-scroll:nth-child(3) { animation-delay: 0.2s; }
.reveal-on-scroll:nth-child(4) { animation-delay: 0.3s; }
.reveal-on-scroll:nth-child(5) { animation-delay: 0.4s; }
.reveal-on-scroll:nth-child(6) { animation-delay: 0.5s; }
.reveal-on-scroll:nth-child(7) { animation-delay: 0.6s; }
.reveal-on-scroll:nth-child(8) { animation-delay: 0.7s; }
.reveal-on-scroll:nth-child(9) { animation-delay: 0.8s; }

/* Fade in animation */
.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Fade in left */
.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

/* Fade in right */
.fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Scale animation */
.scale-in {
  animation: scaleUpFadeIn 0.8s ease-out forwards;
}

/* Slide in */
.slide-in {
  animation: slideInBounce 1s ease-out forwards;
}

/* Float animation */
.float {
  animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Bounce animation */
.bounce-animation {
  animation: bounce 2s ease-in-out infinite;
}

/* Spin animation */
.spin-animation {
  animation: spin 2s linear infinite;
}

/* ========== ENHANCED HOVER ANIMATIONS ========== */

/* Card hover enhancement */
.card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 20px 40px rgba(0, 166, 62, 0.2) !important;
}

.card:hover::before {
  left: 100%;
}

/* Button hover enhancement */
.hero-btn,
.nav-links .btn {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.hero-btn::before,
.nav-links .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.6s ease;
}

.hero-btn:hover::before,
.nav-links .btn:hover::before {
  left: 100%;
}

/* Icon hover animation */
.icon {
  transition: all 0.4s ease;
  position: relative;
}

.card:hover .icon {
  animation: floatRotate 0.6s ease-out;
}

/* Heading hover effect */
h1, h2, h3, h4, h5, h6 {
  position: relative;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #00A63E;
  transform: translateX(-50%);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about h2:hover::after {
  width: 100px;
}

/* Link hover effect */
a:not(.btn) {
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Gradient text animation */
.gradient-text {
  background: linear-gradient(135deg, #00A63E 0%, #008f34 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* ========== SECTION ANIMATIONS ========== */

/* Section fade in */
section {
  animation: fadeInUp 1s ease-out;
}

/* About section cards */
.about-cards .card {
  animation: fadeInUp 0.8s ease-out forwards;
}

.about-cards .card:nth-child(1) { animation-delay: 0.2s; }
.about-cards .card:nth-child(2) { animation-delay: 0.4s; }
.about-cards .card:nth-child(3) { animation-delay: 0.6s; }

/* Featured products cards */
.featured-track .featured-item {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Stats animation */
.stat {
  animation: slideInBounce 1s ease-out forwards;
}

.stat:nth-child(1) { animation-delay: 0.2s; }
.stat:nth-child(2) { animation-delay: 0.4s; }

/* ========== PARALLAX SCROLLING ========== */

.parallax-element {
  will-change: transform;
}

/* ========== TEXT REVEAL ANIMATIONS ========== */

.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  animation: letterReveal 0.6s ease-out forwards;
}

/* Stagger delays for each letter */
.text-reveal span:nth-child(1) { animation-delay: 0s; }
.text-reveal span:nth-child(2) { animation-delay: 0.05s; }
.text-reveal span:nth-child(3) { animation-delay: 0.1s; }
.text-reveal span:nth-child(4) { animation-delay: 0.15s; }
.text-reveal span:nth-child(5) { animation-delay: 0.2s; }
.text-reveal span:nth-child(6) { animation-delay: 0.25s; }
.text-reveal span:nth-child(7) { animation-delay: 0.3s; }
.text-reveal span:nth-child(8) { animation-delay: 0.35s; }
.text-reveal span:nth-child(9) { animation-delay: 0.4s; }
.text-reveal span:nth-child(10) { animation-delay: 0.45s; }

/* ========== LOADING ANIMATIONS ========== */

@keyframes skeletonLoading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: skeletonLoading 2s infinite;
}

/* ========== RESPECTS USER PREFERENCES ========== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .float,
  .pulse,
  .bounce-animation,
  .spin-animation,
  .gradient-text {
    animation: none !important;
  }
}

/* ========== RESPONSIVE ANIMATIONS ========== */

@media (max-width: 768px) {
  .hero h1 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
  }

  .hero h3 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
  }

  .hero p {
    animation: fadeInUp 0.8s ease-out 0.7s both;
  }

  .hero-btn {
    animation: slideInBounce 0.8s ease-out 0.8s both;
  }

  .card {
    transition: all 0.3s ease;
  }

  .card:hover {
    transform: translateY(-4px);
  }

  .about-cards .card {
    animation: fadeInUp 0.6s ease-out forwards;
  }
}

@media (max-width: 420px) {
  .hero .badge {
    animation: fadeInUp 0.6s ease-out 0.1s both;
  }

  .hero h1 {
    animation: fadeInUp 0.6s ease-out 0.2s both;
  }

  .hero h3 {
    animation: fadeInUp 0.6s ease-out 0.3s both;
  }

  .hero p {
    animation: fadeInUp 0.6s ease-out 0.4s both;
  }

  .card:hover {
    transform: translateY(-2px);
  }
}
