/* ========================================
   WhatsApp 官网 - 全站共享样式
   ======================================== */

/* --- 设计变量 --- */
:root {
  --color-primary-dark: #0b3d22;
  --color-primary: #1a8c4e;
  --color-primary-light: #2dd480;
  --color-accent: #00d68f;
  --color-bg: #ffffff;
  --color-bg-alt: #f6faf8;
  --color-surface: #f0f4f2;
  --color-border: #dce8e1;
  --color-text: #141823;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(11, 61, 34, 0.06), 0 4px 12px rgba(11, 61, 34, 0.04);
  --shadow-hover: 0 4px 16px rgba(11, 61, 34, 0.1), 0 8px 24px rgba(11, 61, 34, 0.06);
  --max-width: 1200px;
  --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- 排版 --- */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--color-primary-dark);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--color-primary-dark);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
}

p {
  color: var(--color-text-secondary);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.75;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--color-primary-dark);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
  overflow-x: hidden;
  min-width: 0;
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section__label svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section__heading {
  margin-bottom: 1rem;
}

.section__desc {
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* --- 页头 --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand img {
  height: 32px;
  width: auto;
}

.site-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 140, 78, 0.3);
}

.header-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* --- 页脚 --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2rem);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  min-width: 0;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__brand img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  max-width: 280px;
}

.footer__links {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.footer__col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer__col a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.footer__col a:hover {
  color: var(--color-accent);
}

.footer__bottom {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 2px 8px rgba(26, 140, 78, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 140, 78, 0.35);
}

.btn--outline {
  color: var(--color-primary);
  background: transparent;
  border: 1.5px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
}

.btn--lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* --- 卡片 --- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__icon--green {
  background: rgba(26, 140, 78, 0.1);
}

.card__icon--light {
  background: rgba(0, 214, 143, 0.1);
}

.card__title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.card__text {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* --- 特性列表 --- */
.feature-list {
  display: grid;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(26, 140, 78, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item__content h3 {
  margin-bottom: 0.35rem;
}

.feature-item__content p {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* --- 表格 --- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table-wrapper thead {
  background: var(--color-surface);
}

.table-wrapper th,
.table-wrapper td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table-wrapper th {
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-wrapper tbody tr:last-child td {
  border-bottom: none;
}

.table-wrapper tbody tr:hover {
  background: var(--color-bg-alt);
}

/* --- 步骤 --- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  counter-increment: step;
}

.step__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__content h3 {
  margin-bottom: 0.25rem;
}

.step__content p {
  font-size: 0.92rem;
}

/* --- FAQ --- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq details {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: var(--color-primary-light);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  list-style: none;
  user-select: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-text-muted);
  border-radius: 50%;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  border-color: var(--color-primary);
}

.faq details p {
  padding: 0 1.25rem 1rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --- 新闻卡片 --- */
.news-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  min-width: 0;
}

.news-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.news-card__body {
  padding: clamp(1.25rem, 2vw, 1.5rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.news-card__title {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.news-card__excerpt {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: gap 0.2s ease;
}

.news-card__link:hover {
  gap: 8px;
}

.news-card__link svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- 阅读列表 --- */
.read-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.read-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.read-item:hover {
  background: var(--color-surface);
}

.read-item__arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke: var(--color-primary-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.read-item__text {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

.read-item__text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Hero 区域 --- */
.hero {
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__content {
  max-width: 560px;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--color-text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero__note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__note svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__svg {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.hero__svg svg {
  width: 100%;
  height: auto;
}

/* --- 界面示意 --- */
.preview-block {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.preview-block__svg {
  max-width: 720px;
  margin: 0 auto;
}

.preview-block__svg svg {
  width: 100%;
  height: auto;
}

/* --- 分隔线 --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: clamp(2rem, 5vw, 3rem) 0;
}

/* --- 两栏布局 --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-width: 0;
}

/* --- 下载区域 --- */
.download-block {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0d4a2a 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  color: #fff;
  text-align: center;
}

.download-block h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.download-block p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.download-block__info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.download-block__info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-block__info svg {
  width: 15px;
  height: 15px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-block .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.download-block .btn--primary:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* --- 安全说明 --- */
.security-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.security-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.security-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(26, 140, 78, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.security-item__icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.security-item h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.security-item p {
  font-size: 0.9rem;
}

/* --- SVG 动效通用 --- */
.flow-dot {
  animation: flowDot 6s ease-in-out infinite;
}

.flow-dot--slow {
  animation-duration: 10s;
}

.flow-dot--fast {
  animation-duration: 4s;
}

@keyframes flowDot {
  0% { offset-distance: 0%; opacity: 0.3; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0.3; }
}

.flow-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawPath 8s ease-in-out infinite;
}

.flow-path--2 {
  animation-delay: 1s;
}

.flow-path--3 {
  animation-delay: 2s;
  animation-duration: 12s;
}

@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  15% { stroke-dashoffset: 0; }
  85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

.pulse-node {
  animation: pulseNode 3s ease-in-out infinite;
}

@keyframes pulseNode {
  0%, 100% { opacity: 0.4; r: 3; }
  50% { opacity: 1; r: 5; }
}

/* --- 减少动态效果 --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .flow-dot,
  .flow-path,
  .pulse-node,
  .card,
  .news-card,
  .btn--primary,
  .header-btn {
    animation: none !important;
    transition: none !important;
  }
}

/* --- 响应式 --- */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__note {
    justify-content: center;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
  }

  .footer__links {
    gap: 1.5rem;
  }

  .grid--4 {
    grid-template-columns: 1fr;
  }

  .download-block__info {
    flex-direction: column;
    align-items: center;
  }
}
