/* 分层动效：只改变 transform / opacity，尽量避免布局重排。 */
.scroll-progress {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  height: 5px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #171816, #f3b900, #ffd52f);
  box-shadow: 0 1px 8px rgba(23, 24, 22, 0.28);
}

.brand img {
  animation: nav-logo-bob 3.6s ease-in-out infinite;
}

.brand:hover img {
  animation: logo-pop 0.55s cubic-bezier(0.2, 1.6, 0.3, 1);
}

.hero-copy .lead,
.hero-copy .actions,
.hero-pills {
  animation: content-rise 0.85s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-copy .lead {
  animation-delay: 0.22s;
}

.hero-copy .actions {
  animation-delay: 0.34s;
}

.hero-pills {
  animation-delay: 0.46s;
}

.hero-particles {
  position: absolute;
  inset: -10%;
  pointer-events: none;
}

.hero-particles i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0;
  animation: particle-drift 7s linear infinite;
}

.hero-particles i:nth-child(1) { left: 6%; top: 82%; animation-delay: -1s; }
.hero-particles i:nth-child(2) { left: 18%; top: 48%; width: 6px; height: 6px; animation-delay: -5s; }
.hero-particles i:nth-child(3) { left: 34%; top: 92%; animation-delay: -3.5s; }
.hero-particles i:nth-child(4) { left: 52%; top: 72%; width: 15px; height: 15px; animation-delay: -6s; }
.hero-particles i:nth-child(5) { left: 69%; top: 88%; width: 7px; height: 7px; animation-delay: -2.2s; }
.hero-particles i:nth-child(6) { left: 82%; top: 54%; animation-delay: -4.4s; }
.hero-particles i:nth-child(7) { left: 93%; top: 76%; width: 13px; height: 13px; animation-delay: -.4s; }
.hero-particles i:nth-child(8) { left: 42%; top: 38%; width: 5px; height: 5px; animation-delay: -5.4s; }

.phone::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.6) 46%, transparent 64%);
  transform: translateX(-140%);
  animation: phone-shine 5.5s 1.5s ease-in-out infinite;
}

.mini-grid i {
  position: relative;
  overflow: hidden;
  animation: tile-breathe 3s ease-in-out infinite;
}

.mini-grid i:nth-child(2) { animation-delay: -.75s; }
.mini-grid i:nth-child(3) { animation-delay: -1.5s; }
.mini-grid i:nth-child(4) { animation-delay: -2.25s; }

.mini-grid i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%);
  transform: translateX(-130%);
  animation: tile-shine 4s ease-in-out infinite;
}

.feature {
  overflow: hidden;
}

.feature::after {
  content: "";
  position: absolute;
  inset: -80% -30%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.48) 49%, transparent 56%);
  transform: translateX(-80%) rotate(12deg);
  transition: transform .75s ease;
}

.feature:hover::after {
  transform: translateX(80%) rotate(12deg);
}

.feature-icon {
  animation: icon-float 3.2s ease-in-out infinite;
}

.feature:nth-child(2) .feature-icon { animation-delay: -1.1s; }
.feature:nth-child(3) .feature-icon { animation-delay: -2.2s; }

.stats strong {
  display: inline-block;
  transition: transform .25s cubic-bezier(.2,1.5,.3,1);
}

.stats > div:hover strong {
  transform: scale(1.14) rotate(-3deg);
}

.universe-stage.in-view .tag {
  animation: tag-arrive .6s both cubic-bezier(.2,1.4,.3,1);
}

.universe-stage.in-view .tag:nth-child(2) { animation-delay: .1s; }
.universe-stage.in-view .tag:nth-child(3) { animation-delay: .2s; }
.universe-stage.in-view .tag:nth-child(4) { animation-delay: .3s; }

.collection-core::after {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border: 2px solid var(--yellow);
  border-radius: 52px;
  opacity: .2;
  animation: core-pulse 2.5s ease-out infinite;
}

