/* 动效 v3 —— 只用 transform / opacity；全部包在 no-preference 中，减少动画时页面完全静态 */

/* 画布层（位置在任何模式下都固定，不引起布局变化） */
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.hero-fx { z-index: 6; }
.hero.qr-open .hero-fx { visibility: hidden; }
.play-fx { z-index: 0; }
.play-inner { z-index: 1; }

.sea-shimmer { position: absolute; left: 0; right: 0; top: 46%; height: 34%; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.sea-shimmer i { position: absolute; inset: 0 -50% 0 -50%; opacity: .0;
  background:
    repeating-linear-gradient(97deg, transparent 0 38px, rgba(255, 255, 255, .22) 41px, transparent 46px 90px),
    repeating-linear-gradient(83deg, transparent 0 64px, rgba(255, 255, 255, .16) 66px, transparent 70px 130px); }
.hero-sweep { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.hero-sweep::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55) 45%, rgba(255, 250, 220, .7) 50%, rgba(255, 255, 255, .55) 55%, transparent);
  transform: translateX(-120%) skewX(-18deg); }
.logo-shine i { position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .95) 50%, transparent);
  transform: translateX(-120%) skewX(-12deg); }
.glint { position: absolute; width: 26px; height: 26px; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, rgba(255, 255, 255, 0) 60%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); }
.g1 { left: 9%; top: 18%; } .g2 { left: 56%; top: 8%; width: 20px; height: 20px; } .g3 { left: 86%; top: 52%; width: 30px; height: 30px; }
.btn-play.is-ready { overflow: hidden; isolation: isolate; }
.btn-play.is-ready::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55) 50%, transparent); transform: translateX(-160%) skewX(-18deg); }
.qr-anchor::before { content: ""; position: absolute; inset: -10px -14px; border-radius: 999px; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(80, 240, 140, .55), rgba(80, 240, 140, 0)); }
.card .glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%);
  transition: opacity .4s; }
.tile-ribbon.is-marquee { justify-content: flex-start; }
.ribbon-track { display: flex; gap: inherit; flex: none; will-change: transform; padding-left: 18px; }
.ribbon-track img { width: 74px; flex: none; filter: drop-shadow(0 10px 10px rgba(80, 50, 10, .2)); }
.ribbon-track img:nth-child(odd) { rotate: -6deg; translate: 0 6px; }
.ribbon-track img:nth-child(even) { rotate: 6deg; }
@media (max-width: 600px) { .ribbon-track img { width: 52px; } }

