/* ============================================
   WhatsApp 官网共享样式 / Style System
   ============================================ */

/* --- 设计变量 --- */
:root {
  --color-bg: #F8F6F3;
  --color-surface: #FFFFFF;
  --color-text: #2A2F36;
  --color-text-muted: #6B7280;
  --color-primary: #5E7D7A;
  --color-primary-hover: #4C6A68;
  --color-accent: #C9C0B4;
  --color-border: #E8E4DE;
  --color-highlight: rgba(94, 125, 122, 0.06);
  --color-faq-bg: #FDFCFB;

  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif CN", Georgia, serif;
  --font-sans: "Inter", "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: 3rem;
  --space-2xl: 4.5rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-button: 0 2px 6px rgba(94, 125, 122, 0.25);

  --max-width: 1120px;
  --header-height: 68px;
}

/* --- 基础重置与排版 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; color: var(--color-text); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.6rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1.2vw, 2.1rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.15rem, 1.1rem + 0.5vw, 1.4rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

/* --- 布局容器 --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; }
.grid-2 { display: grid; gap: var(--space-lg); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* --- 导航与页头页脚 --- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(248, 246, 243, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); height: var(--header-height); display: flex; align-items: center; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-family: var(--font-serif); font-weight: 600; color: var(--color-text); text-decoration: none; }
.brand img { height: 32px; width: auto; }
.nav ul { list-style: none; display: flex; gap: var(--space-md); }
.nav a { font-size: 0.95rem; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); }
.nav a[aria-current="page"] { background: var(--color-highlight); color: var(--color-primary); font-weight: 500; text-decoration: none; }
.footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-xl) 0; margin-top: var(--space-2xl); }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-md); align-items: center; text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: var(--space-md); flex-wrap: wrap; justify-content: center; }

/* --- 按钮 --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: 0.85rem 1.6rem; font-size: 1rem; font-weight: 500; border: none; border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-button); }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* --- 卡片 --- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

/* --- 表格 --- */
.table-wrap { 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; min-width: 500px; }
th, td { padding: var(--space-sm) var(--space-md); text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-faq-bg); font-weight: 500; }
tr:last-child td { border-bottom: none; }

/* --- FAQ --- */
.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-md); padding: var(--space-sm) var(--space-md); transition: border-color 0.2s ease; }
details[open] { border-color: var(--color-primary); }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: var(--space-xs) 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 1.2rem; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
.answer { padding-top: var(--space-sm); color: var(--color-text-muted); line-height: 1.65; }

/* --- SVG 动效系统 --- */
.svg-art { width: 100%; height: auto; max-width: 400px; margin: 0 auto; }
.svg-path { fill: none; stroke: var(--color-primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.svg-wire { stroke: var(--color-text-muted); stroke-width: 1; opacity: 0.6; }
.svg-fill { fill: var(--color-highlight); }
@keyframes sweepHighlight {
  0% { stroke-dashoffset: 1; opacity: 0.2; }
  30% { stroke-dashoffset: 0; opacity: 0.85; }
  70% { stroke-dashoffset: 0; opacity: 0.85; }
  100% { stroke-dashoffset: 1; opacity: 0.2; }
}
@keyframes drawWire {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.anim-sweep { stroke-dasharray: 1; stroke-dashoffset: 0; animation: sweepHighlight 9s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawWire 14s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-sweep, .anim-draw { animation: none; }
}

/* --- 响应式微调 --- */
@media (max-width: 767px) {
  .section { padding: var(--space-xl) 0; }
  .nav ul { gap: var(--space-sm); }
  .nav a { padding: var(--space-xs); font-size: 0.9rem; }
}
