/* =====================================================================
   闪戒 Landing Page —— 响应式样式
   设计稿颜色变量取自 Figma；中文正文使用系统字体栈
   （不加载自定义中文 webfont，国内访问更快）。
   断点：手机 <768、平板 768–1099、桌面 ≥1100。
   ===================================================================== */

:root {
  /* —— 设计稿色板 —— */
  --brand:        #9f84f8;   /* 主品牌色 */
  --brand-deep:   #846fec;   /* 深一档（Hero 背景 / CTA） */
  --brand-soft:   #ddd2fe;   /* 图标底色 */
  --surface:      #f4f1ff;   /* 浅紫面 */
  --surface-2:    #f6f6f9;   /* 浅灰面 / 卡片底 */
  --cultured:     #f7f6f9;   /* 板块浅灰背景（为什么 / FAQ） */
  --lime:         #d4f120;   /* 点缀亮绿 */
  --ink:          #27262b;   /* 主文字 */
  --ink-2:        #4a4a55;   /* 正文 */
  --gray:         #64748b;   /* 次要文字 */
  --line:         #ececf1;
  --white:        #ffffff;

  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --maxw: 1200px;
  --nav-h: 72px;
  --shadow: 0 18px 50px rgba(50, 40, 110, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.hl { color: var(--brand); }

.section-title {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
}

/* ============ 品牌 Logo ============ */
/* logo.png 为「图标 + 闪戒」整体标识（154×48），按原比例显示，不要拉伸 */
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 36px; width: auto; }

/* ============ 导航栏 ============ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}

.nav-links { display: flex; gap: 48px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink);
  transition: color .2s;
}
.nav-links a:hover { color: var(--brand); }

/* 汉堡菜单按钮（移动端显示） */
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; background: none;
  cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; margin: 0 auto;
  background: var(--ink); border-radius: 2px; transition: .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 下载按钮 ============ */
.downloads { display: flex; gap: 24px; flex-wrap: wrap; }
.downloads--center { justify-content: center; }

.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 200px; padding: 14px 24px;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 12px;
  font-family: inherit; font-size: 18px; font-weight: 600; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(39,38,43,.16); }
