/* ============================================
   🎀 Premey's Birthday Page — Styles 🎀
   ============================================ */

:root {
  --pink-1: #fff0f6;
  --pink-2: #ffd6e8;
  --pink-3: #ffaed1;
  --pink-4: #ff8fc0;
  --pink-5: #ff5fa2;
  --pink-deep: #d63384;
  --plum: #8a2c5c;
  --white: #fffafc;
  --gold: #ffd66b;
  --shadow-pink: rgba(255, 95, 162, 0.35);

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-body: 'Quicksand', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--plum);
  overflow-x: hidden;
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Background ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(160deg, var(--pink-1) 0%, var(--pink-2) 35%, var(--pink-3) 70%, var(--pink-4) 100%);
  background-size: 200% 200%;
  animation: gradientDrift 14s ease-in-out infinite;
}

@keyframes gradientDrift {
  0%   { background-position: 0% 20%; }
  50%  { background-position: 100% 80%; }
  100% { background-position: 0% 20%; }
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
#sparkle-layer { z-index: -2; }
#bow-layer { z-index: -1; opacity: 0.5; }

/* ---------- sparkles ---------- */
.sparkle {
  position: absolute;
  color: #fff;
  text-shadow: 0 0 6px #fff, 0 0 12px var(--pink-4);
  animation: sparkleTwinkle linear infinite, sparkleFall linear infinite;
  will-change: transform, opacity;
}
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(180deg); }
}
@keyframes sparkleFall {
  from { transform: translateY(-5vh); }
  to { transform: translateY(105vh); }
}

/* ---------- confetti ---------- */
.confetti-piece {
  position: absolute;
  top: -5vh;
  border-radius: 2px;
  opacity: 0.9;
  animation-name: confettiFall, confettiSway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}
@keyframes confettiFall {
  from { transform: translateY(-10vh) rotate(0deg); }
  to { transform: translateY(110vh) rotate(720deg); }
}
@keyframes confettiSway {
  0%, 100% { margin-left: 0px; }
  50% { margin-left: 40px; }
}

/* ---------- balloons ---------- */
.balloon {
  position: absolute;
  bottom: -20vh;
  font-size: 3rem;
  filter: drop-shadow(0 6px 10px var(--shadow-pink));
  animation-name: balloonRise, balloonSway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}
@keyframes balloonRise {
  from { transform: translateY(0); }
  to { transform: translateY(-130vh); }
}
@keyframes balloonSway {
  0%, 100% { margin-left: -30px; }
  50% { margin-left: 30px; }
}

/* ---------- floating background bows ---------- */
.floating-bow {
  position: absolute;
  font-size: 2rem;
  animation: bowFloat ease-in-out infinite;
  opacity: 0.55;
}
@keyframes bowFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-25px) rotate(8deg); }
}

/* ============================================
   Music widget
   ============================================ */
.music-widget {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border: 2px solid var(--pink-4);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  box-shadow: 0 6px 18px var(--shadow-pink);
}
.music-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, var(--pink-4), var(--pink-5));
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.music-btn:hover { transform: scale(1.12) rotate(-8deg); }
.music-btn:active { transform: scale(0.92); }
.music-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--pink-deep);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.hero-bows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.giant-bow {
  position: absolute;
  font-size: clamp(4rem, 10vw, 8rem);
  top: 6%;
  animation: bigBowSway 5s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px var(--shadow-pink));
}
.giant-bow.left { left: 2%; transform: rotate(-14deg); }
.giant-bow.right { right: 2%; transform: rotate(14deg); animation-delay: 0.6s; }
@keyframes bigBowSway {
  0%, 100% { transform: rotate(-14deg) translateY(0); }
  50% { transform: rotate(-6deg) translateY(-14px); }
}
.giant-bow.right { animation-name: bigBowSwayR; }
@keyframes bigBowSwayR {
  0%, 100% { transform: rotate(14deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-14px); }
}

.eyebrow {
  font-family: var(--font-hand);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--pink-deep);
  margin: 0 0 6px;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--pink-deep);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 var(--pink-3);
}

