/* =========================================
   WhatsApp 品牌落地站 - 共享样式
   ========================================= */

/* --- 设计变量 --- */
:root {
  --color-brand-dark: #0B3928;
  --color-brand-mid: #128C7E;
  --color-brand-light: #25D366;
  --color-accent-lime: #A8E6CF;
  --color-bg-page: #F8FAF8;
  --color-bg-card: #FFFFFF;
  --color-text-main: #1A2E22;
  --color-text-secondary: #4A6358;
  --color-border: #DCE8E0;
  --color-focus-ring: #25D366;
  
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 12px rgba(11, 57, 40, 0.08);
  --shadow-hover: 0 8px 24px rgba(11, 57, 40, 0.12);
}

/* --- 基础重置与排版 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-brand-mid); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-brand-dark); }

/* 标题层级 */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; color: var(--color-brand-dark); line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); text-wrap: balance; margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: var(--space-lg); position: relative; padding-left: calc(var(--space-md) - 2px); }
h2::before {
  content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px;
  background: linear-gradient(180deg, var(--color-brand-light), var(--color-brand-mid)); border-radius: 2px;
}
h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); max-width: 75ch; }
mark { background: var(--color-accent-lime); padding: 0 4px; border-radius: 4px; font-style: normal; }

/* 布局容器 */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.section-grid { display: grid; gap: var(--space-lg); align-items: center; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bg-alt { background-color: var(--color-bg-card); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.bg-block { background: linear-gradient(135deg, #EEF9F3 0%, #F4FBF6 100%); }

/* 按钮组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-weight: 500; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid transparent; transition: all 0.25s ease;
  font-size: 1rem; text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-mid), var(--color-brand-dark));
  color: #fff; border-color: var(--color-brand-dark);
  box-shadow: 0 2px 8px rgba(11, 57, 40, 0.2);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: transparent; color: var(--color-brand-mid); border-color: var(--color-border); }
.btn-secondary:hover { border-color: var(--color-brand-mid); background: #F0F8F5; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }

/* 卡片系统 */
.card {
  background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-lg); transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--color-brand-light); }
.card-icon { width: 48px; height: 48px; margin-bottom: var(--space-md); stroke: var(--color-brand-mid); stroke-width: 1.8; fill: none; }
.card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; color: var(--color-brand-dark); }
.card-body { font-size: 0.95rem; color: var(--color-text-secondary); flex: 1; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #F0F8F5; font-weight: 600; color: var(--color-brand-dark); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td { color: var(--color-text-secondary); }

/* FAQ 组件 */
.faq-list { display: grid; gap: 12px; }
details {
  background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 16px; transition: border-color 0.2s;
}
details[open] { border-color: var(--color-brand-light); }
summary {
  font-weight: 500; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px;
  color: var(--color-brand-dark); user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+"; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 4px; background: #E8F5ED; color: var(--color-brand-mid);
  font-size: 14px; transition: transform 0.2s;
}
details[open] summary::before { content: "-"; transform: rotate(90deg); }
details p { margin-top: 12px; font-size: 0.95rem; color: var(--color-text-secondary); padding-left: 24px; }

/* 页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 248, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border); padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-group img { width: 32px; height: 32px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: 1.1rem; color: var(--color-brand-dark); letter-spacing: -0.01em; }
nav ul { display: flex; list-style: none; gap: 24px; }
nav a { color: var(--color-text-secondary); font-size: 0.95rem; font-weight: 500; position: relative; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand-dark); }
nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--color-brand-light); border-radius: 1px; }

.site-footer { background: var(--color-brand-dark); color: #DCE8E0; padding: 48px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #A8C8BA; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.85rem; color: #8FA89D; }

/* SVG 动效基础 */
.svg-container { width: 100%; max-width: 400px; aspect-ratio: 16/10; position: relative; }
.svg-path-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; fill: none; }
.svg-dot-flow { fill: var(--color-brand-light); opacity: 0.6; }
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes flowCurve {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; }
}
@keyframes floatShift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-draw { animation: drawLine 4s ease-in-out infinite alternate; }
.anim-curve { animation: flowCurve 5s ease-in-out forwards; }
.anim-pulse { animation: pulseDot 3s ease-in-out infinite; }
.anim-float { animation: floatShift 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .svg-path-draw { stroke-dashoffset: 0; }
}
