/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════════════ */
:root {
  --cream:       #FDFAF5;
  --champagne:   #F5EFE6;
  --mauve:       #6B4E4E;
  --warm-gray:   #4A3F3F;
  --blush:       #D4A5A5;
  --gold:        #C9A84C;
  --gold-light:  #E8D48A;
  --dark:        #1A0A0C;
  --off-white:   #FFF8F0;

  --font-script:  'Great Vibes', cursive;
  --font-heading: 'Cormorant Garamond', serif;
  --font-display: 'Playfair Display', serif;
  --font-body:    'Lato', sans-serif;

  --section-pad: 100px;
  --max-width:   900px;
}

/* ─── BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; max-width: 100%; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--warm-gray);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

p { font-size: 1.05rem; margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════
   SCROLL PROGRESS BAR
════════════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   MUSIC PLAYER
════════════════════════════════════════════════════ */
#music-player {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 1000;
}

#music-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(26, 10, 12, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 50px;
  padding: 10px 18px 10px 10px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  color: var(--off-white);
}

#music-btn:hover {
  background: rgba(26, 10, 12, 0.92);
  border-color: var(--gold);
}

.vinyl {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: conic-gradient(
    #1a0810 0deg, #4a1520 90deg,
    #1a0810 180deg, #4a1520 270deg, #1a0810 360deg
  );
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.vinyl-center {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
}

#music-player.playing .vinyl {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.music-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blush);
}

/* ═══════════════════════════════════════════════════
   SECTION — SHARED UTILITIES
════════════════════════════════════════════════════ */
.section-light { background: var(--cream); }
.section-alt   { background: var(--champagne); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad) 40px;
}

.section-label-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-year {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--blush);
  opacity: 0.5;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  font-style: italic;
  color: var(--mauve);
  line-height: 1.2;
  margin-bottom: 40px;
}

.section-sub {
  font-size: 1rem;
  color: var(--blush);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

/* ─── Photo placeholder ─── */
.photo-placeholder,
.thumb-placeholder {
  background: linear-gradient(135deg, #EFE4DC 0%, #D4A5A5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--mauve);
  opacity: 0.7;
  border-radius: 4px;
}

.photo-placeholder {
  width: 100%; height: 340px;
}

.placeholder-symbol {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.placeholder-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════
   SECTION 1 — HERO
════════════════════════════════════════════════════ */
#hero {
  position: relative;
  width: 100%; height: 100vh;
  min-height: 600px;
  display: flex; align-items: center; justify-content: center;

  background: url('../assets/photos/hero.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(15, 5, 7, 0.52);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  opacity: 0; /* GSAP fades this in */
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 16px;
}

.hero-script {
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 5.8vw, 7rem);
  color: var(--off-white);
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 48px;
}

/* Counter */
.hero-counter {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.counter-unit {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 12px;
}

.counter-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--off-white);
  line-height: 1;
}

.counter-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blush);
  margin-top: 4px;
}

.counter-sep {
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.5;
  padding-top: 6px;
  user-select: none;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  z-index: 2;
}

.hero-scroll-hint span {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,248,240,0.5);
}

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,248,240,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ═══════════════════════════════════════════════════
   SECTION 2 — HOW IT BEGAN
════════════════════════════════════════════════════ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.two-col-text p {
  color: var(--warm-gray);
  font-size: 1.05rem;
}

.two-col-image {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(107, 78, 78, 0.15);
}

/* ═══════════════════════════════════════════════════
   SECTION 3 — CLOSER WITHOUT KNOWING
════════════════════════════════════════════════════ */
#closer { position: relative; overflow: hidden; }

.closer-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.pull-quote {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--mauve);
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  margin-top: 32px;
  line-height: 1.5;
}

/* CSS petal animation */
.petals-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  left: var(--x);
  font-size: calc(10px * var(--s));
  color: var(--blush);
  opacity: 0.4;
  animation: petalFall 8s linear var(--d) infinite;
}

.petal::before { content: '✿'; }

@keyframes petalFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   SECTION 4 — THE MOMENT
════════════════════════════════════════════════════ */
#the-moment {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;

  background: url('../assets/photos/moment.jpg') center/cover no-repeat;
}

.moment-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 3, 5, 0.65);
}

.moment-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.moment-pre {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 20px;
}

.moment-date {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 32px;
}