@media (prefers-reduced-motion: no-preference) {
  /* ===== 开场序列（约 2.2s，任何点击/按键/滚动立即跳过） ===== */
  .js .site-header .awning { transform-origin: 50% 0; animation: awning-drop 1s cubic-bezier(.3, 1.4, .5, 1) both; }
  .js .nav { animation: nav-in .7s .35s cubic-bezier(.22, 1, .36, 1) both; }
  .js .hero-sky { animation: fade-in 1.2s both; }
  .js .hero-sea img { transform-origin: 50% 80%; animation: pano-zoom 2.2s cubic-bezier(.16, 1, .3, 1) both; }
  .js .hero-sweep::before { animation: sweep 1.5s .25s cubic-bezier(.45, 0, .2, 1) both; }
  .js .hero [data-enter] { animation: enter-up .8s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--d, 0) * 1s); }
  .js .hero [data-enter="1"] { --d: .2; }
  .js .hero [data-enter="2"] { animation: none; }
  .js .hero .logo-wrap { transform-origin: 50% 88%; animation: logo-slam 1s .3s both; }
  .js .hero [data-enter="3"] { --d: .85; }
  .js .hero [data-enter="4"] { --d: .95; }
  .js .hero [data-enter="5"] { --d: 1.1; }
  .js .hero-inner { animation: shake .42s .62s linear; }
  .js .stage-arch[data-enter] { animation: arch-pop 1.05s .62s cubic-bezier(.22, 1, .36, 1) both; }
  .js .stage-glow { animation: glow-in 1.2s .7s cubic-bezier(.22, 1, .36, 1) both, spin 90s 1.9s linear infinite; }
  .js .fl { animation: fly-in 1.15s cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(.95s + var(--i, 0) * .09s); }
  .f1 { --i: 0; --fx: -420px; --fy: -260px; --cx: 120px; --cy: -90px; }
  .f2 { --i: 1; --fx: 520px; --fy: -60px; --cx: -40px; --cy: -140px; }
  .f3 { --i: 2; --fx: -480px; --fy: 280px; --cx: 60px; --cy: 120px; }
  .f4 { --i: 3; --fx: 380px; --fy: -380px; --cx: -120px; --cy: 40px; }
  .f5 { --i: 4; --fx: 460px; --fy: 360px; --cx: -60px; --cy: -120px; }
  .f6 { --i: 5; --fx: -560px; --fy: 20px; --cx: 40px; --cy: -160px; }
  .js .tile-ribbon { animation: enter-up .8s 1.35s cubic-bezier(.22, 1, .36, 1) both; }

  /* ===== 常驻氛围 ===== */
  .cloud, .fl, .fl img, .stage-glow, .sea-shimmer i, .logo-shine i, .sp-panda, .sp-gift, .play::before { will-change: transform; }
  .fl img { animation: bob 5.5s ease-in-out infinite; }
  .f2 img { animation-delay: -1.2s; animation-duration: 6.2s; }
  .f3 img { animation-delay: -2.4s; animation-duration: 5s; }
  .f4 img { animation-delay: -3.1s; animation-duration: 6.8s; }
  .f5 img { animation-delay: -.7s; animation-duration: 5.8s; }
  .f6 img { animation-delay: -1.9s; animation-duration: 7s; }
  .fl { cursor: pointer; }
  .cloud { animation: drift 38s linear infinite alternate; }
  .c2 { animation-duration: 52s; } .c3 { animation-duration: 46s; animation-direction: alternate-reverse; }
  .sea-shimmer i { animation: shimmer-move 16s linear infinite, shimmer-pulse 5s ease-in-out infinite; }
  .logo-shine i { animation: shine 5.5s 2.2s cubic-bezier(.45, 0, .2, 1) infinite; }
  .glint { animation: glint 4.8s ease-in-out infinite; }
  .g1 { animation-delay: 2.6s; } .g2 { animation-delay: 4.1s; animation-duration: 5.6s; } .g3 { animation-delay: 3.3s; animation-duration: 6.2s; }
  .btn-play.is-ready::after { animation: btn-shine 4.2s 2.4s ease-in-out infinite; }
  .qr-anchor::before { animation: breathe 2.8s 2s ease-in-out infinite; }
  .play::before { animation: spin 120s linear infinite reverse; }
  .sp-panda { transform-origin: 50% 100%; animation: panda-wave 3.6s ease-in-out infinite; }
  .sp-gift { transform-origin: 50% 100%; animation: gift-hop 4.4s 1s cubic-bezier(.3, 1.5, .5, 1) infinite; }
  .hero.is-paused *, .hero.is-paused, .hero.is-paused *::before, .hero.is-paused *::after { animation-play-state: paused !important; }
  .play.is-paused *, .play.is-paused::before { animation-play-state: paused !important; }

  /* ===== 滚动入场：弹性、分层 ===== */
  .motion-reveal [data-reveal] { opacity: 0; translate: 0 56px; scale: .94;
    transition: opacity .6s ease-out, translate .95s cubic-bezier(.34, 1.45, .64, 1), scale .95s cubic-bezier(.34, 1.45, .64, 1);
    transition-delay: calc(var(--ri, 0) * 110ms); }
  .motion-reveal [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }
  .motion-reveal .section-head[data-reveal] { translate: none; scale: none; }
  .motion-reveal .section-head > * { opacity: 0; }
  .motion-reveal .section-head.is-in > * { animation: head-rise .9s cubic-bezier(.34, 1.5, .64, 1) both; }
  .motion-reveal .section-head.is-in > :nth-child(2) { animation-name: head-slam; animation-delay: .1s; }
  .motion-reveal .section-head.is-in > :nth-child(3) { animation-delay: .24s; }
  .motion-reveal .feature .feature-art img { opacity: 0; }
  .motion-reveal .feature.is-in .feature-art img { animation: icon-bounce 1s cubic-bezier(.34, 1.4, .64, 1) both; animation-delay: calc(var(--ri, 0) * 110ms + .25s); }
  .motion-reveal .feature.is-in .feature-art img:nth-child(2) { animation-delay: calc(var(--ri, 0) * 110ms + .4s); }
  .feature:hover .feature-art img { animation: icon-wiggle .7s ease-in-out both !important; opacity: 1; }
  .card.tilting { transition: transform .12s ease-out; }
  .card.tilt-reset { transition: transform .7s cubic-bezier(.22, 1, .36, 1); }
  .card > img, .card > .tile-board, .card > .tool-row { transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
}

