:root {
  --bg: #0c0b10;
  --fg: #f4f0ff;
  --muted: #9a8fb8;
  --accent: #ff6b9d;
  --accent2: #7c5cff;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.glow-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}

.orb-a {
  width: min(60vw, 420px);
  height: min(60vw, 420px);
  top: -10%;
  left: -15%;
  background: radial-gradient(circle, var(--accent2), transparent 70%);
}

.orb-b {
  width: min(50vw, 360px);
  height: min(50vw, 360px);
  bottom: -5%;
  right: -10%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation-delay: -7s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, 6%) scale(1.05);
  }
  66% {
    transform: translate(-3%, -4%) scale(0.98);
  }
}

.stage {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 4rem) 1.5rem 3rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
}

.sound-btn {
  position: fixed;
  z-index: 2;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid rgba(244, 240, 255, 0.2);
  border-radius: 50%;
  background: rgba(20, 18, 32, 0.75);
  color: var(--fg);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    transform 0.2s var(--ease-spring),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.sound-btn:hover {
  border-color: rgba(255, 107, 157, 0.45);
  transform: scale(1.06);
}

.sound-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sound-btn.is-playing {
  border-color: rgba(124, 92, 255, 0.55);
  color: var(--accent);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.25);
}

.sound-btn__icon {
  width: 1.45rem;
  height: 1.45rem;
}

.sound-btn.is-playing .sound-btn__icon {
  animation: sound-pulse 1.2s ease-in-out infinite;
}

@keyframes sound-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

.line--soft {
  font-family: "Unbounded", "Nunito", sans-serif;
  font-weight: 900;
  font-size: clamp(1.65rem, 5.5vw, 2.35rem);
  line-height: 1.35;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.28em;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(120%) rotate(-4deg);
  animation: word-in 0.85s var(--ease-spring) forwards;
  animation-delay: calc(0.12s + var(--i) * 0.09s);
}

.word--pop {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(255, 107, 157, 0.35);
  animation-name: word-in-pop;
}

.line--soft .word {
  cursor: default;
  transition: transform 0.25s var(--ease-spring), color 0.25s ease;
}

.line--soft:hover .word:not(:hover) {
  opacity: 0.55;
}

.line--soft .word:hover {
  transform: translateY(-4px) scale(1.06);
  color: #fff;
}

.line--soft .word--pop:hover {
  color: #ffb3d0;
}

@keyframes word-in {
  0% {
    opacity: 0;
    transform: translateY(120%) rotate(-5deg) scale(0.92);
  }
  70% {
    opacity: 1;
    transform: translateY(-6%) rotate(1deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes word-in-pop {
  0% {
    opacity: 0;
    transform: translateY(140%) rotate(8deg) scale(0.85);
  }
  65% {
    opacity: 1;
    transform: translateY(-10%) rotate(-3deg) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.divider {
  height: 3px;
  width: 0;
  max-width: 12rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 1s var(--ease-out-expo);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.4);
}

.divider.is-visible {
  width: 100%;
}

.line--hard {
  margin: 0;
  padding: 0;
  border: none;
}

.hard-inner {
  display: inline-block;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 3.8vw, 1.5rem);
  line-height: 1.45;
  color: #e8e0ff;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateX(-8%) skewX(-6deg) scale(0.94);
  filter: blur(6px);
}

.hard-inner.is-visible {
  animation: hard-slam 0.9s var(--ease-spring) forwards;
}

@keyframes hard-slam {
  0% {
    opacity: 0;
    transform: translateX(-14%) skewX(-8deg) scale(0.9);
    filter: blur(8px);
  }
  55% {
    opacity: 1;
    transform: translateX(2%) skewX(2deg) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .word {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hard-inner {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hard-inner.is-visible {
    animation: none;
  }

  .divider {
    width: 100%;
  }

  .sound-btn.is-playing .sound-btn__icon {
    animation: none;
  }
}
