body { isolation: isolate; }

.site-starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: #08090b url("/guanlan-assets/guanlan-starfield-wide-20261205-r2.webp") center / cover no-repeat;
}

main::before,
main::after,
.workspace::before,
.demo-metrics::before { content: none; }

.demo-metrics {
  background: radial-gradient(ellipse 66% 60% at 60% 48%, #10151c, transparent 97%);
}

.demo-particle-flow {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-starfield span {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--diameter, 6px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f4 0 12%, #a5b2ca96 23%, #99b0cf33 43%, transparent 69%);
  opacity: .36;
  animation: star-twinkle var(--period, 6.4s) ease-in-out var(--delay, 0s) infinite;
}

.site-starfield span:nth-child(1) { --x: 9%; --y: 15%; --period: 6.9s; --delay: -2.6s; }
.site-starfield span:nth-child(2) { --x: 26%; --y: 11%; --period: 9.1s; --delay: -4.2s; --diameter: 5px; }
.site-starfield span:nth-child(3) { --x: 53%; --y: 19%; --period: 7.7s; --delay: -1.1s; }
.site-starfield span:nth-child(4) { --x: 76%; --y: 8%; --period: 8.6s; --delay: -3.7s; --diameter: 7px; }
.site-starfield span:nth-child(5) { --x: 89%; --y: 22%; --period: 6.4s; --delay: -1.9s; }
.site-starfield span:nth-child(6) { --x: 15%; --y: 37%; --period: 9.8s; --delay: -4.8s; --diameter: 5px; }
.site-starfield span:nth-child(7) { --x: 38%; --y: 39%; --period: 8.2s; --delay: -6.3s; }
.site-starfield span:nth-child(8) { --x: 61%; --y: 48%; --period: 7.3s; --delay: -1.5s; --diameter: 5px; }
.site-starfield span:nth-child(9) { --x: 81%; --y: 38%; --period: 6.1s; --delay: -4.7s; --diameter: 7px; }
.site-starfield span:nth-child(10) { --x: 94%; --y: 57%; --period: 9.4s; --delay: -2.9s; }
.site-starfield span:nth-child(11) { --x: 7%; --y: 64%; --period: 7.2s; --delay: -2.3s; --diameter: 7px; }
.site-starfield span:nth-child(12) { --x: 29%; --y: 61%; --period: 7.9s; --delay: -6.1s; }
.site-starfield span:nth-child(13) { --x: 44%; --y: 80%; --period: 9.3s; --delay: -3.6s; --diameter: 5px; }
.site-starfield span:nth-child(14) { --x: 67%; --y: 72%; --period: 7.2s; --delay: -1.2s; }
.site-starfield span:nth-child(15) { --x: 84%; --y: 84%; --period: 8.9s; --delay: -7.4s; --diameter: 7px; }
.site-starfield span:nth-child(16) { --x: 18%; --y: 91%; --period: 8.1s; --delay: -3.6s; }

@keyframes star-twinkle {
  0%, 19%, 100% { opacity: .22; }
  39% { opacity: .94; }
  63%, 84% { opacity: .31; }
}

.site-meteor {
  position: absolute;
  left: var(--origin-x);
  top: var(--origin-y);
  width: clamp(2.2rem, 5.5vw, 4.7rem);
  height: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 4%, #8da1c056 68%, #e0e9f8c7);
  opacity: 0;
  animation: meteor-pass 76s linear var(--wait) infinite;
}
.site-meteor::after {
  position: absolute;
  inset: -.55px 0 auto auto;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #e6eefb;
  box-shadow: 0 0 5px #acc5edaa;
  content: "";
}
.site-meteor-first { --origin-x: 69%; --origin-y: 12%; --wait: 9s; }
.site-meteor-second { --origin-x: 22%; --origin-y: 28%; --wait: 45s; }

@keyframes meteor-pass {
  0% { opacity: 0; transform: translate(-38px, -17px) rotate(26deg); }
  .24% { opacity: .56; }
  .44% { opacity: .7; }
  1.14%, 100% {
    opacity: 0;
    transform: translate(clamp(75px, 13vw, 225px), clamp(38px, 6.3vw, 112px)) rotate(26deg);
  }
}

@media (max-aspect-ratio: 4/5) {
  .site-starfield { background-image: url("/guanlan-assets/guanlan-starfield-portrait-20261205-r2.webp"); }
}

@media (prefers-reduced-motion: reduce) {
  .site-starfield span { animation: none; opacity: .36; }
  .site-meteor { display: none; }
}