@keyframes awning-drop { 0% { transform: translateY(-105%) scaleY(.3); } 55% { transform: translateY(0) scaleY(1.14); } 72% { transform: scaleY(.93); } 86% { transform: scaleY(1.04); } 100% { transform: none; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes pano-zoom { from { transform: scale(1.15); } to { transform: none; } }
@keyframes sweep { 0% { opacity: 0; transform: translateX(-120%) skewX(-18deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(420%) skewX(-18deg); } }
@keyframes enter-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes logo-slam {
  0% { opacity: 0; transform: translateY(-90px) scale(2.3); animation-timing-function: cubic-bezier(.55, 0, .9, .4); }
  32% { opacity: 1; transform: translateY(0) scale(1.16, .74); animation-timing-function: cubic-bezier(.2, .9, .3, 1.3); }
  52% { transform: translateY(-10px) scale(.92, 1.1); }
  70% { transform: translateY(0) scale(1.04, .96); }
  85% { transform: scale(.99, 1.01); }
  100% { opacity: 1; transform: none; }
}
@keyframes shake { 0%, 100% { translate: 0 0; } 15% { translate: -5px 3px; } 30% { translate: 5px -2px; } 45% { translate: -3px 2px; } 60% { translate: 3px -1px; } 80% { translate: -1px 1px; } }
@keyframes arch-pop { 0% { opacity: 0; translate: 0 140px; scale: .55; } 55% { opacity: 1; translate: 0 -16px; scale: 1.05; } 75% { translate: 0 5px; scale: .985; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes glow-in { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes fly-in {
  0% { opacity: 0; translate: var(--fx) var(--fy); scale: .4; rotate: calc(var(--r) - 240deg); }
  15% { opacity: 1; }
  55% { translate: calc(var(--fx) * .22 + var(--cx)) calc(var(--fy) * .22 + var(--cy)); scale: 1.12; }
  80% { translate: calc(var(--cx) * -.08) calc(var(--cy) * -.08); scale: .96; }
  100% { opacity: 1; translate: 0 0; scale: 1; rotate: var(--r); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes drift { to { translate: 70px 0; } }
@keyframes shimmer-move { to { transform: translateX(-25%); } }
@keyframes shimmer-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-12deg); } 30%, 100% { transform: translateX(420%) skewX(-12deg); } }
@keyframes glint { 0%, 78%, 100% { opacity: 0; transform: scale(0) rotate(0); } 86% { opacity: 1; transform: scale(1.2) rotate(45deg); } 94% { opacity: 0; transform: scale(.2) rotate(90deg); } }
@keyframes btn-shine { 0% { transform: translateX(-160%) skewX(-18deg); } 28%, 100% { transform: translateX(380%) skewX(-18deg); } }
@keyframes breathe { 0%, 100% { opacity: .25; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.06); } }
@keyframes panda-wave { 0%, 100% { transform: translateY(0) rotate(-3deg); } 25% { transform: translateY(-10px) rotate(3deg); } 50% { transform: translateY(0) rotate(-2deg); } 75% { transform: translateY(-6px) rotate(4deg); } }
@keyframes gift-hop { 0%, 70%, 100% { transform: none; } 76% { transform: scale(1.1, .86); } 84% { transform: translateY(-34px) scale(.94, 1.08) rotate(-6deg); } 92% { transform: translateY(0) scale(1.06, .94); } }
@keyframes head-rise { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes head-slam { 0% { opacity: 0; transform: translateY(-30px) scale(1.5); } 45% { opacity: 1; transform: scale(1.06, .9); } 70% { transform: scale(.98, 1.03); } 100% { opacity: 1; transform: none; } }
@keyframes icon-bounce { 0% { opacity: 0; transform: translateY(60px) scale(.3); } 55% { opacity: 1; transform: translateY(-18px) scale(1.12); } 78% { transform: translateY(4px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes icon-wiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-8deg) scale(1.08); } 60% { transform: rotate(6deg) scale(1.05); } }
