/* 动效层：不改变当前 zfb888.com 的排版尺寸、断点或内容顺序。 */

.motion-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.motion-stage::before {
  position: absolute;
  top: -26rem;
  left: 50%;
  width: 82rem;
  height: 68rem;
  content: "";
  border: 1px solid rgba(104, 151, 229, .055);
  border-radius: 50%;
  transform: translateX(-50%) rotate(-8deg);
  animation: hero-orbit 18s ease-in-out infinite alternate;
}

.motion-arc {
  position: absolute;
  border: 1px solid rgba(117, 155, 218, .045);
  border-radius: 50%;
  transform-origin: center;
}

.arc-one {
  top: -31rem;
  left: calc(50% - 42rem);
  width: 84rem;
  height: 84rem;
  animation: orbit-spin 38s linear infinite;
}

.arc-two {
  top: 23rem;
  right: -26rem;
  width: 52rem;
  height: 52rem;
  border-color: rgba(255, 111, 70, .035);
  animation: orbit-spin 44s linear infinite reverse;
}

.motion-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  opacity: .35;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.035) 22%, rgba(255,255,255,.012) 72%, transparent);
  animation: line-breathe 9s ease-in-out infinite;
}

.line-one { left: 22%; }
.line-two { right: 20%; animation-delay: 1.4s; }

.motion-crystal {
  position: absolute;
  top: 5rem;
  right: max(2vw, calc((100vw - 1320px) / 2));
  width: 80px;
  height: 116px;
  opacity: .1;
  animation: crystal-float 7s ease-in-out infinite;
}

.motion-crystal i {
  position: absolute;
  inset: 0;
  display: block;
  clip-path: polygon(52% 0, 100% 31%, 78% 100%, 20% 86%, 0 37%);
}

.motion-crystal i:nth-child(1) { background: linear-gradient(145deg, #9dbaf0, #17325b 48%, #6688be); }
.motion-crystal i:nth-child(2) { background: linear-gradient(60deg, transparent 0 44%, rgba(255,255,255,.4) 45% 59%, transparent 60%); }
.motion-crystal i:nth-child(3) { background: linear-gradient(120deg, transparent 0 38%, rgba(255,116,74,.3) 39% 50%, transparent 51%); }

.container { position: relative; z-index: 1; }

.entrance {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.entrance::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .13;
  background:
    repeating-radial-gradient(ellipse at 50% -60%, transparent 0 82px, rgba(111,157,255,.12) 83px 84px, transparent 85px 132px),
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.035) 50%, transparent 50.1%);
  animation: panel-drift 13s ease-in-out infinite alternate;
}

.entry::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.065), transparent 70%);
  transform: translateX(-70%);
  transition: opacity .2s ease, transform .55s ease;
}

.entry:hover::before {
  opacity: 1;
  transform: translateX(70%);
}

.entry:hover .chip {
  box-shadow: 0 0 18px rgba(23,201,100,.12);
}

.chip { transition: box-shadow .25s ease, border-color .25s ease; }

.btn.primary {
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  position: absolute;
  top: -70%;
  bottom: -70%;
  left: -32%;
  width: 18%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transform: skewX(-18deg);
  animation: button-shine 5s 1.2s ease-in-out infinite;
}

.motion-capable header {
  animation: header-enter .58s cubic-bezier(.2,.75,.25,1) both;
}

.motion-capable .brand,
.motion-capable .actions {
  animation: content-enter .62s cubic-bezier(.2,.75,.25,1) both;
}

.motion-capable .brand { animation-delay: .06s; }
.motion-capable .actions { animation-delay: .14s; }
.motion-capable .entrance { animation: panel-enter .68s .16s cubic-bezier(.2,.75,.25,1) both; }

.motion-capable .entry {
  animation: entry-enter .5s cubic-bezier(.2,.75,.25,1) both;
}

.motion-capable .entry:nth-child(1) { animation-delay: .28s; }
.motion-capable .entry:nth-child(2) { animation-delay: .34s; }
.motion-capable .entry:nth-child(3) { animation-delay: .4s; }
.motion-capable .entry:nth-child(4) { animation-delay: .46s; }
.motion-capable .entry:nth-child(5) { animation-delay: .52s; }
.motion-capable .entry:nth-child(6) { animation-delay: .58s; }

.motion-capable .reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.2,.75,.25,1), transform .65s cubic-bezier(.2,.75,.25,1);
}

.motion-capable .reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes content-enter {
  from { opacity: 0; filter: blur(5px); transform: translateY(11px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(16px) scale(.994); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes hero-orbit {
  from { transform: translateX(-50%) rotate(-8deg) scale(.98); }
  to { transform: translateX(-50%) rotate(4deg) scale(1.03); }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes line-breathe {
  0%, 100% { opacity: .18; }
  50% { opacity: .55; }
}

@keyframes crystal-float {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(10px) rotate(2deg); }
}

@keyframes panel-drift {
  from { transform: translateY(-4px) scale(1.02); }
  to { transform: translateY(4px) scale(1.04); }
}

@keyframes button-shine {
  0%, 68% { left: -32%; opacity: 0; }
  73% { opacity: 1; }
  87% { left: 112%; opacity: 1; }
  92%, 100% { left: 112%; opacity: 0; }
}

@media (max-width:640px) {
  .motion-crystal { top: 4rem; right: -20px; width: 62px; height: 90px; opacity: .075; }
  .arc-one { left: calc(50% - 29rem); width: 58rem; height: 58rem; }
  .line-one { left: 16%; }
  .line-two { right: 14%; }
  .entrance::before { opacity: .09; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-stage,
  .motion-stage *,
  .entrance::before,
  .btn.primary::after {
    animation: none !important;
  }

  .motion-capable header,
  .motion-capable .brand,
  .motion-capable .actions,
  .motion-capable .entrance,
  .motion-capable .entry,
  .motion-capable .reveal-on-scroll {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
