/* ==========================================================================
   ROMANTIC LOVE LETTER - STYLESHEET
   Design Theme: Sophisticated Dark
   Atmospheric #0f0707 dark canvas, Playfair Display typography, warm ivory #fdf6e3 text,
   radial paper texture, rich #8b0000 wax seal, and cinematic ambient glows.
   ========================================================================== */

/* --- CSS VARIABLES & SOPHISTICATED DARK THEME TOKENS --- */
:root {
  --bg-dark-primary: #0f0707;
  --bg-dark-secondary: #160a0a;
  --bg-dark-tertiary: #1f0d0d;
  
  --red-deep-accent: #8b0000;
  --red-seal-base: #5a0000;
  --red-subtle-glow: rgba(139, 0, 0, 0.18);
  --red-border-subtle: rgba(139, 0, 0, 0.35);
  --red-text-muted: rgba(239, 68, 68, 0.65);
  
  --ivory-cream: #fdf6e3;
  --ivory-muted: #dcd5c0;
  --parchment-base: #fdf6e3;
  --parchment-border: #ede4d3;
  --ink-color: #2c1810;
  --ink-subtle: #4a281c;
  
  --text-main: #fdf6e3;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-cinematic: 0 20px 50px -12px rgba(0, 0, 0, 0.8);
  
  --font-serif: 'Playfair Display', 'Cormorant Garamond', 'Noto Serif Bengali', serif;
  --font-handwriting: 'Dancing Script', 'Alex Brush', 'Caveat', 'Anek Bangla', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-bengali: 'Noto Serif Bengali', 'Anek Bangla', serif;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark-primary);
  color: var(--text-main);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-dark-primary);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(139, 0, 0, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(90, 0, 0, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, #160a0a 0%, #0f0707 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* Allow text selection in the letter and story */
.letter-paper, .timeline-content, .moment-card, .caption-text, .intro-content, .final-vows-box {
  user-select: text;
  -webkit-user-select: text;
}

/* --- ATMOSPHERIC BACKGROUND ELEMENTS --- */
.ambient-glow-top {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  max-width: 600px;
  max-height: 600px;
  background: rgba(139, 0, 0, 0.1);
  filter: blur(140px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-bottom {
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: rgba(90, 0, 0, 0.18);
  filter: blur(160px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* --- BACKGROUND PARTICLES CANVAS --- */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* --- FLOATING HEARTS CONTAINER --- */
#floatingHeartsContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.floating-heart {
  position: absolute;
  color: rgba(220, 38, 38, 0.5);
  font-size: 1.1rem;
  animation: floatUpward 12s linear infinite;
  filter: drop-shadow(0 0 10px rgba(139, 0, 0, 0.6));
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes floatUpward {
  0% {
    transform: translateY(105vh) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  85% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(-10vh) scale(1.1) rotate(45deg);
    opacity: 0;
  }
}

/* --- SECTION 1: OPENING ENVELOPE SCREEN --- */
#openingScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 40%, #1c0b0b 0%, #0f0707 85%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
  overflow: hidden;
}

#openingScreen.hidden-scene {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-header {
  text-align: center;
  margin-bottom: 2.5rem;
  z-index: 5;
  animation: fadeInDown 1.5s ease-out;
}

.opening-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--red-text-muted);
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: block;
}

.opening-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6.5vw, 3.8rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ivory-cream);
  text-shadow: 0 0 35px rgba(139, 0, 0, 0.6);
  margin-bottom: 0.6rem;
}

.opening-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
  opacity: 0.95;
}

/* --- 3D REALISTIC ENVELOPE --- */
.envelope-wrapper {
  position: relative;
  width: clamp(280px, 85vw, 380px);
  height: clamp(190px, 58vw, 250px);
  perspective: 1200px;
  margin-bottom: 2.5rem;
  z-index: 5;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f4ebd9;
  border-radius: 6px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(139, 0, 0, 0.25);
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.envelope:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(139, 0, 0, 0.4);
}

/* Back background pocket */
.envelope-back {
  position: absolute;
  inset: 0;
  background: #e8dcce;
  border-radius: 6px;
  border: 1px solid rgba(139, 0, 0, 0.15);
}

