/* ==========================================================================
   VIKA & SLAVIK — 1 YEAR ANNIVERSARY CELEBRATION
   Aesthetic: Romantic Dusk Velvet, Champagne Gold & Intimate Editorial
   Ultra Mobile & Desktop Cross-Platform Adaptation (100dvh, Safe-Area)
   ========================================================================== */

:root {
  --bg-dark: #0a0610;
  --bg-gradient: radial-gradient(circle at 50% 10%, #200f28 0%, #0d0716 60%, #050308 100%);
  --surface-glass: rgba(28, 17, 40, 0.72);
  --surface-border: rgba(244, 114, 182, 0.22);
  --surface-border-subtle: rgba(255, 255, 255, 0.08);
  
  --text-primary: #fff1f2;
  --text-secondary: #e2d9e6;
  --text-muted: #a69bb0;
  
  --accent-rose: #f472b6;
  --accent-coral: #fb7185;
  --accent-gold: #fde047;
  --accent-champagne: #fef08a;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-handwriting: 'Caveat', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-glow: 0 10px 40px -10px rgba(244, 114, 182, 0.35);
  --shadow-card: 0 20px 45px -15px rgba(0, 0, 0, 0.65);
  
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  width: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* Ambient Canvas behind all content */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   TOP FLOATING NAVIGATION (SAFE-AREA & MOBILE TOUCH READY)
   ========================================================================== */

.top-nav {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.15rem;
  background: rgba(20, 10, 30, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-champagne);
  white-space: nowrap;
}

.heart-pulse {
  display: inline-block;
  animation: pulse-heart 1.5s infinite ease-in-out;
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); filter: drop-shadow(0 0 8px var(--accent-rose)); }
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.glass-pill-btn.heart-btn {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(251, 113, 133, 0.22));
  border-color: rgba(244, 114, 182, 0.45);
}

.glass-pill-btn:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .glass-pill-btn:hover {
    background: rgba(244, 114, 182, 0.2);
    border-color: var(--accent-rose);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.25);
  }
}

.music-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: 2px;
}

.wave-bar {
  width: 2.5px;
  height: 4px;
  background-color: var(--accent-rose);
  border-radius: 2px;
  animation: equalize 1s infinite ease-in-out;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; height: 8px; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; height: 12px; }

.paused .wave-bar {
  animation: none;
  height: 3px;
  opacity: 0.4;
}

@keyframes equalize {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

/* ==========================================================================
   PAGE CONTAINER & LAYOUT
   ========================================================================== */

.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  display: inline-block;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--accent-rose);
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.9rem;
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 9999px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  line-height: 1.18;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.55;
  padding: 0 0.5rem;
}

/* ==========================================================================
   HERO SECTION (RESPONSIVE VIEWPORT 100DVH)
   ========================================================================== */

.hero-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(6rem + env(safe-area-inset-top, 0px)) 0 3.5rem;
  position: relative;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(0.75rem, 2.2vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-champagne);
  padding: 0.4rem 1.1rem;
  background: rgba(254, 240, 138, 0.08);
  border: 1px solid rgba(254, 240, 138, 0.3);
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  max-width: 95%;
  white-space: normal;
  text-align: center;
}

.tag-sparkle {
  color: var(--accent-gold);
  font-size: 0.75rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
}

.title-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-style: italic;
  font-weight: 300;
  color: var(--accent-rose);
}

.title-main {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 9.5vw, 5.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #fbcfe8 70%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(244, 114, 182, 0.25));
}

.hero-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.2vw, 1.55rem);
  font-style: italic;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 2.25rem;
  line-height: 1.5;
  padding: 0 0.75rem;
}

/* LOVE STOPWATCH COUNTER */

