/* =========================================
   WhatsApp 品牌落地站 · 全局共享样式
   ========================================= */

/* --- 设计变量 --- */
:root {
  --color-primary: #0b1120;
  --color-primary-light: #1e293b;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-success: #10b981;

  --font-display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-display);

  --size-base: 1rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;

  --container-width: 1200px;
}

/* --- 基础重置与排版 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -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); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 流体字号与紧凑行距 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--color-primary);
}
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); letter-spacing: -0.01em; margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.25rem, 2vw + 0.25rem, 1.5rem); margin-bottom: var(--space-md); }
p { margin-bottom: var(--space-md); }
strong { font-weight: 600; }

/* --- 布局容器 --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.section {
  padding-block: var(--space-2xl);
}
.section-alt { background-color: var(--color-surface); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--space-xl);
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-lg);
}
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }

/* --- 导航与页头页脚 --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
}
.brand img { height: 32px; width: auto; }
.nav-list { display: flex; gap: var(--space-lg); }
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-block: var(--space-sm);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.site-footer {
  background: var(--color-primary);
  color: #cbd5e1;
  padding-block: var(--space-xl);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}
.footer-brand { color: #fff; margin-bottom: var(--space-md); }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a:hover { color: var(--color-accent); }
.footer-legal {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #334155;
  font-size: 0.875rem;
  text-align: center;
  color: #94a3b8;
}

/* --- 按钮与组件 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgb(245 158 11 / 0.3);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(245 158 11 / 0.4);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}
.btn-outline:hover { background: rgba(245, 158, 11, 0.1); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-meta { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: var(--space-sm); display: flex; align-items: center; gap: var(--space-sm); }

/* --- 表格 --- */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #f1f5f9; font-weight: 600; color: var(--color-primary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* --- FAQ --- */
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
}
.faq-summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  list-style: none;
  user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform var(--transition-fast);
  font-size: 1.25rem;
  color: var(--color-accent);
}
.faq-item[open] .faq-summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { padding: 0 1.25rem 1rem; color: var(--color-text-muted); line-height: 1.6; }

/* --- SVG 动效关键帧 --- */
@keyframes wave-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes wave-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.wave-path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: wave-draw 2.4s ease-out forwards, wave-float 4s ease-in-out infinite;
}
.wave-group-1 { animation: wave-float 4s ease-in-out infinite; animation-delay: 0s; }
.wave-group-2 { animation: wave-float 4s ease-in-out infinite; animation-delay: -1.3s; }
.wave-group-3 { animation: wave-float 4s ease-in-out infinite; animation-delay: -2.6s; }

/* 减少动画偏好设置 */
@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;
  }
  .wave-path { animation: none; }
  .wave-group-1, .wave-group-2, .wave-group-3 { animation: none; }
}

/* --- 辅助类 --- */
.bg-tech-pattern {
  background-image: radial-gradient(circle at 1px 1px, #cbd5e1 1px, transparent 0);
  background-size: 24px 24px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