.moment-sub {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: rgba(255, 248, 240, 0.8);
  line-height: 1.7;
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   SECTION 5 — TIMELINE
════════════════════════════════════════════════════ */
.timeline-container {
  position: relative;
  padding: 20px 0 40px;
}

/* Center line track */
.timeline-line-track {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(212, 165, 165, 0.2);
  overflow: hidden;
}

.timeline-line {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--gold), var(--blush));
}

/* Card layout */
.timeline-card {
  display: flex;
  align-items: flex-start;
  margin-bottom: 64px;
  position: relative;
}

.timeline-card.left  { flex-direction: row; padding-right: calc(50% + 40px); }
.timeline-card.right { flex-direction: row-reverse; padding-left: calc(50% + 40px); }

.timeline-card-inner {
  background: white;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(107, 78, 78, 0.1);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  transition: box-shadow 0.3s ease;
}

.timeline-card-inner:hover {
  box-shadow: 0 12px 48px rgba(107, 78, 78, 0.18);
}

/* Thumbnail */
.timeline-thumb {
  width: 70px; height: 70px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--blush);
}

.thumb-placeholder {
  width: 100%; height: 100%;
  font-size: 1.5rem;
  border-radius: 50%;
}

/* Card body */
.timeline-year {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
}

.timeline-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--mauve);
  margin-bottom: 8px;
  line-height: 1.3;
}

.timeline-card-body p {
  font-size: 0.92rem;
  color: var(--warm-gray);
  line-height: 1.7;
  margin: 0;
}

/* Dot on the center line */
.timeline-dot {
  position: absolute;
  top: 28px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--blush);
  border: 2px solid white;
  box-shadow: 0 0 0 3px var(--blush);
  z-index: 2;
}

.timeline-dot.gold {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.4);
}

.timeline-card.left  .timeline-dot { right: calc(50% - 7px); transform: translateX(50%); }
.timeline-card.right .timeline-dot { left:  calc(50% - 7px); transform: translateX(-50%); }

/* Special cards */
.timeline-card.special .timeline-card-inner {
  background: linear-gradient(135deg, #FDFAF5 0%, #FFF0E8 100%);
  border: 1px solid rgba(201, 168, 76, 0.25);
}

/* ═══════════════════════════════════════════════════
   SECTION 6 — MAP
════════════════════════════════════════════════════ */
#map-section .section-inner { padding-bottom: 40px; }

#map {
  width: 100%;
  height: 500px;
  z-index: 1;
}

/* Leaflet popup custom style */
.leaflet-popup-content-wrapper {
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(107,78,78,0.2);
  font-family: var(--font-body);
}

.leaflet-popup-content {
  margin: 14px 18px;
  min-width: 160px;
}

.map-popup-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  color: var(--mauve);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.map-popup-caption {
  font-size: 0.82rem;
  color: var(--warm-gray);
  line-height: 1.5;
}

/* Custom heart marker */
.heart-marker-icon {
  background: none !important;
  border: none !important;
}

.heart-marker-icon span {
  display: block;
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  transition: transform 0.2s ease;
}

.heart-marker-icon:hover span { transform: scale(1.3); }

/* ═══════════════════════════════════════════════════
   SECTION 7 — GALLERY
════════════════════════════════════════════════════ */
#gallery-section .section-inner { padding-bottom: 40px; }

.gallery-coming-soon {
  text-align: center;
  font-style: italic;
  color: var(--blush);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}

.gallery-swiper {
  padding: 10px 0 50px;
}

.gallery-slide {
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(107,78,78,0.1);
}

.gallery-slide.placeholder {
  background: linear-gradient(135deg, #F0E3DC 0%, #D4A5A5 60%, #EFD9CD 100%);
  display: flex; align-items: center; justify-content: center;
}

.gallery-ph {
  text-align: center;
  color: var(--mauve);
  opacity: 0.65;
}

.gallery-ph span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

.gallery-ph p {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  margin: 0;
  letter-spacing: 0.05em;
}

/* Real gallery slides */
.gallery-link {
  display: block;
  width: 100%; height: 100%;
  position: relative;
  text-decoration: none;
}

.gallery-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-link:hover img { transform: scale(1.04); }

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 16px 14px;
  background: linear-gradient(to top, rgba(15,5,7,0.7), transparent);
  color: var(--off-white);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Swiper overrides */
.swiper-button-prev, .swiper-button-next {
  color: var(--gold) !important;
  background: rgba(26,10,12,0.5);
  width: 40px !important; height: 40px !important;
  border-radius: 50%;
}

.swiper-button-prev::after, .swiper-button-next::after {
  font-size: 16px !important;
}

.swiper-pagination-bullet { background: var(--blush) !important; }
.swiper-pagination-bullet-active { background: var(--gold) !important; }

/* ═══════════════════════════════════════════════════
   SECTION 8 — LOVE LETTER
════════════════════════════════════════════════════ */
#love-letter {
  background: var(--cream);
  padding: var(--section-pad) 40px;
}

