/* ========================================
   WhatsApp 官网 - 全局样式
   浅色编辑风 · 克制中性灰阶 · 沉浸氛围
   ======================================== */

/* ---------- 设计变量 ---------- */
:root {
  /* 色彩 */
  --color-primary: #1a8c4b;
  --color-primary-light: #eaf5ee;
  --color-primary-dark: #0f6b38;
  --color-accent: #25d366;
  --color-bg: #fafaf8;
  --color-bg-alt: #f3f3ef;
  --color-surface: #ffffff;
  --color-text: #1e1e1e;
  --color-text-secondary: #5a5a5a;
  --color-text-muted: #8a8a8a;
  --color-border: #e2e2dd;
  --color-border-light: #ecece8;
  --color-focus: #1a8c4b;
  --color-download-btn: #25d366;
  --color-download-btn-hover: #1da855;
  --color-download-btn-text: #ffffff;

  /* 排版 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.775rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.875rem + 0.3vw, 1rem);
  --text-lg: clamp(1.0625rem, 0.975rem + 0.4vw, 1.125rem);
  --text-xl: clamp(1.1875rem, 1.05rem + 0.55vw, 1.3125rem);
  --text-2xl: clamp(1.375rem, 1.2rem + 0.75vw, 1.5625rem);
  --text-3xl: clamp(1.625rem, 1.35rem + 1.1vw, 2rem);
  --text-4xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
  --text-5xl: clamp(2.25rem, 1.75rem + 2vw, 3.125rem);

  /* 间距 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* 布局 */
  --max-width: 1120px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);

  /* 过渡 */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ---------- 基础重置 ---------- */
*, *::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: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ---------- 焦点样式 ---------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-2xl);
  }
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

.section__desc {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.header__name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-xs) 0;
}

.header__nav-link:hover,
.header__nav-link[aria-current="page"] {
  color: var(--color-primary);
}

.header__nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.header__cta {
  display: none;
}

@media (min-width: 768px) {
  .header__cta {
    display: inline-flex;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer__brand-name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
}

.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 320px;
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75em 1.75em;
  transition: background var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-download-btn);
  color: var(--color-download-btn-text);
}

.btn--primary:hover {
  background: var(--color-download-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary-light);
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: 0.5em 1.25em;
  border-radius: var(--radius-sm);
}

.btn--icon {
  width: 20px;
  height: 20px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow var(--transition-base), transform var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

.card-grid {
  display: grid;
  gap: var(--space-lg);
}

.card-grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-grid--5 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 表格 ---------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th, td {
  padding: 0.85em 1em;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-alt);
  white-space: nowrap;
}

td {
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  transition: background var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
  content: "";
}

.faq-item summary:hover {
  background: var(--color-bg-alt);
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item .faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ---------- 链接列表 ---------- */
.link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.link-list__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-list__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

.link-list__title:hover {
  color: var(--color-primary-dark);
}

.link-list__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---------- 步骤编号 ---------- */
.steps-number {
  counter-reset: step-counter;
}

.step-item {
  position: relative;
  padding-left: 2.5em;
  padding-bottom: var(--space-lg);
}

.step-item:last-child {
  padding-bottom: 0;
}

.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8em;
  height: 1.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ---------- 分隔器 ---------- */
.divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2xl) 0;
}

/* ---------- SVG 动效 ---------- */
.svg-animate {
  overflow: visible;
}

/* 同心轨道呼吸 */
@keyframes orbit-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes orbit-breathe-slow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
}

@keyframes orbit-spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-ccw {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes dash-draw {
  0% {
    stroke-dashoffset: 0;
  }
  30% {
    stroke-dashoffset: 1;
  }
  70% {
    stroke-dashoffset: 1;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.svg-orbit-ring {
  animation: orbit-breathe 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.svg-orbit-ring--slow {
  animation: orbit-breathe-slow 8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.svg-orbit-spin-cw {
  animation: orbit-spin-cw 20s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.svg-orbit-spin-ccw {
  animation: orbit-spin-ccw 25s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.svg-draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-draw 8s ease-in-out infinite;
}

.svg-pulse-ring {
  animation: pulse-ring 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  .svg-orbit-ring,
  .svg-orbit-ring--slow,
  .svg-orbit-spin-cw,
  .svg-orbit-spin-ccw,
  .svg-draw-path,
  .svg-pulse-ring {
    animation: none !important;
  }
}

/* ---------- 响应式工具 ---------- */
.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;
}

/* ---------- 移动导航切换 ---------- */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-size: var(--text-lg);
  font-weight: 500;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] {
  color: var(--color-primary);
}
