/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  --color-primary-start: #0f4c3a;
  --color-primary-end: #2dd36b;
  --color-accent: #1aa160;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-focus: #0ea5e9;

  --font-display: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --container: 1200px;
}

*, *::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: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* =========================================
   排版系统
   ========================================= */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); color: var(--color-text-secondary); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.grid { display: grid; gap: var(--space-lg); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.875rem 1.75rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all 0.2s ease; border: none; outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-accent));
  color: #fff; box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: brightness(1.05); }
.btn-ghost {
  background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); background: #f0fdf4; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: var(--radius-sm); }

/* =========================================
   组件：卡片
   ========================================= */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.icon-box {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #f8fafc; font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* =========================================
   组件：FAQ (Details)
   ========================================= */
details {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); margin-bottom: var(--space-sm); overflow: hidden;
}
summary {
  padding: 1.25rem; cursor: pointer; font-weight: 600; color: var(--color-text);
  list-style: none; position: relative; padding-right: 3rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+'; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--color-muted); transition: transform 0.2s;
}
details[open] summary::after { content: '−'; }
details p { padding: 0 1.25rem 1.25rem; margin: 0; color: var(--color-text-secondary); line-height: 1.65; }
details:focus-within { border-color: var(--color-focus); box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2); }

/* =========================================
   SVG 动效定义
   ========================================= */
.svg-animate path, .svg-animate circle, .svg-animate polyline, .svg-animate line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.draw-path {
  animation: drawLine 3s ease-in-out infinite alternate;
}
.pulse-ring {
  animation: pulseRing 4s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.float-element {
  animation: floatAnim 6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.spin-slow {
  animation: spinSlow 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; opacity: 0.6; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0.2; opacity: 0.8; }
}
@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}
@keyframes floatAnim {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}
@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .svg-animate path, .svg-animate circle, .svg-animate polyline, .svg-animate line {
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
  }
}

/* =========================================
   响应式调整
   ========================================= */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  :where(.layout-asym) { flex-direction: column; }
}
@media (min-width: 901px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
