/* ============================================
   车匠云 Official Website - Design System
   ============================================
   Style: Trust & Authority + Modern B2B SaaS
   Colors: Indigo-based professional palette
   Typography: Plus Jakarta Sans + Noto Sans SC
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Primary Colors - Indigo */
    --primary-50: #EEF2FF;
    --primary-100: #E0E7FF;
    --primary-200: #C7D2FE;
    --primary-300: #A5B4FC;
    --primary-400: #818CF8;
    --primary-500: #6366F1;
    --primary-600: #4F46E5;
    --primary-700: #4338CA;

    /* Neutral Colors - Slate */
    --neutral-50: #F8FAFC;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;

    /* Semantic Colors */
    --success: #22C55E;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --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);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Z-Index Scale */
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
    --z-max: 9999;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--neutral-700);
    background: white;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-600);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Focus States - Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

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

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--neutral-900);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--neutral-700);
    border: 1.5px solid var(--neutral-200);
}

.btn-outline:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
    background: var(--primary-50);
}

.btn-ghost {
    background: transparent;
    color: var(--neutral-600);
}

.btn-ghost:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-50);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-100);
    transition: all var(--transition-slow);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    letter-spacing: -0.01em;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: var(--space-1);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--neutral-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--neutral-900);
    background: var(--neutral-50);
}

.nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.header-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    z-index: calc(var(--z-max) + 1);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--neutral-700);
    transition: all var(--transition-fast);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: var(--z-max);
    padding: 80px var(--space-6) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-list li {
    border-bottom: 1px solid var(--neutral-100);
}

.mobile-nav-list a {
    display: block;
    padding: var(--space-5) 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--neutral-700);
    text-decoration: none;
}

.mobile-actions {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ============================================
   Main Content
   ============================================ */
.site-main {
    min-height: 100vh;
    padding-top: 72px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--neutral-900);
    color: var(--neutral-300);
    padding: var(--space-20) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid var(--neutral-800);
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    text-decoration: none;
}

.footer-logo span {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--neutral-400);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--neutral-400);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-contact h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: 0.875rem;
    color: var(--neutral-400);
}

.icon-sm {
    width: 16px;
    height: 16px;
    color: var(--primary-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) 0;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.footer-legal p {
    font-size: 0.8125rem;
    color: var(--neutral-500);
    margin: 0;
}

.footer-legal-links {
    display: flex;
    gap: var(--space-4);
}

.footer-legal-links a {
    font-size: 0.8125rem;
    color: var(--neutral-500);
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: var(--neutral-300);
}

.footer-icp {
    display: flex;
    gap: var(--space-4);
}

.footer-icp a {
    font-size: 0.8125rem;
    color: var(--neutral-500);
    text-decoration: none;
}

.footer-icp a:hover {
    color: var(--neutral-300);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    width: 48px;
    height: 48px;
    background: white;
    color: var(--primary-500);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: var(--z-40);
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    transform: translateY(-2px);
}

/* ============================================
   Section Styles
   ============================================ */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-16);
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--neutral-500);
    line-height: 1.6;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: var(--space-2);
    }

    .footer-icp {
        flex-direction: column;
        gap: var(--space-2);
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-menu {
        display: none !important;
    }

    .site-main {
        padding-top: 0;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
}
