/* CR880x — FlowOS 风格静态落地页
   滚动模型（照原站的混合式）：
   - Hero / 01 / 02 是「翻页页」，装在一个 2.2 屏高的翻页台里：台面整屏
     粘住，三页叠在同一屏内。每翻一页只需滚动 0.6 屏（行程刻意压短，
     手指少滑一点就能翻页），滚动停下时 site.js 把位置吸附到最近的
     整页边界，绝不停在半页。页与页之间怎么过渡看
     背景：三页背景各不相同，相邻页淡入淡出交叠；背景相同的页直接
     整页切换、不淡化（规则在 site.js 里按 data-bg 判断）。
   - 离开翻页台进入平滑段同样吸附：要么 HE160 整页，要么平滑段从
     页首开始。03 之后是普通文档流平滑滚动。
   - body 用 overflow-x: clip 而不是 hidden——hidden 会在 iOS Safari
     上破坏 position: sticky，台面粘不住翻页就垮了。
   - 动效跟着滚动走（照原站）：site.js 每帧按元素在视口中的位置写
     --rv（0~1 连续进度），CSS 把它变成逐字升起、模糊变清晰、图片由
     1.1 倍回落——没有一次性触发的舞台式入场，往回滚会自然倒放。
   图片由 images.css 以 CSS 变量提供；无图时用页内极光渐变垫底（整幅填充，
   不是页与页之间的过渡渐变）。 */

:root {
  --bg: #06060a;
  --text: #f5f5f7;
  --text-dim: rgba(245, 245, 247, .68);
  --text-faint: rgba(245, 245, 247, .45);
  --glass-bg: rgba(255, 255, 255, .08);
  --glass-border: rgba(255, 255, 255, .14);
  --glass-radius: 20px;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --max-width: 1080px;

  /* 极光渐变 fallback（整幅页底，无图时也成立） */
  --aurora-hero:
    radial-gradient(ellipse 90% 55% at 18% 0%, rgba(124, 58, 237, .55), transparent 65%),
    radial-gradient(ellipse 70% 50% at 85% 12%, rgba(56, 189, 248, .5), transparent 65%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(16, 185, 129, .35), transparent 70%),
    linear-gradient(180deg, #0a0a18 0%, #06060a 60%, #06060a 100%);
  --aurora-1:
    radial-gradient(ellipse 75% 55% at 12% 20%, rgba(56, 189, 248, .4), transparent 65%),
    radial-gradient(ellipse 65% 50% at 88% 70%, rgba(167, 139, 250, .38), transparent 65%),
    linear-gradient(180deg, #06060a, #0a0a16);
  --aurora-2:
    radial-gradient(ellipse 70% 55% at 85% 15%, rgba(52, 211, 153, .38), transparent 65%),
    radial-gradient(ellipse 75% 55% at 10% 80%, rgba(124, 58, 237, .4), transparent 65%),
    linear-gradient(180deg, #06060a, #0a0a16);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* clip 不创建滚动容器，不破坏 sticky 翻页（hidden 在 iOS Safari 上会） */
  overflow-x: hidden;
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- 液态玻璃 ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 32px), var(--max-width));
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
}

.nav-brand {
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }

.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  transition: transform .2s ease, opacity .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--text);
  color: #06060a;
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  background: var(--text);
  color: #06060a;
  white-space: nowrap;
}

/* ---------- 翻页台（整页翻页，绝不停在半页） ---------- */
/* 台高 = 1 屏台面 + 每页 0.6 屏行程 × 2 页 = 2.2 屏；台面整屏粘住，
   三页绝对叠放在同一屏里。行程压到 0.6 屏是要让手指少滑：拖过约
   三分之一行程松手，吸附就会把这一页翻完。每页的透明度由 site.js
   按滚动进度逐帧写：背景不同的相邻页在这 0.6 屏行程内淡入淡出交叠，
   到整页位置时上一页恰好完全淡出、这一页完全显形；滚动一停，JS 再
   把位置吸附到最近的整页边界。所以任何静止时刻，屏幕上永远只有
   完整的一页。台高必须和 site.js 的 TRAVEL_RATIO 对上：1 + 2×0.6。 */
.deck {
  position: relative;
  height: 220vh;
  height: 220svh;
}
.deck-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
}
.deck-page {
  position: absolute;
  inset: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--bg);
  /* JS 接管前只露第一页；JS 每帧写 opacity / visibility */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.deck-page:first-of-type { opacity: 1; visibility: visible; }
.deck-page.is-active { pointer-events: auto; }
#nss { background-color: #080a18; }
#he160 { background-color: #071411; }

/* 翻页圆点：标明现在是第几页，点击整页跳过去 */
.deck-dots {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deck-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: transparent;
  cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}
.deck-dot.is-active { background: var(--text); transform: scale(1.3); }

/* 平滑段：普通流，紧接翻页台；与 HE160 的交界同样被吸附管着，
   静止时不会半页 HE160、半页平滑段 */