/* The Paper Letter Inside */
.envelope-letter-preview {
  position: absolute;
  top: 8px;
  left: 15px;
  right: 15px;
  height: 90%;
  background-color: var(--parchment-base);
  background-image: radial-gradient(var(--ivory-muted) 0.5px, transparent 0.5px);
  background-size: 15px 15px;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--parchment-border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transform: translateY(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  z-index: 2;
  overflow: hidden;
}

.preview-lines {
  width: 80%;
  height: 2px;
  background: #e2d3be;
  margin: 6px 0;
  border-radius: 2px;
}

.preview-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink-color);
  margin-bottom: 0.3rem;
}

/* Left & Right Fold Flaps */
.envelope-left-fold {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: clamp(95px, 29vw, 125px) 0 clamp(95px, 29vw, 125px) clamp(140px, 42.5vw, 190px);
  border-color: transparent transparent transparent #f5ebdc;
  border-radius: 6px 0 0 6px;
  z-index: 3;
  filter: drop-shadow(2px 0 3px rgba(0, 0, 0, 0.08));
}

.envelope-right-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: clamp(95px, 29vw, 125px) clamp(140px, 42.5vw, 190px) clamp(95px, 29vw, 125px) 0;
  border-color: transparent #ebd9c5 transparent transparent;
  border-radius: 0 6px 6px 0;
  z-index: 3;
  filter: drop-shadow(-2px 0 3px rgba(0, 0, 0, 0.08));
}

/* Bottom Fold Flap */
.envelope-bottom-fold {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 clamp(140px, 42.5vw, 190px) clamp(105px, 32vw, 140px) clamp(140px, 42.5vw, 190px);
  border-color: transparent transparent #e4cfba transparent;
  border-radius: 0 0 6px 6px;
  z-index: 4;
  filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, 0.1));
}

/* Top Flap (Flips Open) */
.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: clamp(110px, 34vw, 145px) clamp(140px, 42.5vw, 190px) 0 clamp(140px, 42.5vw, 190px);
  border-color: #f7ede0 transparent transparent transparent;
  border-radius: 6px 6px 0 0;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), z-index 0.4s ease;
  z-index: 5;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

/* Wax Seal on Flap */
.wax-seal {
  position: absolute;
  top: clamp(80px, 25vw, 110px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 30% 30%, #8b0000, #5a0000);
  border-radius: 50%;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), inset -1px -1px 3px rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 6;
}

.wax-seal-inner {
  color: rgba(253, 246, 227, 0.9);
  font-size: 1.3rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(139, 0, 0, 0.7);
}

/* Envelope Open State Animations */
.envelope.opened .envelope-top-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.opened .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  pointer-events: none;
}

.envelope.opened .envelope-letter-preview {
  transform: translateY(-130px) scale(1.06);
  z-index: 10;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Action Button */
.open-letter-btn {
  position: relative;
  z-index: 10;
  background: radial-gradient(circle at 30% 30%, #8b0000, #5a0000);
  color: var(--ivory-cream);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.95rem 2.4rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.3);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  animation: pulseButton 3s infinite ease-in-out;
}

.open-letter-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 30px rgba(139, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, #a30000, #6e0000);
  border-color: rgba(253, 246, 227, 0.3);
}

.open-letter-btn:active {
  transform: translateY(0) scale(0.98);
}

@keyframes pulseButton {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 0, 0, 0.5);
  }
}

/* --- MAIN WEBSITE CONTAINER --- */
#mainContent {
  position: relative;
  z-index: 10;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

#mainContent.active-site {
  opacity: 1;
}

/* --- FLOATING MUSIC CONTROLLER (Sophisticated Glass) --- */
.floating-music-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 6px 16px 6px 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.floating-music-widget:hover {
  border-color: rgba(139, 0, 0, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 0, 0, 0.35);
}

