/* =========================================
   全站共享样式：WhatsApp 品牌落地站
   Design System: 米白纸感 + 墨黑强对比
   ========================================= */

/* 1. 设计变量 (Design Tokens) */
:root {
  /* 色彩系统 */
  --color-bg: #F7F5F0;          /* 米白纸张底色 */
  --color-surface: #FFFFFF;     /* 纯白卡片面 */
  --color-ink: #111111;         /* 墨黑主文字 */
  --color-ink-light: #444444;   /* 次级文字 */
  --color-accent: #25D366;      /* WhatsApp 官方绿（按钮/强调） */
  --color-border: #E2DFD8;      /* 柔和边框 */
  
  /* 排版与间距 */
  --font-stack: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --container-width: 1240px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --radius: 6px;                /* 低圆角，保持纸质感 */
}

/* 2. 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-stack);
  background-color: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.7;
  font-size: clamp(14px, 1vw + 0.5rem, 16px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

/* 标题流体系列 */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  margin-top: 0;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: var(--space-sm); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; color: var(--color-ink-light); }

p { margin-bottom: 1.25rem; max-width: 75ch; }

/* 通用容器 */
.container {
  width: min(92%, var(--container-width));
  margin-left: auto; margin-right: auto;
}

/* 3. 组件库 */

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 2rem;
  font-weight: 600; font-size: 1rem;
  border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: none; outline: none;
}
.btn:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-ink);
  color: #FFFFFF;
}
.btn-primary:hover { background-color: #333333; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-ink);
  color: var(--color-ink);
}
.btn-outline:hover { background: var(--color-ink); color: #FFF; }

.btn-download {
  background-color: var(--color-accent);
  color: #FFF;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}
.btn-download:hover { filter: brightness(0.9); }

/* 网格布局辅助 */
.grid-split { display: grid; gap: var(--space-md); }
@media (min-width: 900px) { .grid-split-2col { grid-template-columns: 1fr 1fr; align-items: center; } }

/* 横向滚动画廊 */
.horizontal-scroll {
  display: flex; gap: var(--space-sm);
  overflow-x: auto; padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.scroll-item {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--color-surface);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
@media (min-width: 768px) { .scroll-item { flex: 0 0 380px; } }

/* 功能特性图标 */
.icon-box {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #EBE9E3;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
}
.icon-box svg { width: 24px; height: 24px; stroke: var(--color-ink); }

/* 界面模拟图 */
.ui-mockup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 表格样式 */
.table-responsive { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem;
}
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--color-border); }
th { font-weight: 600; background: #EFECE6; }
tr:last-child td { border-bottom: none; }

/* 下载区域特殊样式 */
#download { background: #2B2A28; color: #F0EEEA; padding: var(--space-lg) 0; }
#download h2 { color: #FFF; }
#download p { color: #BCBAB3; }
.download-card {
  background: #3A3936;
  border: 1px solid #555;
  padding: 2rem; border-radius: var(--radius);
  max-width: 600px;
}
.download-meta { margin: 1rem 0; color: #BCBAB3; font-size: 0.9rem; }

/* 新闻卡片 */
.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  height: 100%;
}
.news-date { font-size: 0.85rem; color: #888; margin-bottom: 0.5rem; }
.card-link {
  margin-top: auto;
  color: var(--color-accent);
  text-decoration: none; font-weight: 600;
  display: inline-block;
}
.card-link:hover { text-decoration: underline; }

/* 常见问题 FAQ */
.faq-list details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  padding: 1rem 1.5rem;
}
.faq-list summary {
  font-weight: 600; cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; color: #888; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin-top: 1rem; margin-bottom: 0; font-size: 0.95rem; color: var(--color-ink-light); }

/* 页头页脚 */
.site-header {
  padding: 1rem 0;
  background: rgba(247, 245, 240, 0.9);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.brand-logo img { height: 32px; width: auto; }
.brand-name { font-weight: 700; font-size: 1.1rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  text-decoration: none; color: var(--color-ink-light); font-weight: 500;
  font-size: 0.95rem; padding: 0.5rem 0;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-ink); }
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 1rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
}

.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-ink-light);
  font-size: 0.9rem;
}

/* =========================================
   SVG 动效系统
   ========================================= */
/* Hero 网格节点点亮动画 */
@keyframes node-pulse {
  0%   { fill: transparent; stroke: transparent; r: 0; opacity: 0; }
  10%  { fill: transparent; stroke: var(--color-ink); stroke-width: 1; r: 6; opacity: 0.15; }
  40%  { fill: var(--color-ink); stroke: transparent; r: 8; opacity: 0.8; }
  70%  { fill: transparent; stroke: var(--color-ink); stroke-width: 1; r: 6; opacity: 0.15; }
  100% { fill: transparent; stroke: transparent; r: 0; opacity: 0; }
}
.grid-node-1 { animation: node-pulse 6s infinite 0.0s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-2 { animation: node-pulse 6s infinite 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-3 { animation: node-pulse 6s infinite 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-4 { animation: node-pulse 6s infinite 1.8s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-5 { animation: node-pulse 6s infinite 2.4s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-6 { animation: node-pulse 6s infinite 3.0s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-7 { animation: node-pulse 6s infinite 3.6s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-8 { animation: node-pulse 6s infinite 4.2s cubic-bezier(0.4, 0, 0.2, 1); }
.grid-node-9 { animation: node-pulse 6s infinite 4.8s cubic-bezier(0.4, 0, 0.2, 1); }

/* 连接线描边绘制 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke: var(--color-border);
  stroke-width: 1.5;
  fill: none;
}
.animate-draw {
  animation: draw-line 4s infinite linear;
}
@keyframes draw-line {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  5%   { opacity: 1; }
  30%  { stroke-dashoffset: 0; opacity: 1; }
  80%  { stroke-dashoffset: 0; opacity: 1; }
  95%  { opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}

/* 呼吸光晕 */
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
.breathe { animation: breathe 4s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }

/* 减少动态效果偏好适配 */
@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;
  }
  .grid-node-1, .grid-node-2, .grid-node-3, .grid-node-4, .grid-node-5,
  .grid-node-6, .grid-node-7, .grid-node-8, .grid-node-9,
  .draw-path, .breathe { animation: none !important; opacity: 1; fill: transparent; }
}