.smooth {
  position: relative;
  z-index: 4;
  background: var(--bg);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--img-hero, var(--aurora-hero));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* 环境动效：背景图以 1.09 倍为底缓慢漂移（26s 往返），画面是活的；
     这是背景层自己的运动，透明字纹理与字号都不受影响。
     被盖住时变暗并轻轻变糊（--covered 由 site.js 写） */
  animation: heroDrift 26s ease-in-out infinite alternate;
  filter: brightness(calc(1 - var(--covered, 0) * .55))
          blur(calc(var(--covered, 0) * 5px));
}
@keyframes heroDrift {
  from { transform: scale(1.09) translate3d(-1.6%, -1%, 0); }
  to   { transform: scale(1.09) translate3d(1.6%, 1.4%, 0); }
}
.hero-bg::before {
  /* 极光光晕层：在画面上缓慢呼吸、横移，与背景漂移错开节奏出层次 */
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 55% 38% at 22% 8%, rgba(139, 92, 246, .35), transparent 70%),
    radial-gradient(ellipse 45% 32% at 82% 16%, rgba(56, 189, 248, .3), transparent 70%);
  mix-blend-mode: screen;
  animation: heroGlow 11s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { opacity: .5; transform: translate3d(-2%, 0, 0); }
  to   { opacity: 1; transform: translate3d(2%, 1.5%, 0); }
}
.hero-bg::after {
  /* 均匀压暗，保证文字可读；不是渐变，不参与页面切换 */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, .22);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  /* 退出照原站：上移 + 缩小 + 变糊 + 变淡——只缩，绝不放大；
     缩放的是整个内容组，透明字纹理本身仍锁定不缩放 */
  transform: translateY(calc(var(--covered, 0) * -26px))
             scale(calc(1 - var(--covered, 0) * .07));
  opacity: calc(1 - var(--covered, 0) * .55);
  filter: blur(calc(var(--covered, 0) * 5px));
}

/* 滚动提示：底部小鼠标，光点循环下落；hero 被盖住时随之淡出 */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  pointer-events: none;
  opacity: calc(1 - var(--covered, 0) * 1.6);
}
.scroll-hint-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;
}
.scroll-hint-track {
  position: relative;
  width: 24px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  overflow: hidden;
}
.scroll-hint-dot {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--text);
  animation: scrollDot 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes scrollDot {
  0%       { transform: translateY(0); opacity: 0; }
  18%      { opacity: 1; }
  55%      { transform: translateY(16px); opacity: 1; }
  78%, 100% { transform: translateY(22px); opacity: 0; }
}

.hero-eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(84px, 18vw, 200px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  /* 玻璃字：纹理尺寸仍锁定为整个视口（100vw × 100svh，不缩放），
     但取景不再居中——居中会采到极光图中央的暗带，字近乎纯黑。
     取景上移到 50% 15%，让顶部紫蓝彩带落进字形；字背后的 hero
     背景在这一段正好是暗的，彩色字落在暗底上清晰可读。
     第二层是同一取景的极光渐变，与照片层 screen 混合：照片的
     暗部会被渐变颜色提亮，字形永远不会再采到纯黑。
     滚动时纹理不缩放、不漂移，字号也不动。 */
  background-image: var(--img-hero, var(--aurora-hero)), var(--aurora-hero);
  background-size: 100vw 100svh, 100vw 100svh;
  background-position: 50% 15%, 50% 15%;
  background-repeat: no-repeat;
  background-blend-mode: screen;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .38);
  filter: drop-shadow(0 0 28px rgba(125, 211, 252, .35));
  /* 铁律：任何滚动变量都不许动这个字的 transform */
  transform: none;
}

.hero-sub {
  margin: 28px auto 0;
  max-width: 560px;
  font-size: clamp(19px, 3vw, 26px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.hero-cta { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero-note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- 章节 ---------- */
.chapter {
  display: flex;
  align-items: center;
  padding: 110px 24px 56px;
}

/* 平滑段里的章节恢复普通高度 */
.smooth .chapter {
  position: relative;
  min-height: 0;
  overflow: visible;
  padding: 110px 24px;
}

.chapter-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* 跟着滚动走：本页滑入时图片由 1.1 倍回落到 1 倍、由糊变清；
     被下一页盖住时只变暗，不溶解、不渐变过渡 */
  transform: scale(calc(1.1 - var(--enter, 1) * .1));
  filter: brightness(calc(1 - var(--covered, 0) * .55))
          blur(calc((1 - var(--enter, 1)) * 7px));
}
.chapter-bg-1 { background-image: var(--img-aurora-1, var(--aurora-1)); }
.chapter-bg-2 { background-image: var(--img-aurora-2, var(--aurora-2)); }
.chapter-bg::after {
  /* 均匀压暗保证可读；切换由整页覆盖完成，这里没有任何渐变 */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, .38);
}

.chapter-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* 翻页页的内容随翻页进度轻轻就位：小幅上浮 + 由糊变清，
   全程由滚动位置驱动；被下一页淡盖时缩小、变暗、变糊。
   --enter / --covered 由 site.js 按翻页进度写在本页元素上。 */
.deck-page .chapter-inner {
  transform: translateY(calc((1 - var(--enter, 1)) * 26px))
             scale(calc(1 - var(--covered, 0) * .05));
  opacity: calc(.3 + var(--enter, 1) * .7 - var(--covered, 0) * .45);
  filter: blur(calc((1 - var(--enter, 1)) * 5px + var(--covered, 0) * 4px));
}

.chapter-num {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 12px;
}

.chapter h2 {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  margin-bottom: 16px;
}

.chapter-lede {
  font-size: clamp(19px, 3vw, 25px);
  font-weight: 500;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 40px;
}

.chapter .glass { padding: 32px; max-width: 640px; }
.chapter .glass p { font-size: 18px; }

/* 数字亮点 */
.stat { margin-top: 24px; }
.stat strong {
  display: block;
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat span { display: block; margin-top: 8px; color: var(--text-dim); font-size: 16px; }

/* 补丁卡片 */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 860px;
}
.cards .glass { padding: 32px; max-width: none; }
.card-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.cards h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.cards p:last-child { color: var(--text-dim); }

/* ---------- FAQ ---------- */
.faq { padding: 120px 24px 140px; }
.faq-inner { max-width: 760px; margin: 0 auto; }
.faq .chapter-num { color: var(--accent); }
.faq h2 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  margin-bottom: 48px;
}

