/* ============================================================
   崇州德扑网 - Premium SaaS Landing Page
   Custom Styles & Animations
   ============================================================ */

/* === BASE & SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    overflow-x: hidden;
}

/* === CUSTOM SELECTION === */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: #312e81;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #4338ca);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5, #3730a3);
}

/* === NAVBAR SCROLLED STATE === */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08) !important;
}

.navbar-scrolled a:not(.bg-white) {
    color: #1f2937 !important;
}

.navbar-scrolled a:not(.bg-white):hover {
    color: #4f46e5 !important;
}

/* === HERO FLOATING ANIMATION === */
@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: floatUpDown 3s ease-in-out infinite;
}

/* === FEATURE CARD HOVER GLOW === */
.feature-card-glow {
    transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

/* === STATS COUNTER ANIMATION === */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter-animated {
    animation: countUp 0.6s ease-out forwards;
}

/* === FAQ ACCORDION === */
.faq-item .faq-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease, padding 0.35s ease;
}

.faq-item .faq-content > * {
    overflow: hidden;
}

.faq-item.active .faq-content {
    grid-template-rows: 1fr;
}

.faq-item.active .faq-icon {
    background-color: #4f46e5;
    color: #ffffff;
    transform: rotate(45deg);
}

.faq-item.active .faq-toggle {
    background-color: rgba(79, 70, 229, 0.03);
}

/* === BUTTON PULSE === */
@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.btn-pulse {
    animation: buttonPulse 2s infinite;
}

/* === FADE IN UP ON SCROLL === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === TESTIMONIAL ACTIVE STATE === */
.testimonial-featured {
    transform: scale(1.03);
    box-shadow: 0 25px 60px rgba(79, 70, 229, 0.1) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
}

/* === MOBILE MENU DROPDOWN === */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* === RESPONSIVE FINE TUNING === */
@media (max-width: 640px) {
    h1 {
        letter-spacing: -0.02em;
    }
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* === GRADIENT TEXT SHIMMER === */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* === CARD BORDER GRADIENT (subtle on hover) === */
.feature-card:hover {
    border-image: linear-gradient(135deg, #818cf8, #4f46e5) 1;
}

/* === IMAGE LOADING PLACEHOLDER === */
img {
    -webkit-user-drag: none;
    user-select: none;
}

/* === FOCUS OUTLINE === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === ACCESSIBLE REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
