/* === 设计变量 === */
:root {
  --bg-dark: #240F29;
  --bg-paper: #F6F3F7;
  --text-body: #201523;
  --brand: #A711CF;
  --accent: #ED6E73;
  --content-max: 1120px;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --line-color: rgba(32, 21, 35, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* === 基础重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  background: var(--bg-paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器与网格 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.grid-2 { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* === 排版 === */
h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) * 0.75); }
p { margin-bottom: var(--gap); max-width: 38em; }
.hero-sub { font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.6; opacity: 0.85; }
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: calc(var(--gap) * 0.5);
  text-transform: uppercase;
}
.paper-section .section-label { color: var(--brand); }
.dark-section .section-label { color: var(--accent); }
.hl { color: var(--brand); }
.dark-section .hl { color: var(--accent); }

/* === 区块通用 === */
.section { padding: var(--section-y) 0; border-bottom: 1px solid var(--line-color); }
.section:last-child { border-bottom: none; }
.dark-section { background: var(--bg-dark); color: var(--bg-paper); }
.dark-section p, .dark-section li { color: var(--bg-paper); }
.dark-section .paper-card { background: var(--bg-paper); color: var(--text-body); }
.dark-section .paper-card p, .dark-section .paper-card li { color: var(--text-body); }

/* === 页头 === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-color);
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; opacity: 0.8; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 1; color: var(--brand); }
.dark-section nav a { color: var(--bg-paper); }
.dark-section nav a:hover, .dark-section nav a[aria-current="page"] { color: var(--accent); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: currentColor; }
@media (max-width: 767px) {
  nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-paper); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--line-color); }
  nav.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 20px;
  font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { transform: translateY(-1px); background: #d95c60; }
.btn-secondary { background: transparent; border: 1px solid var(--text-body); color: var(--text-body); }
.paper-section .btn-secondary { border-color: var(--text-body); color: var(--text-body); }
.dark-section .btn-secondary { border-color: var(--bg-paper); color: var(--bg-paper); }
.btn-secondary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--gap); }

/* === 卡片 === */
.card {
  background: rgba(32, 21, 35, 0.03);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: background 0.2s;
}
.paper-section .card { background: rgba(167, 17, 207, 0.04); }
.dark-section .paper-card { background: var(--bg-paper); }
.card:hover { background: rgba(32, 21, 35, 0.06); }
.paper-section .card:hover { background: rgba(167, 17, 207, 0.08); }

/* === 表格 === */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 320px; }
.data-table th, .data-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-color); }
.data-table th { font-weight: 600; white-space: nowrap; }
.dark-section .data-table th, .dark-section .data-table td { border-color: rgba(246, 243, 247, 0.15); }

/* === FAQ === */
.faq-item { border-bottom: 1px solid var(--line-color); }
.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.2rem; font-weight: 400; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 16px; line-height: 1.65; }

/* === 编号徽标 === */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--accent); color: var(--bg-dark);
  font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
}
.timeline-item { display: flex; gap: 16px; align-items: flex-start; }
.timeline-content { padding-top: 4px; }

/* === SVG 图标 === */
.icon { width: 20px; height: 20px; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon-lg { width: 24px; height: 24px; }
.icon-sm { width: 16px; height: 16px; }

/* === SVG 动效 === */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes rotateAlign { 0% { transform: rotate(-12deg) translate(-4px, 4px); opacity: 0.6; } 100% { transform: rotate(0deg) translate(0, 0); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.anim-float { animation: float 4s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw.active { animation: dash 2s ease forwards; }
.anim-rotate { animation: rotateAlign 5s cubic-bezier(0.25, 1, 0.5, 1) forwards; transform-box: fill-box; transform-origin: center; }
.anim-slide { animation: slideIn 1.5s ease forwards; opacity: 0; }

.svg-layer { position: relative; width: 100%; height: auto; max-width: 100%; }
.svg-layer svg { width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-float, .anim-breathe, .anim-draw, .anim-rotate, .anim-slide { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* === 新闻卡片 === */
.news-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { padding: 20px; border-bottom: 1px solid var(--line-color); }
.news-card time { font-size: 0.8rem; opacity: 0.7; margin-bottom: 8px; display: block; }
.news-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.news-card p { font-size: 0.9rem; margin: 0; line-height: 1.55; }

/* === 场景走查 === */
.scenario { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .scenario { grid-template-columns: 1fr 1fr; } }
.scenario-meta { font-size: 0.85rem; opacity: 0.8; margin-bottom: 8px; }
.scenario-steps { counter-reset: step; }
.scenario-steps li { counter-increment: step; padding-left: 28px; position: relative; margin-bottom: 12px; }
.scenario-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: var(--accent); color: var(--bg-dark); font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dark-section .scenario-steps li::before { background: var(--accent); color: var(--bg-dark); }
.result-box { margin-top: 12px; padding: 12px; background: rgba(167, 17, 207, 0.06); border-left: 3px solid var(--brand); font-size: 0.9rem; }
.dark-section .result-box { background: rgba(237, 110, 115, 0.12); border-left-color: var(--accent); }
