/* 设计变量 */
:root {
  --bg-primary: #F9F7F4;
  --bg-surface: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #3A3A3A;
  --text-muted: #666666;
  --border: #E5E1DB;
  --border-strong: #C4BFB6;
  --focus: #0052CC;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.12);
  --font-heading: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --container: 1200px;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
button, .btn { cursor: pointer; font-family: inherit; border: none; background: none; }

/* 容器与网格 */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-md); }
.grid-auto { display: grid; gap: var(--space-md); }
@media (min-width: 768px) { .grid-auto { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-auto { grid-template-columns: repeat(3, 1fr); } }

/* 排版系统 */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--text-secondary); }
.section { padding: var(--space-xl) 0; position: relative; }
.section-header { text-align: center; max-width: 800px; margin: 0 auto var(--space-lg); }

/* 导航与页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249,247,244,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1.1rem; }
.nav { display: flex; gap: var(--space-md); }
.nav-link { font-weight: 500; padding: 0.5rem 0; position: relative; }
.nav-link[aria-current="page"] { color: var(--focus); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--focus);
}
.footer { background: var(--bg-surface); border-top: 1px solid var(--border); padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-lg); }
.footer-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col h4 { font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.copyright { text-align: center; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text-primary); color: #fff; }
.btn-primary:hover { background: #222; box-shadow: var(--shadow-md); }
.btn-outline { border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary); }
.btn-outline:hover { border-color: var(--text-primary); }

/* 组件：卡片 */
.card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md); transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-xs); }
.card-actions { margin-top: var(--space-sm); }

/* 组件：表格 */
.table-wrapper { 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); 
  border-radius: var(--radius-md); 
  background: var(--bg-surface);
  width: 100%;
  min-width: 0;
}
table { width: 100%; border-collapse: collapse; box-sizing: border-box; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: normal; }
tr:last-child td { border-bottom: none; }

/* 组件：FAQ / Details */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.summary { padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 600; list-style: none; position: relative; }
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); font-weight: 400; transition: transform var(--transition-base); }
details[open] .summary::after { content: "−"; }
.summary:hover { background: #FAFAF8; }
.faq-answer { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); }
.faq-answer p { margin-bottom: 0.5rem; }

/* 组件：步骤 */
.step-list { counter-reset: step; list-style: none; display: flex; flex-direction: column; gap: var(--space-md); }
.step-item { position: relative; padding-left: 3rem; }
.step-item::before {
  content: counter(step); counter-increment: step;
  position: absolute; left: 0; top: 0; width: 2rem; height: 2rem;
  background: var(--text-primary); color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.step-title { font-weight: 600; margin-bottom: 0.25rem; }

/* SVG 动画基础 */
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-float-delay-1 { animation-delay: -1.5s; }
.anim-float-delay-2 { animation-delay: -3s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.stroke-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.stroke-animate { animation: draw-stroke 3s ease forwards; }
@keyframes draw-stroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.svg-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* 减少动态效果支持 */
@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;
  }
  .anim-float, .stroke-animate { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.8rem 0; }
  .nav { order: 3; width: 100%; padding-top: 0.5rem; border-top: 1px solid var(--border); justify-content: center; }
  h1 { font-size: 1.8rem; }
  .section { padding: var(--space-lg) 0; }
}
