/* =========================================
   1. Design Tokens & Variables
   ========================================= */
:root {
    /* 色板 */
    --color-dark-bg: #10112D;
    --color-paper: #F5F0E5;
    --color-text-main: #151523;
    --color-brand: #1416EB;
    --color-accent: #89ED6E;
    
    /* 字体 */
    --font-sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    
    /* 布局与间距 */
    --content-max: 1120px;
    --section-y: clamp(5rem, 10vw, 9rem);
    --gap: clamp(1.5rem, 3vw, 2.5rem);
    
    /* 组件形状 */
    --radius-card: 24px;
    --radius-btn: 999px;
    
    /* 阴影 */
    --card-shadow: 0 10px 28px -14px rgba(21, 21, 35, 0.15);
    --card-hover-shadow: 0 14px 32px -12px rgba(21, 21, 35, 0.25);
    
    /* 边框 */
    --border-subtle: 1px solid rgba(21, 21, 35, 0.08);
}

/* =========================================
   2. Reset & Base Typography
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-paper);
    color: var(--color-text-main);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* =========================================
   3. Layout Utilities
   ========================================= */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
    position: relative;
}

.section--dark {
    background-color: var(--color-dark-bg);
    color: var(--color-paper);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: var(--gap);
    align-items: center;
}

.text-center { text-align: center; }

/* =========================================
   4. Header & Navigation
   ========================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(245, 240, 229, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(21, 21, 35, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section--dark ~ .site-header,
.site-header.is-scrolled {
    background-color: rgba(16, 17, 45, 0.9);
    border-bottom-color: rgba(245, 240, 229, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

.brand img {
    height: 28px;
    width: auto;
}

.nav-list {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-main);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    opacity: 1;
    color: var(--color-brand);
}

.section--dark .nav-link {
    color: var(--color-paper);
}

.section--dark .nav-link:hover,
.section--dark .nav-link[aria-current="page"] {
    color: var(--color-accent);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    background-color: var(--color-accent);
    color: var(--color-dark-bg);
    font-weight: 700;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(137, 237, 110, 0.4);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* =========================================
   5. Typography & Headings
   ========================================= */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: inherit;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    max-width: 38em;
}

.label-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 1rem;
}

.label-tag--brand {
    background-color: rgba(20, 22, 235, 0.1);
    color: var(--color-brand);
}

.section--dark .label-tag--brand {
    background-color: rgba(137, 237, 110, 0.15);
    color: var(--color-accent);
}

.hl {
    color: var(--color-brand);
}

.section--dark .hl {
    color: var(--color-accent);
}

/* =========================================
   6. Components: Cards, Tables, Details
   ========================================= */
.card {
    background-color: #fff;
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section--dark .card {
    background-color: rgba(245, 240, 229, 0.05);
    border: 1px solid rgba(245, 240, 229, 0.1);
    box-shadow: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card__icon {
    display: block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(21, 21, 35, 0.1);
}

.section--dark .data-table th,
.section--dark .data-table td {
    border-bottom-color: rgba(245, 240, 229, 0.1);
    color: var(--color-paper);
}

.data-table th {
    font-weight: 700;
    color: var(--color-text-main);
}

.section--dark .data-table th {
    color: var(--color-paper);
}

.faq-item {
    border-bottom: 1px solid rgba(21, 21, 35, 0.1);
    padding: 16px 0;
}

.faq-item summary {
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-brand);
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-item p {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* =========================================
   7. SVG Animation Classes
   ========================================= */
.svg-node {
    animation: nodePulse 4s infinite ease-in-out;
}

.svg-node:nth-child(odd) {
    animation-delay: 0.5s;
}

.svg-node:nth-child(even) {
    animation-delay: 1.5s;
}

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.draw-line {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: drawPath 6s infinite linear;
}

@keyframes drawPath {
    0% { stroke-dashoffset: 1; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1; }
}

.float-element {
    animation: floatY 6s infinite ease-in-out;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* =========================================
   8. Footer
   ========================================= */
.site-footer {
    background-color: var(--color-dark-bg);
    color: var(--color-paper);
    padding: 3rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(245, 240, 229, 0.1);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-accent);
}

/* =========================================
   9. Accessibility & 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;
    }
    .svg-node, .draw-line, .float-element {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =========================================
   10. Responsive Tweaks
   ========================================= */
@media (max-width: 768px) {
    .nav-list {
        display: none; /* Simplified for this static demo, usually burger menu */
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2.2rem;
    }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
