/* ============================================================
   Narvyn — landing & download page
   「墨玻璃」设计语言（内化自 ShiCe docs/设计语言.md）
   · 纯黑基底 #000，材质代替颜色表达层级
   · 玻璃三档：L1 磨砂 blur12/白.06（无高光）
               L2 常规 blur24/白.10-.16（顶部 1px 内高光）
               L3 清玻璃 blur40/白.16-.28（悬浮件）
   · hairline 描边 rgba(255,255,255,.08)，玻璃外描边 .14
   · 文字三级灰 t1/t2/t3；唯一彩色拾册蓝 #3B6FE0，一屏一次
   · 全部位移用弹簧曲线，禁止生硬缓动
   纯静态 · 系统字体 · 无任何外部依赖
   ============================================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei",
    "Source Han Sans SC", sans-serif;

  /* 色彩令牌（深色） */
  --base: #000000;            /* 页面基底 */
  --elev: #0E0F12;            /* 实底区块 */
  --t1: #F5F6F8;              /* 主文本（不是纯白） */
  --t2: rgba(245, 246, 248, 0.62);
  --t3: rgba(245, 246, 248, 0.38);
  --hairline: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.14);   /* 玻璃外描边 */
  --rim: rgba(255, 255, 255, 0.30);    /* 顶部 1px 内高光 */
  --accent: #3B6FE0;          /* 拾册蓝：唯一彩色 */

  /* 玻璃面色 */
  --glass-l1: rgba(255, 255, 255, 0.06);
  --glass-l2: rgba(255, 255, 255, 0.10);
  --glass-l3: rgba(255, 255, 255, 0.16);

  /* 圆角家族 */
  --r-screen: 24px;
  --r-card: 16px;
  --r-small: 12px;

  /* 弹簧曲线（tokens.dart 的 Cubic 直译） */
  --spring-snap: cubic-bezier(0.2, 0.9, 0.25, 1.02);
  --spring-default: cubic-bezier(0.22, 0.9, 0.3, 1.0);
  --spring-bouncy: cubic-bezier(0.3, 1.35, 0.45, 1.0);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--t1);
  background: var(--base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[id] { scroll-margin-top: 104px; }

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid rgba(245, 246, 248, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(255, 255, 255, 0.18); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--elev);
  color: var(--t1);
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  font-size: 14px;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------
   材质：玻璃三档
   ------------------------------------------------------------ */
.glass-2,
.glass-3 {
  position: relative;
  border-radius: var(--r-card);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 var(--rim),        /* 顶部 1px 内高光（specular rim） */
    0 12px 32px rgba(0, 0, 0, 0.45); /* 落影：真的浮起来 */
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.glass-3 {
  background: var(--glass-l3);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 16px 44px rgba(0, 0, 0, 0.55);
}
.glass-2 { background: var(--glass-l2); }

/* L1 磨砂内容卡：无高光，hairline 描边 */
.frost {
  background: var(--glass-l1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ------------------------------------------------------------
   开屏加载动画（默认 hidden，JS 首次访问才显示）
   黑底 + 玻璃标志 + 细进度
   ------------------------------------------------------------ */
html.is-intro { overflow: hidden; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--base);
}
.loader[hidden] { display: none; }

.loader-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.loader-mark {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--glass-l3);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 18px 44px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  will-change: transform, opacity, filter;
}
/* 玻璃高光斜切面 */
.loader-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}
.loader-mark span {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t1);
}

.loader-word {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--t2);
  will-change: transform, opacity;
}

.loader-bar {
  width: 200px;
  height: 2px;
  border-radius: 2px;
  background: var(--hairline);
  overflow: hidden;
}
.loader-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ------------------------------------------------------------
   悬浮玻璃胶囊导航（L3）
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  height: 56px;
  max-width: calc(100vw - 24px);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 8px 0 22px;
  border-radius: 999px;
  background: var(--glass-l2);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 var(--rim),
    0 12px 32px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  transition: background-color 0.35s var(--spring-default), box-shadow 0.35s var(--spring-default);
}
.nav--scrolled {
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 18px 44px rgba(0, 0, 0, 0.6);
}

