/* =========================================
   WhatsApp 品牌落地站 · 全局样式系统
   ========================================= */

:root {
  /* 调色板：冷蓝科技 + 霓虹点缀 */
  --color-bg: #0b1120;
  --color-surface: #131b2e;
  --color-surface-hover: #1a2540;
  --color-primary: #3b82f6;
  --color-accent: #00e5ff;
  --color-success: #22c55e;
  --color-text: #e5e7eb;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-glow: rgba(0, 229, 255, 0.15);

  /* 排版变量 */
  --font-main: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --size-base: 16px;
  --lh-base: 1.75;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --spacing-section: clamp(3.5rem, 8vh, 6rem);
  --spacing-container: 0 1.5rem;
  --max-width: 1200px;

  /* 动效参数 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-base: 0.3s var(--ease-out);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: var(--size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* =========================================
   布局与容器
   ========================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-container);
}

section {
  padding: var(--spacing-section) 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

/* =========================================
   排版层级
   ========================================= */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  border: none;
  outline: none;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #00c3ff);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
}

/* =========================================
   组件：卡片
   ========================================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

/* =========================================
   组件：FAQ (<details>)
   ========================================= */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--color-surface);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-accent);
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: rgba(255, 255, 255, 0.03); }

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =========================================
   组件：页头 / 页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img { height: 32px; width: auto; }
.brand-name { font-size: 1.1rem; font-weight: 700; color: #fff; letter-spacing: 0.05em; }

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.site-footer {
  background: #080d1a;
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-canvas {
  width: 100%;
  height: auto;
  max-height: 100%;
  overflow: visible;
}

.node-light {
  fill: transparent;
  stroke: var(--color-primary);
  stroke-width: 2;
  animation: nodePulse 5s infinite ease-in-out;
}

@keyframes nodePulse {
  0%, 100% { fill: transparent; stroke-width: 1.5; opacity: 0.4; }
  40%, 60% { fill: var(--color-accent); stroke-width: 3; opacity: 1; filter: drop-shadow(0 0 6px var(--color-accent)); }
}

.stagger-1 { animation-delay: 0s; }
.stagger-2 { animation-delay: 0.6s; }
.stagger-3 { animation-delay: 1.2s; }
.stagger-4 { animation-delay: 1.8s; }
.stagger-5 { animation-delay: 2.4s; }

.path-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  animation: dashReveal 4s infinite alternate ease-in-out;
}

@keyframes dashReveal {
  0% { stroke-dashoffset: 1; opacity: 0.3; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 1; opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .node-light, .path-draw, .fade-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
