/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --burgundy:  #2d0a1a;
  --deep-plum: #4a1030;
  --plum:      #7b3f6e;
  --rose:      #a93060;
  --blush:     #e8a0b0;
  --blush-lt:  #f5cdd8;
  --cream:     #fdf6ee;
  --ivory:     #faf5ef;
  --gold:      #c9956a;
  --gold-lt:   #e8c89a;
  --text-dark: #1a0a12;
  --text-mid:  #5a1e3a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: var(--burgundy);
  color: var(--cream);
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════
   GLOBAL CANVAS OVERLAYS
═══════════════════════════════════════════════ */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

#click-hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
}

/* ═══════════════════════════════════════════════
   CURSOR SPARKLE TRAIL
═══════════════════════════════════════════════ */
#cursor-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8999;
}

.cursor-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold-lt), 0 0 12px rgba(232,200,154,0.3);
}

/* ═══════════════════════════════════════════════
   MUSIC TOGGLE
═══════════════════════════════════════════════ */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(45,10,26,0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-lt);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 24px rgba(201,149,106,0.35);
}

.music-toggle__icon--off {
  animation: musicPulse 2s ease-in-out infinite;
}

.music-toggle.is-playing .music-toggle__icon--off { display: none; }
.music-toggle:not(.is-playing) .music-toggle__bars { display: none; }

.music-toggle__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.music-toggle__bars i {
  display: block;
  width: 3px;
  background: var(--gold-lt);
  border-radius: 2px;
  animation: musicBar 0.6s ease-in-out infinite alternate;
}

.music-toggle__bars i:nth-child(1) { height: 6px;  animation-delay: 0s; }
.music-toggle__bars i:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.music-toggle__bars i:nth-child(3) { height: 8px;  animation-delay: 0.3s; }
.music-toggle__bars i:nth-child(4) { height: 14px; animation-delay: 0.1s; }

@keyframes musicBar {
  0%   { height: 4px; }
  100% { height: 16px; }
}

@keyframes musicPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

/* ═══════════════════════════════════════════════
   PAPER CUT LETTERS
═══════════════════════════════════════════════ */
.cut-letter {
  display: inline-block;
  font-family: var(--font, 'Bebas Neue');
  background: var(--bg, #8e2057);
  color: inherit;
  padding: 4px 10px;
  border-radius: 2px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
  transform: rotate(var(--rot, 0deg));
  line-height: 1;
  position: relative;
  cursor: default;
  /* No CSS transition — GSAP handles all transforms to avoid conflicts */
}

/* Add micro paper texture on letters */
.cut-letter::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 80px;
  border-radius: 2px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   SECTION 1 · HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--burgundy);
  overflow: hidden;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  padding: 40px 20px;
}

/* Big "8" */
.cut-letter--eight {
  font-size: clamp(7rem, 20vw, 16rem);
  padding: 10px 30px;
  letter-spacing: -0.02em;
}

/* MARCH row */
.hero__march {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero__march .cut-letter {
  font-size: clamp(2.5rem, 8vw, 6rem);
  padding: 6px 14px;
}

/* Gold line */
.hero__line {
  width: 70vw;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform-origin: left center;
  margin: 8px 0;
}

/* Scroll cue */
.hero__scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  margin-top: 20px;
  color: var(--gold-lt);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ═══════════════════════════════════════════════
   SHOOTING STARS
═══════════════════════════════════════════════ */
.shooting-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
  transform-origin: left center;
  transform: rotate(0deg);
}

/* ═══════════════════════════════════════════════
   PETALS
═══════════════════════════════════════════════ */
.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.petal {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 60% 40% 60% 40% / 50% 50% 50% 50%;
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   SECTION 2 · ZHANEL NAME REVEAL
═══════════════════════════════════════════════ */
.name-reveal {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--burgundy) 0%, #5c1a38 50%, #8e2057 100%);
  overflow: hidden;
}

.name-reveal__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 100px 20px;
}

.name-reveal__letters {
  display: flex;
  gap: clamp(6px, 2vw, 18px);
  flex-wrap: wrap;
  justify-content: center;
}

.cut-letter--name {
  font-size: clamp(3.5rem, 12vw, 9rem);
  padding: 8px 20px;
}