.nav-logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t1);
}

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 14px;
  color: var(--t2);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--t1); }

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--t1);
  color: #0B0C0F;
  box-shadow: inset 0 1px 0 #FFFFFF;
  transition: transform 0.35s var(--spring-snap), background-color 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: #FFFFFF; }
.nav-cta:active { transform: scale(0.96); transition-duration: 0.12s; }

@media (max-width: 640px) {
  .nav {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    justify-content: space-between;
    gap: 12px;
  }
  .nav-links { display: none; }
}

/* ------------------------------------------------------------
   通用排版
   ------------------------------------------------------------ */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 7vw, 80px);
}

.section-head h2 {
  margin: 18px 0 0;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--t1);
}

.section-sub {
  margin: 16px auto 0;
  max-width: 540px;
  font-size: 16px;
  color: var(--t2);
}

/* eyebrow 玻璃小签（caption：11-12px · 加字距） */
.chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--glass-l1);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--t2);
}

/* 按钮：胶囊 · 按压 0.96 弹回 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    transform 0.35s var(--spring-snap),
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.35s var(--spring-default);
}
.btn:active { transform: scale(0.96); transition-duration: 0.12s; }
.btn--lg { height: 56px; padding: 0 32px; font-size: 17px; }

/* 亮玻璃反色主按钮（选中 = 亮，不是变蓝） */
.btn--white {
  background: var(--t1);
  color: #0B0C0F;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 10px 28px rgba(0, 0, 0, 0.5);
}
.btn--white:hover { background: #FFFFFF; }

/* 唯一彩色：留给「下载」这个动作与结果本身 */
.btn--accent {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 28px rgba(0, 0, 0, 0.5);
}
.btn--accent:hover { background: #4A7CE8; }

/* L2 玻璃幽灵按钮 */
.btn--glass {
  background: var(--glass-l2);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--rim);
  color: var(--t1);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.16); }

.btn-glyph { transition: transform 0.35s var(--spring-default); }
.btn--glass:hover .btn-glyph { transform: translateY(2px); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(128px, 16vw, 176px) 0 clamp(64px, 9vw, 120px);
}
/* 极淡的单色环境光：给玻璃一点可折射的东西，仅此而已 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 460px at 72% 4%, rgba(255, 255, 255, 0.06), transparent 68%),
    radial-gradient(560px 360px at 8% 30%, rgba(255, 255, 255, 0.03), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  align-items: center;
  gap: clamp(48px, 6vw, 80px);
}

.hero-copy { text-align: center; }

.hero-title {
  margin: 22px 0 0;
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--t1);
}

.hero-kicker {
  margin: 14px 0 0;
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--t2);
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 520px;
  font-size: 16px;
  color: var(--t2);
}

.hero-ctas {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.hero-phone { display: flex; justify-content: center; }
.hero-phone-wrap { will-change: transform, opacity; }

/* 手机样机：黑框 + hairline + 顶部微高光 */
.phone {
  position: relative;
  width: min(300px, 76vw);
  padding: 10px;
  background: #0B0C0F;
  border: 1px solid var(--edge);
  border-radius: 44px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 40px 80px rgba(0, 0, 0, 0.55);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: var(--elev); /* 图片未加载时的底色，防跳动 */
  aspect-ratio: 720 / 1280;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero-copy { text-align: left; }
  .hero-copy .chip { margin-left: 0; }
  .hero-sub { margin-left: 0; }
  .hero-ctas { justify-content: flex-start; }
  .hero-phone { justify-content: flex-end; }
}

/* ------------------------------------------------------------
   核心特性：L1 磨砂卡片
   ------------------------------------------------------------ */
.features { padding: clamp(90px, 12vw, 150px) 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
}

.fcard {
  padding: 26px 24px;
  transition:
    transform 0.35s var(--spring-snap),
    background-color 0.35s var(--spring-default),
    border-color 0.35s ease,
    box-shadow 0.35s var(--spring-default);
}
/* 越靠近用户、越需要交互的东西，玻璃越亮越清 */
.fcard:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--edge);
  box-shadow:
    inset 0 1px 0 var(--rim),
    0 16px 40px rgba(0, 0, 0, 0.5);
}

