/* ============================================================
   BIRTHDAY WEBSITE — styles.css
   Palette: soft pastels · glassmorphism · glow · elegance
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --pink:       #ffb3c6;
  --pink-deep:  #ff85a1;
  --lavender:   #c8b6ff;
  --lav-deep:   #a78bfa;
  --blue:       #a0c4ff;
  --blue-deep:  #60a5fa;
  --cream:      #fff8f0;
  --cream-2:    #fdf4ff;
  --white:      #ffffff;
  --text-dark:  #3d2c4e;
  --text-mid:   #6b5b7b;
  --text-light: #9d8aaa;

  --glass-bg:   rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 40px rgba(180, 140, 200, 0.18);

  --font-display: 'Dancing Script', cursive;
  --font-body:    'Poppins', sans-serif;

  --radius-card: 28px;
  --radius-btn:  50px;
  --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: linear-gradient(
    135deg,
    #fff0f6 0%,
    #f5f0ff 30%,
    #eef4ff 60%,
    #fff8f0 100%
  );
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Confetti Canvas ────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ── Floating Particles Container ──────────────────────────── */
#particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: clamp(14px, 2vw, 22px);
  opacity: 0;
  animation: floatUp var(--dur, 8s) var(--delay, 0s) ease-in infinite;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Music Button ───────────────────────────────────────────── */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mid);
  box-shadow: 0 4px 20px rgba(180, 140, 200, 0.15);
  transition: var(--transition);
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 28px rgba(167, 139, 250, 0.3);
  transform: translateY(-2px);
}

.music-icon {
  font-size: 1rem;
  animation: pulse-icon 2s ease-in-out infinite;
}

.music-btn.playing .music-icon {
  animation: spin-icon 1.5s linear infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

@keyframes spin-icon {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Decorative Blobs ───────────────────────────────────────── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 12s ease-in-out infinite alternate;
}

.blob-1 { width: 420px; height: 420px; background: var(--pink);     top: -100px; left: -120px; animation-delay: 0s; }
.blob-2 { width: 350px; height: 350px; background: var(--lavender); top: 40%;    right: -80px; animation-delay: -4s; }
.blob-3 { width: 280px; height: 280px; background: var(--blue);     bottom: 5%;  left: 20%;   animation-delay: -8s; }
.blob-4 { width: 380px; height: 380px; background: var(--lavender); top: -60px;  right: -100px; animation-delay: -2s; }
.blob-5 { width: 300px; height: 300px; background: var(--pink);     bottom: 0;   left: -80px;   animation-delay: -6s; }

@keyframes blobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 20px) scale(1.05); }
  100% { transform: translate(-20px, 30px) scale(0.97); }
}

/* ════════════════════════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
}

/* Floating emoji row */
.emoji-row {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 24px);
  margin-bottom: 28px;
}

.float-emoji {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  display: inline-block;
  animation: floatBob 3s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Hero title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-title .line-reveal:first-child {
  color: var(--text-dark);
}

.accent-text {
  background: linear-gradient(135deg, var(--pink-deep), var(--lav-deep), var(--blue-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(167, 139, 250, 0.35));
}

/* Hero subheading */
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: var(--text-mid);
  letter-spacing: 0.02em;
  margin-bottom: 44px;
  font-style: italic;
}

/* ── Line Reveal Animation ──────────────────────────────────── */
.line-reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: lineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.3s + var(--i, 0) * 0.18s);
}

@keyframes lineReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Portrait ───────────────────────────────────────────────── */
.portrait-wrapper {
  display: flex;
  justify-content: center;
  margin: 36px 0 40px;
}

.portrait-ring {
  position: relative;
  width: clamp(200px, 40vw, 280px);
  height: clamp(200px, 40vw, 280px);
}

/* Animated gradient ring */
.portrait-ring::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    var(--pink-deep),
    var(--lav-deep),
    var(--blue-deep),
    var(--pink-deep)
  );
  animation: ringRotate 4s linear infinite;
  z-index: 0;
}

/* White gap between ring and image */
.portrait-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: white;
  z-index: 1;
  margin: 4px;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Soft outer glow */
.portrait-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(200, 182, 255, 0.45) 0%,
    rgba(255, 179, 198, 0.3) 50%,
    transparent 70%
  );
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}

/* The actual photo */
.portrait-img {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  z-index: 2;
  display: block;
}

/* Crown on top */
.portrait-crown {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  z-index: 4;
  animation: crownBob 2.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(167, 139, 250, 0.5));
}

@keyframes crownBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-5deg); }
  50%       { transform: translateX(-50%) translateY(-6px) rotate(5deg); }
}

/* Orbiting sparkle emojis */
.portrait-sparkles {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 3;
  animation: orbitSpin 12s linear infinite;
}

.portrait-sparkles span {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: clamp(0.8rem, 1.8vw, 1.1rem);
  transform:
    rotate(var(--a))
    translateX(var(--r))
    rotate(calc(-1 * var(--a)));
  margin-top: -0.5em;
  margin-left: -0.5em;
  animation: sparkleFloat 2s ease-in-out infinite;
  animation-delay: calc(var(--a) / 60deg * 0.3s);
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes sparkleFloat {
  0%, 100% { opacity: 0.6; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))) scale(1); }
  50%       { opacity: 1;   transform: rotate(var(--a)) translateX(calc(var(--r) + 6px)) rotate(calc(-1 * var(--a))) scale(1.2); }
}

