/* ============================================
   FONT IMPORT
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Great+Vibes&display=swap');

/* ============================================
   CSS VARIABLES / DESIGN TOKENS
============================================ */
:root {
  /* Colors */
  --bg-dark: #0a0a0f;
  --bg-section: #0f0f18;
  --rose-primary: #e8627c;
  --rose-light: #f4a0b0;
  --rose-dark: #c44d66;
  --gold: #d4a76a;
  --gold-light: #f0d4a0;
  --cream: #fdf5e6;
  --text-primary: #f0e6e8;
  --text-secondary: #c4b0b5;
  --text-muted: #8a7a7f;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-script: 'Great Vibes', cursive;

  /* Spacing */
  --section-padding: 100px 20px;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   CUSTOM SCROLLBAR
============================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--rose-dark);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rose-primary);
}

/* ============================================
   FLOATING HEARTS CANVAS
============================================ */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   PRELOADER
============================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-heart {
  font-size: 60px;
  animation: heartbeat 1.2s ease-in-out infinite;
}

.preloader-text {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--rose-light);
  margin-top: 20px;
  opacity: 0.8;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

/* ============================================
   HERO SECTION
============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/rose-petals.png') center/cover no-repeat;
  filter: brightness(0.25) blur(2px);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0.3) 0%,
    rgba(10, 10, 15, 0.6) 50%,
    rgba(10, 10, 15, 0.95) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-title .name {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--rose-primary);
  margin: 10px 0;
  text-shadow: 0 0 40px rgba(232, 98, 124, 0.3);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease 1.1s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.hero-scroll span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--rose-primary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ============================================
   SECTION COMMON STYLES
============================================ */
section {
  position: relative;
  z-index: 1;
}

.section-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--section-padding);
}

.section-label {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.3;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--rose-primary), var(--gold));
  margin: 0 auto 40px;
  border: none;
}

.center-text {
  text-align: center;
}

/* ============================================
   LETTER / APOLOGY SECTION
============================================ */
.letter-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-section) 50%, var(--bg-dark) 100%);
}

.letter-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 50px 40px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.letter-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: var(--font-display);
  font-size: 120px;
  color: var(--rose-primary);
  opacity: 0.08;
  line-height: 1;
}

.letter-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
}

.letter-greeting {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--rose-light);
  margin-bottom: 25px;
}

.letter-body p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 2;
  text-align: justify;
}

.letter-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.5rem;
  float: left;
  color: var(--rose-primary);
  margin-right: 10px;
  margin-top: 5px;
  line-height: 1;
}

.letter-sign {
  margin-top: 40px;
  text-align: right;
}

.letter-sign .sign-text {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.letter-sign .sign-name {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--rose-primary);
}

/* ============================================
   IMAGE SECTION
============================================ */
.image-showcase {
  padding: 60px 20px;
  text-align: center;
}

.image-showcase img {
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(232, 98, 124, 0.15);
  border: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

.image-showcase img:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 80px rgba(232, 98, 124, 0.25);
}

.image-caption {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 20px;
}

/* ============================================
   PROMISES SECTION
============================================ */
.promises-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-section) 50%, var(--bg-dark) 100%);
}

.promises-grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.promise-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: var(--transition-smooth);
  cursor: default;
}

.promise-card:hover {
  background: var(--glass-hover);
  border-color: rgba(232, 98, 124, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(232, 98, 124, 0.1);
}

.promise-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 98, 124, 0.1);
  border-radius: 12px;
}

.promise-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.promise-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   TIMELINE SECTION
============================================ */
.timeline-section {
  background: var(--bg-dark);
}

.timeline {
  position: relative;
  margin-top: 50px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--rose-primary), var(--gold), transparent);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  width: 50%;
  padding: 0 40px 60px 0;
  position: relative;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  margin-left: 50%;
  padding: 0 0 60px 40px;
}

.timeline-dot {
  position: absolute;
  right: -8px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--rose-primary);
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
  box-shadow: 0 0 20px rgba(232, 98, 124, 0.4);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
  right: auto;
}

.timeline-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 25px;
  max-width: 350px;
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  background: var(--glass-hover);
  transform: translateY(-3px);
}

.timeline-card .phase {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 5px;
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   POEM / QUOTE SECTION
============================================ */
.poem-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-section));
  position: relative;
  overflow: hidden;
}

.poem-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 98, 124, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.poem-content {
  text-align: center;
  max-width: 700px;
  padding: 60px 20px;
  position: relative;
  z-index: 1;
}

.poem-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  line-height: 2;
  color: var(--text-primary);
  margin-bottom: 30px;
}

.poem-author {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--rose-light);
}

/* ============================================
   FUTURE SECTION
============================================ */
.future-section {
  background: var(--bg-dark);
}

.future-image {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 40px;
  display: block;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
}

.future-text {
  text-align: center;
}

.future-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   CLOSING / FOOTER SECTION
============================================ */
.closing-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-dark), #0d0810);
  position: relative;
  overflow: hidden;
}

.closing-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to top, rgba(232, 98, 124, 0.03), transparent);
}

.closing-content {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
}

.closing-heart {
  font-size: 4rem;
  margin-bottom: 30px;
  animation: heartbeat 2s ease-in-out infinite;
  display: inline-block;
}

.closing-title {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--rose-primary);
  margin-bottom: 20px;
  text-shadow: 0 0 60px rgba(232, 98, 124, 0.3);
}

.closing-message {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.8;
  font-style: italic;
}

.closing-names {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.closing-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 15px;
}

/* ============================================
   MUSIC TOGGLE BUTTON
============================================ */
.music-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 1.3rem;
}

.music-toggle:hover {
  background: var(--glass-hover);
  border-color: var(--rose-primary);
  transform: scale(1.1);
}

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

.music-bars span {
  display: block;
  width: 3px;
  background: var(--rose-primary);
  border-radius: 2px;
  transition: height 0.3s ease;
}

.music-bars.playing span:nth-child(1) { animation: bar1 0.6s ease-in-out infinite; }
.music-bars.playing span:nth-child(2) { animation: bar2 0.7s ease-in-out infinite; }
.music-bars.playing span:nth-child(3) { animation: bar3 0.5s ease-in-out infinite; }
.music-bars.playing span:nth-child(4) { animation: bar4 0.8s ease-in-out infinite; }

.music-bars:not(.playing) span { height: 4px !important; }

@keyframes bar1 { 0%, 100% { height: 6px; } 50% { height: 18px; } }
@keyframes bar2 { 0%, 100% { height: 12px; } 50% { height: 6px; } }
@keyframes bar3 { 0%, 100% { height: 8px; } 50% { height: 16px; } }
@keyframes bar4 { 0%, 100% { height: 14px; } 50% { height: 8px; } }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   SPARKLE EFFECT (for letter card)
============================================ */
.sparkle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px;
}

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

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 0.8; transform: scale(1); }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .letter-card {
    padding: 35px 25px;
  }

  .section-content {
    padding: 70px 20px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 40px 50px;
    justify-content: flex-start;
  }

  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 12px;
    right: auto;
  }

  .timeline-card {
    max-width: 100%;
  }

  .promise-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .music-toggle {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-title .name {
    font-size: 2.8rem;
  }

  .letter-card {
    padding: 25px 18px;
  }

  .section-title {
    font-size: 1.5rem;
  }
}
