/* =========================================
   WhatsApp 品牌落地站全局样式
   ========================================= */

/* 设计变量 */
:root {
  --color-bg-primary: #0a0f1c;
  --color-bg-secondary: #111827;
  --color-bg-card: rgba(17, 24, 39, 0.7);
  --color-text-primary: #f3f4f6;
  --color-text-secondary: #9ca3af;
  --color-accent: #00d4ff;
  --color-accent-hover: #00a8cc;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(0, 212, 255, 0.4);
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --spacing-section: clamp(48px, 8vw, 96px);
  --spacing-container: clamp(16px, 4vw, 32px);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input {
  font: inherit;
  color: inherit;
}

/* 排版系统 (流体字号) */
h1, h2, h3, h4 {
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; color: var(--color-text-primary); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; margin-bottom: 0.8em; color: var(--color-text-primary); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; margin-bottom: 0.6em; color: var(--color-text-primary); }

p { margin-bottom: 1em; color: var(--color-text-secondary); }

/* 布局容器 */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--spacing-container);
}

.section {
  padding-top: var(--spacing-section);
  padding-bottom: var(--spacing-section);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

/* 页头导航 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
}

.logo-img {
  height: 32px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #007bff);
  color: #000;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 212, 255, 0.08);
}

/* 卡片组件 */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
}

/* 表格组件 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 500;
  color: var(--color-text-primary);
}

td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* 步骤与列表 */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
}

.scenario-list, .related-list {
  list-style: none;
  padding-left: 0;
}

.scenario-list li, .related-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 12px;
}

.scenario-list li::before, .related-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* FAQ 组件 */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform var(--transition-base);
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-bottom: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* 页脚 */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
  margin-top: 48px;
  background: var(--color-bg-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--color-text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-accent); }

.copyright {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* 焦点与无障碍 */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

@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;
  }
}

/* SVG 动画关键帧 */
@keyframes node-light {
  0%, 100% { opacity: 0.3; fill: rgba(0, 212, 255, 0.4); }
  50% { opacity: 1; fill: var(--color-accent); filter: drop-shadow(0 0 6px var(--color-accent)); }
}

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.node-pulse {
  animation: node-light 4s infinite alternate ease-in-out;
}

.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 3s ease-out forwards;
}

.stagger-1 { animation-delay: 0.2s; }
.stagger-2 { animation-delay: 0.4s; }
.stagger-3 { animation-delay: 0.6s; }
.stagger-4 { animation-delay: 0.8s; }
