/* ============================================================================
   首页滚动叙事 · 第三轮（task-43）
   1) 首屏数字证据带：真实接口数字从 0 滚到真值（见 assets/js/narrative-v3.js）
   2) 章节视差分层：hero 底图与标题差速、showcase 截图与文字反向微移
      —— 用独立的 translate 属性叠加，避免和 cinema.css 的 transform 动画互相覆盖
   3) showcase 内嵌纯前端「下单/出价」演示卡
   4) 页尾 ⌘K 彩蛋与命令面板
   只动 transform / opacity / translate；reduced-motion 下全部为静态。
   ========================================================================== */

/* ── 1. 数字证据带 ─────────────────────────────────────────────────────── */
.nl-proof {
  position: relative;
  z-index: 2;
  color: var(--nl-fg);
  background: var(--nl-bg);
  border-top: 1px solid var(--nl-line-soft);
  border-bottom: 1px solid var(--nl-line-soft);
}
.nl-proof__inner {
  padding: clamp(30px, 5vh, 56px) clamp(20px, 6vw, 96px);
}
.nl-proof__eyebrow {
  margin: 0 0 clamp(18px, 3vh, 30px);
  font-size: var(--fs-11);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nl-fg-faint);
}
.nl-proof__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nl-proof__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-left: clamp(14px, 1.6vw, 24px);
  border-left: 1px solid var(--nl-line-soft);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nl-proof__item:first-child {
  padding-left: 0;
  border-left: 0;
}
.nl-proof.is-in .nl-proof__item {
  opacity: 1;
  transform: none;
}
.nl-proof.is-in .nl-proof__item:nth-child(2) {
  transition-delay: 90ms;
}
.nl-proof.is-in .nl-proof__item:nth-child(3) {
  transition-delay: 180ms;
}
.nl-proof.is-in .nl-proof__item:nth-child(4) {
  transition-delay: 270ms;
}
.nl-proof__num {
  display: block;
  font-size: clamp(1.65rem, 3.6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--nl-fg);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  white-space: nowrap;
}
.nl-proof__unit {
  margin-left: 6px;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--nl-fg-faint);
}
.nl-proof__label {
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--nl-fg-faint);
}
.nl-proof__src {
  margin: clamp(18px, 3vh, 28px) 0 0;
  font-size: var(--fs-11);
  letter-spacing: 0.04em;
  color: var(--nl-fg-faint);
  opacity: 0.82;
}

/* ── 2. 章节视差：独立 translate 与既有 transform 动画叠加 ─────────────── */
.nl-plate__img {
  translate: 0 var(--nl-par-hero-img, 0px);
}
.nl-hero__inner {
  translate: 0 var(--nl-par-hero-in, 0px);
}
.nl-showcase__head {
  translate: 0 var(--nl-par-sc-head, 0px);
}
.nl-showcase__steps {
  translate: 0 var(--nl-par-sc-steps, 0px);
}
.nl-shot > img {
  translate: 0 var(--nl-par-shot, 0px);
}

