/* MockMy.Best Animations */

/* ========================================
   KEYFRAMES
   ======================================== */

/* Fade In Up - Hero headline */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left - Feature items */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pop In - Check circle icons */
@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Fade In - General fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scale In - Cards entrance */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   HERO SECTION ANIMATIONS
   ======================================== */

/* Hero title animation */
.hero-title {
  animation: fadeInUp 1s ease-out 0.3s both;
}

/* Hero subtitle animation */
.hero-subtitle {
  animation: fadeInUp 1s ease-out 0.5s both;
}

/* Hero feature items - staggered animation */
.hero-features .feature-item {
  opacity: 0;
  animation: fadeInLeft 0.8s ease-out both;
}

.hero-features .feature-item:nth-child(1) {
  animation-delay: 0.6s;
}

.hero-features .feature-item:nth-child(2) {
  animation-delay: 0.8s;
}

.hero-features .feature-item:nth-child(3) {
  animation-delay: 1s;
}

/* Check circle icons - pop in before text */
.hero-features .feature-check-icon {
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.hero-features .feature-item:nth-child(1) .feature-check-icon {
  animation-delay: 0.5s;
}

.hero-features .feature-item:nth-child(2) .feature-check-icon {
  animation-delay: 0.7s;
}

.hero-features .feature-item:nth-child(3) .feature-check-icon {
  animation-delay: 0.9s;
}

/* Hero action buttons */
.hero-actions {
  animation: fadeInUp 1s ease-out 1.1s both;
}

/* Hero image */
.hero-image {
  animation: fadeIn 1.2s ease-out 0.8s both;
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */

/* Base class for scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variant: Fade from left */
.animate-on-scroll-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Variant: Fade from right */
.animate-on-scroll-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Variant: Scale up */
.animate-on-scroll-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   BUTTON ANIMATIONS
   ======================================== */

/* Pulse animation for hero CTA */
@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 8px 8px 16px var(--neo-shadow-dark), -8px -8px 16px var(--neo-shadow-light), 0 4px 12px rgba(255, 167, 38, 0.3);
  }
  50% {
    box-shadow: 8px 8px 16px var(--neo-shadow-dark), -8px -8px 16px var(--neo-shadow-light), 0 8px 20px rgba(255, 167, 38, 0.5);
    transform: translateY(-2px);
  }
}

/* Icon bounce animation (horizontal - for arrow_forward) */
@keyframes iconBounce {
  0%, 100% {
    transform: translateX(3px);
  }
  50% {
    transform: translateX(6px);
  }
}

/* Icon bounce animation (vertical - for expand_more) */
@keyframes iconBounceDown {
  0%, 100% {
    transform: translateY(3px);
  }
  50% {
    transform: translateY(6px);
  }
}

/* Spin animation for loading state */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* CTA Button enhancements */
.neo-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.neo-button:hover {
  transform: translateY(-3px);
}

/* Ripple effect on click */
.neo-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.neo-button:active::before {
  width: 300px;
  height: 300px;
}

.neo-button-primary::before {
  background: rgba(255, 255, 255, 0.3);
}

.neo-button-secondary::before {
  background: rgba(99, 102, 241, 0.2);
}

/* Click animation */
.neo-button:active {
  transform: translateY(0) scale(0.98);
}

/* Additional ripple effect (programmatic) */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnimation 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* ========================================
   CARD ANIMATIONS
   ======================================== */

/* Pricing cards hover effect */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* Mentor card hover effect */
.mentor-profile-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mentor-profile-card:hover {
  transform: translateY(-5px);
}

/* Step cards */
.step {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

/* Contact card */
.contact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   FAQ ANIMATIONS
   ======================================== */

/* FAQ answer sliding */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  transition: max-height 0.4s ease-in, padding 0.4s ease-in;
}

/* FAQ icon rotation */
.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* ========================================
   MODAL ANIMATIONS
   ======================================== */

/* Modal overlay fade */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal scale and fade */
.modal {
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ========================================
   STAGGERED ANIMATIONS
   ======================================== */

/* Process steps - staggered */
.steps .step {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.steps .step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.steps .step:nth-child(1).is-visible {
  transition-delay: 0.1s;
}

.steps .step:nth-child(2).is-visible {
  transition-delay: 0.2s;
}

.steps .step:nth-child(3).is-visible {
  transition-delay: 0.3s;
}

/* Pricing cards - staggered */
.pricing-grid .pricing-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pricing-grid .pricing-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pricing-grid .pricing-card:nth-child(1).is-visible {
  transition-delay: 0.1s;
}

.pricing-grid .pricing-card:nth-child(2).is-visible {
  transition-delay: 0.2s;
}

.pricing-grid .pricing-card:nth-child(3).is-visible {
  transition-delay: 0.3s;
}

.pricing-grid .pricing-card:nth-child(4).is-visible {
  transition-delay: 0.4s;
}

.pricing-grid .pricing-card:nth-child(5).is-visible {
  transition-delay: 0.5s;
}

/* FAQ items - staggered */
.faq .faq-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq .faq-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.faq .faq-item:nth-child(1).is-visible {
  transition-delay: 0.1s;
}

.faq .faq-item:nth-child(2).is-visible {
  transition-delay: 0.2s;
}

.faq .faq-item:nth-child(3).is-visible {
  transition-delay: 0.3s;
}

.faq .faq-item:nth-child(4).is-visible {
  transition-delay: 0.4s;
}

/* ========================================
   ICON ANIMATIONS
   ======================================== */

/* Material icon pop-in for all check icons */
.pricing-check-icon,
.mentor-check-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.pricing-card:hover .pricing-check-icon,
.mentor-profile-card:hover .mentor-check-icon {
  transform: scale(1.1);
}

/* Step number pulse on hover */
.step .num {
  transition: transform 0.3s ease;
}

.step:hover .num {
  transform: scale(1.15);
}

/* Step icon bounce on hover */
.step .icon {
  transition: transform 0.3s ease;
}

.step:hover .icon {
  transform: translateY(-5px);
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Hint to browser about animated properties */
.animate-on-scroll,
.animate-on-scroll-left,
.animate-on-scroll-right,
.animate-on-scroll-scale,
.pricing-card,
.mentor-profile-card,
.step,
.neo-button {
  will-change: transform, opacity;
}

/* Remove will-change after animation completes */
.is-visible {
  will-change: auto;
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

@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;
  }

  /* Remove transforms for accessibility */
  .animate-on-scroll,
  .animate-on-scroll-left,
  .animate-on-scroll-right,
  .animate-on-scroll-scale {
    transform: none !important;
  }

  .hero-title,
  .hero-subtitle,
  .hero-features .feature-item,
  .hero-actions,
  .hero-image {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ========================================
   HEADER ANIMATION ON SCROLL
   ======================================== */

.header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   SECTION TITLE ANIMATIONS
   ======================================== */

.section h2 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section h2.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-intro {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.section-intro.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SMOOTH SCROLLING ENHANCEMENTS
   ======================================== */

@supports (scroll-behavior: smooth) {
  html {
    scroll-behavior: smooth;
  }
}