/* Responsive portrait */
@media (max-width: 600px) {
  .portrait-ring { width: 180px; height: 180px; }
  .portrait-crown { font-size: 1.5rem; top: -24px; }
}

/* ── CTA Button ─────────────────────────────────────────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  padding: 16px 44px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--pink-deep) 0%, var(--lav-deep) 60%, var(--blue-deep) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow:
    0 6px 30px rgba(255, 133, 161, 0.4),
    0 2px 8px rgba(167, 139, 250, 0.3);
  transition: var(--transition);
  cursor: pointer;
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cta-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 12px 40px rgba(255, 133, 161, 0.5),
    0 4px 16px rgba(167, 139, 250, 0.4);
}

.cta-btn:hover .cta-icon {
  transform: rotate(15deg) scale(1.2);
}

.cta-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Shimmer sweep */
.cta-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.cta-btn:hover .cta-shimmer {
  transform: translateX(100%);
}

/* ── Scroll Hint ────────────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-hint span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(167, 139, 250, 0.5);
  border-radius: 12px;
  position: relative;
}

.scroll-hint span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--lav-deep);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
  0%   { top: 6px;  opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   MESSAGE SECTION
════════════════════════════════════════════════════════════ */
.message-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 100px;
  overflow: hidden;
}

.message-wrapper {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Section label */
.section-label {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ── Glass Card ─────────────────────────────────────────────── */
.glass-card {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: clamp(28px, 6vw, 52px) clamp(24px, 6vw, 52px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle inner glow */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(
    135deg,
    rgba(255, 179, 198, 0.12) 0%,
    rgba(200, 182, 255, 0.08) 50%,
    rgba(160, 196, 255, 0.12) 100%
  );
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(180, 140, 200, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Card top decoration */
.card-deco {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.card-deco span {
  display: inline-block;
  animation: floatBob 2.5s ease-in-out infinite;
}

.card-deco span:nth-child(1) { animation-delay: 0s; }
.card-deco span:nth-child(2) { animation-delay: 0.4s; }
.card-deco span:nth-child(3) { animation-delay: 0.8s; }

/* Card body */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Message lines — staggered fade-in when card enters viewport */
.msg-line {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.75;
  color: var(--text-dark);
  font-weight: 300;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease calc(var(--li, 0) * 0.12s),
    transform 0.6s ease calc(var(--li, 0) * 0.12s);
}

.msg-line strong {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Active state — triggered by JS IntersectionObserver */
.glass-card.in-view .msg-line {
  opacity: 1;
  transform: translateY(0);
}

/* Card bottom sparkle dots */
.card-bottom-deco {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.sparkle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav-deep));
  animation: sparklePulse 1.8s ease-in-out infinite;
}

.sparkle-dot:nth-child(2) { animation-delay: 0.3s; background: linear-gradient(135deg, var(--lav-deep), var(--blue-deep)); }
.sparkle-dot:nth-child(3) { animation-delay: 0.6s; background: linear-gradient(135deg, var(--blue-deep), var(--pink-deep)); }

@keyframes sparklePulse {
  0%, 100% { transform: scale(1);   opacity: 0.7; }
  50%       { transform: scale(1.5); opacity: 1; }
}

/* ── Balloon Row ────────────────────────────────────────────── */
.balloon-row {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 28px);
}

.balloon {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  display: inline-block;
  animation: balloonFloat 3.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  cursor: default;
  transition: transform 0.2s ease;
}

.balloon:hover {
  transform: scale(1.3) rotate(-10deg);
}

@keyframes balloonFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-18px) rotate(3deg); }
}

/* ── Reveal-up (scroll-triggered) ──────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  padding: 48px 24px 56px;
  text-align: center;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 240, 246, 0.6)
  );
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-mid);
  font-weight: 600;
}

.footer-text em {
  font-style: normal;
  background: linear-gradient(135deg, var(--pink-deep), var(--lav-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-hearts {
  display: flex;
  gap: 12px;
  font-size: 1.3rem;
}

.footer-hearts span {
  display: inline-block;
  animation: heartBeat 1.4s ease-in-out infinite;
}

.footer-hearts span:nth-child(2) { animation-delay: 0.2s; }
.footer-hearts span:nth-child(3) { animation-delay: 0.4s; }

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.3); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.2); }
  70%       { transform: scale(1); }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero { padding: 100px 20px 60px; }

  .blob-1 { width: 260px; height: 260px; }
  .blob-2 { width: 220px; height: 220px; }
  .blob-3 { width: 180px; height: 180px; }

  .glass-card { border-radius: 20px; }

  .music-btn { top: 14px; right: 14px; padding: 8px 14px; font-size: 0.72rem; }

  .balloon-row { gap: 10px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2rem; }
  .cta-btn    { padding: 14px 32px; font-size: 0.9rem; }
}

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}