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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base animation class */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for grids */
.animate-on-scroll.delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.delay-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll.delay-4 {
    transition-delay: 0.4s;
}

/* Button hover effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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.5s ease;
}

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

/* Card animations */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Progress bar animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width, 75%);
    }
}

.progress-fill {
    animation: progressFill 2s ease-out 0.5s both;
}

/* Phone mockup animations */
.phone-frame {
    animation: floatAnimation 6s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.app-screen {
    animation: screenGlow 4s ease-in-out infinite alternate;
}

@keyframes screenGlow {
    0% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }
    100% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* Timeline animations */
.timeline-marker {
    animation: pulseMarker 2s ease-in-out infinite;
}

@keyframes pulseMarker {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 20px rgba(102, 126, 234, 0.3);
    }
}

/* Text gradient animation */
.text-gradient {
    background-size: 200% auto;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Navigation animation */
.nav {
    transform: translateY(-100%);
    animation: slideDownNav 0.5s ease-out 0.2s both;
}

@keyframes slideDownNav {
    to {
        transform: translateY(0);
    }
}

/* Hero content stagger */
.hero-title {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

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

.hero-proof {
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.hero-visual {
    animation: fadeInRight 1s ease-out 0.5s both;
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-number {
    animation: countUp 0.6s ease-out both;
}

/* Slider animation */
#income-slider {
    transition: all 0.3s ease;
}

#income-slider:hover {
    filter: brightness(1.1);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Hover effects for interactive elements */
.problem-card:hover {
    transform: translateY(-12px) scale(1.03);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.03);
}

.faq-item:hover {
    transform: translateY(-5px);
}

/* Testimonial quote animation */
.quote-icon {
    animation: fadeIn 1s ease-out 1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.2;
    }
}

/* Background animations */
.hero-background {
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0%) translateY(0%) scale(1);
    }
    25% {
        transform: translateX(-2%) translateY(-1%) scale(1.05);
    }
    50% {
        transform: translateX(2%) translateY(1%) scale(0.95);
    }
    75% {
        transform: translateX(-1%) translateY(2%) scale(1.02);
    }
}

/* Pricing card special effects */
.pricing-card::before {
    animation: rotatePricing 30s linear infinite;
}

@keyframes rotatePricing {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    .card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .phone-frame {
        animation-duration: 8s;
    }
}

/* 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;
    }
    
    .animate-on-scroll {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .card:hover {
        transform: none !important;
    }
} 