.love-counter-box {
  width: 100%;
  max-width: 720px;
  background: rgba(22, 12, 33, 0.78);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.love-counter-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.counter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  font-weight: 500;
  color: var(--accent-rose);
  margin-bottom: 1rem;
  text-align: center;
  padding: 0 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  box-shadow: 0 0 12px var(--accent-rose);
  animation: pulse-heart 1.5s infinite;
  flex-shrink: 0;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.counter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.85rem 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.counter-card.highlight {
  border-color: rgba(244, 114, 182, 0.4);
  background: rgba(244, 114, 182, 0.09);
}

.counter-num {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.counter-card.highlight .counter-num {
  color: var(--accent-rose);
  text-shadow: 0 0 15px rgba(244, 114, 182, 0.5);
}

.counter-unit {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

.counter-footer {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  color: var(--accent-champagne);
  line-height: 1.4;
  padding: 0 0.5rem;
}

/* Scroll Cue */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-muted);
  min-height: 44px;
  justify-content: center;
  transition: color 0.3s ease;
}

.scroll-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-arrow {
  animation: float-down 2s infinite ease-in-out;
}

@keyframes float-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ==========================================================================
   CHAPTER 1: POSTCARDS TIMELINE (MOBILE RESILIENT)
   ========================================================================== */

.postcards-timeline {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

/* Center vertical thread for desktop */
.postcards-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(244, 114, 182, 0.4) 15%, 
    rgba(244, 114, 182, 0.6) 50%, 
    rgba(244, 114, 182, 0.4) 85%, 
    transparent 100%
  );
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.postcard-entry {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  z-index: 1;
}

.postcard-entry:nth-child(odd) {
  flex-direction: row;
}

.postcard-entry:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--bg-dark);
  border: 2px solid var(--accent-rose);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.6);
  z-index: 2;
  transition: transform 0.25s ease;
}

.postcard-card {
  width: 44%;
  background: #fbf9f5;
  color: #1a1620;
  padding: 1.15rem 1.15rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  transition: transform 0.35s var(--transition-smooth), box-shadow 0.35s ease;
  transform-origin: center center;
}

.postcard-card:active {
  transform: scale(0.98) !important;
}

/* Washi tape decoration */
.postcard-card::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 85px;
  height: 22px;
  background: rgba(254, 240, 138, 0.6);
  backdrop-filter: blur(2px);
  border-left: 2px dashed rgba(200, 180, 100, 0.4);
  border-right: 2px dashed rgba(200, 180, 100, 0.4);
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  z-index: 2;
}

@media (min-width: 769px) {
  .postcard-entry:nth-child(odd) .postcard-card {
    transform: rotate(-1.5deg);
  }

  .postcard-entry:nth-child(even) .postcard-card {
    transform: rotate(1.5deg);
  }

  @media (hover: hover) and (pointer: fine) {
    .postcard-card:hover {
      transform: scale(1.03) rotate(0deg) !important;
      box-shadow: 0 25px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(244, 114, 182, 0.35);
      z-index: 10;
    }

    .postcard-entry:hover .timeline-marker {
      transform: translateX(-50%) scale(1.2);
      background: var(--accent-rose);
    }
  }
}

.postcard-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #1c1424;
}

.postcard-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition-smooth);
}

.postcard-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.postcard-meta {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.postcard-date {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b5cf6;
}

.postcard-caption {
  font-family: var(--font-handwriting);
  font-size: clamp(1.3rem, 3.5vw, 1.55rem);
  line-height: 1.25;
  color: #1e1b2e;
  font-weight: 700;
  word-break: normal;
  overflow-wrap: break-word;
}

.postcard-subtext {
  font-size: 0.88rem;
  color: #555060;
  line-height: 1.45;
  margin-top: 0.2rem;
}

.postcard-tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #ec4899;
  font-weight: 600;
  margin-top: 0.6rem;
}

/* ==========================================================================
   CHAPTER 2: REASONS WHY I LOVE YOU (GRID)
   ========================================================================== */

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1050px;
  margin: 0 auto;
}

.reason-card {
  background: var(--surface-glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--surface-border-subtle);
  border-radius: 18px;
  padding: 1.75rem 1.4rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reason-card:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .reason-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-rose);
    box-shadow: 0 12px 30px rgba(244, 114, 182, 0.22);
  }

  .reason-card:hover .reason-icon {
    transform: scale(1.2) rotate(10deg);
  }
}

.reason-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.reason-number {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--accent-champagne);
}

.reason-icon {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.reason-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.reason-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.reason-heart-btn {
  margin-top: 1.15rem;
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--accent-rose);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.35rem 0;
}

.reason-heart-btn:active {
  transform: scale(1.1);
}

/* ==========================================================================
   CHAPTER 3: INTERACTIVE WAX-SEALED LOVE LETTER
   ========================================================================== */

.envelope-wrapper {
  max-width: 760px;
  margin: 0 auto;
  perspective: 1200px;
}

.envelope {
  position: relative;
  background: #23122e;
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(244, 114, 182, 0.18);
  padding: 2.75rem 2rem;
  overflow: hidden;
  transition: all 0.5s var(--transition-smooth);
}

