/* ==================== 设计变量与基础重置 ==================== */
:root {
  --bg-page: #F8F6F1;
  --bg-surface: #FFFFFF;
  --bg-soft: #EFECE6;
  --color-text: #2A2825;
  --color-text-muted: #6B665F;
  --color-primary: #4A7C59;
  --color-primary-hover: #3A6347;
  --color-accent: #D4A373;
  --color-border: #DDD8CF;
  --color-danger: #A63A3A;
  --color-success: #3D8B5F;
  
  --font-head: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --container-max: 1180px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(42, 40, 37, 0.06);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================== 排版系统 ==================== */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: var(--color-text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: var(--space-md); position: relative; display: inline-block; }
h2::after { content: ''; display: block; width: 64px; height: 4px; background: var(--color-primary); margin-top: 12px; border-radius: 2px; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); margin-bottom: var(--space-xs); }
p { margin-bottom: 1rem; color: var(--color-text-muted); }
strong { font-weight: 600; color: var(--color-text); }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-primary-hover); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

/* ==================== 布局与网格 ==================== */
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--bg-surface); }
.grid-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
@media (max-width: 768px) {
  .grid-bento { grid-template-columns: 1fr; }
}

/* ==================== 组件：按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 1rem; cursor: pointer; border: none; transition: all var(--transition-base);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(74, 124, 89, 0.25); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-secondary:hover { background: rgba(74, 124, 89, 0.08); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* ==================== 组件：卡片 ==================== */
.card {
  background: var(--bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-md); transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.card-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-sm); color: var(--color-primary); }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-xs); display: block; }

/* ==================== 组件：表格 ==================== */
.table-wrapper { overflow-x: auto; margin-top: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--bg-surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--bg-soft); font-weight: 600; color: var(--color-text); }
tr:last-child td { border-bottom: none; }
td { color: var(--color-text-muted); }

/* ==================== 组件：FAQ ==================== */
details { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; background: var(--bg-surface); transition: box-shadow var(--transition-base); }
details[open] { box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--color-primary); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 1.25rem 1rem; margin: 0; font-size: 0.95rem; }

/* ==================== SVG 动效系统 ==================== */
.svg-animate { width: 100%; height: auto; display: block; overflow: visible; }
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-stroke 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards, breathe 4s ease-in-out infinite 2.5s;
}
.animate-group { transform-box: fill-box; transform-origin: center; animation: breathe 4s ease-in-out infinite 2.5s; }
@keyframes draw-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { opacity: 0.9; transform: scale(1); } 50% { opacity: 1; transform: scale(1.015); } }

/* ==================== 响应式与无障碍 ==================== */
@media (max-width: 640px) {
  .section { padding: var(--space-lg) 0; }
  h1 { font-size: 2rem; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .draw-path, .animate-group { animation: none !important; }
  html { scroll-behavior: auto; }
}
.skip-link { position: absolute; top: -100px; left: 1rem; background: var(--color-primary); color: #fff; padding: 0.5rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }
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; }
