/* =========================================
   1. 设计变量 (Design Variables)
   ========================================= */
:root {
  /* 配色：米白纸感 + 墨黑强对比 */
  --color-bg: #f7f4eb;
  --color-surface: #ffffff;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-border: #d8d3c7;
  --color-accent: #0d9e5c;
  --color-accent-hover: #087f49;
  --color-accent-light: #eefbef;
  
  /* 字体搭配：高瘦浓缩体标题 + 标准正文 */
  --font-display: 'Inter', 'Helvetica Neue', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  
  /* 间距与圆角 */
  --space-unit: 8px;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  /* 阴影 */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* =========================================
   2. 基础排版 (Base Typography)
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* 流体字号 */
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--color-text-secondary); max-width: 70ch; }
small { font-size: 0.875rem; color: var(--color-text-secondary); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-unit), 5vw, 60px);
}

section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

/* =========================================
   3. 布局网格 (Grid Layouts)
   ========================================= */
.grid-2 { display: grid; gap: 40px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 30px; grid-template-columns: 1fr; }
.grid-auto { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================
   4. 组件样式 (Components)
   ========================================= */
/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  gap: 8px;
}
.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(13, 158, 92, 0.25);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-text-primary);
  color: var(--color-text-primary);
}
.btn-outline:hover {
  background: var(--color-text-primary);
  color: #fff;
}

/* 卡片 */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

/* 列表 */
ul.custom-list {
  list-style: none;
}
ul.custom-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
}
ul.custom-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* 表格 */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th, td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}
th {
  background: #f0ece3;
  font-weight: 600;
  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-md);
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
details[open] {
  border-color: var(--color-accent);
}
summary {
  padding: 20px 24px;
  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.5rem;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.3s;
}
details[open] summary::after {
  transform: rotate(45deg);
}
.details-content {
  padding: 0 24px 24px;
  color: var(--color-text-secondary);
}

/* 页头页脚 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 235, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--color-accent);
}
.logo-img {
  height: 36px;
  width: auto;
  vertical-align: middle;
  margin-right: 10px;
}
footer {
  background: var(--color-text-primary);
  color: #ccc;
  padding: 60px 0;
  margin-top: 60px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #aaa; text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }

/* =========================================
   5. SVG 动效 (SVG Animations)
   ========================================= */
@keyframes pulse-node {
  0%, 100% { opacity: 0.2; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes flow-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

svg.animate-node circle {
  animation-name: pulse-node;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
svg.animate-flow line, svg.animate-flow path {
  stroke-dasharray: 1;
  animation: flow-line 1.5s ease-in-out infinite alternate;
}

/* 减少动态效果偏好 */
@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.animate-node circle,
  svg.animate-flow line,
  svg.animate-flow path {
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
}
