/* ═══════════════════════════════════════════════════
   Valentine Mode Styles
   ═══════════════════════════════════════════════════ */

/* --- Floating Hearts Canvas --- */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* --- Rose Petals --- */
.petal {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: petalFall linear forwards;
}

/* --- Music Toggle (Valentine only) --- */
#music-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(18, 7, 17, 0.7);
  backdrop-filter: blur(10px);
  color: var(--gold-light);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInDown 1s 3s forwards;
}

#music-toggle:hover {
  background: rgba(198, 153, 62, 0.15);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(198, 153, 62, 0.3);
}

body.mode-greeting #music-toggle {
  display: none !important;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }
.delay-5 { transition-delay: 0.75s; }

/* ═══════════════ SECTION 1: HERO ═══════════════ */

#hero {
  background: radial-gradient(ellipse at 50% 30%, #2A0E1F 0%, #170A12 40%, var(--warm-black) 100%);
  min-height: 100vh;
}

.hero-stars { position: absolute; inset: 0; overflow: hidden; }

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold-pale);
  border-radius: 50%;
  animation: twinkle var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}

.crescent-moon {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 10px -6px 0 0 var(--gold-light);
  opacity: 0.25;
  animation: moonGlow 4s ease-in-out infinite;
}

.hero-greeting {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(18px, 3vw, 24px);
  color: var(--blush);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: softFadeIn 2s 2.5s forwards;
}

.hero-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(56px, 11vw, 120px);
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 10px;
  opacity: 0;
  animation: nameReveal 2s 3s forwards;
  text-shadow: 0 0 40px rgba(198, 153, 62, 0.4), 0 0 80px rgba(198, 153, 62, 0.15);
  position: relative;
}

.hero-name::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: lineExpand 1.5s 4.5s forwards;
}

.hero-subtitle {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(18px, 3vw, 28px);
  color: var(--blush);
  opacity: 0;
  animation: softFadeIn 2s 5s forwards;
  font-weight: 400;
  letter-spacing: 1px;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: softFadeIn 1.5s 6s forwards;
}

.scroll-hint span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.5;
}

/* ═══════════════ SECTION 2: WISHES ═══════════════ */

#wishes {
  background: linear-gradient(180deg, var(--warm-black) 0%, #1A0B14 50%, var(--warm-black) 100%);
}

.wishes-icon {
  font-size: 40px;
  margin-bottom: 24px;
  animation: gentleFloat 3s ease-in-out infinite;
}

.wishes-heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(36px, 7vw, 64px);
  color: var(--gold-light);
  margin-bottom: 32px;
  text-shadow: 0 0 30px rgba(198, 153, 62, 0.25);
}

.wishes-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.9;
  color: var(--light-blush);
  font-weight: 300;
  max-width: 650px;
  margin: 0 auto;
}

.wishes-text em {
  color: var(--gold-light);
  font-style: italic;
}

.wishes-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 48px auto 0;
  width: 100%;
  max-width: 700px;
}

.wish-card {
  background: linear-gradient(135deg, rgba(198, 153, 62, 0.08), rgba(212, 77, 110, 0.06));
  border: 1px solid rgba(198, 153, 62, 0.15);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.wish-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(198, 153, 62, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.wish-card:hover {
  transform: translateY(-6px);
  border-color: rgba(198, 153, 62, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(198, 153, 62, 0.1);
}

.wish-card:hover::before { opacity: 1; }

.wish-card .icon { font-size: 32px; margin-bottom: 12px; }

.wish-card .label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--blush);
  font-weight: 500;
}

/* ═══════════════ SECTION 3: PERFECTION ═══════════════ */

#perfection {
  background: radial-gradient(ellipse at 30% 50%, #1F0D19 0%, var(--warm-black) 70%);
}

.perfection-heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(36px, 7vw, 64px);
  color: var(--gold-light);
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(198, 153, 62, 0.25);
}

.perfection-sub {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--blush);
  margin-bottom: 48px;
  opacity: 0.85;
}

.adjective-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto 48px;
}

.adj-tag {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 19px);
  padding: 8px 22px;
  border-radius: 50px;
  border: 1px solid rgba(198, 153, 62, 0.2);
  background: rgba(198, 153, 62, 0.05);
  color: var(--gold-pale);
  font-weight: 400;
  letter-spacing: 1px;
  transition: all 0.35s ease;
  cursor: default;
  opacity: 0;
  animation: tagFadeIn 0.5s forwards;
  animation-delay: var(--d);
}

