/* ========================================
   WhatsApp 品牌站 · 全局样式
   Dark immersive + single saturated accent
   ======================================== */

/* ---------- Design Tokens ---------- */
:root {
  --bg-deep:      #080c14;
  --bg-primary:   #0c1120;
  --bg-secondary: #111827;
  --bg-card:      #151e2e;
  --bg-card-hover:#1a2638;
  --border-subtle: rgba(255, 255, 255, 0.055);
  --border-accent: rgba(0, 230, 118, 0.22);
  --text-main:    #e4ecf7;
  --text-body:    #94a3b8;
  --text-muted:   #5a6a80;
  --accent:       #00E676;
  --accent-dark:  #00c864;
  --accent-glow:  rgba(0, 230, 118, 0.12);
  --radius:       12px;
  --radius-sm:    8px;
  --font-sans:    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-cond:    "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --container:    1180px;
  --space-xs:     8px;
  --space-sm:     16px;
  --space-md:     24px;
  --space-lg:     40px;
  --space-xl:     64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-body);
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-cond);
  font-weight: 700;
  color: var(--text-main);
  text-wrap: balance;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.2rem); letter-spacing: -0.018em; }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.3rem); letter-spacing: -0.01em; }

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}
.section-title p {
  margin-top: var(--space-xs);
  font-size: 1.05rem;
  color: var(--text-body);
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section--alt { background: var(--bg-secondary); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.01em;
}
.main-nav { display: flex; align-items: center; gap: var(--space-sm); }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }
.main-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 600;
}
.nav-btn { margin-left: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--bg-primary);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-links { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--text-body); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--primary {
  background: var(--accent);
  color: #080c14;
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 230, 118, 0.25);
}
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-3px);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-glow);
  margin-bottom: var(--space-sm);
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; color: var(--text-body); }

/* ---------- Feature Section ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.feature-block:last-child { margin-bottom: 0; }
.feature-block--reverse .feature-text { order: 2; }
.feature-block--reverse .feature-visual { order: 1; }
.feature-text h2 { margin-bottom: 12px; }
.feature-text p { color: var(--text-body); margin-bottom: 16px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.feature-tag {
  font-size: 0.82rem;
  padding: 4px 12px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 20px;
  font-weight: 500;
}

/* ---------- Interface Demo ---------- */
.demo-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-md);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-sm);
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); opacity: 0.4; }
.demo-dot:nth-child(1) { background: #ef4444; opacity: 0.7; }
.demo-dot:nth-child(2) { background: #f59e0b; opacity: 0.7; }
.demo-dot:nth-child(3) { background: #22c55e; opacity: 0.7; }
.demo-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-sm);
  min-height: 260px;
}
.demo-sidebar {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.demo-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.2s;
}
.demo-sidebar-item.active { background: var(--accent-glow); }
.demo-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #00a854);
  flex-shrink: 0;
}
.demo-msg-line {
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin-bottom: 8px;
}
.demo-chat {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.chat-bubble--sent {
  background: var(--accent-glow);
  color: var(--text-main);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-bubble--received {
  background: rgba(255,255,255,0.06);
  color: var(--text-body);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

/* ---------- Scenario Cards ---------- */
.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
}
.scenario-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.18;
  line-height: 1;
  margin-bottom: 10px;
}
.scenario-card h3 { margin-bottom: 10px; }
.scenario-card p { font-size: 0.95rem; color: var(--text-body); }
.scenario-steps { margin-top: 14px; }
.scenario-steps li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 6px;
}
.scenario-steps li::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.7;
}

/* ---------- Steps (Quick Start) ---------- */
.steps-list { counter-reset: steps; }
.steps-list li {
  counter-increment: steps;
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}
.steps-list li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
  margin-top: 2px;
}
.steps-list h4 { font-size: 1rem; margin-bottom: 4px; }
.steps-list p { font-size: 0.92rem; }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--accent);
  text-align: left;
  padding: 14px 18px;
  white-space: nowrap;
}
td { padding: 14px 18px; border-top: 1px solid var(--border-subtle); color: var(--text-main); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
details[open] { border-color: var(--border-accent); }
summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.3s;
  flex-shrink: 0;
}
details[open] summary::after { transform: rotate(45deg); }
summary:hover { background: rgba(255,255,255,0.02); }
.detail-body { padding: 0 24px 18px; color: var(--text-body); font-size: 0.95rem; line-height: 1.75; }

/* ---------- News ---------- */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s, transform 0.3s;
}
.news-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}
.news-meta { font-size: 0.82rem; color: var(--text-muted); }
.news-card h4 { font-size: 1.05rem; font-weight: 600; }
.news-card p { font-size: 0.92rem; color: var(--text-body); flex-grow: 1; }
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s;
}
.btn-read:hover { opacity: 0.75; }
.btn-read::after { content: "→"; }

/* ---------- Related ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
}
.related-item a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.related-item a:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}
.related-item .r-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.related-item .r-desc { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Hero section ---------- */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: 14px; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-body); margin-bottom: var(--space-md); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}
.hero-svg { width: 100%; max-width: 480px; height: auto; }

/* ---------- Download section ---------- */
#download { scroll-margin-top: 80px; }
.download-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 36px;
}
.download-box h2 { margin-bottom: 8px; }
.download-box > p { color: var(--text-body); margin-bottom: var(--space-md); }
.install-steps { margin-bottom: var(--space-md); }
.install-steps li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: 14px;
}
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  margin-top: 2px;
}
.install-steps li strong { display: block; margin-bottom: 2px; color: var(--text-main); }
.install-steps li span { font-size: 0.92rem; }
.dl-info { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: var(--space-md); font-size: 0.9rem; color: var(--text-muted); }
.dl-info dt { color: var(--text-body); font-weight: 600; }

/* ---------- SVG Animation Classes ---------- */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
.draw-path--slow { animation-duration: 6s; }
.draw-path--fast { animation-duration: 2.8s; }

@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

.float-y {
  animation: floatY 4.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.float-y--alt {
  animation: floatYAlt 5.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes floatYAlt {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

.pulse-node {
  animation: pulseNode 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes pulseNode {
  0%, 100% { opacity: 0.7; r: 4; }
  50%      { opacity: 1; r: 5.5; }
}

@media (prefers-reduced-motion: reduce) {
  .draw-path, .float-y, .float-y--alt, .pulse-node { animation: none !important; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-inner, .feature-block { grid-template-columns: 1fr; }
  .feature-block--reverse .feature-text,
  .feature-block--reverse .feature-visual { order: unset; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-sidebar { display: none; }
  .main-nav a:not(.nav-btn) { display: none; }
  h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); }
}

/* ---------- Global focus ---------- */
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-glow); color: var(--text-main); }
