/* =========================================
   WhatsApp 品牌站全局样式 (style.css)
   设计系统：暖调渐变 / 弥散光 / 流体排版
   ========================================= */

:root {
  /* 色彩变量 */
  --color-bg: #0B0F19;
  --color-surface: #151B2B;
  --color-surface-hover: #1C2538;
  --color-accent-from: #F97316;
  --color-accent-to: #FBBF24;
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-success: #22C55E;
  
  /* 排版与间距 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --size-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --size-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --size-base: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --size-md: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --size-lg: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --size-xl: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* 圆角与阴影 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* 容器 */
  --container-max: 1200px;
  --nav-height: 72px;
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* 排版层级 */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 var(--space-sm) 0;
  font-weight: 700;
}
h1 { font-size: var(--size-xl); }
h2 { font-size: var(--size-lg); margin-bottom: var(--space-md); }
h3 { font-size: var(--size-md); margin-bottom: var(--space-xs); }
p { margin: 0 0 var(--space-sm) 0; color: var(--color-text-muted); font-size: var(--size-base); }
strong { color: var(--color-text); font-weight: 600; }

/* 布局工具 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; position: relative; }
.grid { display: grid; gap: var(--space-lg); }
.flex { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mb-lg { margin-bottom: var(--space-lg); }

/* 按钮组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.85rem 1.75rem; border-radius: var(--radius-full); font-weight: 600; font-size: var(--size-sm);
  cursor: pointer; border: 1px solid transparent; transition: all 0.25s ease; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-accent-from); outline-offset: 4px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-from), var(--color-accent-to));
  color: #0B0F19; box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45); }
.btn-outline {
  background: transparent; border-color: var(--color-border); color: var(--color-text);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--color-text-muted); }

/* 卡片与内容块 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-md); transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.feature-icon { width: 48px; height: 48px; margin-bottom: var(--space-sm); color: var(--color-accent-from); }
.feature-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(255,255,255,0.03); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* 列表与引用 */
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 2.5rem; margin-bottom: var(--space-md); }
.step-list li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; background: rgba(249,115,22,0.15); color: var(--color-accent-from);
  border-radius: var(--radius-sm); display: grid; place-items: center; font-weight: 700; font-size: var(--size-xs);
}
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-sm); }
.link-item { display: flex; flex-direction: column; padding: var(--space-sm); border: 1px solid var(--color-border); border-radius: var(--radius-sm); transition: background 0.2s; }
.link-item:hover { background: var(--color-surface-hover); }
.link-title { font-weight: 600; margin-bottom: 0.25rem; display: block; }
.link-desc { font-size: var(--size-xs); color: var(--color-text-muted); line-height: 1.5; }

/* FAQ 组件 */
.faq-details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-sm); background: var(--color-surface); overflow: hidden; }
.faq-summary {
  padding: 1.25rem 1.5rem; cursor: pointer; font-weight: 600; font-size: var(--size-base);
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
.faq-summary:hover { background: rgba(255,255,255,0.03); }
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "+"; font-weight: 400; color: var(--color-accent-from); transition: transform 0.2s;
  font-size: var(--size-md);
}
.faq-details[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.5rem 1.25rem; color: var(--color-text-muted); font-size: var(--size-sm); line-height: 1.7; }
.faq-answer p { margin-bottom: 0.75rem; }

/* 页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(11, 15, 25, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border); height: var(--nav-height); display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-link { font-size: var(--size-sm); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s; }
.nav-link:hover { color: var(--color-text); background: rgba(255,255,255,0.05); }
.nav-link[aria-current="page"] { color: var(--color-accent-from); font-weight: 600; }
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg); border-top: 1px solid var(--color-border); margin-top: var(--space-2xl);
  background: #080B12;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); }
.footer-col h4 { font-size: var(--size-sm); color: var(--color-text); margin-bottom: var(--space-sm); }
.footer-col a { display: block; padding: 0.4rem 0; color: var(--color-text-muted); font-size: var(--size-xs); }
.footer-col a:hover { color: var(--color-text); }
.copyright { text-align: center; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-border); font-size: var(--size-xs); color: var(--color-text-muted); }

/* SVG 动效通用类 */
.svg-canvas { width: 100%; height: auto; overflow: visible; }
.star-dot { fill: var(--color-accent-from); }
.star-line { stroke: var(--color-accent-from); stroke-width: 1.5; fill: none; opacity: 0.4; }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-12px); opacity: 0.6; }
}
.anim-star { animation: twinkle 4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 3s ease-in-out forwards; }
.anim-float { animation: floatSoft 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* 减少动态效果适配 */
@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;
  }
  html { scroll-behavior: auto; }
}

/* 响应式断点 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: var(--space-sm) 0; }
  .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-top: var(--space-xs); }
  .section { padding: var(--space-xl) 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
}
