/* Starmelo — candy-daydream cosmos.
   Palette: dream-blue #4656D8 · bright-violet #8A5CE8 · candy-pink #E86BBE
            sunny-peach #FFB870 · candy-rose #FF9EC0 · melody-gold #FFD98A
            starlight-cream #FFF6E8 · mint-sparkle #A5F0DC */

@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url('../fonts/fredoka-500.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('../fonts/fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito';  font-weight: 400; font-display: swap; src: url('../fonts/nunito-400.woff2')  format('woff2'); }
@font-face { font-family: 'Nunito';  font-weight: 600; font-display: swap; src: url('../fonts/nunito-600.woff2')  format('woff2'); }
@font-face { font-family: 'Nunito';  font-weight: 700; font-display: swap; src: url('../fonts/nunito-700.woff2')  format('woff2'); }

:root {
  --plum: #3A46C8;
  --plum-deep: #3240C4;
  --violet: #8A5CE8;
  --mauve: #E86BBE;
  --peach: #FFB870;
  --rose: #FF9EC0;
  --gold: #FFD98A;
  --cream: #FFF6E8;
}

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

html { height: 100%; overflow-x: hidden; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--cream);
  background-color: #6E5EE6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

/* fixed gradient layer — covers the viewport, composited once, no scroll repaint
   (mobile-friendly; avoids background-attachment:fixed jank and the seam it caused) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg,
    #4656D8 0%,
    #5C55E0 20%,
    var(--violet) 44%,
    #C466D0 64%,
    var(--mauve) 80%,
    #F98BA2 92%,
    var(--peach) 104%);
}

/* ---------- sky layers ---------- */

#nebula,
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.glow-horizon {
  position: fixed;
  left: 50%;
  bottom: -32vh;
  width: 130vw;
  height: 62vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(255, 217, 138, 0.7) 0%,
    rgba(255, 158, 192, 0.35) 45%,
    transparent 72%);
  animation: breathe 5s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

@keyframes breathe {
  from { opacity: 0.75; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;    transform: translateX(-50%) scale(1.1); }
}

.cloud {
  position: fixed;
  border-radius: 50%;
  filter: blur(46px);
  pointer-events: none;
  z-index: 1;
}

.cloud-1 {
  width: 55vw; height: 24vh; left: -12vw; top: 14vh;
  background: radial-gradient(ellipse at center, rgba(255,158,192,0.4), transparent 70%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.cloud-2 {
  width: 48vw; height: 22vh; right: -14vw; top: 40vh;
  background: radial-gradient(ellipse at center, rgba(165,240,220,0.28), transparent 70%);
  animation: drift-b 42s ease-in-out infinite alternate;
}

.cloud-3 {
  width: 62vw; height: 26vh; left: 18vw; bottom: -6vh;
  background: radial-gradient(ellipse at center, rgba(255,217,138,0.32), transparent 70%);
  animation: drift-a 50s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a { from { transform: translateX(0); } to { transform: translateX(9vw); } }
@keyframes drift-b { from { transform: translateX(0); } to { transform: translateX(-11vw); } }

/* ---------- header ---------- */

.top {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(18px, 3vw, 32px) clamp(20px, 4vw, 44px);
}

.wordmark {
  display: flex;
  align-items: center;
}

.logo-img {
  height: clamp(38px, 6vw, 56px);
  width: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wordmark:hover .logo-img { transform: scale(1.06) rotate(-2deg); }

.mute {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 246, 232, 0.45);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, transform 0.2s;
}

.mute:hover { border-color: rgba(255, 246, 232, 0.7); transform: scale(1.06); }

.mute svg { width: 20px; height: 20px; fill: var(--cream); stroke: var(--cream); }
.mute .icon-off { display: none; }
.mute[aria-pressed="true"] .icon-on { display: none; }
.mute[aria-pressed="true"] .icon-off { display: block; }

/* ---------- star buddy ---------- */

.buddy {
  position: fixed;
  top: 15vh;
  right: clamp(24px, 9vw, 140px);
  width: clamp(64px, 8vw, 96px);
  height: clamp(64px, 8vw, 96px);
  border: none;
  background: none;
  cursor: pointer;
  z-index: 3;
  animation: bounce-buddy 2.6s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.buddy:hover { transform: scale(1.18) rotate(10deg); }
.buddy svg { width: 100%; height: 100%; overflow: visible; }
.buddy-body {
  fill: var(--gold);
  filter: drop-shadow(0 0 22px rgba(255, 217, 138, 0.75));
}
.buddy-eye { fill: #7a4a20; }
.buddy-cheek { fill: rgba(255, 130, 160, 0.55); }
.buddy-smile { stroke: #7a4a20; stroke-width: 2.6; }

.buddy.singing { animation: buddy-bop 0.32s ease-in-out infinite; }

@keyframes bounce-buddy {
  0%, 100% { translate: 0 0; rotate: -4deg; }
  50% { translate: 0 -16px; rotate: 6deg; }
}

@keyframes buddy-bop {
  0%, 100% { transform: rotate(-7deg) scale(1.04); }
  50% { transform: rotate(7deg) scale(1.14); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 3;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 22px 30px;
  pointer-events: none;          /* let taps fall through to the singing sky */
}

.hero > * { pointer-events: none; }
.hero .cta { pointer-events: auto; }  /* but keep the button clickable */

.eyebrow {
  font-weight: 700;
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 217, 138, 0.45);
  animation: rise 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.9rem);
  line-height: 1.12;
  margin: 20px 0 22px;
  text-shadow: 0 2px 30px rgba(58, 40, 150, 0.5);
  animation: rise 0.8s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.amp {
  font-weight: 500;
  color: var(--rose);
  font-style: italic;
}

.sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.6;
  color: rgba(255, 246, 232, 0.88);
  max-width: 34em;
  animation: rise 0.9s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pill {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  letter-spacing: 0.04em;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 246, 232, 0.55);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(58, 40, 150, 0.3);
  animation: pop 0.8s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pill-star {
  color: var(--gold);
  animation: twinkle-pill 2.2s ease-in-out infinite;
}

@keyframes twinkle-pill {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8) rotate(20deg); }
}

.hint {
  margin-top: 30px;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  font-weight: 600;
  color: rgba(255, 217, 138, 0.85);
  animation: rise 0.9s 1.1s cubic-bezier(0.22, 1, 0.36, 1) both, hint-pulse 3.2s 2.2s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.sub strong { color: var(--gold); font-weight: 800; }

/* ---------- hero art (the crew) ---------- */

.hero-art {
  position: relative;
  width: min(620px, 90vw);
  margin: 30px 0 26px;
  animation: rise 0.9s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both,
             float-art 6.5s 1.3s ease-in-out infinite;
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 26px;
  border: 3px solid rgba(255, 246, 232, 0.9);
  box-shadow: 0 20px 60px rgba(58, 40, 150, 0.45);
}

/* spinning rainbow halo behind the image */
.hero-art::before {
  content: '';
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 36px;
  background: conic-gradient(from 0deg,
    #FF9EC0, #FFD98A, #A5F0DC, #8A5CE8, #E86BBE, #FF9EC0);
  filter: blur(28px);
  opacity: 0.65;
  animation: spin-halo 14s linear infinite;
}

@keyframes spin-halo { to { transform: rotate(360deg); } }
@keyframes float-art {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- watch CTA ---------- */

.cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: #3a2472;
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFE9A8 0%, #FFB870 52%, #FF9EC0 100%);
  box-shadow: 0 12px 30px rgba(255, 158, 192, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  animation: pop 0.8s 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 18px 42px rgba(255, 158, 192, 0.62),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cta svg { width: 20px; height: 20px; fill: #3a2472; }

/* ---------- songs ---------- */

.songs {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 22px 22px 8px;
}

.songs h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 22px;
  text-shadow: 0 2px 22px rgba(58, 40, 150, 0.45);
}

.song-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.song-card {
  width: min(400px, 90vw);
  text-decoration: none;
  color: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 246, 232, 0.35);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(58, 40, 150, 0.35);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s;
}

.song-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 46px rgba(58, 40, 150, 0.5);
}

.song-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

.song-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.song-card:hover .play { transform: translate(-50%, -50%) scale(1.12); }
.play svg { width: 26px; height: 26px; fill: #E8397A; margin-left: 3px; }

.song-title {
  display: block;
  padding: 14px 16px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.song-title:hover { text-decoration: underline; text-underline-offset: 3px; }

.more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  font-size: clamp(0.9rem, 1.7vw, 1rem);
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(255, 246, 232, 0.45);
  transition: border-color 0.2s;
}

.more:hover { border-color: var(--cream); }

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 16px 20px clamp(20px, 3.5vh, 34px);
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  font-weight: 700;
  color: #33204d;
  text-align: center;
}

.foot-nav, .foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.foot-nav a {
  color: #33204d;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(51, 32, 77, 0.35);
  transition: border-color 0.2s;
}

.foot-nav a:hover { border-color: #33204d; }
.foot-legal { font-weight: 700; opacity: 0.92; }

.mail {
  color: #33204d;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(51, 32, 77, 0.4);
  transition: border-color 0.2s;
}

.mail:hover { border-color: #33204d; }

.dot { opacity: 0.6; }

/* ---------- content pages (about / privacy) ---------- */

.page {
  position: relative;
  z-index: 3;
  flex: 1 0 auto;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 16px 22px 44px;
  color: var(--cream);
}

.page h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 8px 0 6px;
  text-shadow: 0 2px 22px rgba(58, 40, 150, 0.45);
}

.page .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 22px;
}

.page h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  margin: 30px 0 10px;
}

.page p, .page li {
  line-height: 1.72;
  font-weight: 600;
  color: rgba(255, 246, 232, 0.92);
  margin-bottom: 12px;
}

.page ul { padding-left: 1.25em; }

.page a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page .back {
  display: inline-block;
  margin-top: 26px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(255, 217, 138, 0.5);
}

.page .back:hover { border-color: var(--gold); }

/* ---------- a11y ---------- */

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .glow-horizon, .cloud, .buddy, .pill-star, .hint,
  .hero-art, .hero-art::before, .cta { animation: none; }
  .eyebrow, h1, .sub, .pill, .hero-art, .cta { animation: none; opacity: 1; transform: none; }
  .wordmark-star, .buddy, .mute { transition: none; }
}

@media (max-width: 560px) {
  .wide-only { display: none; }
  .buddy { top: 10vh; right: 14px; width: 56px; height: 56px; }
  .hero-art { margin: 22px 0 22px; }
  h1 { margin: 14px 0 6px; }
}