.envelope-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.wax-seal {
  width: clamp(76px, 18vw, 92px);
  height: clamp(76px, 18vw, 92px);
  background: radial-gradient(circle at 35% 35%, #e11d48, #9f1239, #4c0519);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(159, 18, 57, 0.6), inset 0 3px 6px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  margin-bottom: 1.75rem;
  border: 3px solid rgba(254, 240, 138, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  user-select: none;
}

.wax-seal:active {
  transform: scale(0.92);
}

@media (hover: hover) and (pointer: fine) {
  .wax-seal:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 15px 35px rgba(225, 29, 72, 0.8), inset 0 3px 6px rgba(255, 255, 255, 0.5);
  }
}

.seal-inner {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 700;
  color: var(--accent-champagne);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.05em;
}

.envelope-stamp {
  position: absolute;
  top: -10px;
  right: 5px;
  background: #fbf9f5;
  color: #1a1620;
  padding: 0.45rem 0.75rem;
  border: 2px dashed #9f1239;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(5deg);
}

.stamp-icon { font-size: 1.2rem; }
.stamp-text { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }

.envelope-address {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 0.5rem;
}

.handwritten {
  font-family: var(--font-handwriting);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  color: var(--accent-champagne);
  line-height: 1.3;
}

.handwritten.from {
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  color: var(--text-muted);
}

/* Unfolded Letter Paper */
.letter-paper {
  display: none;
  background: #fdfaf4;
  color: #262130;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  animation: unfold-letter 0.75s var(--transition-smooth) forwards;
}

@keyframes unfold-letter {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.envelope.opened .envelope-front {
  display: none;
}

.envelope.opened .letter-paper {
  display: block;
}

.letter-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b5cf6;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.letter-greeting {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: #1e1828;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.letter-content p {
  font-size: clamp(1rem, 2.8vw, 1.12rem);
  line-height: 1.7;
  color: #3b3547;
  margin-bottom: 1.1rem;
}

.letter-closing {
  font-family: var(--font-handwriting);
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  color: #e11d48;
  font-weight: 700;
  margin-top: 1.75rem !important;
}

.letter-signature {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-handwriting);
  font-size: clamp(1.4rem, 4.2vw, 1.65rem);
  color: #1e1828;
}

/* ==========================================================================
   CHAPTER 4: COMPLIMENTS JAR
   ========================================================================== */

.compliment-card-box {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 3rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.jar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.compliment-content {
  position: relative;
  z-index: 1;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  color: var(--accent-rose);
  opacity: 0.4;
  line-height: 0;
  vertical-align: middle;
}

.quote-mark.closing {
  margin-left: 0.35rem;
}

.compliment-text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.45;
  padding: 0 0.5rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.accent-glow-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #f472b6, #e11d48);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4);
  transition: transform 0.15s ease, box-shadow 0.25s ease;
  user-select: none;
  text-align: center;
}

.accent-glow-btn:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .accent-glow-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(225, 29, 72, 0.6);
  }
}

/* ==========================================================================
   CHAPTER 5: BENTO PHOTO GALLERY
   ========================================================================== */

.bento-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.25s ease;
  background: #140d1c;
}

.gallery-item:active {
  transform: scale(0.97);
}

.gallery-item.span-2 {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-rose);
    box-shadow: 0 15px 35px rgba(244, 114, 182, 0.3);
  }

  .gallery-item:hover img {
    transform: scale(1.08);
  }

  .gallery-item:hover .gallery-overlay {
    opacity: 1;
  }
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13, 7, 22, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-date {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--accent-champagne);
  letter-spacing: 0.08em;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #fff;
  margin-top: 0.15rem;
}

/* ==========================================================================
   FINALE / FOOTER (SAFE-AREA BOTTOM)
   ========================================================================== */

