/* ========================================
   数析预测 SaaS Landing Page - Custom Styles
   ======================================== */

/* ---------- Custom Properties ---------- */
:root {
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
}

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
::selection {
    background-color: var(--blue-600);
    color: #fff;
}

/* ---------- Navbar Scroll State ---------- */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

/* ---------- Mobile Menu Transition ---------- */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

/* ---------- Feature Card Hover ---------- */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ---------- Stats Counter Animation ---------- */
.stat-item .counter {
    transition: none;
}

/* ---------- FAQ Accordion ---------- */
.faq-answer {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-toggle i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.faq-toggle.active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* ---------- CTA Pulse ---------- */
#cta a:first-child {
    animation: pulse-shadow 2s ease-in-out infinite;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 15px 45px rgba(255, 255, 255, 0.4);
    }
}

/* ---------- Scroll-triggered Fade-Up ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .stat-item .text-5xl {
        font-size: 2.25rem;
    }

    #cta h2 {
        font-size: 1.75rem;
    }
}

/* ---------- Focus Styles for Accessibility ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
}

/* ---------- Print Hidden ---------- */
@media print {
    #navbar,
    #cta,
    footer {
        display: none;
    }
}
