/* ==========================================================================
   1. GLOBAL STYLES & BASE
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: #ffb7c5 #000000;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #000, #111);
  font-family: 'Inter', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar (WebKit) */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, transparent, #ffb7c5, transparent);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(255, 183, 197, 0.4);
}
::-webkit-scrollbar-thumb:hover {
  background: #ffb7c5;
  box-shadow: 0 0 12px rgba(255, 183, 197, 0.8);
}

/* ==========================================================================
   2. HERO SECTION (ATMOSPHERIC)
   ========================================================================== */
.intro-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: #000;
  overflow: hidden;
  /* Ensures no bottom spacing interferes with the next section */
  margin-bottom: 0; 
}

.intro-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 25%, rgba(255, 183, 197, 0.05) 0%, transparent 35%),
    /* Bottom-right glow moved slightly up (65%) so it doesn't touch the bottom edge */
    radial-gradient(circle at 85% 65%, rgba(255, 183, 197, 0.05) 0%, transparent 35%);
  z-index: 1;
  pointer-events: none;
}

/* Sakura Branches */
.sakura-branch {
  position: absolute;
  width: clamp(300px, 45vw, 650px);
  height: auto;
  z-index: 2;
  pointer-events: none;
}

.hero-branch-right {
  top: -5%; right: -2%; opacity: 0.7; filter: blur(0.4px);
  animation: floatBranchRight 8s ease-in-out infinite;
}

.hero-branch-left {
  top: 15%; left: -10%; opacity: 0.6; filter: blur(0.8px);
  animation: floatBranchLeft 15s ease-in-out infinite;
}

.hero-branch-bottom {
  top: 20%; right: -10%; opacity: 0.50; filter: blur(1.5px);
  transform: rotate(-20deg);
}

/* Reverses the SVG branch direction */
.hero-branch-bottom.reverse-branch {
  transform: rotate(-10deg) scaleX(-1); /* Flips the branch */
  top: -5%;
  right: -50%;
  left: -10%;
}

.hero-branch-bottom.reverse-branch-2 {
  transform: rotate(45deg) scaleX(-1);
  top: 5%;
  right: -50%;
  left: -10%;
}

.hero-branch-bottom.reverse-branch-3 {
  top: -5%; right: 5%; opacity: 0.50; filter: blur(1.5px);
  transform: rotate(25deg);
}



/* Hero Content & Typography */
.intro-hero__content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}

/* The visual "thread" pulling from Hero to TOC */
.intro-hero__content::after {
  content: "";
  display: block;
  width: 1px;
  height: 150px; 
  background: linear-gradient(to bottom, #ffb7c5, transparent);
  margin: 60px auto 0;
  opacity: 0.2;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 700;
  line-height: 0.9;
  margin: 0 0 30px 0;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 30%, #ffb7c5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 183, 197, 0.3));
}

.highlight-name {
  font-family: 'Playfair Display', serif !important;
  font-size: clamp(1.8rem, 4.5vw, 1rem) !important; 
  color: #fff !important;
  letter-spacing: 0.05em;
  -webkit-text-fill-color: #fff;
}

.highlight-name span {
  color: #ffb7c5;
  text-shadow: 0 0 20px rgba(255, 183, 197, 0.8);
  font-style: italic;
}

/* ==========================================================================
   3. TABLE OF CONTENTS (NAVIGATION)
   ========================================================================== */
.toc-section {
  background: #000;
  width: 100%;
  padding-bottom: 100px;
  position: relative; 
  overflow: hidden;
  /* FIX: Negative margin to overlap the 1px ghost line browsers sometimes render */
  margin-top: -1px; 
}

.toc-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    /* Top glows moved slightly down (35%) so they don't hit the top edge */
    radial-gradient(circle at 85% 35%, rgba(255, 183, 197, 0.05) 0%, transparent 35%),
    radial-gradient(circle at 15% 45%, rgba(255, 183, 197, 0.05) 0%, transparent 35%);
  z-index: 1;
  pointer-events: none;
}

.toc {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
  padding: 40px 20px;
  z-index: 20;
}

.toc h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1.1em;
  text-align: center;
  margin-bottom: 100px;
  color: #ffc6d1;
  opacity: 0.8;
}

.toc ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 2fr));
  gap: 15px;
}

.toc a {
  text-decoration: none;
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.toc a::before {
  content: "";
  width: 5px; height: 5px;
  background: #ffb7c5;
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg) scale(0);
  margin-right: 15px;
  opacity: 0;
  transition: all 0.4s ease;
}

