/* ================= 设计变量与基础重置 ================= */
:root {
  --color-clay: #8C6B5D;
  --color-clay-light: #A8897B;
  --color-olive: #5A7247;
  --color-olive-light: #7A9468;
  --color-sand: #F4F0EA;
  --color-sand-dark: #E8E2DA;
  --color-bark: #2D2622;
  --color-bark-light: #4A423C;
  --color-moss: #7A9468;
  --color-stone: #D9D3CB;
  --color-white: #FFFFFF;
  
  --font-stack: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-title-weight: 800;
  --font-body-weight: 400;
  --text-tracking-tight: -0.02em;
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(45, 38, 34, 0.06);
  --shadow-hover: 0 8px 24px rgba(45, 38, 34, 0.1);
  
  --container-max: 1120px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-stack);
  font-weight: var(--font-body-weight);
  line-height: 1.65;
  color: var(--color-bark);
  background-color: var(--color-sand);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease, transform 0.2s ease; }
ul, ol { list-style: none; }

/* ================= 排版系统 ================= */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
section { padding: var(--space-xxl) 0; position: relative; }
.section-header { text-align: center; margin-bottom: var(--space-xl); max-width: 780px; margin-left: auto; margin-right: auto; }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-title-weight);
  letter-spacing: var(--text-tracking-tight);
  color: var(--color-bark);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  text-wrap: balance;
}
.section-desc {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--color-bark-light);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ================= 头部与导航 ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 240, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-stone);
  height: var(--header-height);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-sm); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: var(--font-title-weight); letter-spacing: var(--text-tracking-tight); color: var(--color-bark); font-size: 1.1rem; }
.nav-links { display: flex; gap: var(--space-md); align-items: center; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm); transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: rgba(90, 114, 71, 0.08); color: var(--color-olive); }
.nav-links a[aria-current="page"] { font-weight: 700; }

/* ================= 按钮与交互 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all 0.25s ease; border: none; text-wrap: balance;
}
.btn-primary { background: var(--color-olive); color: var(--color-white); }
.btn-primary:hover { background: var(--color-olive-light); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-bark-light); color: var(--color-bark); }
.btn-outline:hover { border-color: var(--color-olive); color: var(--color-olive); background: rgba(90, 114, 71, 0.05); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--color-olive); outline-offset: 2px; }

/* ================= 卡片与网格 ================= */
.grid-auto { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--color-white); border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-card); transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(217, 211, 203, 0.5);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-icon { width: 44px; height: 44px; margin-bottom: var(--space-md); color: var(--color-olive); }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: var(--space-xs); letter-spacing: var(--text-tracking-tight); }
.card p { font-size: 0.95rem; color: var(--color-bark-light); line-height: 1.65; }

/* ================= 表格 ================= */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); background: var(--color-white); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--color-stone); font-size: 0.95rem; }
th { background: var(--color-sand-dark); font-weight: 600; color: var(--color-bark); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td strong { color: var(--color-olive); }

/* ================= 详情折叠 (FAQ) ================= */
.faq-list { display: flex; flex-direction: column; gap: var(--space-md); max-width: 800px; margin: 0 auto; }
details { background: var(--color-white); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); box-shadow: var(--shadow-card); transition: box-shadow 0.2s; }
details[open] { box-shadow: var(--shadow-hover); }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; align-items: center; gap: var(--space-sm); user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--color-olive); border-bottom: 2px solid var(--color-olive); transform: rotate(45deg); transition: transform 0.2s; flex-shrink: 0; }
details[open] summary::before { transform: rotate(-45deg); }
.details-content { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px dashed var(--color-stone); font-size: 0.95rem; color: var(--color-bark-light); line-height: 1.7; }

/* ================= SVG 动效系统 ================= */
.svg-container { display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.svg-draw {
  path, circle, rect, polyline, polygon {
    fill: none; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 1; stroke-dashoffset: 0;
    animation: draw-line 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }
}
.svg-breathe { animation: breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes draw-line {
  0%, 100% { stroke-dashoffset: 0; opacity: 1; }
  40%, 60% { stroke-dashoffset: 1; opacity: 0.8; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .svg-draw path, .svg-draw circle, .svg-draw rect, .svg-draw polyline, .svg-draw polygon,
  .svg-breathe { animation: none !important; }
  .svg-breathe { transform: none !important; }
}

/* ================= 响应式适配 ================= */
@media (max-width: 768px) {
  .nav-links { display: none; }
  section { padding: var(--space-xl) 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .split-layout { flex-direction: column; }
}