.steps > div {
  transition: transform .35s cubic-bezier(.2,1.2,.3,1), background .35s;
}

.steps > div:hover {
  z-index: 3;
  transform: translateY(-12px) rotate(-1deg);
  background: #fff9d8;
}

.steps i {
  animation: connector-pulse 1.8s linear infinite;
}

.post-wall.in-view article {
  animation: card-sway 5s ease-in-out infinite;
}

.post-wall.in-view article:nth-child(2) {
  animation-delay: -1.7s;
}

.post-wall.in-view article:nth-child(3) {
  animation-delay: -3.4s;
}

.post-wall article:hover {
  animation-play-state: paused;
}

.assurance-grid article {
  transition: transform .35s cubic-bezier(.2,1.3,.3,1), box-shadow .35s;
}

.assurance-grid article:hover {
  transform: translateY(-10px);
  box-shadow: 7px 10px 0 var(--ink);
}

.assurance-grid article:hover > div {
  animation: badge-wiggle .6s ease;
}

.faq details[open] p {
  animation: faq-open .38s ease both;
}

.qr-card::before,
.qr-card::after {
  animation: corner-blink 1.6s ease-in-out infinite alternate;
}

.qr-card::after {
  animation-delay: -.8s;
}

.qr-card img {
  transition: transform .35s cubic-bezier(.2,1.25,.3,1);
}

.qr-card:hover img {
  transform: scale(1.035);
}

.qr-card img::after {
  content: "";
}

.qr-card {
  overflow: visible;
}

.qr-card strong::before {
  content: "●";
  margin-right: 6px;
  color: #18a957;
  animation: online-dot 1.4s ease-in-out infinite;
}

.cta .dark-button,
.primary {
  position: relative;
  display: inline-block;
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.motion-trail {
  position: fixed;
  z-index: 110;
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.4);
  animation: trail-out .65s ease-out forwards;
}

@keyframes nav-logo-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes logo-pop {
  0% { transform: scale(1) rotate(0); }
  55% { transform: scale(1.14) rotate(-7deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes content-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes particle-drift {
  0% { opacity: 0; transform: translateY(30px) scale(.5); }
  15%, 75% { opacity: .8; }
  100% { opacity: 0; transform: translate(28px, -260px) scale(1.1) rotate(180deg); }
}

@keyframes phone-shine {
  0%, 68% { transform: translateX(-140%); }
  88%, 100% { transform: translateX(140%); }
}

@keyframes tile-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.96); }
}

@keyframes tile-shine {
  0%, 55% { transform: translateX(-130%); }
  90%, 100% { transform: translateX(130%); }
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

@keyframes tag-arrive {
  from { opacity: 0; transform: translateY(12px) scale(.78); }
  to { opacity: 1; transform: none; }
}

@keyframes core-pulse {
  0% { transform: scale(.9); opacity: .5; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes connector-pulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

@keyframes card-sway {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes badge-wiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-10deg) scale(1.08); }
  65% { transform: rotate(8deg) scale(1.08); }
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes corner-blink {
  from { opacity: .45; transform: scale(.88); }
  to { opacity: 1; transform: scale(1.05); }
}

@keyframes online-dot {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

@keyframes trail-out {
  0% { opacity: .8; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
}

@media (max-width: 850px) {
  .motion-trail {
    display: none;
  }

  .post-wall.in-view article {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress span {
    transition: none;
  }

  .brand img,
  .hero-copy .lead,
  .hero-copy .actions,
  .hero-pills,
  .hero-particles i,
  .phone::after,
  .mini-grid i,
  .mini-grid i::after,
  .feature-icon,
  .collection-core::after,
  .post-wall.in-view article,
  .qr-card::before,
  .qr-card::after,
  .qr-card strong::before {
    animation: none !important;
  }

  .motion-trail {
    display: none;
  }
}
