/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-bg: #f7f4f0;
  --color-surface: #ffffff;
  --color-text-primary: #2c2a25;
  --color-text-secondary: #5a564e;
  --color-accent: #8b6b56;
  --color-accent-hover: #6d5342;
  --color-border: #e0dbd4;
  --color-highlight: #d4c5b3;
  --color-success: #5e7a64;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --space-unit: 0.25rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 8px rgba(44, 42, 37, 0.06);
  --shadow-hover: 0 8px 20px rgba(44, 42, 37, 0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ==================== 排版系统 ==================== */
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.2; color: var(--color-text-primary); }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 700; margin-bottom: 1.25rem; margin-top: 0.5rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-secondary); }
strong { font-weight: 600; color: var(--color-text-primary); }

/* ==================== 布局容器 ==================== */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; border-bottom: 1px solid var(--color-border); }
section:last-of-type { border-bottom: none; }
.grid-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 840px) { .grid-split { grid-template-columns: 1fr; } }

/* ==================== 页头与导航 ==================== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 244, 240, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); }
.nav-wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 36px; width: auto; vertical-align: middle; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.05)); }
.brand span { margin-left: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--color-text-primary); }
.nav-list { display: flex; gap: 2rem; }
.nav-link { font-weight: 500; color: var(--color-text-secondary); transition: color 0.2s ease; position: relative; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-accent); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--color-accent); border-radius: 2px; }
@media (max-width: 640px) { .nav-list { display: none; } }

/* ==================== 组件：按钮 ==================== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.8rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; transition: all 0.25s ease; text-align: center; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139, 107, 86, 0.25); }
.btn-outline { border: 1.5px solid var(--color-accent); color: var(--color-accent); background: transparent; }
.btn-outline:hover { background: var(--color-accent); color: #fff; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ==================== 组件：卡片与网格 ==================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card { background: var(--color-surface); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--color-border); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon { width: 44px; height: 44px; margin-bottom: 1rem; color: var(--color-accent); }
.card-icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.card-body h3 { margin-top: 0; margin-bottom: 0.75rem; }
.card-body p { margin-bottom: 0; font-size: 0.95rem; }

/* ==================== 组件：表格 ==================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-weight: 600; background: rgba(139, 107, 86, 0.06); color: var(--color-text-primary); }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(139, 107, 86, 0.03); }

/* ==================== 组件：FAQ (details/summary) ==================== */
.faq-list details { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.faq-list summary { padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--color-text-primary); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.25rem; color: var(--color-accent); transition: transform 0.2s ease; font-weight: 400; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 1.5rem 1.2rem; color: var(--color-text-secondary); margin-bottom: 0; }
.faq-list details:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ==================== 组件：文章卡片 ==================== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.article-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; display: flex; flex-direction: column; height: 100%; }
.article-date { font-size: 0.85rem; color: var(--color-accent); margin-bottom: 0.5rem; font-weight: 500; }
.article-card h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.article-card p { font-size: 0.9rem; flex-grow: 1; margin-bottom: 1rem; }
.article-card a { align-self: flex-start; font-weight: 600; font-size: 0.9rem; color: var(--color-accent); }
.article-card a:hover { text-decoration: underline; }

/* ==================== 组件：相关阅读 ==================== */
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.related-item { padding: 0.75rem 1rem; border-left: 3px solid var(--color-highlight); background: rgba(255,255,255,0.6); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.related-item a { display: block; font-weight: 500; font-size: 0.95rem; color: var(--color-text-primary); margin-bottom: 0.25rem; }
.related-item a:hover { color: var(--color-accent); }
.related-item span { font-size: 0.8rem; color: var(--color-text-secondary); }

/* ==================== 页脚 ==================== */
.site-footer { padding: 3rem 0; background: #ebe8e3; border-top: 1px solid var(--color-border); }
.footer-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand img { height: 32px; width: auto; }
.footer-nav ul { display: flex; gap: 1.5rem; }
.footer-nav a { font-size: 0.9rem; color: var(--color-text-secondary); }
.footer-nav a:hover { color: var(--color-accent); }
.copyright { width: 100%; text-align: center; margin-top: 2rem; font-size: 0.8rem; color: var(--color-text-secondary); opacity: 0.8; }

/* ==================== SVG 动效体系 ==================== */
.svg-geo-container { width: 100%; max-width: 320px; aspect-ratio: 1 / 1; margin: 0 auto; position: relative; }
.svg-geo-container svg { width: 100%; height: 100%; }
@keyframes assemble-spin {
  0% { transform: rotate(0deg) scale(0.92); opacity: 0.75; }
  50% { transform: rotate(180deg) scale(1.06); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.92); opacity: 0.75; }
}
@keyframes path-draw-cycle {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-5px); opacity: 1; }
}
.geo-shape-1 { animation: assemble-spin 14s cubic-bezier(0.4, 0, 0.2, 1) infinite; transform-box: fill-box; transform-origin: center; }
.geo-shape-2 { animation: assemble-spin 18s cubic-bezier(0.3, 0, 0.7, 1) infinite reverse; transform-box: fill-box; transform-origin: center; }
.geo-shape-3 { animation: assemble-spin 12s cubic-bezier(0.5, 0, 0.5, 1) infinite; transform-box: fill-box; transform-origin: center; }
.path-draw-anim { animation: path-draw-cycle 6s ease-in-out infinite; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.float-element { animation: float-pulse 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* ==================== 无障碍与响应式降级 ==================== */
@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;
  }
  .geo-shape-1, .geo-shape-2, .geo-shape-3, .path-draw-anim, .float-element { animation: none !important; }
}
@media (max-width: 640px) {
  .btn-group { flex-direction: column; }
  .btn { width: 100%; }
  h1 { font-size: 2rem; }
  section { padding: 3.5rem 0; }
}