.name-reveal__subtitle {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--gold-lt);
  opacity: 0;
  letter-spacing: 0.02em;
  /* No margin-top — gap is handled by parent flex gap */
}

/* ═══════════════════════════════════════════════
   SECTION 3 · HAPPY WOMEN'S DAY
═══════════════════════════════════════════════ */
.womens-day {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #8e2057 0%, #c9617a 40%, #e8a0b0 100%);
  overflow: hidden;
}

.womens-day__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 60px 20px;
  width: 100%;
  max-width: 900px;
}

.womens-day__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.womens-day__word {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.cut-letter--wday {
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  padding: 5px 12px;
  opacity: 0;
}

/* SVG flourishes */
.flourish {
  width: clamp(200px, 60vw, 400px);
  display: block;
}

.flourish-path {
  stroke-dasharray: 450;
  stroke-dashoffset: 450;
}

.flourish-path--2 {
  stroke-dasharray: 380;
  stroke-dashoffset: 380;
}

.flourish-path--3 {
  stroke-dasharray: 450;
  stroke-dashoffset: 450;
}

/* ═══════════════════════════════════════════════
   SECTION 4 · LOVE NOTE + ENVELOPE
═══════════════════════════════════════════════ */
.love-note-wrap {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #e8a0b0 0%, #f5cdd8 50%, var(--cream) 100%);
}

.love-note-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
}

/* Envelope styles — sits absolutely centered, above the love note */
.envelope {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 80vw);
  height: 220px;
  background: linear-gradient(135deg, #e8d5b8, #d4b896);
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: default;
}

.envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, #c9a875, #d4b896);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  z-index: 6;
}

.envelope__heart {
  font-size: 3rem;
  color: var(--rose);
  opacity: 0.7;
  animation: heartPulse 1.5s ease-in-out infinite;
  z-index: 4;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

/* Love note card */
.love-note {
  position: relative;
  background: #fdf8f0;
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      #d4b896 28px
    );
  border: 1px solid #c9a875;
  border-radius: 2px;
  box-shadow:
    4px 4px 0 #c9a875,
    8px 8px 20px rgba(0,0,0,0.2),
    0 0 0 6px rgba(201,149,106,0.1);
  padding: 60px 50px 50px;
  width: min(600px, 90vw);
  min-height: 400px;
  font-family: 'Cormorant Garamond', serif;
  color: #3a2010;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.love-note__rose {
  position: absolute;
  font-size: 2rem;
  transform: scale(0);
}

.love-note__rose--tl { top: -16px;  left: -16px;  transform: rotate(-15deg) scale(0); }
.love-note__rose--tr { top: -16px;  right: -16px; transform: rotate(15deg)  scale(0); }
.love-note__rose--bl { bottom: -16px; left: -16px;  transform: rotate(15deg)  scale(0); }
.love-note__rose--br { bottom: -16px; right: -16px; transform: rotate(-15deg) scale(0); }

.love-note__date {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6040;
  margin-bottom: 20px;
}

.love-note__body {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.75;
  min-height: 200px;
  color: #3a2010;
  white-space: pre-wrap;
  font-style: italic;
}

.love-note__sign {
  text-align: right;
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--rose);
  margin-top: 30px;
}

/* ═══════════════════════════════════════════════
   SECTION 5 · YOU ARE…
═══════════════════════════════════════════════ */
.you-are {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--cream) 0%, var(--ivory) 40%, #f0dde6 100%);
  overflow: hidden;
}

.you-are__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
  padding: 80px 20px;
  width: 100%;
  max-width: 900px;
}

.you-are__heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--text-mid);
  margin-bottom: 10px;
}

.you-are__word-row {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
}

.you-are__word-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}

.cut-letter--word {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  padding: 4px 10px;
}

/* Sparkles */
.sparkle {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
}

.sparkle::before, .sparkle::after {
  content: '✦';
  position: absolute;
  font-size: 1.2rem;
  color: var(--gold);
  animation: sparkleAnim 2s ease-in-out infinite;
}

.sparkle::after {
  font-size: 0.7rem;
  top: -8px;
  right: -6px;
  animation-delay: 0.5s;
}

@keyframes sparkleAnim {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50%       { opacity: 1;   transform: scale(1.2) rotate(20deg); }
}

