/* 设计变量与基础重置 */
:root {
  --color-bg: #f7f4ef;
  --color-surface: #ffffff;
  --color-primary: #5a7d6f;
  --color-primary-hover: #466356;
  --color-secondary: #8b7355;
  --color-text: #2c3329;
  --color-text-muted: #5a6358;
  --color-border: #e2dfd8;
  --color-accent: #a68b66;
  --spacing-page: clamp(1rem, 2.5vw, 3rem);
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-card: 0 4px 12px rgba(44, 51, 41, 0.06);
  --shadow-focus: 0 0 0 3px rgba(90, 125, 111, 0.35);
  --font-main: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-secondary); }
a:focus-visible, button:focus-visible, summary:focus-visible, details:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
h1, h2, h3, h4 { margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3.2rem); line-height: 1.15; text-wrap: balance; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--color-text); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--color-text); }
p { margin: 0 0 1rem; max-width: 70ch; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

/* 布局容器 */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--spacing-page); }
.section { padding: 4rem 0; border-bottom: 1px solid var(--color-border); }
.section:last-child { border-bottom: none; }
.grid-2 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* 导航与页头 */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.logo img { height: 32px; width: auto; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-link { font-size: 0.95rem; font-weight: 500; padding: 0.4rem 0; position: relative; }
.nav-link[aria-current="page"] { color: var(--color-primary); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--color-primary); }

/* 页脚 */
.site-footer { background: var(--color-text); color: #e8e6e1; padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-title { color: #fff; font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.5rem; }
.footer-list a { color: #a8a59e; }
.footer-bottom { text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #3a4138; font-size: 0.85rem; color: #7a776f; }

/* 按钮组件 */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff;
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--color-primary-hover); }
.btn:active { transform: scale(0.98); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: rgba(90, 125, 111, 0.08); }

/* 卡片与表格 */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-card); transition: box-shadow 0.2s, border-color 0.2s; }
.card:hover { border-color: var(--color-accent); box-shadow: 0 6px 16px rgba(44, 51, 41, 0.1); }
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.data-table th { background: #f4f1eb; font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ 组件 */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 1rem 1.25rem; transition: box-shadow 0.2s; }
details[open] { box-shadow: 0 4px 10px rgba(44, 51, 41, 0.08); }
summary { font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 1.5rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { content: "−"; }
details p { margin: 0.8rem 0 0; color: var(--color-text-muted); font-size: 0.95rem; }

/* SVG 动效基础 */
.svg-animated { width: 100%; height: auto; max-width: 400px; }
.geo-shape { fill: none; stroke: var(--color-primary); stroke-width: 1.5; }
.geo-fill { fill: var(--color-secondary); opacity: 0.85; }
.geo-line { fill: none; stroke: var(--color-text-muted); stroke-width: 1; stroke-dasharray: 4 4; }

@keyframes rotate-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes align-sync {
  0% { transform: translateX(-12px) translateY(-8px); }
  50% { transform: translateX(6px) translateY(4px); }
  100% { transform: translateX(0) translateY(0); }
}
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.anim-rotate { animation: rotate-slow 12s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-align { animation: align-sync 6s ease-in-out infinite alternate; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 3s ease-out forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 页面特定微调 */
.hero-section { padding: 5rem 0 3rem; }
.hero-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 768px) { .hero-layout { grid-template-columns: 1fr; } }
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: 2.5rem; margin-bottom: 1.2rem; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; background: var(--color-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.news-card time { display: block; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.4rem; }
.related-list { list-style: none; padding: 0; display: grid; gap: 0.8rem; }
.related-list a { display: flex; align-items: baseline; gap: 0.5rem; }
.related-list a::before { content: "→"; color: var(--color-accent); font-weight: 700; }
.icon-box { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--color-primary); border-radius: 8px; flex-shrink: 0; }
.feature-item { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon { margin-top: 0.15rem; }
.interface-mock { background: #f9f7f3; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem; display: grid; grid-template-columns: 200px 1fr; gap: 1rem; min-height: 300px; }
.mock-sidebar { background: #edeae4; border-radius: var(--radius-sm); padding: 0.5rem; }
.mock-chat { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.8rem; position: relative; }
.mock-bubble { padding: 0.6rem 0.8rem; border-radius: 8px; margin-bottom: 0.6rem; max-width: 80%; font-size: 0.85rem; }
.bubble-in { background: #f0ebe3; align-self: flex-start; }
.bubble-out { background: var(--color-primary); color: #fff; margin-left: auto; }
.mock-input { position: absolute; bottom: 0.8rem; left: 0.8rem; right: 0.8rem; height: 32px; background: #f4f1eb; border-radius: 16px; border: 1px solid var(--color-border); }