.name-swirl {
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--pink-5);
  font-size: 1.15em;
  display: inline-block;
  animation: nameWiggle 2.4s ease-in-out infinite;
}
@keyframes nameWiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.hero-emojis {
  display: inline-block;
  animation: emojiBounce 1.6s ease-in-out infinite;
}
@keyframes emojiBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.15); }
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--plum);
  font-weight: 600;
}

/* ---------- CTA button ---------- */
.cta-button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  background: linear-gradient(135deg, var(--pink-4), var(--pink-5));
  border: none;
  padding: 16px 34px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px var(--shadow-pink);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 30px var(--shadow-pink);
}
.cta-button:active { transform: translateY(0) scale(0.97); }

.btn-heart { display: inline-block; margin-left: 4px; }

/* popping hearts on hover, shared by pop-heart buttons */
.pop-heart { position: relative; overflow: visible; }
.heart-pop {
  position: absolute;
  pointer-events: none;
  font-size: 1.1rem;
  animation: heartPopFly 0.9s ease-out forwards;
  z-index: 5;
}
@keyframes heartPopFly {
  0% { opacity: 1; transform: translate(0,0) scale(0.6); }
  100% { opacity: 0; transform: translate(var(--dx), -70px) scale(1.3); }
}

/* ============================================
   Section shared styles
   ============================================ */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--pink-deep);
  text-align: center;
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 #fff;
}

.section-sub {
  text-align: center;
  font-weight: 600;
  color: var(--plum);
  opacity: 0.8;
  margin-top: 0;
  margin-bottom: 32px;
}

/* ---------- message card ---------- */
.message-card {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border: 3px dashed var(--pink-4);
  border-radius: 28px;
  padding: 44px 32px;
  margin: 50px auto;
  max-width: 760px;
  box-shadow: 0 14px 34px var(--shadow-pink);
}
.corner-bow {
  position: absolute;
  font-size: 2.4rem;
}
.corner-bow.tl { top: -20px; left: -14px; transform: rotate(-18deg); }
.corner-bow.br { bottom: -20px; right: -14px; transform: rotate(18deg); }

.handwritten-note {
  font-family: var(--font-hand);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.55;
  color: var(--plum);
  text-align: center;
  margin: 0 0 18px;
}
.signoff {
  font-weight: 700;
  color: var(--pink-5);
  margin: 0;
}

/* ---------- gallery ---------- */
.gallery-section { margin: 70px auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid white;
  outline: 3px solid var(--pink-3);
  box-shadow: 0 10px 24px var(--shadow-pink);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-item:hover {
  transform: rotate(-1.5deg) scale(1.04);
  box-shadow: 0 18px 34px var(--shadow-pink);
}
.gallery-item:nth-child(even):hover { transform: rotate(1.5deg) scale(1.04); }

.gallery-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.frame-bow {
  position: absolute;
  top: -6px;
  right: 6px;
  font-size: 1.8rem;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.25));
}

/* ---------- wish / cake section ---------- */
.wish-section {
  text-align: center;
  margin: 90px auto;
}

.cake-button {
  background: none;
  border: none;
  font-size: clamp(4.5rem, 12vw, 7rem);
  cursor: pointer;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 10px 18px var(--shadow-pink));
}
.cake-button:hover { transform: scale(1.1) rotate(-4deg); }
.cake-button:active { transform: scale(0.9); }

.wish-text {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--pink-deep);
  min-height: 2.4rem;
  margin-top: 14px;
}

/* ---------- sticker strip ---------- */
.sticker-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 2rem;
  margin: 60px auto 0;
  opacity: 0.9;
}
.sticker-strip span {
  animation: stickerBounce 2.2s ease-in-out infinite;
}
.sticker-strip span:nth-child(odd) { animation-delay: 0.3s; }
.sticker-strip span:nth-child(3n) { animation-delay: 0.6s; }
@keyframes stickerBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(10deg); }
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 34px 20px 44px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pink-deep);
}
.footer-name { color: var(--pink-5); }
.footer-sub {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--plum);
  margin-top: 4px;
}

/* ---------- responsive tweaks ---------- */
@media (max-width: 640px) {
  .giant-bow { font-size: 3.2rem; }
  .music-label { display: none; }
  .message-card { padding: 32px 20px; }
}
