/* === 基础重置与变量 === */
:root {
    /* 色板 */
    --color-dark: #140E25;
    --color-paper: #FCFCFD;
    --color-text: #191523;
    --color-brand: #5214EB;
    --color-accent: #6EEDD2;
    
    /* 结构 Token */
    --radius-card: 8px;
    --radius-btn: 6px;
    --card-border: 0;
    --card-shadow: none;
    --section-y: clamp(3.5rem, 7vw, 6rem);
    --gap: clamp(1rem, 2vw, 1.75rem);
    --content-max: 1120px;
    
    /* 字体 */
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-paper);
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    padding-left: 0;
    list-style: none;
}

/* === 容器与排版 === */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

/* 面：纸面（默认） */
.paper-surface {
    background-color: var(--color-paper);
    color: var(--color-text);
}

.paper-surface h2, .paper-surface h3, .paper-surface p {
    color: var(--color-text);
}

.paper-surface .hl {
    color: var(--color-brand);
}

.paper-surface .label {
    color: var(--color-brand);
}

/* 面：深色面 */
.dark-surface {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.dark-surface h2, .dark-surface h3, .dark-surface p {
    color: var(--color-paper);
}

.dark-surface .hl {
    color: var(--color-accent);
}

.dark-surface .label {
    color: var(--color-accent);
}

/* 卡片（深色面上用于承载内容，恢复纸面取色） */
.card-light-on-dark {
    background-color: var(--color-paper);
    color: var(--color-text);
    border-radius: var(--radius-card);
    padding: var(--gap);
    box-shadow: var(--card-shadow);
    border: var(--card-border);
}

.card-light-on-dark h3, .card-light-on-dark p {
    color: var(--color-text);
}

.card-light-on-dark .hl {
    color: var(--color-brand);
}

.card-light-on-dark .label {
    color: var(--color-brand);
}

/* 标题系统 */
.label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1.5em 0;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 var(--gap) 0;
    text-wrap: balance;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75em 0;
    text-wrap: balance;
}

p {
    margin: 0 0 1em 0;
}

strong {
    font-weight: 700;
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    height: 52px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.dark-surface .btn-secondary {
    color: var(--color-paper);
    border-color: var(--color-paper);
}

/* === 页头与页脚 === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(252, 252, 253, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(25, 21, 35, 0.08);
    padding: 16px 0;
}

.dark-surface .site-header {
    background-color: rgba(20, 14, 37, 0.9);
    border-bottom-color: rgba(252, 252, 253, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.nav-list {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.site-footer {
    padding: 64px 0 32px 0;
    border-top: 1px solid rgba(25, 21, 35, 0.1);
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gap);
    margin-bottom: var(--gap);
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-col a:hover {
    opacity: 1;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.5;
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(25, 21, 35, 0.05);
}

/* === 组件：表格 === */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 400px; /* 保证在小屏幕上内容可读，不压缩过度 */
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

.dark-surface .data-table th, 
.dark-surface .data-table td {
    border-bottom-color: rgba(252, 252, 253, 0.1);
}

.data-table th {
    font-weight: 700;
    width: 40%;
}

/* === 组件：FAQ === */
.faq-item {
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
    margin-bottom: 16px;
}

.faq-item summary {
    padding: 16px 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin-bottom: 16px;
    opacity: 0.9;
}

/* === 组件：Tab (纯 CSS) === */
.tabs-wrapper {
    margin-top: 32px;
}

.tab-radio {
    display: none;
}

.tab-labels {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab-label {
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-content {
    display: none;
    padding: 16px 0;
}

#tab-1:checked ~ .tab-labels label[for="tab-1"],
#tab-2:checked ~ .tab-labels label[for="tab-2"],
#tab-3:checked ~ .tab-labels label[for="tab-3"],
#tab-4:checked ~ .tab-labels label[for="tab-4"] {
    border-bottom-color: var(--color-brand);
    color: var(--color-brand);
}

#tab-1:checked ~ .tab-content-1,
#tab-2:checked ~ .tab-content-2,
#tab-3:checked ~ .tab-content-3,
#tab-4:checked ~ .tab-content-4 {
    display: block;
}

/* === 响应式调整 === */
@media (max-width: 768px) {
    .nav-list {
        display: none; /* 简化移动端，实际项目需汉堡菜单，此处保持静态简洁 */
    }
    
    .header-inner {
        justify-content: center;
    }
    
    .logo-group {
        margin-right: auto;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* === SVG 动效 (CSS Keyframes) === */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes draw-line {
    0% { stroke-dashoffset: 1; }
    100% { stroke-dashoffset: 0; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 动效类 */
.anim-float {
    animation: float 6s ease-in-out infinite;
}

.anim-draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: draw-line 2s ease forwards;
}

.anim-fade-in {
    animation: fade-in-up 1s ease forwards;
}

.anim-spin {
    animation: spin-slow 20s linear infinite;
    transform-box: fill-box;
    transform-origin: center;
}

/* 延迟控制 */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1.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;
    }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
