/* === 设计变量 === */
:root {
  --bg-canvas: #F9F8F6;
  --bg-surface: #FFFFFF;
  --ink-primary: #0F0F0F;
  --ink-secondary: #4A4A4A;
  --ink-tertiary: #7A7A7A;
  --border-light: #E2DFDA;
  --border-medium: #C8C4BC;
  --accent: #111111;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 32px rgba(0, 0, 0, 0.08);
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max: 1120px;
  --spacing-section: clamp(64px, 10vw, 120px);
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg-canvas);
  color: var(--ink-primary);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; margin-bottom: 24px; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 600; margin-bottom: 20px; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; margin-bottom: 12px; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
section { padding: var(--spacing-section) 0; }

/* === 导航与页头 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 246, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink-primary);
  border-color: var(--ink-primary);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:focus-visible { outline: 3px solid var(--ink-tertiary); outline-offset: 4px; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-medium);
  color: var(--ink-primary);
}
.btn-outline:hover { background: var(--bg-surface); border-color: var(--ink-primary); }

/* === 卡片与组件 === */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  background: #EEE;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

/* === 表格 === */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: #F2F0EC; font-weight: 600; color: var(--ink-secondary); }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 500; }

/* === FAQ === */
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }
details summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-weight: 500;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 20px; color: var(--ink-secondary); line-height: 1.7; }

/* === 链接列表 === */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.link-list li a {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.link-list li a:hover { border-color: var(--ink-tertiary); }
.link-title { font-weight: 500; margin-bottom: 4px; }
.link-desc { font-size: 0.9rem; color: var(--ink-secondary); }

/* === 页脚 === */
.site-footer {
  background: var(--ink-primary);
  color: #CCC;
  padding: 64px 0 32px;
  margin-top: var(--spacing-section);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #FFF; margin-top: 0; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #AAA; transition: color 0.2s; }
.footer-col a:hover { color: #FFF; }
.footer-bottom { border-top: 1px solid #333; padding-top: 24px; text-align: center; font-size: 0.9rem; color: #777; }

/* === SVG 动效核心 === */
.svg-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sweep-line {
  stroke: var(--ink-primary);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.2));
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.animate-draw { animation: drawPath 6s ease-in-out infinite; }
.animate-fade { animation: fadeFloat 5s ease-in-out infinite; }
.animate-pulse { animation: softPulse 4s ease-in-out infinite; }

@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  40% { stroke-dashoffset: 0; }
  80% { stroke-dashoffset: -1; }
  100% { stroke-dashoffset: -1; }
}
@keyframes fadeFloat {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-6px); opacity: 1; }
}
@keyframes softPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.02); }
}

/* === 响应式与无障碍 === */
@media (max-width: 768px) {
  .nav ul { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .container { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
.focus-visible:focus-visible {
  outline: 3px solid var(--ink-primary);
  outline-offset: 4px;
}
