/* ==========================================================================
   泷芯通营销落地页样式（/longxintong/landing/）
   独立静态页：不进 Vue 应用，不引外部字体/CDN，无第三方依赖。
   设计口径（卡面 §4）：苹果风 —— 大留白、克制动效；t_2bb7c3df 起由深色主题改为
   **浅色明亮主题**（用户 2026-11-10：「这个网页太暗了，要明亮一点」）。
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
/*
 * 浅色主题一律走 token，禁止局部打补丁：
 * 原实现把「白色半透明叠层」硬编码在正文里（深色主题专用），
 * 换浅底后这类叠层等于隐形（白压白），所以全部收成 --card / --line / --shine。
 * 对比度按 WCAG 2.1 算过（见 docs/31-evidence-t_2bb7c3df/contrast.txt）：
 *   --ink 16.56:1、--ink-2 7.02:1、--ink-3 5.05:1、--accent 4.62:1（均 >= 4.5:1）
 */
:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --ink: #111826;
  --ink-2: #4a5568;
  --ink-3: #5f6b7b;
  --line: rgba(17, 24, 38, 0.1);
  --line-strong: rgba(17, 24, 38, 0.22);
  --card: #ffffff;
  --card-hover: #f2f7fe;
  --accent: #1c6fd0;
  --accent-2: #1668b8;
  /* 压在 accent 淡底胶囊上的文字色：#1c6fd0 叠 10% 淡蓝只有 4.16:1，压到 #12539b 是 6.43:1 */
  --accent-ink: #12539b;
  --accent-soft: rgba(28, 111, 208, 0.1);
  /* 浅底上的叠层 / 毛玻璃 / 遮罩 / 阴影（深色主题下这些是白色半透明，必须换向） */
  --shine: rgba(28, 111, 208, 0.06);
  --glass: rgba(248, 250, 253, 0.82);
  --scrim: rgba(17, 24, 38, 0.42);
  --shadow-sm: 0 1px 2px rgba(17, 24, 38, 0.06);
  --shadow-card: 0 14px 32px rgba(17, 24, 38, 0.1);
  --shadow-panel: 0 24px 64px rgba(17, 24, 38, 0.24);
  --radius-card: 20px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 600ms;
  --pad-x: 24px;
  --nav-h: 64px;
  /*
   * 安全区（t_4b9d44ff / QA t_d2bfcc9d P2）: 落地页自己引导「添加到主屏幕」，
   * 而 <meta viewport viewport-fit=cover> 在 standalone 下会让内容顶进 iPhone 刘海
   * （47px 不透明区压住品牌/登录/下载）。这里把环境量收进 token，nav 与整屏 section
   * 的上下留白全部从它派生 —— 没有安全区时 env() 回退 0px，桌面/Android 视觉不变。
   */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* 整屏吸附 + 平滑滚动（键盘/指示器跳转都走这条） */
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 38, 0.22) transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- screen */
.screen {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + var(--safe-top) + 8vh) var(--pad-x)
    calc(8vh + var(--safe-bottom));
  overflow: hidden;
}

.screen__inner {
  position: relative;
  width: 100%;
  max-width: 1120px;
  /* 「切页不是硬切」：非当前屏淡出 8%、下一屏从 12px 下方升入 */
  opacity: 0.92;
  transform: translateY(12px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}

.screen.is-active > .screen__inner {
  opacity: 1;
  transform: translateY(0);
}

/* 逐块入场：用动画而不是 transition。
   ① transition 会被同权重、后出现的 .card/hover 简写覆盖 → stagger 失效；
   ② 首帧就加 class 时浏览器不产生「前值」，transition 不插值（首屏直接瞬现）。
   动画用 translate 属性而非 transform，避免和卡片 3D tilt 的 transform 互相覆盖。 */
.reveal {
  opacity: 0;
  translate: 0 16px;
}

/* 入场只做一次：.is-seen 进过视口就不再撤销（否则离场时内容会瞬间消失） */
.is-seen .reveal {
  animation: rise var(--dur) var(--ease) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.screen__hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  animation: hint-drift 2.6s var(--ease) infinite;
}

@keyframes hint-drift {
  0%,
  100% {
    opacity: 0.62;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, 6px);
  }
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  /* 刘海/状态栏区不铺内容：把整条导航压到安全区之下（背景仍延伸到屏幕顶，视觉连续） */
  padding-top: var(--safe-top);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 400ms var(--ease), border-color 400ms var(--ease),
    backdrop-filter 400ms var(--ease);
}