.adj-tag:hover {
  background: rgba(198, 153, 62, 0.15);
  border-color: var(--gold);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(198, 153, 62, 0.2);
  color: var(--gold-light);
}

.perfection-quote {
  font-family: 'Amiri', serif;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--light-blush);
  line-height: 1.8;
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding: 0 20px;
}

.perfection-quote::before,
.perfection-quote::after {
  font-family: 'Great Vibes', cursive;
  font-size: 60px;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
}

.perfection-quote::before { content: '\201C'; top: -20px; left: -10px; }
.perfection-quote::after { content: '\201D'; bottom: -40px; right: -10px; }

/* ═══════════════ SECTION 4: LOVE LETTER ═══════════════ */

#letter {
  background: linear-gradient(180deg, var(--warm-black) 0%, #150A10 50%, var(--warm-black) 100%);
}

.envelope-container {
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}

.envelope {
  width: min(380px, 85vw);
  height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.envelope:hover { transform: translateY(-5px); }

.envelope-body {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F5E6D3, #EDD5BD);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.envelope-body::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(198, 153, 62, 0.3);
  border-radius: 4px;
  pointer-events: none;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, #EDD5BD, #E8CCAF);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.8s ease;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.envelope-flap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  border-bottom: 1px solid rgba(198, 153, 62, 0.2);
}

.envelope.opened .envelope-flap { transform: rotateX(180deg); }

.envelope-seal {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: var(--deep-rose);
  border-radius: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 3px 15px rgba(168, 41, 78, 0.5);
  transition: all 0.5s ease;
}

.envelope.opened .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.letter-paper {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  background: var(--ivory);
  border-radius: 4px;
  padding: 24px;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  max-height: 60px;
  overflow: hidden;
  opacity: 0.7;
}

.envelope.opened .letter-paper {
  max-height: 500px;
  bottom: calc(100% + 20px);
  opacity: 1;
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.letter-text {
  font-family: 'Amiri', serif;
  font-size: 15px;
  color: #3D2B1F;
  line-height: 1.8;
  text-align: left;
}

.letter-text .letter-greeting {
  font-family: 'Great Vibes', cursive;
  font-size: 24px;
  color: var(--burgundy);
  margin-bottom: 12px;
}

.letter-text .letter-sign {
  font-family: 'Great Vibes', cursive;
  font-size: 20px;
  color: var(--burgundy);
  text-align: right;
  margin-top: 16px;
}

.envelope-hint {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--gold);
  opacity: 0.7;
  letter-spacing: 2px;
  animation: gentlePulse 2s ease-in-out infinite;
  margin-top: 20px;
}

.envelope-hint.hidden { display: none; }

/* ═══════════════ SECTION 5: FOREVER ═══════════════ */

#forever {
  background: radial-gradient(ellipse at 50% 50%, #200E1A 0%, var(--warm-black) 70%);
}

.forever-heading {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(40px, 8vw, 80px);
  background: linear-gradient(135deg, var(--gold-light), var(--rose), var(--gold-light));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  margin-bottom: 32px;
}

.forever-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.5vw, 26px);
  color: var(--light-blush);
  line-height: 2;
  max-width: 650px;
  margin: 0 auto 48px;
  font-weight: 300;
}

.typewriter {
  font-family: 'Amiri', serif;
  font-size: clamp(20px, 3.5vw, 34px);
  color: var(--gold-light);
  font-style: italic;
  min-height: 50px;
  position: relative;
}

.typewriter .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold-light);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* ═══════════════ SECTION 6: CLOSING ═══════════════ */

#closing {
  background: radial-gradient(ellipse at 50% 60%, #1E0C18 0%, var(--warm-black) 70%);
  min-height: 100vh;
}

.infinity-symbol {
  font-size: 80px;
  color: var(--gold);
  opacity: 0.3;
  margin-bottom: 32px;
  animation: infinitySpin 6s linear infinite;
}

.closing-main {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(32px, 7vw, 70px);
  color: var(--gold-light);
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(198, 153, 62, 0.3);
}

.closing-sub {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(18px, 3vw, 26px);
  color: var(--blush);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 48px;
}

.closing-hearts {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 48px;
}

.closing-hearts span {
  animation: heartBeat 1.5s ease-in-out infinite;
  animation-delay: var(--d);
}

.closing-footer {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.4;
  margin-top: 60px;
}