/* 首页下载按钮 hover：填充黑底、文字与图标转白（按设计稿 node 3125:28309） */
.hero .dl-btn:hover { background: #000; border-color: #000; color: var(--white); }
.hero .dl-btn:hover .dl-icon { filter: brightness(0) invert(1); }
.dl-icon { width: 28px; height: 28px; transition: filter .2s; }
/* 「（内测）」标记：比主文字略小、稍弱化 */
.dl-beta { font-size: .72em; font-weight: 600; opacity: .65; margin-left: 1px; }

/* CTA 上的浅色按钮：无边框白底 */
.dl-btn--light { border-color: transparent; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.dl-btn--light:hover { box-shadow: 0 14px 30px rgba(0,0,0,.22); }

/* ============ 首屏 Hero ============ */
/* 占满首屏（减去导航栏高度），让下一板块标题落到折叠线以下 */
.hero {
  display: flex; align-items: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  padding: clamp(32px, 5vw, 72px) 0;
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-title {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 800; line-height: 1.4; letter-spacing: -0.5px;
}
.hero-sub { margin-top: 24px; font-size: clamp(15px, 1.3vw, 20px); color: var(--gray); line-height: 1.6; }
.hero-copy .downloads { margin-top: 40px; }

.hero-art { position: relative; }
.hero-art img { width: 100%; height: auto; }

/* ============ 核心功能 ============ */
.features { padding: clamp(50px, 7vw, 100px) 0; }
.feature-grid {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.feature-card {
  background: var(--surface-2); border-radius: var(--radius-lg);
  padding: 48px 48px 44px; text-align: center;
  /* 入场前状态：隐藏并下移，由 JS 加 .revealed 逐个触发 */
  opacity: 0; transform: translateY(30px);
  transition: opacity .55s ease, transform .55s ease, box-shadow .25s ease;
}
.feature-card.revealed { opacity: 1; transform: translateY(0); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-art {
  height: 360px; display: flex; align-items: flex-end; justify-content: center;
  margin-bottom: 28px; overflow: hidden;
  /* 手机后面的柔和光晕 */
  background: radial-gradient(58% 50% at 50% 80%, rgba(159,132,248,.22), transparent 70%);
}
.feature-art img {
  max-height: 100%; width: auto; object-fit: contain;
  filter: drop-shadow(0 22px 40px rgba(50,40,110,.18));
}
.feature-card h3 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 800; }
.feature-card p { margin-top: 14px; color: var(--gray); font-size: 15px; line-height: 1.7; }

/* ============ 为什么不一样 ============ */
/* 无外层卡片，板块白底；溢出（手机/圆形）由 .why 的 overflow:hidden 裁切 */
.why { background: var(--white); padding: clamp(40px, 6vw, 88px) 0; overflow: hidden; }
.why .section-title { margin-bottom: clamp(32px, 4vw, 56px); }
.why-inner {
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 40px; align-items: start;
}
/* 左侧列表：默认白底无投影圆角卡，hover 变浅灰 #f7f6f9（图标+标题一行，描述在下方一行） */
.why-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.why-list li {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: var(--white); border-radius: 32px; padding: 22px 28px;
  transition: background .2s ease, box-shadow .2s ease;
}
.why-list li:hover {
  background: var(--cultured);
}
.why-head { display: flex; gap: 12px; align-items: center; }
.why-ico {
  flex: 0 0 52px; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.why-ico img { width: 52px; height: 52px; }
.why-list h3 { font-size: 22px; font-weight: 800; }
/* 描述默认单行不换行（移动端恢复换行，见媒体查询） */
.why-list p { color: var(--gray); font-size: 15px; line-height: 1.7; white-space: nowrap; }

/* 右侧：手机图，与左侧列表顶部对齐 */
.why-art {
  position: relative; display: flex; justify-content: center; align-items: flex-start;
}
.why-phone { width: 100%; max-width: 620px; height: auto; }

/* ============ 常见问题 FAQ ============ */
.faq { background: var(--cultured); padding: clamp(50px, 7vw, 100px) 0; }
.faq-inner { max-width: 880px; }
.faq .section-title { margin-bottom: clamp(28px, 4vw, 48px); }
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--white); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 2px 12px rgba(30, 25, 60, .05);
}
.faq-q {
  width: 100%; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 28px; text-align: left;
  font-size: clamp(15px, 1.3vw, 17px); font-weight: 600; color: var(--ink);
  font-family: inherit;
}
/* + / − 图标（纯 CSS） */
.faq-ico { position: relative; flex: 0 0 24px; width: 24px; height: 24px; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s;
}
.faq-ico::before { width: 16px; height: 2px; transform: translate(-50%, -50%); }
.faq-ico::after  { width: 2px; height: 16px; transform: translate(-50%, -50%); }
.faq-item.open .faq-ico::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 28px 26px; color: var(--ink-2); font-size: 15px; line-height: 1.8; }

/* ============ CTA ============ */
.cta {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  padding: clamp(56px, 7vw, 96px) 0; color: var(--white); position: relative; overflow: hidden;
}
.cta-inner { position: relative; text-align: center; z-index: 1; }
.cta-title {
  font-size: clamp(24px, 3vw, 40px); font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 36px;
}
.cta-arrow {
  position: absolute; right: 8%; bottom: 28%; width: clamp(90px, 12vw, 180px);
  z-index: 0; pointer-events: none;
}

/* ============ 页脚 ============ */
.footer { background: var(--white); border-top: 1px solid var(--line); padding: 64px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-copy { margin-top: 18px; color: var(--gray); font-size: 13px; line-height: 1.8; }
.footer-copy a:hover { color: var(--brand); }
.footer-social { display: flex; gap: 14px; margin-top: 20px; }
.footer-social a {
  display: inline-flex; transition: opacity .2s, transform .2s;
}
.footer-social a:hover { opacity: .82; transform: translateY(-2px); }
.footer-social img { width: 36px; height: 36px; }

.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--gray); transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-contact { display: inline-flex; align-items: center; gap: 6px; }
.footer-contact svg { flex: 0 0 16px; }

/* ============ 二维码弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(31,30,40,.55); backdrop-filter: blur(2px); animation: fade .2s ease; }
.modal-panel {
  position: relative; background: var(--white); border-radius: 24px;
  padding: 40px 40px 44px; width: min(92vw, 520px); text-align: center;
  box-shadow: 0 30px 80px rgba(20,15,50,.35); animation: pop .25s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 20px; border: 0; background: none;
  font-size: 30px; line-height: 1; color: var(--gray); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-title { font-size: 22px; font-weight: 800; }
.modal-hint { margin-top: 8px; color: var(--gray); font-size: 14px; }
.modal-codes { margin-top: 28px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr > img { width: 240px; height: 240px; border-radius: 12px; }
.qr figcaption { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.qr figcaption img { width: 20px; height: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ============ 微信内打开引导蒙层 ============ */
.wx-guide {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.82);
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 12px 26px 0; color: #fff; text-align: right;
  animation: fade .2s ease; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.wx-guide[hidden] { display: none; }
.wx-guide-arrow { width: 92px; height: auto; margin: 2px 14px 10px 0; }
.wx-guide-text { font-size: 18px; line-height: 1.8; font-weight: 600; }
.wx-guide-text b { font-weight: 800; }
.wx-guide-tip { margin-top: 26px; font-size: 13px; font-weight: 400; opacity: .7; }

/* =====================================================================
   响应式
   ===================================================================== */

/* 平板 */
@media (max-width: 1099px) {
  .hero-inner { gap: 36px; }
  .why-inner { gap: 40px; }
  .why-list p { white-space: normal; } /* 平板列宽不足，恢复换行 */
  .feature-card { padding: 36px 32px; }
  .feature-art { height: 320px; }
}

/* 手机 */
@media (max-width: 767px) {
  :root { --nav-h: 60px; }

  /* 导航：收起为汉堡菜单 */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 8px 0;
    transform: translateY(-130%); transition: transform .3s; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 16px 24px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }

  /* Hero 上下堆叠，文字在上 */
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .downloads, .hero-copy .downloads { justify-content: center; }
  .hero-art { order: 2; max-width: 440px; margin: 0 auto; }

  /* 功能卡片单列 */
  .feature-grid { grid-template-columns: 1fr; gap: 20px; }
  .feature-art { height: 320px; }

  /* 为什么：单列，图在下 */
  .why-inner { grid-template-columns: 1fr; }
  .why-art { min-height: 420px; margin-top: 12px; }
  .why-phone { max-height: 480px; }
  .why-list p { white-space: normal; } /* 窄屏恢复换行，避免溢出 */

  /* CTA 箭头在小屏隐藏，避免遮挡 */
  .cta-arrow { display: none; }

  /* 页脚堆叠 */
  .footer { padding: 48px 0; }
  .footer-inner { flex-direction: column; gap: 36px; }
  .footer-cols { gap: 48px; }
}

/* 小屏微调 */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  /* 窄屏：两个按钮上下堆叠、各占满整行，避免「Android版（内测）」换行 */
  .downloads { flex-direction: column; gap: 12px; width: 100%; }
  .dl-btn { width: 100%; flex: none; min-width: 0; padding: 13px 16px; font-size: 16px; white-space: nowrap; }
  .qr > img { width: 200px; height: 200px; }
  .modal-codes { gap: 20px; }
}

/* 尊重用户的动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* =====================================================================
   法律页面（隐私政策 / 用户协议）—— privacy.html · terms.html
   ===================================================================== */
.legal-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
/* 标题区容器宽度与正文一致（820px 居中），保证左边缘对齐 */
.legal-head .container { max-width: 820px; }
.legal-head h1 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.legal-head .legal-updated {
  margin-top: 10px;
  color: var(--gray);
  font-size: 14px;
}
.legal-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  color: var(--ink-2);
}
.legal-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 14px;
  letter-spacing: -0.3px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 10px;
}
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin: 0 0 8px; }
/* 正文链接跟随正文颜色，仅用下划线区分，不做颜色强调 */
.legal-body a { color: inherit; text-decoration: underline; word-break: break-all; }
/* 表格：仅用细线分隔，文字与正文同色，表头不加重强调 */
.legal-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}
.legal-body th, .legal-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
  font-weight: 400;
}
.legal-body thead th { background: var(--surface-2); }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--brand);
  font-weight: 600;
  font-size: 15px;
}
@media (max-width: 768px) {
  .legal-head { padding: 40px 0 28px; }
  .legal-body { padding: 32px 18px 56px; }
}