.nav.is-solid {
  /* 毛玻璃顶栏：浅底上用「近白半透明 + 模糊」，深色主题的 rgba(10,12,16,.72) 在浅底上会留一道灰带 */
  background: var(--glass);
  border-bottom-color: var(--line);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.nav__bar {
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__progress {
  display: block;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 120ms linear;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.brand__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 顶栏按钮统一「浅色胶囊」（卡面 §3 屏 0）：强调色只留页内主 CTA 一个 */
.nav__actions .btn--solid {
  background: var(--accent-soft);
  border-color: rgba(28, 111, 208, 0.3);
  color: var(--accent-ink);
  box-shadow: none;
}

.nav__actions .btn--solid:hover {
  background: rgba(28, 111, 208, 0.18);
  box-shadow: 0 6px 18px rgba(28, 111, 208, 0.18);
}

/* ---------------------------------------------------------------- 按钮 */
.btn {
  --btn-py: 10px;
  --btn-px: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 300ms var(--ease), background 300ms var(--ease),
    border-color 300ms var(--ease), box-shadow 300ms var(--ease), opacity 200ms linear;
}

.btn--sm {
  --btn-py: 8px;
  --btn-px: 18px;
  min-height: 36px;
  font-size: 14px;
}

.btn--lg {
  --btn-py: 14px;
  --btn-px: 28px;
  min-height: 50px;
  font-size: 16px;
}

.btn--solid {
  color: #fff;
  /* 浅底上的实心主 CTA：渐变两端都压到 >=4.5:1（白字），#289bf0 在浅底环境里太亮、白字只有 2.9:1 */
  background: linear-gradient(135deg, #1668b8, #0f5f9e);
  box-shadow: 0 8px 24px rgba(28, 111, 208, 0.26);
}

.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(28, 111, 208, 0.34);
}

.btn--ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: rgba(17, 24, 38, 0.34);
}

.btn:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------- 指示器 */
.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 35;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dots__dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dots__dot span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  /*
   * 非活动指示点（t_4b9d44ff 定对比度口径，t_2bb7c3df 换浅底时同步翻转）:
   * 深色主题是「白点压黑底」，浅色主题必须换成「深点压浅底」，否则白点直接消失。
   * rgba(17,24,38,.55) 合成 #788085 vs #f5f7fb = 3.7:1，过 WCAG SC 1.4.11 的 3:1 门槛。
   */
  background: rgba(17, 24, 38, 0.55);
  transition: transform 400ms var(--ease), background 400ms var(--ease);
}

.dots__dot:hover span {
  background: rgba(17, 24, 38, 0.78);
}

.dots__dot.is-current span {
  transform: scale(2);
  background: var(--accent-2);
}

/* ---------------------------------------------------------------- hero */
.screen--hero {
  padding-top: var(--nav-h);
  justify-content: center;
}

.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* 鼠标视差用：JS 只改这两个变量，位移上限 8px */
  --px: 0px;
  --py: 0px;
}

.glow__core,
.glow__ring,
.glow__speck {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}

.glow__core {
  left: 50%;
  top: 44%;
  width: min(78vw, 900px);
  aspect-ratio: 1;
  transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py)));
  /* 浅底光晕：中心用品牌蓝 20% 才看得见，边缘必须淡出到 --bg（#f5f7fb），否则浅底上会留一块脏灰 */
  background: radial-gradient(
    circle at 50% 50%,
    rgba(28, 111, 208, 0.2) 0%,
    rgba(28, 111, 208, 0.08) 34%,
    rgba(245, 247, 251, 0) 68%
  );
  filter: blur(10px);
  animation: breathe 9s ease-in-out infinite;
}

