/* ============================================================
   WPK微扑克 - External Stylesheet
   Primary Color: indigo-600 (#4f46e5)
   Design: SaaS, clean, white space, large rounded corners, shadows
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --transition-fast: 200ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
}

/* ---------- Global ---------- */
html {
    scroll-behavior: smooth;
}

::selection {
    background-color: var(--primary);
    color: white;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal), padding var(--transition-normal);
}

#navbar.scrolled {
    background-color: rgba(49, 46, 129, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#navbar .logo-text {
    background: linear-gradient(135deg, #c7d2fe, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width var(--transition-normal);
    border-radius: 2px;
}
.nav-link:hover::after { width: 100%; }

#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ============================================================
   HERO
   ============================================================ */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.4) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.feature-card {
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-100);
}
.feature-card .w-14 {
    transition: background-color var(--transition-slow), transform var(--transition-slow);
}
.feature-card:hover .w-14 {
    transform: scale(1.1) rotate(-5deg);
}

/* ============================================================
   STATS COUNTERS
   ============================================================ */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
#testimonials .bg-white {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
#testimonials .bg-white:hover { transform: translateY(-6px); }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-item {
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.faq-item:hover { border-color: var(--primary-100); }
.faq-toggle {
    cursor: pointer;
    transition: background-color var(--transition-fast);
}
.faq-toggle:hover { background-color: rgba(79, 70, 229, 0.04); }
.faq-icon {
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}
.faq-icon.open { transform: rotate(180deg); }
.faq-content {
    animation: fadeInDown 0.35s ease-out;
}

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

/* ============================================================
   CTA
   ============================================================ */
#cta a {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer a { transition: color var(--transition-fast); }
footer .w-10 {
    transition: background-color var(--transition-normal), transform var(--transition-normal);
}
footer .w-10:hover { transform: translateY(-3px); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-input {
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-fast);
}
.contact-input:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.contact-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.contact-input.success {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.form-error { animation: shake 0.4s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   ABOUT PAGE - TIMELINE
   ============================================================ */
#milestones .w-4 {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
#milestones .group:hover .w-4 {
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.2);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in-up { animation: fadeInUp 0.6s ease-out both; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease-out both; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scale-in { animation: scaleIn 0.4s ease-out both; }
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.pulse-anim { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    #hero h1 { font-size: 2.5rem; line-height: 1.2; }
    #hero .text-lg { font-size: 1rem; }
}

@media (max-width: 768px) {
    #hero {
        padding-top: 7rem;
        padding-bottom: 4rem;
        text-align: center;
    }
    #hero h1 { font-size: 2rem; }
    #hero .flex-wrap { justify-content: center; }
    #features h2, #testimonials h2, #faq h2, #stats h2 { font-size: 1.75rem; }
    #stats .text-6xl { font-size: 2.5rem; }
    .faq-toggle span { font-size: 0.95rem; }
    footer .grid { gap: 2rem; }
    #milestones .md\:w-1\/2 { width: auto; }
    #milestones .md\:pl-16 { padding-left: 3rem; }
}

@media (max-width: 480px) {
    #hero h1 { font-size: 1.75rem; }
    #hero .text-lg { font-size: 0.95rem; }
    #features h2, #testimonials h2 { font-size: 1.5rem; }
    #stats .grid-cols-2 { grid-template-columns: 1fr; gap: 2rem; }
    #stats .counter { font-size: 2.5rem; }
    .feature-card { padding: 1.5rem; }
    footer .text-sm { text-align: center; }
    footer .grid { grid-template-columns: 1fr; text-align: center; }
    footer .flex.items-start { justify-content: center; }
    footer .flex.space-x-4 { justify-content: center; }
    #contact-form .grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #navbar, #cta, footer, .faq-content, #mobile-menu { display: none !important; }
    body { font-size: 12pt; color: #000; }
    a { text-decoration: underline; }
}

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

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    font-size: 0.875rem;
    transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }
