/* =========================================
   WhatsApp 官网共享样式
   Design System: Monochrome + Brand Accent
   ========================================= */

:root {
  /* 色彩系统 */
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #515154;
  --color-text-tertiary: #86868b;
  --color-border: #e5e5ea;
  --color-accent: #25d366;
  --color-accent-hover: #1ebe57;
  --color-accent-light: rgba(37, 211, 102, 0.08);

  /* 空间与圆角 */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-xxl: 96px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);

  /* 排版 */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
}

img, svg { display: block; max-width: 100%; }

/* 排版层级 */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--color-text);
  text-wrap: balance;
  margin-top: 0;
  margin-bottom: var(--space-sm);
}
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 var(--space-sm) 0; }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent-hover); }

/* 布局容器 */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-sm); }
section { padding: var(--space-xxl) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }

/* 页头与导航 */
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: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-md); }
nav a {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.btn-primary { background: var(--color-accent); color: #ffffff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--color-accent); color: var(--color-accent); }
.btn-outline:hover { background: var(--color-accent-light); color: var(--color-accent-hover); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; border-radius: var(--radius-sm); }
.btn-icon { width: 20px; height: 20px; }

/* 卡片组件 */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-card { display: flex; flex-direction: column; gap: var(--space-xs); }
.article-card { display: flex; flex-direction: column; gap: var(--space-xs); }
.article-card time { font-size: 0.85rem; color: var(--color-text-tertiary); }
.related-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}
.related-link:last-child { border-bottom: none; }

/* 表格组件 */
.table-wrapper { overflow-x: auto; margin: var(--space-md) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #fafafa; font-weight: 600; white-space: nowrap; }
td { font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }

/* FAQ 组件 */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
summary {
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: 1rem;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
details[open] summary::before { content: "−"; transform: rotate(90deg); }
details[open] summary { border-bottom: 1px solid var(--color-border); }
.faq-answer { padding: var(--space-sm) var(--space-md); color: var(--color-text-secondary); line-height: 1.7; }

/* SVG 动效基础 */
.wave-path { fill: none; stroke: var(--color-accent); stroke-width: 2.5; opacity: 0.85; }
@keyframes wave-drift-1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes wave-drift-2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes wave-drift-3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.wave-1 { animation: wave-drift-1 6s ease-in-out infinite alternate; }
.wave-2 { animation: wave-drift-2 8s ease-in-out infinite alternate; animation-delay: -2s; }
.wave-3 { animation: wave-drift-3 7s ease-in-out infinite alternate; animation-delay: -4s; }

/* 描边流动动效（遵循规则：默认完全绘制，仅做相位偏移循环） */
@keyframes dash-flow { 0% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0.15; } 100% { stroke-dashoffset: 1; } }
.flow-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-flow 4s ease-in-out infinite; }

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; 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; }

/* 减少动态效果偏好 */
@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-1, .wave-2, .wave-3 { animation: none; }
  .flow-line { animation: none; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: var(--space-sm) 0; gap: var(--space-xs); }
  nav ul { flex-wrap: wrap; justify-content: center; gap: var(--space-sm); }
  section { padding: var(--space-xl) 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