.glow__ring {
  left: 50%;
  top: 44%;
  width: min(52vw, 620px);
  aspect-ratio: 1;
  transform: translate(calc(-50% + var(--px) * 0.6), calc(-50% + var(--py) * 0.6));
  border: 1px solid rgba(28, 111, 208, 0.16);
  box-shadow: inset 0 0 80px rgba(28, 111, 208, 0.05);
  animation: breathe 11s ease-in-out infinite reverse;
}

.glow__speck {
  width: 4px;
  height: 4px;
  background: var(--accent);
  opacity: 0.4;
  box-shadow: 0 0 10px 1px rgba(28, 111, 208, 0.28);
}

.glow__speck--a {
  left: 22%;
  top: 38%;
  animation: float-a 12s ease-in-out infinite;
}

.glow__speck--b {
  right: 24%;
  top: 58%;
  animation: float-b 14s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.78;
    scale: 1;
  }
  50% {
    opacity: 1;
    scale: 1.045;
  }
}

@keyframes float-a {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -14px);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 12px);
  }
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero__eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.hero__title {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 逐行上浮：外框裁切 + 内层位移（不弹跳、不旋转） */
.line {
  display: block;
  overflow: hidden;
  padding: 0 0.08em;
}

.line__in {
  display: block;
  transform: translateY(112%);
}

.screen.is-seen .line:nth-child(1) .line__in {
  animation: line-rise 900ms var(--ease) both;
}

.screen.is-seen .line:nth-child(2) .line__in {
  animation: line-rise 900ms var(--ease) both;
  animation-delay: 120ms;
}

@keyframes line-rise {
  from {
    transform: translateY(112%);
  }
  to {
    transform: translateY(0);
  }
}

.hero__sub {
  max-width: 30em;
  font-size: 17px;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero__meta {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------- 液态玻璃 hero（t_9ca2270a） */
/*
 * 与 LiquidGlass.vue 的对应关系（结构与算法逐段搬，没有自己发明）：
 *   组件 .lg-root    → .lg-hero（本层，同时保留 .screen__inner 的切屏过渡）
 *   组件 .lg-glass   → .lg-glass（圆角 + 底色 + 内阴影；指针跟随的 transform 目标）
 *   组件 .lg-warp    → .lg-warp（backdrop-filter 毛玻璃 + SVG 位移滤镜）
 *   组件 .lg-sheen   → .lg-sheen（跟随指针的柔光，读 --lg-hx/--lg-hy）
 *   组件 .lg-content → .lg-content（内容层，z-index:1）
 *
 * 三级降级（capabilities.ts 的裁决，类名由 landing.js 加）：
 *   is-full          位移 + 跟随（Chrome 内核 && 非低端 && 未开「减少动效」）
 *   no-displacement  只留 backdrop-filter 毛玻璃（Safari / Firefox / iOS）
 *   no-backdrop      连毛玻璃都不支持 → 近白纯色卡片（仍然可读）
 *   no-follow        关指针跟随（低端机 / prefers-reduced-motion）
 * 位移滤镜只挂在 .lg-hero.is-full .lg-warp（元素自身），不给全屏容器套 filter。
 */
.lg-hero {
  /* 比 .screen__inner 的 1120px 窄：玻璃卡太宽就看不出边缘折射 */
  max-width: 880px;
  /*
   * ⚠ 必须清掉 .screen__inner 的 will-change（本卡实测 2026-11-17）：
   * `will-change: opacity, transform` 会创建 backdrop root，导致卡内 .lg-warp 的
   * backdrop-filter 采样不到页面背景 → 位移滤镜作用在「空背景」上，整张卡被半透明黑覆盖
   * （内部均值 173 vs 摘掉后 240，见 docs/evidence-t_9ca2270a）。
   * 同理：不要再给 .lg-hero 或它的祖先加 will-change / opacity<1 / filter / mask。
   */
  will-change: auto;
}

/* 玻璃的「折射源」：纯 CSS 点阵（零请求）。只提供高频细节，不产生文案。
   作为 .lg-hero 的第一层子元素（在 .lg-glass 之前绘制）⇒ inset:0 就是卡片自身矩形，
   卡片外一个像素都不占，hero 背景观感不变。 */
.lg-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  overflow: hidden;
  pointer-events: none;
}

.lg-backdrop__grid {
  position: absolute;
  inset: 0;
  /* 16px 间距的品牌蓝点阵：位移滤镜把边缘附近的点推歪 ⇒ 折射/色散才看得见。
     强度是本卡实测调出来的（docs/evidence-t_9ca2270a/J1：0.55/2.4px 时像素差 <0.2%，
     肉眼看不见；0.9/3.4px 时 3.3% 像素差、放大看是点阵纹理且不脏）。 */
  background-image: radial-gradient(rgba(28, 111, 208, 0.9) 3.4px, transparent 3.7px);
  background-size: 16px 16px;
  /*
   * 中心留白、边缘显形：位移/色散本来就只发生在边缘（过滤器内 EDGE_MASK 也把中心还原成原图），
   * 让点阵在中心淡出，文字区不受干扰；52%→86% 这段过渡正好覆盖卡片圆角内的边缘带。
   */
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, transparent 52%, #000 86%);
  mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, transparent 52%, #000 86%);
}

.lg-filter-defs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.lg-glass {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  /* 底色 RGB 与 --glass 完全一致（248,250,253），只把 alpha 降到 0.55：
     --glass 的 0.82 会把背后的位移压成一片白、折射看不出来；不新增第二套色系 */
  background: rgba(248, 250, 253, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(17, 24, 38, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 44px 40px;
  --lg-hx: 50%;
  --lg-hy: 50%;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
  will-change: transform;
}

.lg-warp {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* 吞不掉按钮点击：这是这类特效最常见的坑（LiquidGlass.vue 顶部注释第 5 条） */
  pointer-events: none;
  /*
   * blur/saturate 与组件 warpStyle 同构（4 + blurAmount*32、saturation 140%），
   * 但落地页把 blur 从组件默认 6px 降到 3px：首屏背景是低频渐变，6px 会把身后的点阵抹成一片雾、
   * 位移就完全看不见（README「圆环背景」一节同一结论）。3px 下点阵还在、文字对比度不受影响。
   */
  backdrop-filter: blur(3px) saturate(140%);
  -webkit-backdrop-filter: blur(3px) saturate(140%);
}

/* 位移只在能力判定通过后才挂：默认不挂，避免 Safari/Firefox 先闪一帧错位色散 */
.lg-hero.is-full .lg-warp {
  filter: url(#lg-hero-warp);
}

.lg-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  /* 组件里是 var(--glass-sheen)（应用主题变量）；落地页无此 token，取同语义的白色柔光 */
  background: radial-gradient(320px circle at var(--lg-hx) var(--lg-hy), rgba(255, 255, 255, 0.55), transparent 62%);
  opacity: 0.9;
}

/*
 * 四角补光（t_eb6fe3ce 定因；t_57c34e51 第4轮收窄，与 LiquidGlass.vue 的 .lg-corner-glow 同一口径逐字一致）：
 * 边缘位移会把卡片**外侧**的背景折射进圆角内侧（第2轮真机 A/B：单独摘 backdrop-filter 或单独摘
 * 位移 filter 都变干净 ⇒ 两者叠加才出灰影），圆角半径小、折射距离相对长 ⇒ 贴着圆角的羽化灰影。
 * 两层柔光叠在 .lg-warp 之上（DOM 顺序在 warp 之后）、.lg-content 之下：
 *   · 46px 近角层  —— 压掉贴角 2~16px 的暗带（右上单独加强：实测右上最暗）
 *   · 80px 外圈层  —— 只做柔和过渡；原来 130px 会铺满卡片 1/3，四角比卡身亮 +19 ⇒ 看着像白塑料
 * 只压灰影，不动位移强度/圆角/背景，边缘中段折射照旧。
 */
.lg-corner-glow {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* 只在挂了位移（is-full）时补光：降级模式下没有折射，也就没有灰影，不要平白加亮角 */
.lg-hero.is-full .lg-corner-glow {
  display: block;
  background:
    radial-gradient(46px circle at 0% 0%, rgba(255, 255, 255, 0.56), transparent 100%),
    radial-gradient(46px circle at 100% 0%, rgba(255, 255, 255, 0.62), transparent 100%),
    radial-gradient(46px circle at 0% 100%, rgba(255, 255, 255, 0.46), transparent 100%),
    radial-gradient(46px circle at 100% 100%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(80px circle at 0% 0%, rgba(255, 255, 255, 0.44), transparent 72%),
    radial-gradient(80px circle at 100% 0%, rgba(255, 255, 255, 0.42), transparent 72%),
    radial-gradient(80px circle at 0% 100%, rgba(255, 255, 255, 0.62), transparent 72%),
    radial-gradient(80px circle at 100% 100%, rgba(255, 255, 255, 0.68), transparent 72%);
}

.lg-content {
  position: relative;
  z-index: 1;
}

/* 降级矩阵 */
.lg-hero.no-displacement .lg-warp {
  filter: none;
}

.lg-hero.no-backdrop .lg-warp {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.lg-hero.no-backdrop .lg-glass {
  background: rgba(255, 255, 255, 0.94);
}

.lg-hero.no-follow .lg-sheen {
  display: none;
}

/* solid 级别（连 backdrop-filter 都没有）：点阵失去了「被采样」的意义，收掉，纯色卡片最稳 */
.lg-hero.no-backdrop .lg-backdrop {
  display: none;
}

/* 减少动效：与 LiquidGlass.vue 末尾那段同一口径 —— 过渡也关掉（跟随已由 no-follow 关掉） */
@media (prefers-reduced-motion: reduce) {
  .lg-glass {
    transition: none;
    will-change: auto;
  }
}

/* ---------------------------------------------------------------- 小节标题 */
.sect-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vh, 56px);
}

.sect-title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sect-sub {
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 功能卡 */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: transform 400ms var(--ease), border-color 400ms var(--ease),
    background 400ms var(--ease), box-shadow 400ms var(--ease);
}

/* 极轻 3D tilt：JS 写 --rx/--ry，限幅 ±4° */
.card.is-tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px);
  border-color: rgba(28, 111, 208, 0.3);
  background: var(--card-hover);
  box-shadow: var(--shadow-card);
}

.card__icon {
  width: 24px;
  height: 24px;
  margin-bottom: 16px;
  color: var(--accent);
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 数字 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  text-align: center;
}

.stats__item {
  display: flex;
  flex-direction: column-reverse; /* 视觉上数字在上、说明在下（DOM 仍 dd→dt 语义） */
  gap: 10px;
}

.stats__value {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  /* 渐变文字：浅底上 #ffffff→#6ad0ff 会在背景里"消失"，改深墨→品牌蓝 */
  background: linear-gradient(180deg, #111826 20%, var(--accent) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats__label {
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 安全 */
.security {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.security__text .sect-sub {
  margin-bottom: 32px;
}

.sec-list {
  display: grid;
  gap: 24px;
}

.sec-list__item {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.sec-list__item h3 {
  font-size: 17px;
  font-weight: 600;
}

.sec-list__item p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-2);
}

.security__art {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  color: rgba(28, 111, 208, 0.55);
}

/* inline <svg> 没有固有尺寸时，宽度由「内容→figure→svg」互相推导会塌成 0，
   所以这里显式给宽高比（实测塌成 0×0，图案完全不可见）。 */
.security__art svg {
  width: 100%;
  height: auto;
  aspect-ratio: 240 / 260;
}

.draw {
  /* 720 小于外壳矩形周长(~759) → 收尾会留一道断口，按最长路径给足 */
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1400ms var(--ease);
}

.screen.is-seen .draw--1 {
  stroke-dashoffset: 0;
  transition-delay: 120ms;
}

.screen.is-seen .draw--2 {
  stroke-dashoffset: 0;
  transition-delay: 340ms;
}

.screen.is-seen .draw--3 {
  stroke-dashoffset: 0;
  transition-delay: 760ms;
}

.screen.is-seen .draw--4 {
  stroke-dashoffset: 0;
  transition-delay: 940ms;
}

/* ---------------------------------------------------------------- 下载 + 页脚 */
.screen--last {
  align-items: stretch;
}

.screen--last > .screen__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(32px, 6vh, 64px);
}

.cta {
  position: relative;
  padding: clamp(28px, 4.4vh, 48px) clamp(20px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
}

/* CTA 柔光：跟随鼠标（JS 写 --mx/--my），不跟随则落在中心偏上 */
.cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 30%),
    rgba(28, 111, 208, 0.14),
    rgba(28, 111, 208, 0) 62%
  );
  pointer-events: none;
  transition: opacity 400ms var(--ease);
}

.cta > * {
  position: relative;
}

.cta__title {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.cta__sub {
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink-2);
}

.cta__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta__meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}

.cta__tip {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.foot {
  /* 与 CTA 之间留固定呼吸间隙（曾用 margin-top:auto 贴屏底，反而把 CTA 顶到上方、
     下方空一大块，重心失衡） */
  margin-top: clamp(24px, 6vh, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.foot__left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.foot__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.foot__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot__meta strong {
  font-weight: 500;
  color: var(--ink);
}

/* 公安联网备案行（t_2bb7c3df §3.3）：官方图标 36×40 原样缩到 16×18，不重采样改绘，
   用 inline-flex 对齐文字基线，避免 img 基线下沉导致行高被撑开。 */
.foot__beian a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}

.foot__beian img {
  width: 16px;
  height: 18px;
  flex: 0 0 auto;
}

.foot__beian a:hover {
  color: var(--accent);
}

/* iPhone 点「下载」时的引导态（t_2bb7c3df §3.1.3：iOS 不下 APK、不出二维码，
   把用户带到页尾已有的「iPhone 请直接用网页版」提示，不新增一份承诺文案） */
.cta__tip.is-flash {
  animation: tip-flash 1.4s ease-in-out 2;
  /* t_6aaa6d41：必须显式写回 opacity/translate。
     本元素同时是 `.reveal`（初态 opacity:0，靠 `.is-seen .reveal` 的 rise 动画淡入），
     而 `animation` 简写会被本条整体替换（同特异性、声明在后）⇒ rise 的「终态 opacity:1」一并丢失，
     闪烁的 3s 里提示是**全透明**的（浏览器实测 DURING flash: animationName=tip-flash / opacity=0）。
     用户点完下载只看到空白，需求「iOS 引导高亮」等于没达成。 */
  opacity: 1;
  translate: 0 0;
}

@keyframes tip-flash {
  0%,
  100% {
    color: var(--ink-3);
  }
  50% {
    color: var(--accent);
  }
}

/* ---------------------------------------------------------------- 扫码弹层 */
/*
 * 桌面点「下载」的对象：手机点下载直接拿走 APK，桌面才弹这个（t_2bb7c3df §3.1.2）。
 * 遮罩 + 面板两段式，面板内不滚动（内容固定一屏内），关闭走「按钮 / 遮罩 / ESC」三条路径。
 */
.dlg {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dlg[hidden] {
  display: none;
}

.dlg__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dlg__panel {
  position: relative;
  width: min(340px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  border-radius: 24px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-panel);
  text-align: center;
  animation: dlg-in 260ms var(--ease) both;
}

@keyframes dlg-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.dlg__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-3);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dlg__close:hover {
  background: var(--card-hover);
  color: var(--ink);
}

.dlg__title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 0 32px;
}

.dlg__code {
  margin: 18px auto 14px;
  width: 228px;
  height: 228px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.dlg__code canvas {
  width: 220px;
  height: 220px;
  display: block;
}

/* 微信形态要把二维码块换掉：`.dlg__code` 自身是 display:grid，UA 的 [hidden] 压不住，必须显式写。 */
.dlg__code[hidden] {
  display: none;
}

/* 微信内置浏览器引导（t_4b82498a §8.2）：三步操作清单。
   white-space: pre-line 保留脚本里的换行，避免把三步挤成一行看不懂。 */
.dlg__guide {
  margin: 18px auto 4px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
  text-align: left;
  white-space: pre-line;
}

.dlg__guide[hidden] {
  display: none;
}

/* 扫码落地（?from=qr）闪一下下载按钮：复用「闪两遍就停」的口径，不引入计时器。 */
.btn.is-flash {
  animation: btn-flash 1.4s ease-in-out 2;
}

@keyframes btn-flash {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(28, 111, 208, 0);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(28, 111, 208, 0.3);
  }
}

.dlg__desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  text-align: left;
}

.dlg__url {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
  word-break: break-all;
  text-align: center;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card {
    padding: 18px 16px 16px;
  }

  .card__icon {
    width: 22px;
    height: 22px;
    margin-bottom: 12px;
  }

  .card__title {
    font-size: 16px;
  }

  .card__text {
    font-size: 13px;
  }

  .security {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .security__art {
    display: none; /* 手机上文字信息更重要，线稿让位 */
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  /* 手机上保留指示器：视觉点缩到 4px，但命中区保持 24×24（WCAG 2.2 target-size 最小 24px），
     贴右边缘 0 时只压到内容 6px（内容左右留 18px、卡片内再留 16px，不会盖住文字） */
  .dots {
    right: 0;
    gap: 2px;
  }

  .dots__dot {
    width: 24px;
    height: 24px;
  }

  .dots__dot span {
    width: 4px;
    height: 4px;
    background: rgba(17, 24, 38, 0.48);
  }

  .dots__dot.is-current span {
    transform: scale(1.6);
  }
}

@media (max-width: 600px) {
  :root {
    --pad-x: 18px;
    --nav-h: 56px;
  }

  body {
    font-size: 16px;
  }

  .screen {
    padding: calc(var(--nav-h) + var(--safe-top) + 4vh) var(--pad-x)
      calc(4vh + var(--safe-bottom));
  }

  .nav__actions .btn {
    min-height: 40px;
  }

  .hero {
    gap: 18px;
  }

  /* 液态玻璃卡（t_9ca2270a）：手机上一屏要装得下，把内边距与圆角收一档 */
  .lg-glass {
    padding: 30px 20px;
    border-radius: 22px;
  }

  .hero__title {
    font-size: clamp(30px, 9vw, 40px);
  }

  .hero__sub {
    font-size: 15px;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .sect-head {
    margin-bottom: 20px;
  }

  .sect-sub {
    font-size: 14px;
  }

  .sec-list {
    gap: 16px;
  }

  .sec-list__item p {
    font-size: 13px;
  }

  .cta__actions {
    flex-direction: column;
    align-items: center;
  }

  .cta__actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .foot__meta {
    flex-direction: column;
    gap: 4px;
  }
}

/* 矮屏（横屏手机 / 小笔记本）压缩纵向节奏，保证一屏装得下 */
@media (max-height: 720px) and (min-width: 601px) {
  .screen {
    padding-top: calc(var(--nav-h) + var(--safe-top) + 5vh);
    padding-bottom: calc(5vh + var(--safe-bottom));
  }

  .cards {
    gap: 12px;
  }

  .card {
    padding: 20px;
  }

  .sect-head {
    margin-bottom: 28px;
  }
}

/* ---------------------------------------------------------------- 降级 */
/*
  prefers-reduced-motion：位移/视差/计数动画一律关闭，只保留淡入。
  吸附切页保留（它属于导航机制，不是装饰动效）。
*/
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .screen__inner,
  .card,
  .btn,
  .draw {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    transform: none !important;
  }

  .reveal,
  .line__in,
  .is-seen .reveal,
  .screen.is-seen .line__in {
    animation: none !important;
  }

  .screen__inner,
  .reveal {
    opacity: 1;
  }

  .reveal,
  .line__in {
    translate: none;
    transform: none;
  }

  .draw {
    stroke-dashoffset: 0;
  }

  .glow__core,
  .glow__ring,
  .glow__speck,
  .screen__hint {
    animation: none !important;
  }
}
