:root {
  --night: #08030f;
  --pink: #f363ff;
  --cursor-x: 50%;
  --cursor-y: 50%;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
}

body {
  min-height: 100svh;
  color: white;
  isolation: isolate;
  font-family: Arial, Helvetica, sans-serif;
}

.scene {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(126, 48, 255, .2), transparent 27rem),
    radial-gradient(ellipse at 50% 120%, #32117e 0%, #17072f 35%, var(--night) 73%);
}

.scene::before {
  position: absolute;
  inset: -20%;
  z-index: -2;
  content: "";
  background:
    radial-gradient(ellipse at 18% 25%, rgba(102, 22, 255, .42), transparent 30%),
    radial-gradient(ellipse at 86% 16%, rgba(219, 66, 255, .22), transparent 29%),
    radial-gradient(ellipse at 73% 88%, rgba(38, 109, 255, .2), transparent 28%);
  filter: blur(44px);
  animation: breathe 13s ease-in-out infinite alternate;
}

.scene::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
  opacity: .14;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: soft-light;
}

.aurora {
  position: absolute;
  width: min(77vw, 72rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 35deg, transparent, rgba(114, 30, 255, .13), rgba(255, 98, 255, .27), transparent 44%, rgba(71, 101, 255, .12), transparent 70%);
  filter: blur(28px);
  opacity: .85;
  animation: spin 28s linear infinite;
}

.orb {
  position: absolute;
  width: clamp(15rem, 31vw, 29rem);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(3px);
  opacity: .68;
  mix-blend-mode: screen;
}

.orb--one {
  top: -17%;
  left: -9%;
  background: radial-gradient(circle at 58% 58%, rgba(175, 81, 255, .58), rgba(83, 18, 255, .16) 38%, transparent 69%);
  animation: drift-one 18s ease-in-out infinite alternate;
}

.orb--two {
  right: -9%;
  bottom: -25%;
  background: radial-gradient(circle at 38% 35%, rgba(73, 148, 255, .5), rgba(175, 35, 255, .22) 36%, transparent 68%);
  animation: drift-two 22s ease-in-out infinite alternate;
}

.grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(205, 161, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 161, 255, .14) 1px, transparent 1px);
  background-size: clamp(3rem, 7vw, 7rem) clamp(3rem, 7vw, 7rem);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 71%);
  transform: perspective(700px) rotateX(64deg) scale(1.9) translateY(22%);
  transform-origin: center bottom;
}

.rays {
  position: absolute;
  width: 120vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 2deg, rgba(201, 155, 255, .07) 0deg 1deg, transparent 1deg 9deg);
  opacity: .5;
  mask-image: radial-gradient(circle, black 0 21%, transparent 63%);
  animation: spin 54s linear infinite reverse;
}

.ring,
.ring::before,
.ring::after {
  position: absolute;
  border: 1px solid rgba(211, 183, 255, .2);
  border-radius: 50%;
  content: "";
}

.ring {
  width: min(74vw, 56rem);
  aspect-ratio: 1;
  box-shadow: 0 0 5rem rgba(127, 46, 255, .1), inset 0 0 5rem rgba(127, 46, 255, .06);
  animation: ring-pulse 8s ease-in-out infinite;
}

.ring::before { inset: 6%; border-color: rgba(179, 117, 255, .12); }

.ring::after {
  inset: 15%;
  border-color: rgba(233, 172, 255, .1);
  border-style: dashed;
  animation: spin 35s linear infinite;
}

.brand {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(72vw, 32rem);
  padding: 2rem;
  filter: drop-shadow(0 0 1.3rem rgba(166, 95, 255, .75)) drop-shadow(0 0 5rem rgba(119, 41, 255, .38));
  animation: brand-float 7s ease-in-out infinite;
}

.brand::before {
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(170, 93, 255, .24), rgba(105, 31, 255, .09) 43%, transparent 70%);
  filter: blur(18px);
  z-index: -1;
}

.brand::after {
  position: absolute;
  inset: 15% 3%;
  border: 1px solid rgba(246, 209, 255, .2);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  transform: rotate(-17deg) scaleY(.32);
  box-shadow: 0 0 1.2rem rgba(240, 175, 255, .25);
  animation: orbit 11s linear infinite;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.spark {
  position: absolute;
  z-index: 1;
  width: .28rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 1rem .2rem var(--pink), 0 0 .2rem #fff;
  animation: twinkle 4s ease-in-out infinite;
}

.spark:nth-of-type(1) { top: 22%; left: 31%; animation-delay: -1.2s; }
.spark:nth-of-type(2) { top: 34%; right: 24%; width: .18rem; animation-delay: -2.6s; }
.spark:nth-of-type(3) { bottom: 24%; left: 24%; width: .16rem; animation-delay: -.5s; }
.spark:nth-of-type(4) { right: 31%; bottom: 19%; width: .22rem; animation-delay: -3.4s; }

@keyframes breathe { to { transform: scale(1.14) rotate(8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift-one { to { transform: translate(13vw, 10vh) scale(1.16); } }
@keyframes drift-two { to { transform: translate(-11vw, -13vh) scale(1.2); } }
@keyframes ring-pulse { 50% { transform: scale(1.05); opacity: .72; } }
@keyframes brand-float { 50% { transform: translateY(-.75rem) scale(1.012); } }
@keyframes orbit { to { transform: rotate(343deg) scaleY(.32); } }
@keyframes twinkle { 0%, 100% { opacity: .22; transform: scale(.65); } 45% { opacity: 1; transform: scale(1.2); } }

@media (max-width: 600px) {
  .brand { width: min(86vw, 27rem); padding: 1rem; }
  .ring { width: 105vw; }
  .grid { transform: perspective(500px) rotateX(64deg) scale(2.5) translateY(25%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
