/* =========================================
   1. 设计变量与基础重置
   ========================================= */
:root {
    /* 色板 */
    --color-dark: #141838;
    --color-paper: #FCFCFD;
    --color-text: #151723;
    --color-brand: #142CEB;
    --color-accent: #6EAFED;

    /* 结构性 Token */
    --radius-card: 8px;
    --radius-btn: 6px;
    --card-border: 2px solid var(--color-text);
    --card-shadow: 4px 4px 0 var(--color-text);
    --section-y: clamp(2.5rem, 5vw, 4rem);
    --gap: clamp(0.75rem, 1.5vw, 1.25rem);
    --content-max: 1120px;
    
    /* 排版 */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-paper);
    line-height: 1.55;
    font-size: 16px;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* =========================================
   2. 布局容器与通用组件
   ========================================= */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-block: var(--section-y);
    position: relative;
}

/* 面色切换 */
.section--dark {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.section--paper {
    background-color: var(--color-paper);
    color: var(--color-text);
}

/* 眉标 */
.label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--gap);
    opacity: 0.8;
}

.section--paper .label { color: var(--color-brand); }
.section--dark .label { color: var(--color-accent); }

/* 标题系统 */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    margin-bottom: var(--gap);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: calc(var(--gap) * 1.5);
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: var(--gap);
}

/* 关键词高亮 */
.hl {
    color: var(--color-brand);
}

.section--dark .hl {
    color: var(--color-accent);
}

/* 按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    border: none;
}

.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.btn--primary:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.btn--secondary {
    background: transparent;
    border: 2px solid var(--color-text);
    color: var(--color-text);
}

.section--dark .btn--secondary {
    border-color: var(--color-paper);
    color: var(--color-paper);
}

.btn--secondary:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

/* 图标 */
.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* 卡片系统（硬阴影风格） */
.card {
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-card);
    padding: var(--gap);
    background-color: var(--color-paper);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.section--dark .card {
    background-color: var(--color-dark);
    /* 深色面上的卡片保持纸面色取法，但边框可以稍微柔和一点或者保持一致 */
    border-color: var(--color-paper); 
    box-shadow: 4px 4px 0 var(--color-accent);
    color: var(--color-paper);
}

/* =========================================
   3. 页头与页脚
   ========================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-paper);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 16px 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-text);
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav__link {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.nav__link:hover {
    color: var(--color-brand);
}

.nav__link[aria-current="page"] {
    color: var(--color-brand);
}

.nav__link[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-brand);
}

@media (max-width: 768px) {
    .nav { display: none; } /* 简化处理，移动端隐藏导航或改为汉堡菜单，此处为静态单页侧重内容展示 */
}

.footer {
    background-color: var(--color-dark);
    color: var(--color-paper);
    padding: 64px 0 32px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.footer__col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.footer__col ul li {
    margin-bottom: 8px;
}

.footer__col a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* =========================================
   4. 表格与列表
   ========================================= */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: var(--card-border);
    border-radius: var(--radius-card);
}

table {
    min-width: 640px;
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

th {
    background-color: rgba(0,0,0,0.03);
    font-weight: 700;
}

td strong {
    font-weight: 700;
}

tr:last-child th, tr:last-child td {
    border-bottom: none;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--color-brand);
    border-radius: 2px;
}

.section--dark .feature-list li::before {
    background-color: var(--color-accent);
}

/* =========================================
   5. FAQ 组件
   ========================================= */
.faq-item {
    border: var(--card-border);
    border-radius: var(--radius-card);
    margin-bottom: 12px;
    overflow: hidden;
    background-color: var(--color-paper);
}

.faq-item summary {
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background-color: rgba(0,0,0,0.02);
}

.faq-item p {
    padding: 0 24px 16px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.9;
}

/* =========================================
   6. SVG 动效系统
   ========================================= */
.svg-visual {
    width: 100%;
    height: auto;
    max-width: 600px;
    margin: 0 auto;
}

/* 网格节点点亮动画 */
@keyframes grid-light {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.grid-node {
    fill: currentColor;
    opacity: 0.2;
    transform-origin: center;
    transform-box: fill-box;
    animation: grid-light 3s infinite ease-in-out;
}

/* 延迟类，用于依次点亮 */
.delay-1 { animation-delay: 0.0s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.8s; }
.delay-4 { animation-delay: 1.2s; }
.delay-5 { animation-delay: 1.6s; }
.delay-6 { animation-delay: 2.0s; }

/* 减少动态效果媒体查询 */
@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;
    }
    .grid-node {
        opacity: 1;
        transform: scale(1);
    }
}