.music-toggle-btn, .music-mute-btn {
  background: none;
  border: none;
  color: var(--ivory-cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.music-toggle-btn {
  background: var(--red-deep-accent);
  color: #fff;
}

.music-toggle-btn:hover {
  background: #a30000;
  transform: scale(1.08);
}

.music-mute-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.music-upload-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}

.music-upload-btn:hover {
  background: rgba(212, 175, 55, 0.3);
  transform: scale(1.08);
  border-color: rgba(212, 175, 55, 0.7);
}

.audio-toast {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 100;
  background: rgba(26, 12, 12, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--ivory-cream);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 15px rgba(212, 175, 55, 0.2);
  display: none;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInToast {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.music-info-pill {
  display: flex;
  flex-direction: column;
}

.music-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.music-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ivory-cream);
  white-space: nowrap;
}

.music-wave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: 4px;
}

.music-bar {
  width: 2px;
  height: 100%;
  background-color: var(--red-text-muted);
  border-radius: 1px;
}

.playing .music-bar:nth-child(1) { animation: wave 0.8s ease-in-out infinite alternate; }
.playing .music-bar:nth-child(2) { animation: wave 1.1s ease-in-out 0.2s infinite alternate; }
.playing .music-bar:nth-child(3) { animation: wave 0.9s ease-in-out 0.4s infinite alternate; }

@keyframes wave {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* --- COMMON SECTION STYLING --- */
section {
  position: relative;
  width: 100%;
  padding: 6.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red-text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
  display: block;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory-cream);
  text-align: center;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.section-subheading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 3rem auto;
}

.subtle-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-border-subtle), transparent);
  margin: 1.5rem auto 3rem auto;
}

/* --- SECTION 2: PERSONAL INTRODUCTION --- */
.intro-section {
  min-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem;
}

.intro-content {
  max-width: 720px;
}

.intro-greeting {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory-cream);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgba(139, 0, 0, 0.5);
}

.intro-prelude {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 3vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-style: italic;
}

.intro-quote-box {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-cinematic);
}

.intro-quote-box::before {
  content: '“';
  position: absolute;
  top: -20px;
  left: 24px;
  font-family: var(--font-serif);
  font-size: 5rem;
  color: rgba(139, 0, 0, 0.3);
  line-height: 1;
}

.intro-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 400;
  line-height: 1.8;
  color: var(--ivory-cream);
  white-space: pre-line;
}

/* --- SECTION 3: LOVE LETTER SECTION (Ultra-Premium Royal Stationery) --- */
.letter-section {
  padding: 6.5rem 1.5rem 9rem 1.5rem;
  position: relative;
}

.letter-header-badge {
  text-align: center;
  margin-bottom: 3rem;
}

.letter-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  margin-bottom: 0.9rem;
}

.letter-main-heading {
  font-family: 'Noto Serif Bengali', 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--ivory-cream);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.gold-ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 280px;
  margin: 0 auto;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.ornament-symbol {
  font-size: 0.95rem;
  color: var(--gold-accent);
  letter-spacing: 0.2em;
  opacity: 0.85;
}

.letter-outer-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Ambient backlight glow behind the luxury paper */
.letter-outer-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, rgba(139, 0, 0, 0.09) 60%, transparent 100%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.letter-paper {
  position: relative;
  width: 100%;
  max-width: 820px;
  z-index: 1;
  background-color: #fdfaf3;
  background-image: 
    radial-gradient(ellipse at top left, rgba(212, 175, 55, 0.06), transparent 70%),
    radial-gradient(ellipse at bottom right, rgba(139, 69, 19, 0.05), transparent 70%),
    linear-gradient(to right, rgba(44, 24, 16, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 24, 16, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  color: var(--ink-color);
  border-radius: 8px;
  padding: clamp(2.5rem, 7vw, 5rem);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.65),
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 175, 55, 0.3),
    0 0 50px rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.letter-paper:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.75),
    0 12px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 175, 55, 0.45),
    0 0 60px rgba(212, 175, 55, 0.15);
}

/* Double gold border inlay */
.letter-paper::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  pointer-events: none;
  border-radius: 4px;
}

.letter-paper::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(139, 69, 19, 0.18);
  pointer-events: none;
  border-radius: 2px;
}

/* Vintage Corner Filigrees */
.corner-ornament {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(212, 175, 55, 0.65);
  pointer-events: none;
}

.corner-ornament.top-left {
  top: 14px;
  left: 14px;
  border-top: 2px solid rgba(212, 175, 55, 0.7);
  border-left: 2px solid rgba(212, 175, 55, 0.7);
}

