/* =========================================
   WhatsApp 品牌站全局样式
   设计系统：深色沉浸 + 高饱和强调色 + 理性简洁
   ========================================= */

:root {
  /* 色彩系统 */
  --bg-primary: #0a0c10;
  --bg-secondary: #11141c;
  --bg-card: #161a24;
  --bg-card-hover: #1c212e;
  --text-primary: #e6eaef;
  --text-secondary: #8b92a0;
  --accent: #25d366;
  --accent-hover: #1ebe57;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(37, 211, 102, 0.35);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* 排版系统 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

/* 排版层级 */
h1, h2, h3, h4 {
  text-wrap: balance;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); margin-bottom: var(--space-xs); }
p { color: var(--text-secondary); margin-bottom: var(--space-md); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }
ul, ol { padding-left: 1.25rem; margin-bottom: var(--space-md); }
li { color: var(--text-secondary); margin-bottom: 0.5rem; }
strong { color: var(--text-primary); font-weight: 600; }

/* 布局容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
section {
  padding: var(--space-xl) 0;
  position: relative;
}
.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto var(--space-xl);
}
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* 组件：按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 组件：卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow);
}

/* 组件：表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
}
td {
  color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* 组件：FAQ / Details */
details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  background: var(--bg-card);
}
summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
summary:hover { background: rgba(255,255,255,0.03); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.25s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 导航与页脚 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.copyright {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* SVG 动效基础 */
.svg-container {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
}
.svg-path, .svg-circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}
.stroke-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.anim-breathe { animation: breatheOrbit 6s ease-in-out infinite; }
.anim-draw { animation: drawPath 4.5s ease forwards; }
.anim-fade-in { animation: fadeIn 3s ease forwards; }

@keyframes breatheOrbit {
  0%, 100% { opacity: 0.35; transform: scale(0.96); }
  50% { opacity: 0.85; transform: scale(1.04); }
}
@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 无障碍与响应式 */
@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;
  }
  .anim-breathe, .anim-draw, .anim-fade-in { animation: none !important; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  section { padding: var(--space-lg) 0; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: var(--space-md); }
  h1 { font-size: 2rem; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