/* TOC Interaction */
.toc li:hover a {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 183, 197, 1);
  letter-spacing: 0.1em;
  transform: scale(1.05);
}

.toc li:hover a::before {
  opacity: 1;
  transform: rotate(0deg) scale(1.5);
  box-shadow: 0 0 10px #ffb7c5;
}

/* TOC Special Link (Playlist) */
.toc li:last-child {
  grid-column: 1 / -1;
  margin-top: 80px;
}

.toc li:last-child a {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: #ffb7c5;
  opacity: 0.5;
  border: 1px solid rgba(255, 187, 201, 0.1);
  padding: 12px 30px;
  border-radius: 50px;
}

.toc li:last-child a:hover {
  opacity: 1;
  border-color: #ffb7c5;
  background: rgba(255, 183, 197, 0.05);
}

/* ==========================================================================
   4. CONTENT SECTIONS (POEMS/IMAGES)
   ========================================================================== */
.section {
  display: grid;
  /* Creates two equal columns that stay consistent */
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 60px;
  
  padding: 80px 10%;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.section.show {
  opacity: 1;
  transform: translateY(0);
}

/* Perfect alignment for reversed sections */
.reverse {
  direction: rtl; /* Flip the layout direction */
}

.reverse > * {
  direction: ltr; /* Reset text direction inside so words aren't backwards */
}

/* Content Containers */
.image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  /* Perspective kept for depth, though rotation is removed */
  perspective: 1000px; 
}

