.hero-stars {
  position: absolute;
  inset: -24px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 35% 27%, #e8edff 0 1px, transparent 2px),
    radial-gradient(circle at 72% 65%, #ae9fff 0 1px, transparent 2px);
  background-size: 157px 179px, 213px 131px;
  mask-image: radial-gradient(ellipse at 76% 44%, black, transparent 68%);
  opacity: .55;
  transform: translate(var(--star-x, 0px), var(--star-y, 0px));
  transition: transform .45s ease-out;
}

.saturn::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #967aff55, transparent 66%);
  animation: halo 7s ease-in-out infinite alternate;
}

.saturn-ring::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #ecffc388;
  border-radius: inherit;
  box-shadow: 0 0 18px #d9ff4377, inset 0 0 13px #d9ff4355;
  animation: halo 5s ease-in-out infinite alternate;
}

@keyframes halo {
  from { opacity: .35; }
  to { opacity: 1; }
}

.saturn {
  width: min(26vw, 390px);
  height: auto;
  aspect-ratio: 1;
  animation: planet-drift 6s ease-in-out infinite alternate;
}

.saturn-body { inset: 15%; }

.saturn-ring {
  inset: 28% -14%;
  border: 0;
  background: linear-gradient(110deg, #7365a0, #c3bd98 28%, #eaffab 55%, #a6b879 77%, #60547d);
  mask-image: radial-gradient(ellipse closest-side,
    transparent 73%, #000 74% 77%, transparent 78% 80%,
    #000 81% 88%, transparent 89% 91%, #000 92% 96%,
    #0008 97%, transparent 100%);
  mask-position: center;
  mask-repeat: no-repeat;
  animation: ring-tilt 4s ease-in-out infinite alternate;
}

.saturn-ring-back {
  z-index: 1;
  clip-path: inset(-24px -24px 50% -24px);
}

.saturn-ring-front {
  z-index: 3;
  clip-path: inset(50% -24px -24px -24px);
}

@keyframes planet-drift {
  from { transform: translate(-50%, calc(-50% - 16px)) rotate(-17deg); }
  to { transform: translate(-50%, calc(-50% + 16px)) rotate(-7deg); }
}

@keyframes ring-tilt {
  from { transform: rotate(-17deg) scaleY(.8); }
  to { transform: rotate(7deg) scaleY(1.1); }
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(240px, 48vw, 390px);
    opacity: 1;
  }
  .saturn { width: min(63vw, 290px); }
  .visual-note { display: none; }
  .hero-foot { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stars { transform: none; transition: none; }
  .saturn::before, .saturn-ring::after { animation: none; }
  .saturn, .saturn-ring { animation: none; }
}
