/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  /* 莫兰迪低饱和配色 */
  --color-primary: #4a6c6f;
  --color-primary-hover: #3b585a;
  --color-secondary: #a89a8d;
  --color-accent: #d9cec3;
  --color-bg: #f8f6f4;
  --color-surface: #ffffff;
  --color-border: #e6e1db;
  --color-text: #2c3333;
  --color-text-light: #5a6464;
  --color-link: #3a5a5d;
  --color-link-hover: #2a4548;

  /* 字体栈 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-sans: "Inter", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;

  /* 间距与圆角 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* 阴影与过渡 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-hover: 0.2s ease-in-out;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* =========================================
   排版系统
   ========================================= */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--color-text-light); }
strong { font-weight: 600; color: var(--color-text); }
a { color: var(--color-link); text-decoration: none; transition: var(--transition-hover); }
a:hover, a:focus-visible { color: var(--color-link-hover); text-decoration: underline; }
ul, ol { padding-left: var(--space-md); margin-bottom: var(--space-sm); }
li { margin-bottom: var(--space-xs); color: var(--color-text-light); }

/* =========================================
   布局容器
   ========================================= */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 246, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-family: var(--font-serif); font-weight: 700; color: var(--color-text); font-size: 1.1rem; }
.brand img { height: 32px; width: auto; object-fit: contain; }
.nav { display: flex; gap: var(--space-md); list-style: none; padding: 0; }
.nav a { font-size: 0.95rem; color: var(--color-text-light); padding: 0.5rem 0; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-primary); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-primary); border-radius: 2px; }

.site-footer { background: var(--color-text); color: #b8c1c1; padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-md); }
.footer-col h4 { color: #fff; margin-bottom: var(--space-sm); font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: #9aa8a8; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid #3a4444; padding-top: var(--space-sm); text-align: center; font-size: 0.85rem; color: #7a8888; }

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 1rem; cursor: pointer;
  transition: var(--transition-hover); border: none;
}
.btn-primary {
  background: var(--color-primary); color: #fff;
  box-shadow: 0 4px 12px rgba(74, 108, 111, 0.25);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(74, 108, 111, 0.3); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-border); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--color-primary); background: rgba(74, 108, 111, 0.05); }

/* =========================================
   组件：卡片
   ========================================= */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-md);
  transition: var(--transition-base); box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-accent); }
.card-icon { width: 48px; height: 48px; margin-bottom: var(--space-sm); color: var(--color-primary); }
.card-title { font-family: var(--font-serif); font-weight: 600; margin-bottom: 0.5rem; color: var(--color-text); }
.card-desc { font-size: 0.95rem; line-height: 1.6; color: var(--color-text-light); }

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-light); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(74, 108, 111, 0.03); }

/* =========================================
   组件：FAQ (Details/Summary)
   ========================================= */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition-base); }
details[open] { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
summary {
  padding: 1rem var(--space-md); cursor: pointer; font-weight: 500; color: var(--color-text);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--color-secondary); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { padding: 0 var(--space-md) var(--space-md); color: var(--color-text-light); line-height: 1.6; }

/* =========================================
   SVG 动效基础
   ========================================= */
.svg-deco { width: 100%; height: auto; display: block; }
.glow-sweep { animation: sweepGlow 6s infinite alternate ease-in-out; transform-origin: center; }
.line-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s infinite alternate ease-in-out; }
.pulse-subtle { animation: pulseOpacity 5s infinite alternate ease-in-out; }
.rotate-center { transform-box: fill-box; transform-origin: center; animation: rotateSlow 12s infinite linear; }

@keyframes sweepGlow {
  0% { transform: translateX(-120%) skewX(-15deg); opacity: 0.3; }
  100% { transform: translateX(220%) skewX(-15deg); opacity: 0.8; }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseOpacity {
  0% { opacity: 0.4; }
  100% { opacity: 0.8; }
}
@keyframes rotateSlow {
  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; }
  .glow-sweep, .line-draw, .pulse-subtle, .rotate-center { animation: none; }
}

@media (max-width: 400px) {
  .container { padding: 0 0.75rem; }
  .grid-2, .grid-3 { gap: 0.75rem; }
  .nav { flex-wrap: wrap; gap: 0.5rem; }
}

/* =========================================
   焦点与无障碍
   ========================================= */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
