/* ============================================
   hhpoker德州牛仔 - 高端SaaS落地页
   Custom Styles
   ============================================ */

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

/* ---- Selection ---- */
::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #059669;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* ---- Navbar Scrolled State ---- */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding-top: 12px;
    padding-bottom: 12px;
}
nav.scrolled .nav-logo-text {
    color: #111827;
}
nav.scrolled .nav-link {
    color: rgba(55, 65, 81, 0.9);
}
nav.scrolled .nav-link:hover {
    color: #059669;
}
nav.scrolled #mobileToggle {
    color: #111827;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ---- Feature Cards Hover ---- */
.feature-card:hover .fa-solid,
.feature-card:hover .fa-brands {
    transform: scale(1.1);
}

/* ---- Stat Number Counting ---- */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ---- FAQ Accordion ---- */
.faq-item.active {
    border-color: #a7f3d0;
    box-shadow: 0 4px 24px rgba(5, 150, 105, 0.08);
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: #059669;
    color: white;
}
.faq-content {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* ---- Testimonial Card ---- */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    right: 24px;
    font-size: 80px;
    line-height: 1;
    color: #059669;
    opacity: 0.08;
    font-family: Georgia, serif;
    pointer-events: none;
}

/* ---- CTA Section Gradient Animation ---- */
#download {
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ---- Mobile Menu ---- */
#mobileMenu {
    max-height: 0;
}
#mobileMenu.show {
    max-height: 500px;
}

/* ---- Intersection Observer Animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Stagger Children ---- */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }
.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Button Ripple Effect ---- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-ripple:active::after {
    opacity: 1;
    transition: opacity 0s;
}

/* ---- Responsive Fine-tuning ---- */
@media (max-width: 768px) {
    .feature-card {
        padding: 24px;
    }
    .stat-card {
        padding: 24px;
    }
    .testimonial-card {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    #hero h1 span.text-2xl {
        font-size: 1.25rem;
    }
}

/* ---- Focus Styles for Accessibility ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- 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;
    }
}

/* ---- CTA hovering glow ---- */
#download a {
    position: relative;
}
#download a::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s, transform 0.4s;
    transform: scale(1.05);
}
#download a:hover::before {
    opacity: 0.3;
    transform: scale(1.08);
}
