/* ================= 设计变量 ================= */
:root {
  --color-bg: #F8F6F1;
  --color-surface: #FFFFFF;
  --color-primary: #2A4B35;
  --color-primary-light: #3D664A;
  --color-accent: #B89F7A;
  --color-accent-light: #D6CBB8;
  --color-text: #1C1C1C;
  --color-text-secondary: #4A453D;
  --color-border: #E2DED5;
  --color-highlight: #E8F0EA;
  
  --font-title: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow-subtle: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(42, 75, 53, 0.12);
  
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= 基础重置与排版 ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-primary-light); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.5vw + 0.5rem, 3.8rem); margin-bottom: var(--space-sm); color: var(--color-primary); }
h2 { font-size: clamp(1.6rem, 3.2vw + 0.5rem, 2.4rem); margin-bottom: var(--space-md); color: var(--color-primary); }
h3 { font-size: clamp(1.15rem, 2vw + 0.2rem, 1.5rem); margin-bottom: var(--space-xs); color: var(--color-text); }
p { margin-bottom: var(--space-sm); color: var(--color-text-secondary); font-size: 1rem; }
ul, ol { margin-left: 1.25rem; margin-bottom: var(--space-sm); color: var(--color-text-secondary); }
li { margin-bottom: 0.5rem; }

/* ================= 布局容器 ================= */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--space-md); }
section { padding: var(--space-lg) 0; }
.grid-auto { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.offset-lr { margin-left: 5%; margin-right: 5%; }

/* ================= 导航与页脚 ================= */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  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;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: var(--space-md); }
nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.site-footer {
  background: var(--color-primary);
  color: #EAE5DB;
  padding: var(--space-lg) 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-grid h4 { color: #FFF; margin-bottom: var(--space-sm); font-size: 1.1rem; }
.footer-grid a { color: #C4BAA9; display: block; margin-bottom: 0.6rem; }
.footer-grid a:hover { color: #FFF; text-decoration: none; }
.copyright { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--space-md); font-size: 0.85rem; color: #A8A090; }

/* ================= 按钮与表单组件 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none !important;
}
.btn-primary { background: var(--color-primary); color: #FFF; }
.btn-primary:hover { background: var(--color-primary-light); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(42, 75, 53, 0.25); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #FFF; }
.btn-icon { width: 20px; height: 20px; }

/* ================= 卡片与信息块 ================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.icon-box {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

/* ================= 表格样式 ================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--color-surface); }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #F3F0E9; font-weight: 600; color: var(--color-primary); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td { color: var(--color-text-secondary); }

/* ================= FAQ 手风琴 ================= */
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
details[open] { box-shadow: var(--shadow-subtle); }
summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--color-primary);
  transition: transform 0.3s ease;
}
details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.25rem 1.1rem 1.25rem; color: var(--color-text-secondary); line-height: 1.65; }

/* ================= 焦点与无障碍 ================= */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@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; }
}

/* ================= SVG 动效系统 ================= */
svg.dynamic-svg { width: 100%; height: auto; overflow: visible; }
svg.dynamic-svg path,
svg.dynamic-svg circle,
svg.dynamic-svg rect,
svg.dynamic-svg polygon,
svg.dynamic-svg line,
svg.dynamic-svg polyline {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.anim-draw { animation: drawStroke 5s ease-in-out infinite alternate; }
.anim-breathe { animation: softBreathe 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: gentleFloat 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  40% { stroke-dashoffset: 0; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes softBreathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ================= 小屏响应式防溢出修复 ================= */
@media (max-width: 480px) {
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; gap: 0.5rem; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 0.5rem; }
  nav a { font-size: 0.9rem; padding: 0.4rem 0.6rem; white-space: normal; }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .feature-item { flex-direction: column; }
  .step-row { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .step-num { min-width: auto; font-size: 1.5rem; line-height: 1.2; }
  .download-box { padding: var(--space-md); }
}