.image-container img {
  width: 100%;
  max-width: 450px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 
              0 0 0 1px rgba(255, 183, 197, 0.1);
  /* Using a standard ease for a professional feel */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-container img:hover {
  /* Subtle lift (-8px) and very slight enlargement (3%) */
  transform: translateY(-8px) scale(1.03);
  
  /* Softening the shadow and deepening the pink hue slightly */
  box-shadow: 0 25px 50px rgba(255, 183, 197, 0.2),
              0 15px 40px rgba(0, 0, 0, 0.5);
}
.text-container {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

.text-container h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 20px;
  background: linear-gradient(to right, #fff, #ffb7c5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-container p {
  font-family: 'Lora', serif; /* Elegant serif for poems */
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}
.text-container p strong {
  background: linear-gradient(to left, #fff, #fc7b95);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 1px rgba(255, 183, 197, 0.4));
  font-weight: 800;
  font-size: 1.1em; 
}

/* Responsive Fix for Mobile */
@media (max-width: 968px) {
  .section {
    grid-template-columns: 1fr; /* Stack vertically on small screens */
    gap: 40px;
    padding: 60px 20px;
    text-align: center;
  }
  
  .reverse {
    direction: ltr;
  }
  
  .text-container {
    padding: 20px;
    background: transparent;
    border: none;
  }
}

/* Decorative Dividers */
.section-divider {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 40px 0;
  opacity: 0.5;
}

.section-divider span {
  font-size: 1.1rem;
  color: #ffb7c5;
  animation: spin 6s linear infinite;
}


/* ==========================================================================
   5. SPECIAL COMPONENTS (COUNTERS, SPOTIFY, PETALS)
   ========================================================================== */

/* Date Counters */
.date-counter, .date-counter2 {
  margin: 30px auto;
  font-size: 1rem;
  color: #fff;
  text-align: center;
  padding: 14px 26px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  max-width: max-content;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: counterPulse 4s infinite ease-in-out;
}

#monthsary {
  display: none;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin: 25px auto;
  padding: 18px 28px;
  border-radius: 16px;
  background: rgba(255, 182, 193, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 150, 200, 0.9);
  box-shadow: 0 8px 30px rgba(255, 100, 150, 0.3), inset 0 0 12px rgba(255, 200, 220, 0.2);
  border: 1px solid rgba(255, 200, 220, 0.4);
  max-width: max-content;
  animation: fadeInUp 1s ease, glowPulse 3s infinite ease-in-out;
}

/* Spotify Feature */
.spotify-feature {
  margin: 2rem auto;
  max-width: 800px;
  text-align: center;
  padding: 1.5rem;
  border-radius: 16px;
  background: #121212;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.spotify-feature h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.spotify-feature p { font-size: 1rem; color: #b3b3b3; margin-bottom: 1rem; }

/* Floating Petals */
.petal-container {
  position: fixed;
  top: -20px;
  pointer-events: none;
  z-index: 9999;
  animation: fall linear forwards;
}

.petal {
  display: inline-block;
  animation: sway ease-in-out infinite;
}

/* Back to TOC Button */
.back-to-toc {
  position: fixed;
  bottom: 18px; right: 18px;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(117, 96, 96, 0.85);
  backdrop-filter: blur(5px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
}

.back-to-toc.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-toc:hover {
  background: rgba(255, 105, 180, 1);
  transform: translateY(-1px) scale(1.05);
}

/* ==========================================================================
   6. FOOTER & MISC
   ========================================================================== */
.site-footer {
  text-align: center;
  padding: 40px 20px;
  background-color: #000;
  border-top: 1px solid #222;
  color: #888;
  font-size: 0.9rem;
}

.site-footer p { margin: 6px 0; }

.scroll-text {
  margin-top: 20px;
  font-size: 0.95rem;
  color: #888;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   7. ANIMATIONS (KEYFRAMES)
   ========================================================================== */
@keyframes counterPulse {
  0%, 100% { text-shadow: 0 0 6px rgba(0, 255, 200, 0.6); }
  50% { text-shadow: 0 0 14px rgba(0, 255, 200, 0.9); }
}

@keyframes floatBranchRight {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 15px) rotate(3deg); }
}

@keyframes floatBranchLeft {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(25px, -15px) rotate(-2deg); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@keyframes fall {
  0% { transform: translateY(-20px); opacity: 1; }
  100% { transform: translateY(110vh); opacity: 0.8; }
}

@keyframes sway {
  0%, 100% { transform: translateX(0px) rotate(0deg); }
  50% { transform: translateX(15px) rotate(15deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 150, 200, 0.6); }
  50% { box-shadow: 0 0 40px rgba(255, 180, 220, 0.9); }
}

/* ==========================================================================
   8. MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .section, .reverse {
    flex-direction: column;
    text-align: center;
  }
  .image-container img {
    max-width: 100%;
    height: auto;
  }
}


/* Base Styles (Mobile First) */
.video-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0; /* Less padding on small screens */
  width: 100%;
}

.video-container {
  position: relative;
  width: 90%; /* Use more width on mobile */
  max-width: 450px;
  /* Aspect ratio is better for responsiveness than a fixed height */
  aspect-ratio: 1 / 1; /* Standard vertical video ratio */
  max-height: 550px; /* Prevents it from getting too long on large screens */
  
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  margin: 0 auto;
  
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 
              0 0 20px rgba(255, 183, 197, 0.2);
  
  transition: transform 0.3s ease;
}
/* --- Modern Dark Video Section Styles --- */

:root {
  --glow-color: rgba(255, 183, 197, 0.15);
  --glow-hover: rgba(255, 183, 197, 0.3);
  --bg-dark: #0a0a0a;
}
/* --- Aesthetic 3:2 Ratio Video (Modern Style) --- */

.video-section.dark-theme {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  width: 100%;
  overflow: hidden; 
}

/* Glassmorphism Wrapper - The Frame */
.dark-video-wrapper {
  position: relative;
  display: inline-flex; 
  padding: 8px; /* Slightly thicker for the glass look */
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.video-container {
  position: relative;
  /* Responsive Width */
  width: 88vw; 
  max-width: 500px; /* Slightly narrower max-width to keep the 3:2 look tight */
  
  /* THE RATIO: 1 to 1.5 is the same as 3:2 */
  aspect-ratio: 3 / 2; 
  
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  
  /* Initial state for JS reveal */
  opacity: 0; 
  transform: translateY(15px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  
  /* CROPPING: Balances the visual weight to the left */
  object-position: 35% 50%; 
  
  display: block;
  /* Aesthetic GIF grading */
  filter: brightness(0.9) contrast(1.1) saturate(1.1);
}

/* Subtle Gradient overlay for that "Premium GIF" feel */
.video-glow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom, 
    rgba(255, 183, 197, 0.05) 0%, 
    transparent 50%, 
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* --- Responsive Adjustments --- */

@media (min-width: 768px) {
  .video-container {
    width: 70vw;
    max-width: 550px;
  }
}

@media (min-width: 1024px) {
  .video-section.dark-theme {
    padding: 60px 0;
  }

  /* Interaction for Mouse Users */
  .dark-video-wrapper:hover {
    transform: translateY(-8px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 
                0 0 25px rgba(255, 183, 197, 0.15);
  }
}