/* ============================================
   HHPOKER 代理联盟 - 自定义样式
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --color-brand: #334155;
    --color-brand-light: #475569;
    --color-brand-dark: #1e293b;
    --color-accent: #f59e0b;
    --color-accent-light: #fbbf24;
    --color-accent-dark: #d97706;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---- Selection ---- */
::selection {
    background-color: rgba(51, 65, 85, 0.2);
    color: #1e293b;
}

::-moz-selection {
    background-color: rgba(51, 65, 85, 0.2);
    color: #1e293b;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ---- Navbar Scroll Effect ---- */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ---- Feature Card Hover Effect ---- */
.feature-card {
    transition: all var(--transition-smooth);
}
.feature-card:hover {
    border-color: #94a3b8;
}
.feature-card:hover .fa-solid,
.feature-card:hover .fa-brands {
    color: #f59e0b;
}

/* ---- Stat Number Animation ---- */
.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ---- Testimonial Card ---- */
.testimonial-card {
    transition: all var(--transition-base);
}
.testimonial-card:hover {
    border-color: #cbd5e1;
}

/* ---- FAQ Accordion ---- */
.faq-item {
    transition: all var(--transition-base);
}
.faq-toggle {
    cursor: pointer;
    user-select: none;
}
.faq-toggle:hover .faq-icon {
    background-color: #e2e8f0;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background-color: #334155;
    color: #f59e0b;
}
.faq-item.active {
    border-color: #94a3b8;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.faq-content {
    animation: fadeSlideDown 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 600px;
    }
}

/* ---- CTA Pulse ---- */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 16px rgba(251, 191, 36, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* ---- Mobile Menu ---- */
#mobile-menu {
    animation: slideDown 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.mobile-link {
    display: block;
}

/* ---- Hero Scroll Indicator Animation ---- */
@keyframes bounce-custom {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ---- Count Up Transition ---- */
.counting {
    transition: all 50ms linear;
}

/* ---- Responsive Tweaks ---- */

/* Tablets (768px+) */
@media (min-width: 768px) {
    .feature-card {
        min-height: 320px;
    }
}

/* Small devices */
@media (max-width: 640px) {
    #hero {
        min-height: auto;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-card .text-4xl {
        font-size: 2rem;
    }

    .faq-toggle span:first-child {
        font-size: 0.95rem;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .feature-card,
    .testimonial-card,
    .faq-content,
    #mobile-menu {
        animation: none;
        transition: none;
    }
}