.fcard-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-small);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--t1);
  margin-bottom: 18px;
}
.fcard-icon svg { width: 24px; height: 24px; }

.fcard h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--t1);
}

.fcard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--t2);
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   界面预览：横向截图长廊
   默认：原生 overflow-x 滚动 + scroll snap（触屏 / 无 JS / 减弱动效）
   pinned 模式由 JS 加 .gallery--pinned 开启
   ------------------------------------------------------------ */
.gallery {
  padding: clamp(90px, 12vw, 150px) 0;
  overflow: hidden;
}

.gallery-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-viewport::-webkit-scrollbar { display: none; }

.gallery-track {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  width: max-content;
  margin: 0 auto;
  padding: 0 max(20px, calc(50vw - 170px));
  list-style: none;
  will-change: transform;
}

.gcard {
  flex: 0 0 auto;
  width: min(74vw, 340px);
  scroll-snap-align: center;
  text-align: center;
}

.gcard .phone { width: 100%; }

.gcard h3 {
  margin: 26px 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t1);
}

.gcard p {
  margin: 0;
  font-size: 14px;
  color: var(--t2);
}

/* pinned 模式（桌面 + 精确指针 + 未减弱动效）：JS 配合 ScrollTrigger */
.gallery--pinned .gallery-viewport {
  overflow: visible;
  scroll-snap-type: none;
}

/* ------------------------------------------------------------
   数字区
   ------------------------------------------------------------ */
.stats { padding: clamp(90px, 12vw, 150px) 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
  list-style: none;
  text-align: center;
}

.stat-num {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--t1);
  font-variant-numeric: tabular-nums; /* 数字等宽，滚动不跳动 */
}
.stat-unit {
  font-size: 0.3em;
  font-weight: 500;
  color: var(--t2);
  letter-spacing: 0;
}

.stat-label {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
}

.stat p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--t3);
}

@media (min-width: 901px) {
  .stat + .stat { border-left: 1px solid var(--hairline); }
}
@media (max-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
}

/* ------------------------------------------------------------
   下载区：L2 玻璃大卡（大卡圆角 24）
   ------------------------------------------------------------ */
.download { padding: clamp(90px, 12vw, 150px) 20px; }

.dl-card {
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--r-screen);
  background: var(--glass-l2);
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 var(--rim),
    0 24px 64px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  padding: clamp(28px, 6vw, 56px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.dl-info h2 {
  margin: 18px 0 0;
  color: var(--t1);
  font-size: clamp(28px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.dl-meta {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
}

.dl-ctas {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dl-steps {
  margin: 30px 0 0;
  padding-left: 20px;
  color: var(--t2);
  font-size: 14px;
}
.dl-steps li { margin: 6px 0; }
.dl-steps li::marker { color: var(--t3); }

.dl-sha {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-sha-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--t3);
}
.dl-sha-code {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 12.5px;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
  user-select: all;
  word-break: break-all;
}

.dl-note {
  margin: 22px 0 0;
  font-size: 12px;
  color: var(--t3);
}

.qr-box {
  justify-self: center;
  text-align: center;
}
.qr-plate {
  background: #FFFFFF;
  border-radius: var(--r-card);
  padding: 14px;
  width: fit-content;
  margin: 0 auto;
}
.qr-plate img {
  display: block;
  width: 168px;
  height: 168px;
  background: #FFFFFF;
}
.qr-box > p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--t2);
}

@media (max-width: 860px) {
  .dl-card { grid-template-columns: 1fr; }
  .qr-box { justify-self: start; text-align: left; }
  .qr-plate { margin: 0; }
}

/* ------------------------------------------------------------
   页脚
   ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--hairline);
  color: var(--t2);
  padding: 48px 20px 64px;
  font-size: 13px;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.footer-row + .footer-row { border-top: 1px solid var(--hairline); }

.footer-brand {
  margin: 0;
  color: var(--t1);
  font-size: 15px;
  font-weight: 700;
}

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--t2);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--t1); }

.footer-row p { margin: 0; color: var(--t3); }

/* 下载暂时关闭提示条（2026-10-04 用户指令：先封锁下载） */
.dl-closed {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5f6f8;
  font-size: 14px;
  letter-spacing: 0.02em;
}
