/* ===================================
   ANIMATIONS - AAM WEBSITE
   =================================== */

/* Keyframe Animations */

/* Float Animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

/* Gentle Float */
@keyframes gentle-float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-8px); 
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
        transform: scale(1.02);
    }
}

/* Sparkle Animation */
@keyframes sparkle {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2); 
    }
}

/* Slide Up Animation */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Left */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Animation */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Bounce Down Animation */
@keyframes bounce-down {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(4px); 
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Spin Animation */
@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

/* Scroll Wheel Animation */
@keyframes scroll-wheel {
    0%, 100% { 
        top: 8px; 
        opacity: 1; 
    }
    50% { 
        top: 20px; 
        opacity: 0.3; 
    }
}

/* Orb Float Animation */
@keyframes orb-float {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
    }
    33% { 
        transform: translate(30px, -30px) scale(1.1); 
    }
    66% { 
        transform: translate(-20px, 20px) scale(0.9); 
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Typewriter Animation */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Blink Animation */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Animation Classes */

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

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Fade In Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.fade-in-fast {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in-fast.visible {
    opacity: 1;
}

.fade-in-slow {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.2s ease;
}

.fade-in-slow.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide Classes */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

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

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

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

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scale Classes */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Hero Specific Animations */
.hero-badge {
    animation: gentle-float 3s ease-in-out infinite;
}

.floating-elements {
    animation: float 20s ease-in-out infinite;
}

.gradient-orbs::before,
.gradient-orbs::after {
    animation: orb-float 15s ease-in-out infinite;
}

.gradient-orbs::before {
    animation-delay: -5s;
}

.gradient-orbs::after {
    animation-delay: -10s;
}

.title-line {
    opacity: 0;
    transform: translateY(30px);
    animation: slide-up 0.8s ease-out forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.btn-primary.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.btn-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

.scroll-indicator {
    animation: gentle-float 3s ease-in-out infinite;
}

.scroll-wheel {
    animation: scroll-wheel 2s ease-in-out infinite;
}

/* Interactive Animations */
.feature-card {
    position: relative;
    overflow: hidden;
}

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

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

/* Loading Animations */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: inline-block;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    margin: 0 2px;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bar Animation */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: -50px 0;
    }
    100% {
        background-position: 50px 0;
    }
}

/* Hover Animations */
.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Number Counter Animation */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s ease;
}

.text-reveal.visible span {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 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;
    }
    
    .animate-float,
    .animate-bounce,
    .animate-pulse,
    .animate-spin,
    .floating-elements,
    .hero-badge,
    .scroll-indicator {
        animation: none;
    }
}

/* Animation Utilities */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-1000 { animation-delay: 1s; }

.animation-duration-fast { animation-duration: 0.3s; }
.animation-duration-normal { animation-duration: 0.5s; }
.animation-duration-slow { animation-duration: 1s; }

.animation-fill-forwards { animation-fill-mode: forwards; }
.animation-fill-backwards { animation-fill-mode: backwards; }
.animation-fill-both { animation-fill-mode: both; }

/* Custom Easing Functions */
.ease-in-quad { transition-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
.ease-in-cubic { transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
.ease-out-quad { transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.ease-out-cubic { transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
.ease-in-out-quad { transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955); }
.ease-in-out-cubic { transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1); }