.letter-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.letter-header {
  text-align: center;
  margin-bottom: 52px;
}

.letter-to {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--mauve);
  display: block;
  margin-bottom: 16px;
}

.letter-rule {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

.letter-body {
  border-left: 3px solid rgba(201, 168, 76, 0.35);
  padding-left: 36px;
}

.letter-body p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--warm-gray);
  line-height: 1.9;
  margin-bottom: 1.5em;
}

.letter-standout {
  font-family: var(--font-heading) !important;
  font-size: 1.3rem !important;
  font-style: italic;
  color: var(--mauve) !important;
  font-weight: 600 !important;
}

.letter-closing {
  font-family: var(--font-heading) !important;
  font-style: italic;
  font-size: 1.1rem !important;
  color: var(--mauve) !important;
  margin-top: 2em !important;
}

.letter-sign {
  font-family: var(--font-script) !important;
  font-size: 2rem !important;
  color: var(--gold) !important;
  margin-top: 1.5em !important;
  display: block;
}

/* ═══════════════════════════════════════════════════
   SECTION 9 — CLOSING
════════════════════════════════════════════════════ */
#closing {
  position: relative;
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;

  background: url('../assets/photos/closing.jpg') center/cover no-repeat;
  overflow: hidden;
}

#petals-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

.closing-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 3, 5, 0.6);
  z-index: 2;
}

.closing-content {
  position: relative; z-index: 3;
  text-align: center;
  padding: 0 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-script {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--gold);
  margin-bottom: 24px;
  display: block;
}

.closing-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 300;
  color: var(--off-white);
  line-height: 1.7;
  margin-bottom: 40px;
}

.closing-divider {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 0 auto 32px;
  opacity: 0.7;
}

.closing-names {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--off-white);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.closing-date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blush);
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --section-pad: 70px; }

  .section-inner { padding-left: 20px; padding-right: 20px; }

  /* Hero counter wraps */
  .hero-counter { gap: 0; }
  .counter-unit { padding: 0 8px; }
  .counter-num  { font-size: 1.4rem; }
  .counter-sep  { font-size: 1rem; }

  /* Music player smaller */
  #music-player { bottom: 16px; right: 16px; }
  .music-label  { display: none; }
  #music-btn    { padding: 10px; border-radius: 50%; }

  /* Two-col stacks */
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .two-col-image { order: -1; }

  /* Timeline — single column */
  .timeline-line-track { left: 20px; }
  .timeline-card.left,
  .timeline-card.right {
    flex-direction: column;
    padding-left: 52px;
    padding-right: 0;
  }
  .timeline-card.left  .timeline-dot,
  .timeline-card.right .timeline-dot {
    left: 13px; right: auto;
    transform: none;
    top: 28px;
  }

  /* Map shorter */
  #map { height: 320px; }

  /* Gallery single slide */
  .gallery-slide { height: 260px; }

  /* Letter */
  #love-letter { padding: var(--section-pad) 20px; }
  .letter-body { padding-left: 16px; }
  .letter-body p { font-size: 1rem; }

  /* Closing */
  .closing-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .section-inner { padding-left: 16px; padding-right: 16px; }
  #love-letter { padding: var(--section-pad) 16px; }
  .letter-body { padding-left: 14px; }

  .hero-script { font-size: 2.4rem; }
  .hero-title  { font-size: 0.75rem; letter-spacing: 0.2em; }
  .moment-date { font-size: 2.4rem; }
  .section-heading { font-size: 1.6rem; }

  /* Counter: tighter on very small screens */
  .hero-counter { flex-wrap: wrap; justify-content: center; gap: 4px; }
  .counter-sep  { display: none; }
  .counter-unit { padding: 4px 10px; }
}