/* ═══════════════════════════════════════════════
   SECTION 6 · MEMORIES (photo gallery)
═══════════════════════════════════════════════ */
.memories {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f0dde6 0%, #e8a0b0 50%, #c9617a 100%);
  overflow: hidden;
  padding: 80px 20px;
}

.memories__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 900px;
}

.memories__heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.memory-card {
  perspective: 800px;
  height: 280px;
  cursor: pointer;
  opacity: 0;
}

.memory-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(.25,.46,.45,.94);
  transform-style: preserve-3d;
}

.memory-card:hover .memory-card__inner,
.memory-card.is-flipped .memory-card__inner {
  transform: rotateY(180deg);
}

.memory-card__front,
.memory-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.memory-card__front {
  background: linear-gradient(135deg, #fdf8f0, #f5e6d8);
  border: 2px solid rgba(201,149,106,0.4);
}

.memory-card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.memory-card__placeholder {
  font-size: 4rem;
  color: var(--blush);
  animation: heartPulse 2s ease-in-out infinite;
}

.memory-card__back {
  background: linear-gradient(135deg, var(--deep-plum), var(--plum));
  transform: rotateY(180deg);
  padding: 30px;
}

.memory-card__caption {
  font-family: 'Great Vibes', cursive;
  font-size: 1.4rem;
  color: var(--cream);
  text-align: center;
  line-height: 1.5;
}

.memories__hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════
   SECTION 7 · FINALE
═══════════════════════════════════════════════ */
.finale {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #c9617a 0%, var(--deep-plum) 40%, var(--burgundy) 100%);
  overflow: hidden;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  font-size: 1.2rem;
  opacity: 0;
}

.finale__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 20px;
  text-align: center;
}

.finale__heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.8rem, 8vw, 7rem);
  color: var(--cream);
  line-height: 1.2;
  opacity: 0;

  /* Gold shimmer */
  background: linear-gradient(
    90deg,
    var(--cream) 0%,
    var(--gold-lt) 30%,
    #fff 50%,
    var(--gold-lt) 70%,
    var(--cream) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite paused;
}

.finale__heading.shimmer-active {
  animation-play-state: running;
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.finale__subheading {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--blush-lt);
  letter-spacing: 0.1em;
  opacity: 0;
}

.finale__sign {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--gold-lt);
  margin-top: 20px;
  opacity: 0;
}

/* ═══════════════════════════════════════════════
   SECTION 8 · VIDEO
═══════════════════════════════════════════════ */
.video-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--burgundy) 0%, #1a060f 100%);
  overflow: hidden;
}

.video-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 80px 20px;
  width: 100%;
  max-width: 900px;
}

.video-section__label {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold-lt);
  opacity: 0;
  letter-spacing: 0.04em;
}

.video-section__frame {
  position: relative;
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(201,149,106,0.3),
    0 20px 60px rgba(0,0,0,0.6),
    0 0 80px rgba(169,48,96,0.2);
  opacity: 0;
  transform: scale(0.92);
  background: #0d0408;
}

.video-section__frame video,
.video-section__frame iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  border: none;
  background: #0d0408;
}

/* Placeholder shown when video.mp4 is missing */
.video-section__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, #1a060f, #2d0a1a);
  color: var(--blush);
  font-family: 'Cormorant Garamond', serif;
  pointer-events: none;
  opacity: 0; /* hidden by default, shown via JS if video fails */
}

.video-section__placeholder span {
  font-size: 4rem;
  animation: heartPulse 2s ease-in-out infinite;
}

.video-section__placeholder p {
  font-size: 1rem;
  opacity: 0.6;
  letter-spacing: 0.08em;
}

.video-section__placeholder strong {
  color: var(--gold-lt);
}

/* Show placeholder when video fails to load */
.video-section__frame.no-video .video-section__placeholder {
  opacity: 1;
  pointer-events: auto;
}

.video-section__frame.no-video video {
  opacity: 0;
  height: 300px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .love-note {
    padding: 40px 24px 36px;
  }

  .you-are__word-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .name-reveal__letters {
    gap: 4px;
  }

  .memories__grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }

  .memory-card {
    height: 220px;
  }

  .envelope {
    width: min(260px, 80vw);
    height: 170px;
  }

  .music-toggle {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* Prevent horizontal scroll + ensure sections stack above canvases */
section {
  max-width: 100vw;
  position: relative;
  z-index: 1;
}