.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-list details { padding: 0; overflow: hidden; }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 400;
  color: var(--text-faint);
  transition: transform .25s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  padding: 0 28px 24px;
  color: var(--text-dim);
  font-size: 16px;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 5;
  background: var(--bg);
  border-top: 1px solid var(--glass-border);
  padding: 48px 24px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.footer p { margin-bottom: 8px; }
.footer a { color: var(--text-dim); }

/* ---------- 跟着滚动走的细腻动效（--rv 由 site.js 每帧写） ----------
   --rv 是元素在视口中的连续进度（0 刚进入 → 1 到位），不是开关：
   往下滚渐入、往回滚渐出，没有过渡曲线在替滚动做决定。
   - 普通 .reveal：小幅上浮 22px + 模糊 6px → 清晰，透明度随行。
   - [data-words]：site.js 把文本拆成词/字（span.w，带 --wi 序号，
     容器带 --wstep / --wk），每个词的进度被 --rv 依次错开，
     逐词升起、由糊变清。容器本身不再整体位移，避免双重运动。
   --rv 默认 1：JS 没跑起来时一切完整可见。 */
.reveal {
  opacity: var(--rv, 1);
  transform: translateY(calc((1 - var(--rv, 1)) * 22px));
  filter: blur(calc((1 - var(--rv, 1)) * 6px));
}
.reveal[data-words] {
  opacity: 1;
  transform: none;
  filter: none;
}
.reveal .w, [data-words] .w {
  display: inline-block;
  --wp: clamp(0, calc((var(--rv, 1) - var(--wi, 0) * var(--wstep, 0)) * var(--wk, 1)), 1);
  opacity: var(--wp);
  transform: translateY(calc((1 - var(--wp)) * .38em));
  filter: blur(calc((1 - var(--wp)) * 5px));
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal .w, [data-words] .w { opacity: 1; transform: none; filter: none; }
  .deck-page .chapter-inner, .hero-inner { transform: none; opacity: 1; filter: none; }
  .hero-bg, .chapter-bg { filter: none; transform: none; animation: none; }
  .hero-bg::before, .scroll-hint-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 自适应 ---------- */
@media (max-width: 1080px) {
  .smooth .chapter { padding: 96px 24px; }
  .faq { padding: 96px 24px 120px; }
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav { gap: 12px; }
  .nav-brand { margin-right: auto; }
  .cards { grid-template-columns: 1fr; }
  .chapter .glass { padding: 26px; }
}

/* 矮屏：翻页页内容压紧，保证整页装得下、不被裁 */
@media (max-height: 720px) {
  .chapter { padding-top: 88px; padding-bottom: 32px; }
  .chapter h2 { font-size: clamp(36px, 7vw, 60px); margin-bottom: 10px; }
  .chapter-lede { margin-bottom: 24px; }
  .chapter .glass { padding: 22px; }
  .stat { margin-top: 14px; }
  .stat strong { font-size: clamp(40px, 6vw, 56px); }
  .hero { padding-top: 96px; }
  .hero-sub { margin-top: 18px; }
  .hero-cta { margin-top: 26px; }
  .hero-note { margin-top: 18px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .deck-dots { right: 12px; }
  .hero { padding: 104px 20px 48px; }
  .hero-title { font-size: clamp(72px, 22vw, 120px); }
  .hero-sub { margin-top: 20px; }
  .hero-cta { margin-top: 32px; }
  .btn { padding: 12px 22px; font-size: 15px; }
  .chapter { padding: 96px 20px 40px; }
  .smooth .chapter { padding: 72px 20px; }
  .chapter h2 { font-size: clamp(38px, 11vw, 52px); }
  .chapter .glass { padding: 22px; }
  .chapter .glass p { font-size: 16px; }
  .cards .glass { padding: 24px; }
  .faq { padding: 72px 20px 96px; }
  .faq-list summary { padding: 18px 20px; font-size: 17px; }
  .faq-list details p { padding: 0 20px 20px; }
}
