/* =========================================
   WhatsApp 品牌落地站 - 全局样式
   深色沉浸 + 高饱和强调色 | 排版/组件/动效
   ========================================= */

/* --- 设计变量 --- */
:root {
  --bg-primary: #0B0B0F;
  --bg-secondary: #121218;
  --bg-card: #1A1A22;
  --bg-elevated: #22222C;
  --text-primary: #EEF1F5;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --accent: #25D366;
  --accent-hover: #1EBE57;
  --accent-glow: rgba(37, 211, 102, 0.25);
  --border: #2A2A35;
  --border-hover: #3A3A4A;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container-max: 1200px;
}

/* --- 基础重置与排版 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 流体字号与排版层级 */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem); text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 1.5vw + 0.5rem, 1.35rem); margin-bottom: 0.75rem; }
p { font-size: clamp(0.95rem, 0.8vw + 0.6rem, 1.05rem); color: var(--text-secondary); max-width: 65ch; }
small { font-size: 0.85rem; color: var(--text-muted); }

/* 布局容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }
.section-intro { text-align: center; margin-bottom: 3rem; }
.section-intro p { margin: 0.75rem auto 0; }

/* --- 页头与页脚 --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-primary); font-weight: 700; font-size: 1.15rem; }
.logo img { width: 30px; height: 30px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a {
  text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s;
}
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 4rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { color: var(--text-primary); margin-bottom: 1rem; font-size: 0.95rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col a { color: var(--text-secondary); text-decoration: none; display: block; margin-bottom: 0.6rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* --- 通用组件 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 16px var(--accent-glow); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; transition: transform 0.25s, border-color 0.25s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.grid-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

/* 便当格布局 */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(160px, auto); gap: 1.5rem; }
.bento-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.bento-item:nth-child(4) { grid-column: span 2; }
.bento-item { display: flex; flex-direction: column; justify-content: space-between; }
.bento-icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--accent); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; margin: 2rem 0; }
table { width: 100%; border-collapse: collapse; color: var(--text-secondary); font-size: 0.95rem; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-primary); font-weight: 600; background: var(--bg-secondary); }
tr:hover td { background: rgba(37, 211, 102, 0.03); }

/* 列表与步骤 */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps li { position: relative; padding-left: 2.5rem; margin-bottom: 1.25rem; }
ol.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; color: var(--accent);
}
ul.plain { list-style: none; padding-left: 0; }
ul.plain li { position: relative; padding-left: 1.25rem; margin-bottom: 0.75rem; }
ul.plain li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* FAQ 手风琴 */
details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
summary { padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; position: relative; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 1.35rem; color: var(--accent); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); }

/* 卡片网格（更新/相关） */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.card-link { display: inline-block; margin-top: 1rem; color: var(--accent); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: opacity 0.2s; }
.card-link:hover { opacity: 0.8; }

/* 相关链接列表 */
.related-list { display: flex; flex-direction: column; gap: 1rem; }
.related-item { display: flex; justify-content: space-between; align-items: baseline; text-decoration: none; color: var(--text-secondary); transition: color 0.2s; }
.related-item:hover { color: var(--accent); }
.related-title { font-weight: 500; color: var(--text-primary); }
.related-desc { font-size: 0.9rem; max-width: 60%; text-align: right; }

/* --- SVG 动效系统 --- */
.svg-asset { width: 100%; height: auto; display: block; }
.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 3.5s ease-in-out infinite alternate; }
.svg-node { animation: floatNode 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drawPath { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floatNode { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 无障碍：减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .svg-draw, .svg-node, .card, .btn { animation: none !important; transition: none !important; }
  details summary::after { transition: none; }
}

/* 焦点可见性 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible { outline-offset: 4px; }

/* 响应式适配 */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .bento-item:nth-child(4) { grid-column: span 1; }
  nav { display: none; } /* 移动端简化：实际项目可加汉堡菜单，此处保持单页直出要求 */
}
@media (max-width: 600px) {
  section { padding: 3.5rem 0; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-item:nth-child(1), .bento-item:nth-child(4) { grid-column: span 1; }
  .related-item { flex-direction: column; gap: 0.25rem; }
  .related-desc { text-align: left; max-width: 100%; }
}
