/* ==================== 设计变量 ==================== */
:root {
  --color-bg: #FDF8F3;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F4EDE5;
  --color-border: #E6DFD6;
  --color-text: #2B2926;
  --color-text-secondary: #6B635A;
  --color-primary: #6B8E7B;
  --color-primary-hover: #567A65;
  --color-accent-subtle: #EDF2EC;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-heading: var(--font-sans);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(43, 41, 38, 0.04);
  --shadow-md: 0 6px 16px rgba(43, 41, 38, 0.08);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1120px;
  --spacing-section: clamp(48px, 8vh, 96px);
  --spacing-element: 24px;
}

/* ==================== 基础重置与排版 ==================== */
*, *::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);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 流体字号 */
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; margin-bottom: 16px; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; margin-bottom: 20px; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.4; text-wrap: balance; margin-bottom: 10px; }
p { margin-bottom: 14px; color: var(--color-text-secondary); }
strong { font-weight: 600; color: var(--color-text); }

/* ==================== 布局容器 ==================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding: var(--spacing-section) 0; }
.grid-2 { display: grid; gap: 32px; }
.grid-3 { display: grid; gap: 24px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ==================== 导航与页头页脚 ==================== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(253, 248, 243, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.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 { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: none; gap: 24px; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-link { font-size: 0.95rem; font-weight: 500; padding: 6px 0; position: relative; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-primary); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: var(--color-primary); border-radius: 2px; }

.site-footer { background: var(--color-surface-alt); border-top: 1px solid var(--color-border); padding: 48px 0 32px; margin-top: var(--spacing-section); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; }
.footer-col h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; }
.footer-col a { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--color-text-secondary); }
.footer-col a:hover { color: var(--color-primary); }
.copyright { text-align: center; margin-top: 32px; font-size: 0.85rem; color: var(--color-text-secondary); }

/* ==================== 按钮 ==================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all var(--transition-base); min-height: 44px; }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-accent-subtle); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; min-height: 36px; }

/* ==================== 卡片与列表 ==================== */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); transition: transform var(--transition-base), box-shadow var(--transition-base); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-item { display: flex; gap: 16px; margin-bottom: 24px; }
.feature-icon { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--color-accent-subtle); border-radius: var(--radius-sm); color: var(--color-primary); }
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 36px; margin-bottom: 16px; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--color-primary); color: #fff; border-radius: 50%; font-size: 0.85rem; font-weight: 600; }

/* ==================== 表格 ==================== */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
th { background: var(--color-surface-alt); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td[role="img"] svg { width: 18px; height: 18px; stroke: var(--color-primary); }

/* ==================== 折叠面板 FAQ ==================== */
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; background: var(--color-surface); transition: box-shadow var(--transition-base); }
details[open] { box-shadow: var(--shadow-sm); }
summary { padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--color-accent-subtle); color: var(--color-primary); font-size: 0.9rem; transition: transform var(--transition-base); }
details[open] summary::before { transform: rotate(45deg); }
.details-body { padding: 0 20px 20px; font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.7; }

/* ==================== SVG 动效系统 ==================== */
.svg-anim-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
@keyframes drawPath { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.draw .svg-anim-path { animation: drawPath 2.4s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.breathe { animation: breathe 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.03); } }

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .draw, .draw *, .breathe, .breathe * { animation: none !important; animation-delay: 0s !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==================== 焦点与无障碍 ==================== */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