.corner-ornament.top-right {
  top: 14px;
  right: 14px;
  border-top: 2px solid rgba(212, 175, 55, 0.7);
  border-right: 2px solid rgba(212, 175, 55, 0.7);
}

.corner-ornament.bottom-left {
  bottom: 14px;
  left: 14px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.7);
  border-left: 2px solid rgba(212, 175, 55, 0.7);
}

.corner-ornament.bottom-right {
  bottom: 14px;
  right: 14px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.7);
  border-right: 2px solid rgba(212, 175, 55, 0.7);
}

/* Royal Letterhead Crest */
.letterhead-crest {
  text-align: center;
  margin-bottom: 2.2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  position: relative;
}

.crest-monogram {
  font-family: 'Playfair Display', var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--gold-accent);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.crest-tagline {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(44, 24, 16, 0.5);
}

/* Elegant Date Stamp */
.letter-date-stamp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(44, 24, 16, 0.55);
  text-align: right;
  margin-bottom: 1.2rem;
}

.letter-salutation {
  font-family: 'Noto Serif Bengali', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4.8vw, 2.5rem);
  font-weight: 700;
  color: #5c1414;
  margin-bottom: 1.8rem;
  padding-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.letter-body {
  font-family: 'Noto Serif Bengali', 'Anek Bangla', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.12rem, 3.5vw, 1.3rem);
  line-height: 2.25;
  color: #24140e;
  white-space: pre-line;
  min-height: 240px;
  word-break: break-word;
  letter-spacing: 0.01em;
}

.letter-body strong, .letter-bold {
  font-family: 'Noto Serif Bengali', 'Anek Bangla', 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: #800e0e;
  background: linear-gradient(180deg, transparent 65%, rgba(212, 175, 55, 0.15) 65%);
  padding: 0 4px;
  border-radius: 2px;
}

.letter-signature {
  font-family: 'Anek Bangla', 'Dancing Script', 'Playfair Display', cursive, serif;
  font-size: clamp(1.7rem, 4.4vw, 2.3rem);
  font-weight: 600;
  color: #720e0e;
  text-align: right;
  margin-top: 3.5rem;
  line-height: 1.65;
  padding-right: 1rem;
}

/* Realistic 3D Royal Wax Seal */
.letter-wax-seal {
  position: absolute;
  bottom: 28px;
  right: 32px;
  width: 68px;
  height: 68px;
  background: radial-gradient(circle at 35% 35%, #a81c1c, #630505 80%);
  border-radius: 50%;
  box-shadow: 
    3px 4px 12px rgba(0, 0, 0, 0.45),
    inset 2px 2px 4px rgba(255, 255, 255, 0.25),
    inset -2px -2px 5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(10deg);
  pointer-events: none;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.seal-inner-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-heart {
  font-size: 1.35rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Typing cursor animation */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.25em;
  background-color: #8b0000;
  margin-left: 3px;
  vertical-align: middle;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- SECTION 4: OUR STORY TIMELINE --- */
.story-section {
  padding: 6rem 1.5rem;
}

.timeline-track {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(139, 0, 0, 0.4) 15%, rgba(139, 0, 0, 0.6) 85%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
  width: 50%;
  padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 2.5rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
  padding-left: 2.5rem;
}

.timeline-node {
  position: absolute;
  top: 20px;
  width: 14px;
  height: 14px;
  background: var(--red-deep-accent);
  border: 2px solid var(--ivory-cream);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
  z-index: 2;
  transition: transform 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-node {
  right: -7px;
}

.timeline-item:nth-child(even) .timeline-node {
  left: -7px;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.8rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-cinematic);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 0, 0, 0.4);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(139, 0, 0, 0.2);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red-text-muted);
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ivory-cream);
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Mobile Timeline Adjustment */
@media (max-width: 768px) {
  .timeline-track::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px !important;
    padding-right: 0 !important;
    margin-bottom: 2.5rem;
  }
  .timeline-item:nth-child(odd) .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    left: 13px;
    right: auto;
  }
}

/* --- SECTION 5: MEMORY GALLERY --- */
.gallery-section {
  padding: 6rem 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  align-items: stretch;
}

.gallery-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-cinematic);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-card:nth-child(even) {
  transform: rotate(-1deg);
}

