/* =========================================
   WhatsApp 品牌落地站 - 全站共享样式
   设计系统：紫粉双色调 + 玻璃层次 / 圆体亲和 / 不规则留白
   ========================================= */

:root {
  --color-bg: #f4f3f8;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-solid: #ffffff;
  --color-text: #1e1b2e;
  --color-text-secondary: #5a5670;
  --color-purple-deep: #5b4a8a;
  --color-purple-light: #8b7ecf;
  --color-pink-accent: #d45d8a;
  --gradient-primary: linear-gradient(135deg, var(--color-purple-deep), var(--color-pink-accent));
  --gradient-subtle: linear-gradient(180deg, rgba(139, 126, 207, 0.08), rgba(212, 93, 138, 0.06));
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 30px rgba(91, 74, 138, 0.12);
  --shadow-hover: 0 14px 40px rgba(91, 74, 138, 0.18);
  --font-main: 'PingFang SC', 'Noto Sans SC', 'SF Pro Rounded', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-base: 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: var(--gradient-subtle);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 排版与基础组件 */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 650;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin-bottom: 0.8rem; }
p { margin-bottom: 1.1rem; color: var(--color-text-secondary); max-width: 68ch; }

a {
  color: var(--color-purple-deep);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover, a:focus-visible { color: var(--color-pink-accent); }

img, svg { display: block; max-width: 100%; height: auto; }

/* 按钮与交互 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  border: none;
  outline: none;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(212, 93, 138, 0.25);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(212, 93, 138, 0.35);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-purple-light);
  color: var(--color-purple-deep);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: rgba(139, 126, 207, 0.08);
  color: var(--color-purple-deep);
}

/* 页头与导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 243, 248, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(91, 74, 138, 0.08);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { width: 120px; height: 32px; object-fit: contain; }
.brand-name { font-size: 1.15rem; font-weight: 600; color: var(--color-purple-deep); }
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
  border-radius: 2px;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }
.main-nav a[aria-current="page"] { color: var(--color-purple-deep); }

/* 区块布局与不规则留白 */
section {
  padding: 5rem 0;
  position: relative;
}
.section-alt { padding-top: 6.5rem; padding-bottom: 4.5rem; }
.section-tight { padding: 3.5rem 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* 卡片与玻璃拟态 */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* 表格 */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.version-table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.version-table th, .version-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.version-table th {
  background: rgba(91, 74, 138, 0.06);
  font-weight: 600;
  color: var(--color-purple-deep);
}
.version-table tr:last-child td { border-bottom: none; }
.version-table td { color: var(--color-text-secondary); }

/* FAQ 折叠面板 */
.faq-list details {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid rgba(91, 74, 138, 0.1);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.faq-list details:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.faq-list summary {
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-purple-light);
  transition: transform var(--transition-base);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer {
  padding: 0 1.4rem 1.2rem 1.4rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* 最新动态卡片 */
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card .date-block {
  font-size: 0.85rem;
  color: var(--color-pink-accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.news-card p { flex-grow: 1; font-size: 0.95rem; }
.news-card .btn-link {
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  margin-top: auto;
}

/* 页脚 */
.site-footer {
  background: rgba(30, 27, 46, 0.95);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1.05rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* SVG 动画核心 */
@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; opacity: 0; }
  8% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

svg.animate-draw path,
svg.animate-draw circle,
svg.animate-draw rect,
svg.animate-draw polyline,
svg.animate-draw polygon {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-stroke 3.5s cubic-bezier(0.3, 0, 0.7, 1) forwards;
}
svg.animate-draw .delay-1 { animation-delay: 0.15s; }
svg.animate-draw .delay-2 { animation-delay: 0.35s; }
svg.animate-draw .delay-3 { animation-delay: 0.55s; }
svg.animate-draw .delay-4 { animation-delay: 0.75s; }

svg.animate-breathe {
  animation: breathe 5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  svg.animate-draw path, svg.animate-draw circle, svg.animate-draw rect, svg.animate-draw polyline, svg.animate-draw polygon, svg.animate-breathe {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .main-nav ul { gap: 16px; flex-wrap: wrap; justify-content: center; }
  section { padding: 3.5rem 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.5rem; }
}
