/* ===================================================
   ENHANCED ANIMATIONS - Thursday 19 Feb 2026
   Bringing portal-quality micro-interactions to website
   =================================================== */

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

.stat-value,
.pricing-price {
    animation: countUp 0.6s ease-out;
}

/* Add counter animation on scroll into view */
.animate-count {
    opacity: 0;
}

.animate-count.in-view {
    animation: countUp 0.8s ease-out forwards;
}

/* ── Enhanced Card Hover Effects ────────────────────── */
.service-card,
.pricing-card,
.addon-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::before,
.pricing-card::before,
.addon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient, linear-gradient(90deg, #1e40af, #2563eb));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before,
.pricing-card:hover::before,
.addon-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover,
.addon-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(30, 64, 175, 0.1);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(30, 64, 175, 0.12);
}

/* ── Button Ripple Effect ────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    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, height 0.6s;
}

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

/* ── Smooth Scroll Progress Indicator ────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #2563eb);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

/* ── Enhanced FAQ Accordion ────────────────────── */
.faq-item {
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(30, 64, 175, 0.02);
}

.faq-item.active {
    background: rgba(30, 64, 175, 0.04);
}

.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    opacity: 1;
}

/* ── Floating Animation for Icons ────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.service-icon,
.contact-icon {
    animation: float 3s ease-in-out infinite;
}

.service-card:nth-child(1) .service-icon { animation-delay: 0s; }
.service-card:nth-child(2) .service-icon { animation-delay: 0.2s; }
.service-card:nth-child(3) .service-icon { animation-delay: 0.4s; }
.service-card:nth-child(4) .service-icon { animation-delay: 0.6s; }
.service-card:nth-child(5) .service-icon { animation-delay: 0.8s; }
.service-card:nth-child(6) .service-icon { animation-delay: 1s; }

/* ── Gradient Text Effect ────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Pulse Animation for Featured Badge ────────────────────── */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

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

/* ── Skeleton Loading States ────────────────────── */
@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary, #f1f5f9) 0px,
        var(--bg-primary, #f8fafc) 40px,
        var(--bg-secondary, #f1f5f9) 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius, 8px);
}

/* ── Stagger Animations for Grid Items ────────────────────── */
.services-grid .service-card,
.pricing-grid .pricing-card {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.services-grid .service-card:nth-child(1) { animation-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { animation-delay: 0.4s; }
.services-grid .service-card:nth-child(5) { animation-delay: 0.5s; }
.services-grid .service-card:nth-child(6) { animation-delay: 0.6s; }

.pricing-grid .pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.3s; }

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent, #1e40af);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* ── Performance Optimizations ────────────────────── */
.service-card,
.pricing-card,
.addon-card,
.btn {
    will-change: transform;
}

/* ── 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;
    }
    
    .service-icon,
    .contact-icon {
        animation: none !important;
    }
}

/* ── Mobile Touch Feedback ────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.96);
    }
    
    .service-card:active,
    .pricing-card:active,
    .addon-card:active {
        transform: scale(0.98);
    }
}

/* ── Mobile Nav Overlay ────────────────────── */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Enhanced Process Steps ────────────────────── */
.process-num {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover .process-num {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* ── Trust Badges Animation ────────────────────── */
.trust-item {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.trust-item:nth-child(1) { animation-delay: 0.2s; }
.trust-item:nth-child(2) { animation-delay: 0.4s; }
.trust-item:nth-child(3) { animation-delay: 0.6s; }