.gallery-card:nth-child(odd) {
  transform: rotate(1deg);
}

.gallery-card:hover {
  transform: translateY(-8px) scale(1.02) rotate(0deg);
  border-color: rgba(139, 0, 0, 0.45);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(139, 0, 0, 0.25);
}

.gallery-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  max-height: 320px;
  overflow: hidden;
  background-color: #160a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-overlay-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 7, 7, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-cream);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gallery-caption {
  padding: 1.25rem;
  text-align: center;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 75px;
}

.caption-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ivory-cream);
  line-height: 1.5;
  opacity: 0.9;
}

/* --- LIGHTBOX MODAL --- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 3, 3, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.lightbox-modal.active-lightbox {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img-wrapper {
  position: relative;
  max-height: 75vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(139, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ivory-cream);
  text-align: center;
  max-width: 650px;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: var(--ivory-cream);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
}

.lightbox-close-btn:hover {
  color: var(--red-text-muted);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(22, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ivory-cream);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-nav-btn:hover {
  background: var(--red-deep-accent);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close-btn { top: -40px; right: 10px; }
}

/* --- SECTION 6: OUR SPECIAL MOMENTS (CARDS) --- */
.moments-section {
  padding: 6rem 1.5rem;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.moment-card {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-cinematic);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.moment-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 0, 0, 0.4);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(139, 0, 0, 0.2);
}

.moment-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid rgba(139, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory-cream);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.moment-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ivory-cream);
  margin-bottom: 0.9rem;
}

.moment-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* --- SECTION 7: PHOTO + MESSAGE CINEMATIC PARALLAX --- */
.cinematic-banner-section {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem;
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cinematic-banner-section {
    background-attachment: scroll;
    background-position: center 25%;
    min-height: 70vh;
  }
}

.cinematic-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(15, 7, 7, 0.4) 0%, rgba(15, 7, 7, 0.85) 100%);
}

.cinematic-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.cinematic-line-1 {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.cinematic-line-2 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory-cream);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  text-shadow: 0 0 35px rgba(139, 0, 0, 0.7);
}

.cinematic-line-3 {
  font-family: var(--font-handwriting);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--red-text-muted);
}

/* --- SECTION 9: FINAL MESSAGE --- */
.final-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 1.5rem 6rem 1.5rem;
  background: radial-gradient(circle at 50% 40%, #1a0808 0%, #0a0404 90%);
}

.final-pretitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red-text-muted);
  font-weight: 700;
  margin-bottom: 2rem;
}

.final-vows-box {
  max-width: 680px;
  margin-bottom: 3.5rem;
  padding: 2.5rem 2rem;
  background: rgba(90, 0, 0, 0.15);
  border-radius: 16px;
  border: 1px solid rgba(139, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.final-vows {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  line-height: 2.2;
  color: var(--ivory-cream);
  white-space: pre-line;
}

.final-occasion {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory-cream);
  margin-bottom: 1rem;
  text-shadow: 0 0 25px rgba(139, 0, 0, 0.5);
}

.final-signoff {
  font-family: var(--font-handwriting);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--ivory-cream);
  opacity: 0.9;
  margin-bottom: 4rem;
}

/* --- SECTION 10: FINAL HEART ANIMATION & CONCLUSION --- */
.final-heart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.glowing-pulsing-heart {
  font-size: 3.5rem;
  color: #c91838;
  animation: heartPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(201, 24, 56, 0.8));
  margin-bottom: 1.5rem;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.18); }
  70% { transform: scale(1); }
  100% { transform: scale(1); }
}

.forever-text {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: none;
  color: var(--ivory-cream);
  opacity: 0.95;
  margin-bottom: 1rem;
}

.home-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3.2vw, 1.4rem);
  color: var(--text-muted);
  opacity: 0.9;
  margin-bottom: 3rem;
}

.replay-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.75rem 1.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.replay-btn:hover {
  color: var(--ivory-cream);
  border-color: rgba(139, 0, 0, 0.5);
  background: rgba(139, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* --- FOOTER COPYRIGHT / TENDER NOTE --- */
.romantic-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* --- SCROLL REVEAL ANIMATIONS (IntersectionObserver) --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle Entry Keyframes */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
