/* 全局重置与基础设定 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* 核心色板 */
    --color-dark: #121531;
    --color-paper: #E8E9EA;
    --color-text: #151723;
    --color-brand: #142CEB;
    --color-accent: #ED7D6E;
    
    /* 结构性设计 Token */
    --radius-card: 24px;
    --radius-btn: 999px;
    --card-border: 2px solid var(--color-text);
    --card-shadow: 4px 4px 0 var(--color-text);
    --section-y: clamp(5rem, 10vw, 9rem);
    --gap: clamp(1.5rem, 3vw, 2.5rem);
    --content-max: 1120px;
    
    /* 字体栈 */
    --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-paper);
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* 容器与排版 */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gap);
}

.section {
    padding-block: var(--section-y);
    position: relative;
}

/* 颜色主题类 */
.paper-surface {
    background-color: var(--color-paper);
    color: var(--color-text);
}

.dark-surface {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.dark-surface .hl {
    color: var(--color-accent);
}

.paper-surface .hl {
    color: var(--color-brand);
}

/* 眉标 (Kicker) */
.kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.paper-surface .kicker {
    color: var(--color-brand);
}

.dark-surface .kicker {
    color: var(--color-accent);
}

/* 标题系统 */
h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
    max-width: 38em;
}

/* 按钮组件 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 52px;
    padding-inline: 2rem;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* 主按钮：强调色底，深色字 */
.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-dark);
    box-shadow: 0 4px 12px rgba(237, 125, 110, 0.4);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

/* 次按钮：描边 */
.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-text);
    color: var(--color-text);
}

.dark-surface .btn-secondary {
    border-color: var(--color-paper);
    color: var(--color-paper);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
}

.dark-surface .btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--color-paper);
    border-bottom: 1px solid var(--color-text);
    padding-block: 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--color-brand);
}

.dark-surface .nav-link:hover {
    color: var(--color-accent);
}

.nav-link[aria-current="page"] {
    color: var(--color-brand);
    border-bottom: 2px solid var(--color-brand);
}

.dark-surface .nav-link[aria-current="page"] {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

@media (max-width: 768px) {
    .nav-list {
        display: none; /* 简化移动端处理，仅保留主按钮 */
    }
    .header .btn {
        display: none; /* 移动端首屏暂隐主按钮，聚焦内容 */
    }
}

/* 底部 Footer */
.footer {
    padding-block: 4rem;
    border-top: 1px solid var(--color-text);
    margin-top: 2rem;
}

.dark-surface .footer {
    border-color: rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    opacity: 0.7;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    text-decoration: underline;
}

/* 卡片样式 */
.card {
    background-color: var(--color-paper);
    border: var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    transition: transform 0.2s ease;
}

.dark-surface .card {
    background-color: var(--color-dark);
    border-color: var(--color-paper);
    box-shadow: 4px 4px 0 var(--color-paper);
}

.card:hover {
    transform: translateY(-4px);
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
    border: var(--card-border);
    border-radius: var(--radius-card);
    background-color: var(--color-paper);
}

.dark-surface .table-wrapper {
    background-color: var(--color-dark);
    border-color: var(--color-paper);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid currentColor;
}

th {
    font-weight: 700;
    opacity: 0.8;
    background-color: rgba(0,0,0,0.03);
}

.dark-surface th {
    background-color: rgba(255,255,255,0.05);
}

tr:last-child th, tr:last-child td {
    border-bottom: none;
}

/* FAQ 样式 */
details {
    border: var(--card-border);
    border-radius: var(--radius-card);
    margin-bottom: 1rem;
    background-color: var(--color-paper);
    overflow: hidden;
}

.dark-surface details {
    background-color: var(--color-dark);
    border-color: var(--color-paper);
}

summary {
    padding: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
}

details[open] summary::after {
    content: "-";
}

details > div {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid currentColor;
    margin-top: 0;
    padding-top: 1rem;
}

/* 步骤条样式 */
.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-num {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background-color: var(--color-accent);
    color: var(--color-dark);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* SVG 动画关键帧 */
@keyframes float-layer-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes float-layer-2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes float-layer-3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes pulse-opacity {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes dash-flow {
    to { stroke-dashoffset: -20; }
}

/* 动画应用类 */
.anim-float-1 { animation: float-layer-1 6s ease-in-out infinite; }
.anim-float-2 { animation: float-layer-2 7s ease-in-out infinite; }
.anim-float-3 { animation: float-layer-3 5s ease-in-out infinite; }
.anim-pulse { animation: pulse-opacity 4s ease-in-out infinite; }
.anim-dash { 
    stroke-dasharray: 10; 
    animation: dash-flow 1s linear infinite; 
}

/* 减少动态效果偏好 */
@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;
    }
}
