/* 设计变量 */
:root {
  --c-bg: #f5f6f8;
  --c-surface: #ffffff;
  --c-text-primary: #111317;
  --c-text-secondary: #4b5260;
  --c-text-muted: #7a8190;
  --c-accent: #25D366;
  --c-accent-hover: #1da851;
  --c-border: #e2e5ea;
  --c-focus: #25D366;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.08), 0 16px 32px rgba(0,0,0,0.1);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --line-height-base: 1.75;
  --line-height-tight: 1.35;
  --space-section: clamp(3rem, 6vw, 6rem);
  --container-max: 1120px;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--c-text-primary);
  background: var(--c-bg);
  line-height: var(--line-height-base);
  -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; }
ul, ol { list-style: none; }

/* 容器与网格 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.grid-auto { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* 页头与页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.nav-link { padding: 6px 0; position: relative; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--c-accent); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--c-accent); border-radius: 1px;
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; }
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-list { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--c-surface); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--c-border); }
  .nav-list.open { display: flex; }
}
.site-footer {
  background: #0b0e13; color: #aeb3bc; padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; }
.footer-copy { margin-top: 1.5rem; font-size: 0.85rem; opacity: 0.8; }

/* 通用组件 */
.section { padding: var(--space-section) 0; }
.section--alt { background: var(--c-surface); }
.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: var(--line-height-tight);
  margin-bottom: 1rem; text-align: center;
}
.section__desc {
  text-align: center; color: var(--c-text-secondary); max-width: 640px; margin: 0 auto 2.5rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 500;
  cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent;
}
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn--outline { border-color: var(--c-border); background: transparent; color: var(--c-text-primary); }
.btn--outline:hover { border-color: var(--c-text-muted); background: #fafbfc; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  background: #f0fdf4; color: #15803d; margin-bottom: 0.75rem;
}

/* 卡片与表格 */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: clamp(1rem, 2vw, 1.5rem); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card--news { display: flex; flex-direction: column; height: 100%; }
.card__meta { font-size: 0.85rem; color: var(--c-text-muted); margin-bottom: 0.5rem; }
.card__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.card__text { font-size: 0.95rem; color: var(--c-text-secondary); flex: 1; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-md); background: var(--c-surface); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 500px; }
.table-wrap th, .table-wrap td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); }
.table-wrap th { background: #f8f9fb; font-weight: 600; font-size: 0.9rem; }
.table-wrap tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; font-size: 0.95rem;
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::marker { content: ""; }
.faq-summary::after { content: "+"; font-weight: 400; color: var(--c-text-muted); transition: transform 0.2s; }
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--c-text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* 链接列表 */
.link-list { display: flex; flex-direction: column; gap: 0.8rem; max-width: 700px; margin: 0 auto; }
.link-item { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--c-surface); border-radius: var(--radius-md); border: 1px solid transparent; transition: border-color 0.2s; }
.link-item:hover { border-color: var(--c-border); }
.link-item .icon { flex-shrink: 0; color: var(--c-text-muted); }
.link-item span { font-weight: 500; font-size: 0.95rem; }
.link-item p { font-size: 0.85rem; color: var(--c-text-secondary); }

/* 焦点样式 */
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }

/* SVG 动效基础 */
.svg-anim-group { width: 100%; height: auto; overflow: visible; }
.wave-path {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
}
.wave-1 { animation: wave-rise-1 6s ease-in-out infinite alternate; }
.wave-2 { animation: wave-rise-2 7s ease-in-out infinite alternate-reverse; }
.wave-3 { animation: wave-rise-3 8s ease-in-out infinite alternate; }

@keyframes wave-rise-1 {
  0% { stroke-dashoffset: 0.95; }
  50% { stroke-dashoffset: 0.75; }
  100% { stroke-dashoffset: 0.95; }
}
@keyframes wave-rise-2 {
  0% { stroke-dashoffset: 0.9; }
  50% { stroke-dashoffset: 0.65; }
  100% { stroke-dashoffset: 0.9; }
}
@keyframes wave-rise-3 {
  0% { stroke-dashoffset: 0.85; }
  50% { stroke-dashoffset: 0.55; }
  100% { stroke-dashoffset: 0.85; }
}

/* 减少动画偏好 */
@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;
  }
  .wave-path { animation: none !important; stroke-dashoffset: 0 !important; }
}
