/* =========================================
   WhatsApp 品牌站共享样式
   配色：莫兰迪低饱和 | 排版：流体字号 | 动效：CSS Keyframes
   ========================================= */

/* 设计变量 */
:root {
  --color-bg: #f6f5f1;
  --color-surface: #ffffff;
  --color-text: #2b2e2c;
  --color-text-muted: #6a6f6b;
  --color-primary: #6b8278;
  --color-primary-hover: #566b62;
  --color-secondary: #8a9ba5;
  --color-accent: #c2aa9c;
  --color-border: #e0ded9;
  --color-focus: #4a635b;

  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;

  --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.08);

  --max-width: 1180px;
  --header-height: 64px;
}

/* 基础重置与排版 */
*, *::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);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
a:hover, a:focus-visible { color: var(--color-primary-hover); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 排版层级 */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.25; color: var(--color-text); }
h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); max-width: 75ch; }
.section-intro { margin-bottom: var(--space-xl); color: var(--color-text-muted); font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem); }

/* 布局容器 */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-xl); }

/* 页头与导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,245,241,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand-nav { display: flex; align-items: center; gap: var(--space-md); }
.brand-nav img { height: 32px; width: auto; }
.nav-links { display: flex; gap: var(--space-lg); font-weight: 500; font-size: 0.95rem; }
.nav-links a { padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-links a[aria-current="page"], .nav-links a:hover { border-bottom-color: var(--color-primary); color: var(--color-primary-hover); }

/* 通用组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s ease; text-decoration: none; font-size: 1rem;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover, .btn-outline:focus-visible { background: rgba(107,130,120,0.08); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-lg); box-shadow: var(--shadow-card); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-meta { display: flex; align-items: center; gap: var(--space-sm); font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-sm); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: var(--space-lg) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; background: var(--color-surface); }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
th { background: #fafaf8; font-weight: 600; color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }

/* FAQ / Details */
.faq-list { display: flex; flex-direction: column; gap: var(--space-md); }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.2rem; color: var(--color-text-muted); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details > p { margin-top: var(--space-md); color: var(--color-text-muted); line-height: 1.7; }

/* 页脚 */
.site-footer { background: #2c2e2d; color: #d8d7d4; padding: var(--space-xl) 0; margin-top: var(--space-2xl); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-grid h4 { color: #fff; margin-bottom: var(--space-md); font-size: 1rem; }
.footer-grid ul li { margin-bottom: var(--space-sm); }
.footer-grid a { color: #b0afa9; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg); text-align: center; color: #8a8985; }

/* SVG 动效基础 */
.svg-anim { width: 100%; height: auto; overflow: visible; }
.path-flow { fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-linecap: round; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.flow-dot { fill: var(--color-secondary); }
.draw-line { fill: none; stroke: var(--color-text-muted); stroke-width: 1.5; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Keyframes */
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
@keyframes floatDot {
  0% { transform: translateX(0) translateY(0); opacity: 0.4; }
  25% { transform: translateX(12px) translateY(-8px); opacity: 0.8; }
  50% { transform: translateX(24px) translateY(4px); opacity: 0.4; }
  75% { transform: translateX(12px) translateY(12px); opacity: 0.8; }
  100% { transform: translateX(0) translateY(0); opacity: 0.4; }
}
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 应用类 */
.animate-flow { animation: flowDash 8s ease-in-out infinite; }
.animate-dot { animation: floatDot 6s ease-in-out infinite; }
.delay-1 { animation-delay: -2s; }
.delay-2 { animation-delay: -4s; }
.animate-draw { animation: drawPath 10s linear infinite alternate; }

/* 无障碍与响应式 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  :root { --space-xl: 3rem; --space-2xl: 4rem; }
  h1 { font-size: 2.1rem; }
}
