:root {
  --ink: #e8e4dc;
  --muted: rgba(232, 228, 220, 0.62);
  --void: #07080c;
  --hue: 276;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  overflow: hidden;
}

body {
  min-height: 100dvh;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw 7vh;
  text-align: center;
  pointer-events: none;
}

.mark {
  letter-spacing: 0.62em;
  font-weight: 300;
  font-size: 0.78rem;
  text-indent: 0.62em;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.scene {
  position: relative;
  width: min(78vw, 560px);
  height: min(62vw, 440px);
  margin-bottom: 2.2rem;
  --hue: 276;
}

.orb {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(28vw, 196px);
  height: min(28vw, 196px);
  transform: translate(-50%, -50%);
  animation: drift 18s ease-in-out infinite;
}

.sphere {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, hsl(282, 100%, 78%) 0%, transparent 22%),
    radial-gradient(circle at 70% 76%, hsl(268, 80%, 18%) 0%, transparent 48%),
    radial-gradient(circle at 42% 40%,
      hsl(276, 100%, 62%) 0%,
      hsl(272, 90%, 44%) 40%,
      hsl(266, 75%, 24%) 100%);
  box-shadow:
    inset -18px -22px 40px hsla(268, 80%, 8%, 0.55),
    inset 10px 12px 24px hsla(282, 100%, 82%, 0.35),
    0 0 80px hsla(276, 100%, 52%, 0.4);
  animation: breathe 7.4s ease-in-out infinite;
}

.sphere::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.42), transparent 26%);
  mix-blend-mode: screen;
}

.halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(276, 100%, 58%, 0.3), transparent 68%);
  filter: blur(10px);
  animation: breathe 7.4s ease-in-out infinite reverse;
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(232, 228, 220, 0.18);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.r1 {
  width: 138%;
  height: 138%;
  animation: spin 48s linear infinite;
  border-color: hsla(276, 100%, 70%, 0.32);
}

.r2 {
  width: 176%;
  height: 48%;
  border-color: hsla(276, 100%, 70%, 0.38);
  animation: spin 36s linear infinite reverse;
}

.r3 {
  width: 48%;
  height: 186%;
  border-color: hsla(276, 100%, 70%, 0.26);
  animation: spin 52s linear infinite;
}

.creatures {
  list-style: none;
  position: absolute;
  inset: 0;
}

.creature {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 92px;
  height: 104px;
  margin-left: -46px;
  margin-top: -42px;
  transform: rotate(var(--a)) translateY(-176px) rotate(calc(var(--a) * -1));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.radiance {
  position: absolute;
  left: 50%;
  top: 38px;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%) scale(0.72);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 46%,
      hsla(286, 100%, 76%, 0.0) 0%,
      hsla(278, 100%, 64%, 0.55) 28%,
      hsla(268, 90%, 42%, 0.72) 52%,
      hsla(262, 80%, 24%, 0.0) 74%);
  filter: blur(5px);
  opacity: 0;
  z-index: 0;
  animation: radiance 6.9s ease-in-out infinite;
  animation-delay: var(--d);
}

.creature svg {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  overflow: visible;
}

.creature path,
.creature .form {
  fill: rgba(232, 228, 220, 0.86);
  stroke: none;
}

.creature .eye {
  fill: #12140f;
  stroke: none;
}

.creature .name {
  order: 2;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: lowercase;
  color: rgba(232, 228, 220, 0.42);
  font-weight: 300;
}

.line {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.28rem, 2.4vw, 1.92rem);
  line-height: 1.45;
  max-width: 42rem;
  letter-spacing: 0.01em;
}

.line a,
.domain a {
  pointer-events: auto;
  color: #fff;
  text-decoration: none;
}

.line a:hover,
.line a:focus-visible,
.domain a:hover,
.domain a:focus-visible {
  color: hsl(var(--hue), 80%, 76%);
}

.domain {
  margin-top: 1.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: var(--muted);
  font-weight: 300;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 8px)); }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes radiance {
  0%, 16%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  6% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  11% {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@media (max-width: 720px) {
  .scene {
    width: min(92vw, 420px);
    height: 340px;
    margin-bottom: 1.6rem;
  }
  .orb {
    width: 148px;
    height: 148px;
  }
  .creature {
    width: 74px;
    transform: rotate(var(--a)) translateY(-132px) rotate(calc(var(--a) * -1));
  }
  .creature svg {
    width: 52px;
    height: 52px;
  }
  .radiance {
    width: 60px;
    height: 60px;
    top: 26px;
  }
  .line {
    font-size: 1.22rem;
  }
}

@media (max-height: 700px) {
  .scene {
    height: 300px;
    margin-bottom: 1rem;
  }
  .creature {
    transform: rotate(var(--a)) translateY(-124px) rotate(calc(var(--a) * -1));
  }
  .mark {
    margin-bottom: 0.8rem;
  }
}
