*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg0: #07060c;
  --bg1: #0f0a14;
  --accent: #c9a962;
  --accent2: #7b6fd4;
  --text: #e8e4dc;
  --muted: rgba(232, 228, 220, 0.55);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--text);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1a1428 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(123, 111, 212, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(201, 169, 98, 0.08) 0%, transparent 50%),
    var(--bg0);
  overflow-x: hidden;
}

#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
  mix-blend-mode: overlay;
}

#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.55;
}

.aurora {
  position: fixed;
  inset: -50%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(123, 111, 212, 0.15),
    transparent 25%,
    rgba(201, 169, 98, 0.1),
    transparent 50%,
    rgba(123, 111, 212, 0.12),
    transparent 75%,
    rgba(201, 169, 98, 0.08)
  );
  animation: aurora-spin 80s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes aurora-spin {
  to {
    transform: rotate(360deg);
  }
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(7, 6, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate__inner {
  text-align: center;
  padding: 2rem;
  animation: gate-float 6s ease-in-out infinite;
}

@keyframes gate-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.gate__hint {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate__sub {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.gate__btn {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.gate__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201, 169, 98, 0.15);
  border-color: rgba(201, 169, 98, 0.35);
}

.gate__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.stage {
  position: relative;
  z-index: 3;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 4rem) 1.5rem 4rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease 0.15s, transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.stage.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.avatar-figure {
  position: relative;
  width: min(100%, 300px);
  height: 200px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wing {
  position: absolute;
  top: 50%;
  width: 115px;
  height: 175px;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.wing--left {
  left: -8px;
  transform: translateY(-50%);
  transform-origin: 85% 45%;
  animation: wing-flap-l 2.9s ease-in-out infinite;
}

.wing--right {
  right: -8px;
  transform: translateY(-50%);
  transform-origin: 15% 45%;
  animation: wing-flap-r 2.9s ease-in-out infinite;
}

@keyframes wing-flap-l {
  0%,
  100% {
    transform: translateY(-50%) rotate(-4deg) scale(1);
  }
  50% {
    transform: translateY(-50%) rotate(12deg) scale(1.02);
  }
}

@keyframes wing-flap-r {
  0%,
  100% {
    transform: translateY(-50%) rotate(4deg) scale(1);
  }
  50% {
    transform: translateY(-50%) rotate(-12deg) scale(1.02);
  }
}

.avatar-wrap {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 140px;
  margin: 0;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent));
  animation: ring-spin 12s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.avatar {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2438, #15121c);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.avatar__initial {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--muted);
  user-select: none;
}

.avatar.has-photo .avatar__initial {
  display: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
}

.track-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: rgba(201, 169, 98, 0.95);
}

.track-title__note {
  margin-right: 0.35rem;
  opacity: 0.85;
}

.tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.chip:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(201, 169, 98, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(201, 169, 98, 0.1);
}

.chip:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(232, 228, 220, 0.88);
  opacity: 0.95;
}

.chip__icon svg {
  display: block;
}

.chip--discord .chip__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  line-height: 1.15;
}

.chip__line {
  font-size: inherit;
}

.chip__sub {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.music-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(15, 10, 20, 0.75);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-bottom: 14px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.music-btn:hover {
  border-color: rgba(201, 169, 98, 0.4);
  transform: scale(1.05);
}

.music-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.music-btn__wave {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: bottom center;
  animation: wave 0.8s ease-in-out infinite alternate;
}

.music-btn__wave:nth-child(2) {
  animation-delay: 0.15s;
}

.music-btn__wave:nth-child(3) {
  animation-delay: 0.3s;
}

.music-btn.is-muted .music-btn__wave {
  animation: none;
  height: 4px;
  opacity: 0.4;
}

@keyframes wave {
  from {
    transform: scaleY(0.35);
    opacity: 0.6;
  }
  to {
    transform: scaleY(1.2);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .avatar-ring,
  .gate__inner,
  .wing--left,
  .wing--right {
    animation: none;
  }

  .wing--left,
  .wing--right {
    transform: translateY(-50%);
  }

  .music-btn__wave {
    animation: none;
    height: 10px;
  }

  .stage {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
