/* ========================================
   WhatsApp 品牌落地站 - 全站共享样式
   设计系统：大地色系 · 简洁理性 · 流体排版
   ======================================== */

:root {
  /* 色彩变量 */
  --color-bg: #f7f4ef;
  --color-surface: #ffffff;
  --color-primary: #7a6b5c;
  --color-primary-hover: #635548;
  --color-accent: #4d6b54;
  --color-accent-light: #e8efe9;
  --color-text: #2e2b28;
  --color-text-secondary: #5c5650;
  --color-border: #e6e0d6;
  --color-highlight: #d9cfba;
  
  /* 间距与圆角 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* 阴影与过渡 */
  --shadow-sm: 0 2px 8px rgba(46, 43, 40, 0.06);
  --shadow-md: 0 6px 20px rgba(46, 43, 40, 0.08);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 字体栈 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* 基础排版与容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.6rem + 2.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.2rem, 1.1rem + 1vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--color-text-secondary); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 页头与导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--color-text);
  font-size: 1.1rem;
}

.brand img { height: 32px; width: auto; object-fit: contain; }

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-base);
}

.nav-link[aria-current="page"], .nav-link:hover {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

/* 通用区块布局 */
.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.grid-6 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* 卡片组件 */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.card-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(77, 107, 84, 0.25);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 表格 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--space-md) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text); }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 500; }

/* 步骤列表 */
.step-list { counter-reset: step; list-style: none; padding-left: 0; }
.step-list li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: var(--space-md);
  min-height: 60px;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-list li strong { display: block; margin-bottom: 0.3rem; color: var(--color-text); }

/* FAQ (Details/Summary) */
.faq-item { margin-bottom: var(--space-sm); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }
.summary {
  padding: 1rem 1.25rem;
  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: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform var(--transition-base);
  margin-left: 1rem;
}
details[open] > summary::after { transform: rotate(-135deg); }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--color-text-secondary); }

/* 新闻卡片 */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-date { font-size: 0.85rem; color: var(--color-primary); margin-bottom: 0.5rem; font-weight: 500; }
.news-body { flex-grow: 1; margin-bottom: var(--space-sm); }
.news-link { font-size: 0.9rem; font-weight: 600; margin-top: auto; }

/* 页脚 */
.site-footer {
  background: var(--color-text);
  color: #d6d1ca;
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-xl);
}
.footer-grid { display: grid; gap: var(--space-md); margin-bottom: var(--space-lg); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-heading { color: #fff; font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: #aaa; }
.footer-links a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-md); text-align: center; font-size: 0.9rem; color: #888; }

/* ========================================
   SVG 动效系统
   ======================================== */
.geo-canvas { position: relative; width: 100%; max-width: 600px; margin: 0 auto; overflow: hidden; aspect-ratio: 4/3; }
.geo-svg { width: 100%; height: 100%; }

/* 旋转组合 */
.spin-slow { animation: spin-slow 12s linear infinite; transform-box: fill-box; transform-origin: center; }
.spin-reverse { animation: spin-slow 15s linear infinite reverse; transform-box: fill-box; transform-origin: center; }
.float-subtle { animation: float-subtle 6s ease-in-out infinite alternate; }
.draw-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 4s ease-in-out infinite alternate; }

@keyframes spin-slow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes float-subtle { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes draw-line { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

/* 减少动态效果支持 */
@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; }
  .spin-slow, .spin-reverse, .float-subtle, .draw-line { animation: none !important; }
}
