:root {
  --bg-1: #03030e;
  --bg-2: #130725;
  --bg-3: #2a0e3f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #f7f4ff;
  background:
    radial-gradient(1200px 600px at 50% -15%, rgba(173, 66, 255, 0.22), transparent 60%),
    radial-gradient(900px 540px at 50% 115%, rgba(67, 20, 120, 0.26), transparent 66%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  overflow: hidden;
  transition:
    --bg-1 0.45s ease,
    --bg-2 0.45s ease,
    --bg-3 0.45s ease,
    background 0.45s ease;
}

.stage {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent 12%),
    radial-gradient(circle at 50% 8%, rgba(236, 91, 255, 0.15), transparent 55%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 220px, 100% 100%;
  background-position: top center, center;
  opacity: 0.18;
  filter: saturate(1.1) blur(0.2px);
}

.star-layer {
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 8% 16%, rgba(255, 255, 255, 0.5), transparent 70%),
    radial-gradient(2px 2px at 18% 78%, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(1.6px 1.6px at 41% 33%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(1.8px 1.8px at 63% 26%, rgba(255, 255, 255, 0.38), transparent 70%),
    radial-gradient(2px 2px at 80% 74%, rgba(255, 255, 255, 0.34), transparent 70%),
    radial-gradient(1.7px 1.7px at 91% 44%, rgba(255, 255, 255, 0.4), transparent 70%);
  animation: driftStars 24s linear infinite alternate;
}

.hero {
  text-align: center;
  padding: 26px 16px;
  z-index: 2;
}

.hero-logo {
  display: block;
  width: clamp(120px, 16vw, 180px);
  margin: 0 auto 10px;
  opacity: 0.9;
  filter: drop-shadow(0 0 24px rgba(182, 89, 255, 0.35));
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-shadow:
    0 0 20px rgba(200, 82, 255, 0.33),
    0 0 48px rgba(120, 42, 189, 0.35);
}

.subtitle {
  margin: 12px 0 8px;
  color: #e9cdfc;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
}

.hint {
  margin: 0;
  color: #c7abd8;
  font-size: 0.96rem;
}

.floating-links {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.float-link {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  display: block;
  text-decoration: none;
  animation: floatIcon 7.5s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.float-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(198, 94, 255, 0.42));
}

.float-link:hover,
.float-link:focus-visible {
  transform: scale(1.13) translateY(-4px);
  filter: brightness(1.1);
}

.float-link:focus-visible {
  outline: 2px solid rgba(247, 219, 255, 0.95);
  outline-offset: 4px;
  border-radius: 12px;
}

@keyframes floatIcon {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5px, -7px) rotate(1deg);
  }
  50% {
    transform: translate(-4px, -3px) rotate(-1deg);
  }
  75% {
    transform: translate(6px, 5px) rotate(1.1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes driftStars {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-20px, 16px);
  }
}

@media (max-width: 900px) {
  .float-link {
    width: clamp(56px, 14vw, 82px);
    height: clamp(56px, 14vw, 82px);
  }

  .float-link:nth-child(1) {
    left: 18%;
    top: 24%;
  }

  .float-link:nth-child(2) {
    left: 66%;
    top: 24%;
  }

  .float-link:nth-child(3) {
    left: 22%;
    top: 67%;
  }

  .float-link:nth-child(4) {
    left: 66%;
    top: 67%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-link,
  .star-layer {
    animation: none;
  }

  body {
    transition: none;
  }
}