/* =========================================
   WhatsApp 品牌落地站共享样式
   设计系统：浅色编辑风 + 克制中性灰阶 + 衬线标题
   ========================================= */

/* ---------- 设计变量 ---------- */
:root {
  --color-bg: #FAFAF9;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F5F4;
  --color-text: #1C1917;
  --color-text-secondary: #44403C;
  --color-text-muted: #78716C;
  --color-border: #E7E5E4;
  --color-primary: #25D366;
  --color-primary-dark: #1EBE57;
  --color-primary-hover: #128C7E;
  --color-focus: #0EA5E9;
  --font-serif: "Noto Serif SC", "Source Han Serif CN", "Songti SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-subtle: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 12px 24px rgba(0,0,0,0.04);
  --max-width: 1200px;
  --header-height: 72px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 0; list-style: none; }

/* ---------- 排版系统 ---------- */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin: 0 0 1rem; color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.section { padding: var(--space-xxl) 0; }
.section + .section { border-top: 1px solid var(--color-border); }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* ---------- 导航与页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.brand { display: flex; align-items: center; gap: var(--space-sm); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.125rem; }
nav ul { display: flex; gap: var(--space-md); }
nav a {
  font-size: 0.95rem; font-weight: 500;
  padding: 0.25rem 0; position: relative; transition: color 0.2s;
}
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary-dark); }
nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--color-primary);
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }

/* ---------- 按钮组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md);
  font-weight: 500; cursor: pointer; border: none;
  transition: all 0.2s ease; text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text-muted); background: var(--color-surface-alt); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- 卡片与列表 ---------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-md);
  box-shadow: var(--shadow-subtle); transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-xs); display: flex; align-items: center; gap: 0.5rem; }
.card-body p { margin-bottom: var(--space-sm); font-size: 0.95rem; }
.link-list li { padding: var(--space-sm) 0; border-bottom: 1px dashed var(--color-border); }
.link-list li:last-child { border-bottom: none; }
.link-list a { display: flex; align-items: baseline; gap: 0.75rem; }
.link-list .arrow { flex-shrink: 0; opacity: 0.6; }

/* ---------- 表格 ---------- */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface-alt); font-weight: 600; }
td { color: var(--color-text-secondary); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); margin-bottom: var(--space-sm);
  transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--color-primary); }
.faq summary {
  padding: 1rem; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details div { padding: 0 1rem 1rem; color: var(--color-text-secondary); line-height: 1.6; }

/* ---------- SVG 动效定义 ---------- */
.svg-container { display: flex; align-items: center; justify-content: center; }
.orbit-ring {
  fill: none; stroke: var(--color-primary); stroke-width: 1.5;
  transform-origin: center; transform-box: fill-box;
  animation: orbitBreath 6s ease-in-out infinite alternate;
}
.orbit-ring:nth-child(2) { animation-delay: -1.5s; stroke: var(--color-text-muted); opacity: 0.6; }
.orbit-ring:nth-child(3) { animation-delay: -3s; stroke: var(--color-text); opacity: 0.3; }
.draw-path {
  fill: none; stroke: var(--color-text); stroke-width: 1.5;
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: drawStroke 4s linear infinite;
}
.pulse-dot { fill: var(--color-primary); animation: pulseDot 2s ease-in-out infinite alternate; }

@keyframes orbitBreath {
  0% { transform: scale(0.96) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.04) rotate(3deg); opacity: 0.4; }
}
@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes pulseDot {
  0% { r: 3px; opacity: 1; }
  100% { r: 5px; opacity: 0.6; }
}

/* ---------- 无障碍与响应式 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .orbit-ring, .draw-path, .pulse-dot { animation: none !important; }
}
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav { display: none; }
  nav.active { display: block; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: var(--space-md); }
  nav ul { flex-direction: column; gap: var(--space-sm); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
/* 焦点可见性优化 */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
