/* ============================================
   RANKTADA LANDING PAGE - ANIMATIONS
   ============================================ */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    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 float {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-50%) translateX(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

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

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

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* Scroll Animation Classes (triggered by JS) */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Animation Delays */
.delay-100 { animation-delay: 100ms; transition-delay: 100ms; }
.delay-200 { animation-delay: 200ms; transition-delay: 200ms; }
.delay-300 { animation-delay: 300ms; transition-delay: 300ms; }
.delay-400 { animation-delay: 400ms; transition-delay: 400ms; }
.delay-500 { animation-delay: 500ms; transition-delay: 500ms; }
.delay-600 { animation-delay: 600ms; transition-delay: 600ms; }

/* Hero Section Animations */
.hero-content {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-visual {
    animation: fadeInRight 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-meta {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.social-proof {
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

/* Floating Badge Animation */
.floating-badge {
    animation: float 3s ease-in-out infinite;
}

.review-card:nth-child(1) .floating-badge {
    animation-delay: 0s;
}

.review-card:nth-child(2) .floating-badge {
    animation-delay: 1s;
}

/* Dashboard Mockup Animations */
.review-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.review-card:nth-child(1) { animation-delay: 0.5s; }
.review-card:nth-child(2) { animation-delay: 0.7s; }
.review-card:nth-child(3) { animation-delay: 0.9s; }

/* Button Hover Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* Card Hover Animations */
.problem-card,
.feature-card,
.pricing-card,
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-card:hover,
.feature-card:hover,
.testimonial-card:hover {
    transform: translateY(-8px);
}

/* Feature Mockup Animations */
.feature-mockup {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Pricing Card Popular Animation */
.pricing-card.popular {
    animation: pulse 3s ease-in-out infinite;
}

/* FAQ Accordion Animation */
.faq-answer {
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group select:focus {
    animation: scaleIn 0.2s ease;
}

/* Checkbox Animation */
.checkbox-label input[type="checkbox"] {
    transition: transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    animation: bounce 0.3s ease;
}

/* Modal Animation */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Navigation Scroll Animation */
.navbar {
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    padding: 12px 0;
}

/* Mobile Menu Animation */
.nav-links {
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

/* Loading Skeleton Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Star Rating Animation */
.stars {
    display: inline-block;
}

.stars span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.stars:hover span {
    animation: bounce 0.3s ease;
}

.stars:hover span:nth-child(1) { animation-delay: 0s; }
.stars:hover span:nth-child(2) { animation-delay: 0.05s; }
.stars:hover span:nth-child(3) { animation-delay: 0.1s; }
.stars:hover span:nth-child(4) { animation-delay: 0.15s; }
.stars:hover span:nth-child(5) { animation-delay: 0.2s; }

/* Progress Bar Animation */
.bar {
    transition: width 1s ease;
}

/* Tooltip Animation */
.tooltip {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Success/Error State Animations */
.success-state {
    animation: scaleIn 0.3s ease, pulse 0.5s ease 0.3s;
}

.error-state {
    animation: shake 0.5s ease;
}

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

/* Counter Animation (for stats) */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

/* Link Underline Animation */
.footer-links a,
.nav-links a {
    position: relative;
}

.footer-links a::after,
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.footer-links a:hover::after,
.nav-links a:hover::after {
    width: 100%;
}

/* Intersection Observer Animation Triggers */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-left"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"].animated {
    transform: translateX(0);
}

[data-animate="fade-right"] {
    transform: translateX(30px);
}

[data-animate="fade-right"].animated {
    transform: translateX(0);
}

[data-animate="scale"] {
    transform: scale(0.95);
}

[data-animate="scale"].animated {
    transform: scale(1);
}
