/* ============================================================
   Happy Birthday, Baby — dreamy romantic palette
   ============================================================ */

:root {
  /* palette */
  --blush: #fdf2f8;
  --blush-deep: #fce7f3;
  --pink: #ec4899;
  --pink-deep: #db2777;
  --pink-soft: #f9a8d4;
  --lavender: #c4b5fd;
  --lavender-deep: #8b5cf6;
  --gold: #ca8a04;
  --plum: #831843;
  --plum-soft: #9d174d;
  --white: #ffffff;

  /* fonts */
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Quicksand', sans-serif;

  --radius: 22px;
  --shadow-soft: 0 20px 50px -20px rgba(131, 24, 67, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--blush);
  color: var(--plum);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.2;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--pink-soft);
  color: var(--plum);
}

:focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ AMBIENT FLOATING HEARTS ============ */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8vh;
  opacity: 0;
  color: var(--pink-soft);
  animation: petal-fall linear infinite;
  will-change: transform, opacity;
}

.petal svg {
  display: block;
}

.petal:nth-child(odd) {
  color: var(--lavender);
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.55;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translate3d(var(--drift, 40px), 115vh, 0) rotate(220deg);
    opacity: 0;
  }
}

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

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 64px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(196, 181, 253, 0.45), transparent 55%),
    radial-gradient(circle at 85% 18%, rgba(249, 168, 212, 0.5), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(236, 72, 153, 0.18), transparent 60%),
    linear-gradient(180deg, var(--blush) 0%, var(--blush-deep) 100%);
  overflow: hidden;
}

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

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pink-deep);
}

.hero-greeting {
  font-size: clamp(2.6rem, 9vw, 4rem);
  color: var(--lavender-deep);
  margin: 4px 0 0;
}

.hero-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--plum);
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0 auto 40px;
  max-width: 440px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-style: italic;
  color: var(--plum-soft);
}

/* ============ COUNTDOWN ============ */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.countdown-unit {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 14px 4px 12px;
  box-shadow: var(--shadow-soft);
}

.countdown-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 6vw, 2.3rem);
  color: var(--pink-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-label {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum-soft);
}

.countdown-caption {
  margin: 16px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--plum-soft);
  text-transform: uppercase;
  font-weight: 600;
}

.countdown.is-today .countdown-caption {
  color: var(--gold);
}

/* ============ SCROLL CUE ============ */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  text-decoration: none;
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.scroll-cue:hover {
  color: var(--lavender-deep);
  transform: translateY(3px);
}

.scroll-cue svg {
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

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

/* ============ SURPRISE (unlocks at the countdown target) ============ */
.surprise-section {
  position: relative;
  z-index: 2;
  padding: 96px 20px;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, var(--blush-deep) 0%, #fdf6e8 100%);
}

.surprise-card {
  max-width: 560px;
  width: 100%;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px -20px rgba(202, 138, 4, 0.35);
  border: 1px solid rgba(202, 138, 4, 0.25);
  padding: clamp(32px, 6vw, 56px) clamp(24px, 6vw, 48px);
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.surprise-section.is-unlocked .surprise-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.surprise-diamond {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: diamond-float 3.4s ease-in-out infinite;
}

@keyframes diamond-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: sparkle-twinkle 2.2s ease-in-out infinite;
}

.sparkle-1 { top: -4px; left: 6px; animation-delay: 0s; }
.sparkle-2 { top: 10px; right: -6px; animation-delay: 0.6s; background: var(--lavender); }
.sparkle-3 { bottom: 0; left: -8px; animation-delay: 1.2s; background: var(--pink); }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.1); }
}

.surprise-title {
  font-size: clamp(2.2rem, 7vw, 2.8rem);
  color: var(--gold);
  margin: 0 0 12px;
}

@media (prefers-reduced-motion: reduce) {
  .surprise-diamond,
  .sparkle {
    animation: none;
  }
  .surprise-card {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ============ CONFETTI ============ */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

/* ============ LOVE LETTER ============ */
.letter-section {
  position: relative;
  z-index: 2;
  padding: 96px 20px;
  display: flex;
  justify-content: center;
  background: var(--blush-deep);
}

.letter-card {
  max-width: 640px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(32px, 6vw, 64px) clamp(24px, 6vw, 56px);
  border: 1px solid rgba(236, 72, 153, 0.1);
}

.letter-open {
  font-size: clamp(2.2rem, 7vw, 2.8rem);
  color: var(--pink-deep);
  margin: 0 0 8px;
}

.letter-body {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.6vw, 1.3rem);
  line-height: 1.75;
  color: var(--plum);
  margin: 0 0 20px;
}

.letter-body em {
  color: var(--pink-deep);
  font-style: italic;
}

.letter-close {
  margin-bottom: 6px;
}

.letter-sign {
  font-size: clamp(2rem, 6vw, 2.5rem);
  color: var(--lavender-deep);
  text-align: right;
  margin: 8px 0 0;
}

/* ============ GALLERY ============ */
.gallery-section {
  position: relative;
  z-index: 2;
  padding: 96px 20px 100px;
  background: var(--blush);
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 44px;
}

.section-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 6px 0 0;
  color: var(--plum);
}

.gallery-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--blush-deep);
  box-shadow: 0 10px 24px -14px rgba(131, 24, 67, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 36px -16px rgba(131, 24, 67, 0.45);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ============ FOOTER ============ */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 20px 56px;
  background: var(--blush-deep);
  color: var(--pink-deep);
}

.footer-heart {
  margin-bottom: 10px;
}

.footer p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plum-soft);
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(30, 8, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: lightbox-in 0.2s var(--ease) forwards;
}

@keyframes lightbox-in {
  to { opacity: 1; }
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: min(92vw, 900px);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

@media (min-width: 640px) {
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}
