/* =========================================
   WhatsApp 官网共享样式表 (style.css)
   设计变量 · 基础排版 · 组件 · SVG 动效
   ========================================= */

/* --- 设计变量 --- */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f5f4;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-border: #e7e5e4;
  --color-primary: #d97706;
  --color-primary-hover: #b45309;
  --color-accent: #ea580c;
  --gradient-hero: linear-gradient(160deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
  --gradient-btn: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-btn: 0 2px 4px rgba(217,119,6,0.25);
  --max-width: 1120px;
  --header-height: 64px;
}

/* --- 基础重置与排版 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 流体字号 */
.text-display { font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.text-h1 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.text-h2 { font-size: clamp(1.5rem, 2.5vw + 0.25rem, 2rem); font-weight: 600; text-wrap: balance; }
.text-h3 { font-size: clamp(1.125rem, 1.5vw + 0.25rem, 1.25rem); font-weight: 600; }
.body-lg { font-size: clamp(1rem, 1.2vw + 0.25rem, 1.125rem); color: var(--color-text-muted); }
.body-md { font-size: 1rem; }
.mono-accent { font-family: var(--font-mono); font-size: 0.875rem; color: var(--color-primary); }

/* 布局容器 */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.grid-auto { display: grid; gap: var(--space-lg); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* --- 页头与导航 --- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250,250,249,0.85); 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 { display: flex; align-items: center; gap: var(--space-sm); }
.brand-img { width: 120px; height: 36px; object-fit: contain; }
.nav-desktop { display: flex; gap: var(--space-lg); }
.nav-link { font-weight: 500; padding: var(--space-sm) 0; transition: color 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-primary); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); }
@media (max-width: 768px) {
  .nav-desktop { display: none; position: absolute; top: var(--header-height); left: 0; width: 100%; background: var(--color-surface); flex-direction: column; padding: var(--space-md); border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
  .nav-desktop.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* --- 页脚 --- */
.site-footer { background: #1c1917; color: #d6d3d1; padding: var(--space-2xl) 0 var(--space-lg); margin-top: var(--space-2xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-xl); margin-bottom: var(--space-xl); }
.footer-col h4 { color: #fff; margin-bottom: var(--space-md); font-size: 1rem; }
.footer-col a { display: block; margin-bottom: var(--space-sm); opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid #292524; padding-top: var(--space-lg); text-align: center; font-size: 0.875rem; color: #a8a29e; }

/* --- 通用组件 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.5rem; font-weight: 600; border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.2s; border: 2px solid transparent;
  text-wrap: wrap; min-width: 0; flex-shrink: 1;
}
.btn-primary { background: var(--gradient-btn); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: #fff7ed; }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }

.table-responsive { overflow-x: auto; margin: var(--space-md) 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface-alt); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }

/* FAQ */
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-md); background: var(--color-surface); overflow: hidden; }
summary { padding: var(--space-md) var(--space-lg); cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2357534e' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 4v16m8-8H4'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details .faq-body { padding: 0 var(--space-lg) var(--space-lg); color: var(--color-text-muted); }

/* --- SVG 动效 --- */
.svg-container { position: relative; width: 100%; overflow: hidden; }
.anim-contour { animation: contourFlow 8s ease-in-out infinite alternate; }
.anim-wave { animation: waveFloat 6s ease-in-out infinite; }
@keyframes contourFlow {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes waveFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-6px) rotate(1deg); }
  66% { transform: translateY(4px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .anim-contour, .anim-wave { animation: none; }
}

/* 焦点可见性 */
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
a:focus-visible { border-radius: var(--radius-sm); }
