/* ==========================================================================
   CopyGo v3 · 交互动效层
   原则：只动 transform / opacity（GPU 合成，不触发重排）；时长 180-560ms；
        层级清晰（入场 560ms、hover 260ms、按压 90ms）；全部尊重系统「减弱动效」。
   注意：禁用低透明度细线类动效——肉眼看不见等于没做。
   ========================================================================== */

/* ---------- 1. 滚动入场 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity .56s cubic-bezier(.16, 1, .3, 1),
    transform .56s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}
/* 入场完成后释放 will-change，避免常驻图层 */
[data-reveal].is-in { will-change: auto; }

/* ---------- 2. 卡片悬停：抬升 + 铜色描边 + 投影加深 ---------- */
.card,
.artifact,
.pay-pkg,
.plan,
.who,
.step {
  transition:
    transform .26s cubic-bezier(.16, 1, .3, 1),
    box-shadow .26s cubic-bezier(.16, 1, .3, 1),
    border-color .26s ease;
}
.card:hover,
.artifact:hover {
  transform: translate3d(0, -4px, 0);
  border-color: var(--copper-line);
  box-shadow: 0 14px 34px -18px rgba(23, 20, 15, .34);
}
.step:hover,
.who:hover {
  transform: translate3d(0, -3px, 0);
}

/* ---------- 3. 按钮：按压回弹 + 悬停微光 ---------- */
.btn,
button.btn,
#payGo {
  transition:
    transform .12s cubic-bezier(.16, 1, .3, 1),
    background-color .22s ease,
    color .22s ease,
    box-shadow .22s ease;
}
.btn:hover,
button.btn:hover,
#payGo:hover {
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 10px 22px -12px rgba(169, 81, 31, .55);
}
.btn:active,
button.btn:active,
#payGo:active {
  transform: translate3d(0, 1px, 0) scale(.985);
  transition-duration: .08s;
}

/* ---------- 4. 充值档位：选中态过渡 ---------- */
.pay-pkg {
  position: relative;
  transition:
    transform .22s cubic-bezier(.16, 1, .3, 1),
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .22s ease;
  cursor: pointer;
}
.pay-pkg:hover {
  transform: translate3d(0, -3px, 0);
  border-color: var(--copper-line);
}
.pay-pkg.is-on {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 0 0 2px var(--copper), 0 16px 32px -20px rgba(169, 81, 31, .6);
}
/* 选中时右上角打勾，用 scale 弹入，不做位移（避免布局跳动） */
.pay-pkg.is-on::after {
  content: "";
  position: absolute; top: 10px; right: 10px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--copper);
  animation: cg-pop .26s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes cg-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ---------- 5. 首屏入场（.hero 内元素依次上浮）---------- */
.hero__topline,
.hero__title,
.hero__lede,
.hero .paste,
.hero__tag,
.hero__visual {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  animation: cg-rise .72s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero__topline { animation-delay: .04s; }
.hero__title   { animation-delay: .12s; }
.hero__lede    { animation-delay: .20s; }
.hero .paste   { animation-delay: .28s; }
.hero__tag     { animation-delay: .36s; }
.hero__visual  { animation-delay: .22s; }
@keyframes cg-rise {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ---------- 6. 数字滚动：等宽数字防止宽度跳动 ---------- */
[data-countup] {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 1ch;
}

/* ---------- 7. 导航：滚动后收紧并加毛玻璃底 ---------- */
.nav {
  transition:
    padding .3s cubic-bezier(.16, 1, .3, 1),
    background-color .3s ease,
    box-shadow .3s ease,
    backdrop-filter .3s ease;
}
.nav.is-scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
  background: rgba(245, 240, 230, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

/* ---------- 8. 锚点平滑滚动 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- 9. 分区标题下的铜色短线：进入视口时从左展开 ---------- */
.band__rule,
.section-rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}
.band__rule.is-in,
.section-rule.is-in {
  transform: scaleX(1);
}

/* ---------- 10. 系统「减弱动效」：一律静态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  .hero__topline, .hero__title, .hero__lede,
  .hero .paste, .hero__tag, .hero__visual {
    opacity: 1 !important;
    transform: none !important;
  }
  .band__rule, .section-rule { transform: scaleX(1) !important; }
}
