/* =========================================================
   WhatsApp 品牌落地站 - 全局共享样式
   设计变量 / 排版 / 页头页脚 / 通用组件 / SVG 动效
   ========================================================= */

:root {
  /* 基础色彩系统：暖调渐变 + 柔和弥散光 */
  --color-primary: #E07B54;
  --color-primary-dark: #C45D32;
  --color-secondary: #3A7CA5;
  --color-accent: #F2A55D;
  --color-bg: #FAF9F7;
  --color-surface: #FFFFFF;
  --color-text: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-focus: #D97706;
  
  /* 渐变与光影 */
  --gradient-hero: radial-gradient(circle at 70% 30%, rgba(242, 165, 93, 0.15) 0%, transparent 60%),
                   radial-gradient(circle at 20% 80%, rgba(58, 124, 165, 0.1) 0%, transparent 50%);
  --gradient-btn: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  --gradient-btn-hover: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  
  /* 排版 */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  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.65;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

/* 排版层级 */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); margin-bottom: var(--space-lg); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: var(--space-md); color: #111827; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); margin-bottom: var(--space-sm); }

.section { padding: clamp(3rem, 5vw, 5rem) 0; }
.section-header { max-width: 800px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-desc { color: var(--color-text-muted); font-size: 1.05rem; margin-top: var(--space-sm); }

/* 布局工具 */
.split-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.flex-row { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }

/* 组件：按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
}

/* 组件：卡片 */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0FDF4;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: #16A34A;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* 组件：表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: #F9FAFB;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

td { color: #4B5563; }
tr:last-child td { border-bottom: none; }

/* 组件：FAQ */
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

details[open] {
  box-shadow: var(--shadow-sm);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* 页头与页脚 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  height: 32px;
  width: auto;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #111827;
}

nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--color-text);
}

nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

footer {
  background: #F8FAFC;
  border-top: 1px solid var(--color-border);
  padding: clamp(2rem, 4vw, 3rem) 0;
  margin-top: clamp(3rem, 5vw, 5rem);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: #374151;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-col a:hover { color: var(--color-primary); }

.copyright {
  font-size: 0.8rem;
  color: #9CA3AF;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid #E5E7EB;
  text-align: center;
}

/* SVG 动效系统 */
.svg-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.contour-path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: contour-flow 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.contour-path:nth-child(odd) { animation-duration: 15s; stroke: var(--color-primary); opacity: 0.6; }
.contour-path:nth-child(even) { animation-duration: 10s; stroke: var(--color-secondary); opacity: 0.5; }
.contour-path.accent { stroke: var(--color-accent); opacity: 0.8; stroke-width: 2.5; }

@keyframes contour-flow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .contour-path {
    animation: none;
  }
}

/* 辅助类 */
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
  nav ul { gap: var(--space-md); justify-content: center; }
  .split-layout { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