.anniversary-footer {
  position: relative;
  text-align: center;
  padding: 6rem 1.25rem calc(4rem + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.footer-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 60vw, 450px);
  height: clamp(280px, 60vw, 450px);
  background: radial-gradient(circle, rgba(244, 114, 182, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.footer-heart-big {
  font-size: clamp(3rem, 8vw, 4.25rem);
  margin-bottom: 1.25rem;
  animation: pulse-heart 1.5s infinite ease-in-out;
  display: inline-block;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #fbcfe8 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.2vw, 1.35rem);
  font-style: italic;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.25rem;
  line-height: 1.5;
  padding: 0 0.5rem;
}

.footer-actions {
  margin-bottom: 3.5rem;
}

.pulse-glow {
  animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
  0%, 100% { box-shadow: 0 0 15px rgba(244, 114, 182, 0.35); }
  50% { box-shadow: 0 0 35px rgba(244, 114, 182, 0.75), 0 0 10px #f472b6; }
}

.footer-credits {
  font-size: clamp(0.75rem, 2.2vw, 0.85rem);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
}

/* ==========================================================================
   LIGHTBOX MODAL (SAFE-AREA & MOBILE FRIENDLY)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 14, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #1b1124;
  border: 1px solid var(--surface-border);
  border-radius: 22px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  position: relative;
  transform: scale(0.94);
  transition: transform 0.3s var(--transition-smooth);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close:active {
  transform: scale(0.9);
}

.modal-photo-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  max-height: 55vh;
  max-height: 55dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-photo-wrapper img {
  width: 100%;
  height: 100%;
  max-height: 55vh;
  max-height: 55dvh;
  object-fit: contain;
}

.modal-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-champagne);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-details {
  padding: 1.5rem 1.75rem;
}

.modal-details h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.modal-details p {
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.modal-heart-action {
  background: rgba(244, 114, 182, 0.16);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: var(--text-primary);
  border-radius: 9999px;
  min-height: 44px;
  padding: 0.55rem 1.3rem;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.15s ease;
}

.modal-heart-action:active {
  transform: scale(0.95);
}

/* ==========================================================================
   FLOATING HEARTS LAYER (CLICK / TOUCH BURST)
   ========================================================================== */

#floating-hearts-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  user-select: none;
  pointer-events: none;
  animation: float-heart-up 2.5s ease-out forwards;
}

@keyframes float-heart-up {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0px), -180px) scale(1.4) rotate(var(--rot, 20deg));
  }
}

/* ==========================================================================
   SCROLL REVEAL UTILITY
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s var(--transition-smooth), transform 0.75s var(--transition-smooth);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE SMARTPHONES)
   ========================================================================== */

@media (max-width: 768px) {
  .section {
    padding: 3.8rem 0;
  }

  .top-nav {
    padding: 0.45rem 0.85rem;
    width: calc(100% - 1.25rem);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .music-label {
    display: none;
  }

  .glass-pill-btn {
    padding: 0.35rem 0.75rem;
  }

  /* 2x2 counter grid on mobile */
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .counter-card {
    padding: 0.75rem 0.35rem;
  }

  /* Align timeline to left */
  .postcards-timeline {
    gap: 3.5rem;
  }

  .postcards-timeline::before {
    left: 20px;
  }

  .postcard-entry {
    flex-direction: column !important;
    align-items: flex-start;
    padding-left: 52px;
  }

  .timeline-marker {
    left: 20px;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .postcard-card {
    width: 100%;
    transform: none !important;
    padding: 0.95rem 0.95rem 1.25rem;
  }

  .postcard-image-box {
    aspect-ratio: 4 / 3;
  }

  .bento-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .gallery-item.span-2 {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }

  .gallery-overlay {
    opacity: 1; /* Always visible on mobile touch */
    background: linear-gradient(180deg, transparent 50%, rgba(13, 7, 22, 0.92) 100%);
    padding: 0.85rem;
  }

  .gallery-title {
    font-size: 1rem;
  }

  .envelope {
    padding: 2.25rem 1.25rem;
  }

  .letter-paper {
    padding: 1.85rem 1.25rem;
  }

  .modal-dialog {
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 18px;
  }

  .modal-details {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   COMPACT SMARTPHONES (iPhone SE, Galaxy S, screens <= 420px)
   ========================================================================== */

@media (max-width: 420px) {
  .page-container {
    padding: 0 0.85rem;
  }

  .section {
    padding: 3rem 0;
  }

  .postcards-timeline::before {
    left: 14px;
  }

  .postcard-entry {
    padding-left: 42px;
  }

  .timeline-marker {
    left: 14px;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .postcard-card {
    padding: 0.75rem 0.75rem 1rem;
  }

  .postcard-card::before {
    width: 65px;
    height: 18px;
    top: -9px;
  }

  .bento-gallery {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .gallery-item.span-2 {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
  }

  .envelope-stamp {
    right: 0;
    top: -12px;
    transform: rotate(3deg) scale(0.9);
  }

  .counter-num {
    font-size: 1.6rem;
  }

  .counter-unit {
    font-size: 0.68rem;
  }

  .modal-dialog {
    border-radius: 14px;
  }

  .modal-photo-wrapper {
    border-radius: 14px 14px 0 0;
  }
}