/* ── 3. showcase 迷你下单演示（纯前端，标「演示」，不发任何请求） ───────── */
.nl-demo {
  position: absolute;
  right: clamp(12px, 2.4vw, 26px);
  bottom: clamp(12px, 2.4vw, 26px);
  z-index: 3;
  width: min(320px, 70%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(8, 10, 14, 0.86);
  backdrop-filter: blur(14px) saturate(130%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  text-align: left;
}
.nl-demo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.nl-demo__title {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
}
.nl-demo__badge {
  flex: none;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: var(--fs-10);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}
.nl-demo__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: var(--fs-12);
  color: rgba(255, 255, 255, 0.66);
}
.nl-demo__price b {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.nl-demo__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.nl-demo__row span {
  font-size: var(--fs-12);
  color: rgba(255, 255, 255, 0.66);
}
.nl-demo__qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nl-demo__step {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.nl-demo__step:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
.nl-demo__qty b {
  min-width: 3ch;
  text-align: center;
  font-size: var(--fs-14);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nl-demo__submit {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--nl-accent, #16884f);
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 600;
  cursor: pointer;
}
.nl-demo__submit:hover {
  background: var(--nl-accent-hover, #0f6d3e);
}
.nl-demo__submit[disabled] {
  cursor: default;
  opacity: 0.72;
}
.nl-demo__status {
  margin: 10px 0 0;
  min-height: 16px;
  font-size: var(--fs-11);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}
.nl-demo__status.is-ok {
  color: #9fe3bd;
}

/* ── 4. 页尾 ⌘K 彩蛋 ───────────────────────────────────────────────────── */
.nl-easter {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 4vh, 44px) clamp(20px, 6vw, 96px);
  text-align: center;
}
.nl-easter__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--nl-line);
  border-radius: 999px;
  background: transparent;
  color: var(--nl-fg-faint);
  font-size: var(--fs-12);
  font-family: inherit;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
.nl-easter__btn:hover {
  color: var(--nl-fg);
  border-color: var(--nl-line);
}
.nl-easter__btn kbd {
  padding: 2px 7px;
  border: 1px solid var(--nl-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--nl-bg);
  font: inherit;
  font-size: var(--fs-11);
  color: var(--nl-fg);
}
.nl-palette {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16vh 16px 24px;
}
.nl-palette[hidden] {
  display: none;
}
.nl-palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 13, 0.56);
  backdrop-filter: blur(10px);
}
.nl-palette__panel {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid var(--nl-line);
  border-radius: 18px;
  background: var(--nl-bg);
  color: var(--nl-fg);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}
.nl-palette__input {
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--nl-line-soft);
  background: transparent;
  color: var(--nl-fg);
  font: inherit;
  font-size: var(--fs-14);
  outline: none;
}
.nl-palette__input::placeholder {
  color: var(--nl-fg-faint);
}
.nl-palette__list {
  max-height: min(46vh, 380px);
  margin: 0;
  padding: 8px;
  overflow: auto;
  list-style: none;
}
.nl-palette__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--nl-fg);
  text-decoration: none;
  font-size: var(--fs-13);
}
.nl-palette__link:hover,
.nl-palette__link.is-current {
  background: var(--nl-accent-soft, rgba(22, 136, 79, 0.12));
}
.nl-palette__hint {
  flex: none;
  font-size: var(--fs-11);
  color: var(--nl-fg-faint);
  letter-spacing: 0.04em;
}
.nl-palette__empty {
  padding: 16px 12px;
  font-size: var(--fs-12);
  color: var(--nl-fg-faint);
}

/* ── 响应式 ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nl-proof__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
  }
  .nl-proof__item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .nl-proof__item:nth-child(3),
  .nl-proof__item:nth-child(4) {
    padding-top: 4px;
  }
  .nl-demo {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 12px 0 0;
    border-color: var(--nl-line-soft);
    background: var(--nl-bg);
    color: var(--nl-fg);
    box-shadow: none;
    backdrop-filter: none;
  }
  .nl-demo__price {
    border-color: var(--nl-line-soft);
    background: var(--nl-surface, rgba(0, 0, 0, 0.03));
    color: var(--nl-fg-soft);
  }
  .nl-demo__price b,
  .nl-demo__title {
    color: var(--nl-fg);
  }
  .nl-demo__badge {
    border-color: var(--nl-line);
    color: var(--nl-fg-faint);
  }
  .nl-demo__row span,
  .nl-demo__status {
    color: var(--nl-fg-faint);
  }
  .nl-demo__step {
    border-color: var(--nl-line);
    color: var(--nl-fg);
    width: 44px;
    height: 44px;
  }
  .nl-demo__qty b {
    font-size: var(--fs-13);
  }
  .nl-palette {
    padding-top: 12vh;
  }
}

@media (max-width: 560px) {
  .nl-proof__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .nl-proof__item {
    padding-left: 0;
    border-left: 0;
    padding-top: 18px;
    border-top: 1px solid var(--nl-line-soft);
  }
  .nl-proof__item:first-child {
    padding-top: 0;
    border-top: 0;
  }
  .nl-proof__num {
    font-size: 1.9rem;
  }
}

/* ── 动效克制：reduced-motion 全静态 ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nl-proof__item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nl-plate__img,
  .nl-hero__inner,
  .nl-showcase__head,
  .nl-showcase__steps,
  .nl-shot > img {
    translate: none;
  }
  .nl-easter__btn {
    transition: none;
  }
}
