/* ============================================================
   HHpoker 德扑圈 - Premium Landing Page Styles
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-300: #a5b4fc;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;
    --brand-900: #312e81;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base & Reset ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: var(--brand-200);
    color: var(--brand-900);
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--brand-500), var(--brand-700));
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--brand-600), var(--brand-800));
}

/* ---------- Navbar ---------- */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

@media (max-width: 1023px) {
    #navbar.scrolled {
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

/* ---------- Mobile Menu ---------- */
#mobile-menu.show {
    display: block !important;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mobile-nav-link {
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

/* ---------- Feature Cards ---------- */
.feature-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-0.5rem) scale(1.02);
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- FAQ Accordion ---------- */
.faq-item summary {
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::marker {
    display: none;
    content: none;
}

.faq-item[open] summary {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.faq-item .faq-icon i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] .faq-icon i {
    transform: rotate(45deg);
}

.faq-item div {
    animation: accordionIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Back to Top Button ---------- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes accordionIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes floatSlower {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(-3deg);
    }
}

@keyframes pingSlow {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.animate-float-slow {
    animation: floatSlow 7s ease-in-out infinite;
}

.animate-float-slower {
    animation: floatSlower 8s ease-in-out infinite;
}

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays for feature cards */
@media (min-width: 640px) {
    .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* ---------- Counter Animation ---------- */
.counter,
.counter-decimal {
    font-variant-numeric: tabular-nums;
}

/* ---------- CTA Pulse Halo ---------- */
#cta a:first-child {
    position: relative;
}

#cta a:first-child::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.3);
    z-index: -1;
    animation: pulseHalo 2.5s ease-in-out infinite;
}

@keyframes pulseHalo {
    0%, 100% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.6;
    }
}

/* ---------- Hero Gradient Text Glow ---------- */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* ---------- Focus Styles ---------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .animate-fade-in-up,
    .animate-float,
    .animate-float-slow,
    .animate-float-slower,
    .scroll-reveal {
        animation: none !important;
        transition: none !important;
        opacity: 1;
        transform: none;
    }

    #cta a:first-child::after {
        display: none;
    }

    .feature-card:hover {
        transform: none;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    #navbar,
    #back-to-top {
        display: none !important;
    }

    #hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .feature-card,
    .testimonial-card {
        break-inside: avoid;
    }
}