/* ============================================
   PARA LINDA ❤️ — ESTILOS
   Diseño romántico elegante | Mobile-first
   ============================================ */

/* === VARIABLES === */
:root {
  --rose:       #c9737a;
  --rose-light: #e8a0a6;
  --rose-dark:  #8b3a40;
  --gold:       #c9a96e;
  --gold-light: #e8d4a0;
  --cream:      #f5ede8;
  --bg-deep:    #0d0608;
  --bg-mid:     #150b0d;
  --bg-card:    rgba(255,255,255,0.04);
  --bg-card-h:  rgba(255,255,255,0.07);
  --text-main:  #f0e4e6;
  --text-muted: #9e7f82;
  --border:     rgba(201,115,122,0.18);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', sans-serif;

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   PANTALLA DE CARGA
   ============================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0d0608;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

#loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: opacity 0.5s ease;
}

#loader.phase2 .loader-content { opacity: 0; }

.loader-hearts { display: flex; gap: 10px; }

.loader-hearts span {
  font-size: 1.1rem;
  opacity: 0;
  animation: loader-heart-pop 1.8s ease-in-out infinite;
}
.loader-hearts span:nth-child(1) { animation-delay: 0s; }
.loader-hearts span:nth-child(2) { animation-delay: 0.3s; }
.loader-hearts span:nth-child(3) { animation-delay: 0.6s; }

@keyframes loader-heart-pop {
  0%, 100% { opacity: 0.2; transform: scale(0.85); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

.loader-text {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #9e7f82;
}

.loader-dots { display: flex; gap: 7px; }

.loader-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c9737a;
  animation: loader-dot 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-dot {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50%       { opacity: 1;   transform: translateY(-4px); }
}

.loader-reveal {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease 0.1s, transform 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.1s;
}

#loader.phase2 .loader-reveal {
  opacity: 1;
  transform: scale(1);
}

.loader-reveal-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 300;
  color: #f0e4e6;
  letter-spacing: 0.04em;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-snap-type: y proximity;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* Ocultar scrollbar en algunos navegadores */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--rose-dark); border-radius: 2px; }

/* === CANVAS DE PARTÍCULAS === */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* === SECCIÓN BASE === */
.section {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  scroll-snap-align: start;
}

.section-inner {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  opacity: 0.85;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 40px;
}

.section-title em {
  font-style: italic;
  color: var(--rose-light);
}

/* ============================================
   SECCIÓN 1: PORTADA
   ============================================ */
.portada {
  background: radial-gradient(ellipse at 50% 30%, #2a0d12 0%, #0d0608 70%);
  text-align: center;
  gap: 0;
  padding: 40px 24px 80px;
}

.portada-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.portada-sparkle {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--rose), transparent);
  margin-bottom: 8px;
  animation: sparkle-line 3s ease-in-out infinite;
}

@keyframes sparkle-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

.portada-subtitle {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
}

.portada-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 13vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--text-main);
  opacity: 0;
}

.heart-pulse {
  display: inline-block;
  animation: heart-beat 1.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.2); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.12); }
  56%      { transform: scale(1); }
}

.portada-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 320px;
  opacity: 0;
}

/* Botón Comenzar */
.btn-comenzar {
  position: relative;
  padding: 14px 42px;
  background: transparent;
  border: 1px solid var(--rose);
  border-radius: 40px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
  opacity: 0;
}

.btn-comenzar:hover,
.btn-comenzar:focus {
  background: rgba(201,115,122,0.15);
  border-color: var(--rose-light);
  color: var(--rose-light);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,115,122,0.2);
}

.btn-comenzar:active { transform: translateY(0); }

.btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.btn-comenzar:hover .btn-shimmer { transform: translateX(100%); }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 1px solid var(--rose);
  border-bottom: 1px solid var(--rose);
  transform: rotate(45deg);
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
  50%       { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* Animaciones fade-in portada */
.fade-in-delay-1 { animation: fadeUp 0.9s var(--ease-smooth) 0.3s forwards; }
.fade-in-delay-2 { animation: fadeUp 0.9s var(--ease-smooth) 0.7s forwards; }
.fade-in-delay-3 { animation: fadeUp 0.9s var(--ease-smooth) 1.1s forwards; }
.fade-in-delay-4 { animation: fadeUp 0.9s var(--ease-smooth) 1.5s forwards; }
.fade-in-delay-5 { animation: fadeUp 0.9s var(--ease-smooth) 2.2s forwards; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECCIÓN 2: CONTADOR
   ============================================ */
.contador-section {
  background: linear-gradient(160deg, #0f0507 0%, #180a0c 50%, #0d0608 100%);
  padding: 80px 20px;
}

.section-eyebrow { opacity: 0; transition: opacity 0.6s ease, transform 0.6s ease; }
.section-eyebrow.is-visible { opacity: 0.85; }

.counter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.counter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.counter-card:hover {
  background: var(--bg-card-h);
  border-color: rgba(201,115,122,0.35);
}

.counter-number {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 10vw, 3.5rem);
  font-weight: 300;
  color: var(--rose-light);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: transform 0.2s var(--ease-spring);
}

.counter-number.tick {
  animation: tick-anim 0.25s var(--ease-spring);
}

@keyframes tick-anim {
  0%   { transform: translateY(-8px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}

.counter-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.counter-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 340px;
  margin: 0 auto;
}

/* ============================================
   SECCIÓN 3: HISTORIA / TIMELINE
   ============================================ */
.historia-section {
  background: linear-gradient(180deg, #0d0608 0%, #120709 50%, #0d0608 100%);
  padding: 80px 20px;
}

.timeline {
  position: relative;
  margin: 10px 0 40px;
  padding: 0;
}

.timeline-line {
  display: none; /* En móvil se oculta la línea vertical */
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s var(--ease-smooth);
}

.timeline-item.reveal-left  { transform: translateX(-30px); }
.timeline-item.reveal-right { transform: translateX(30px); }
.timeline-item.is-visible   { opacity: 1; transform: translateX(0); }

.timeline-dot {
  display: none; /* Se usa solo en desktop */
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  text-align: left;
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.timeline-card:hover {
  background: var(--bg-card-h);
  border-color: rgba(201,115,122,0.3);
}

.timeline-card--special {
  border-color: rgba(201,115,122,0.45);
  background: rgba(201,115,122,0.07);
}

.timeline-date {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.timeline-text {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 3.5vw, 1.1rem);
  font-weight: 300;
  color: var(--text-main);
  line-height: 1.65;
}

.timeline-closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 10px;
}

/* ============================================
   SECCIÓN 4: CARTA  — rediseño limpio
   ============================================ */
.carta-section {
  background: linear-gradient(160deg, #0d0608 0%, #18090c 50%, #0d0608 100%);
  padding: 80px 20px 120px;
}

/* Escena: contiene carta + sobre apilados */
.envelope-scene {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  /* Reservamos espacio para que la carta suba SIN tapar el sobre:
     sobre ≈ 220px, carta ≈ 180px, carta sube ~160px → total ~380px */
  height: 380px;
}

/* ── CARTA (capa inferior, detrás del sobre) ── */
.letter {
  position: absolute;
  bottom: 0;             /* anclada al fondo de la escena */
  left: 0;
  right: 0;
  height: 180px;
  background: var(--cream);
  border-radius: 10px;
  padding: 22px 20px 18px;
  z-index: 1;            /* detrás del sobre */
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);

  /* Cerrada: oculta detrás del sobre */
  transform: translateY(0);
  opacity: 0;
  transition:
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
    opacity   0.4s  ease                            0.35s;
}

/* Abierta: sube por encima del sobre sin taparlo */
.envelope-scene.open .letter {
  transform: translateY(-155px);   /* sube casi su altura completa */
  opacity: 1;
}

.letter-content {
  text-align: left;
  color: #3d1820;
  height: 100%;
  overflow-y: auto;
}

.letter-greeting {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 10px;
}

.letter-body {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.7;
  color: #5a2830;
  margin-bottom: 14px;
}

.letter-closing {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--rose-dark);
  line-height: 1.6;
}

.letter-closing em { font-style: italic; color: #c9737a; }

/* ── SOBRE (capa superior, encima de la carta) ── */
.envelope {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  z-index: 2;            /* encima de la carta */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Cuerpo del sobre */
.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #2a1115 0%, #1e0c0f 100%);
  border: 1px solid rgba(201,115,122,0.28);
  border-radius: 6px 6px 14px 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  transition: box-shadow 0.4s ease;
}

.envelope:hover .envelope-body,
.envelope-scene.open .envelope-body {
  box-shadow: 0 12px 50px rgba(201,115,122,0.18);
}

/* Centro del sobre: sello + texto */
.envelope-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 2;
}

/* Triángulo decorativo izquierdo */
.env-tri--left {
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 0;
  border-bottom: 80px solid rgba(255,255,255,0.03);
  border-right: 160px solid transparent;
}
/* Triángulo decorativo derecho */
.env-tri--right {
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  border-bottom: 80px solid rgba(255,255,255,0.03);
  border-left: 160px solid transparent;
}
/* Triángulo inferior (doblez) */
.env-tri--bottom {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-bottom: 80px solid rgba(201,115,122,0.04);
}

/* Sello circular */
.envelope-seal {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, #c9737a, #8b3a40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(201,115,122,0.45);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.envelope:hover .envelope-seal {
  transform: scale(1.1);
  box-shadow: 0 0 32px rgba(201,115,122,0.65);
}

/* Al abrir: ocultar sello e hint */
.envelope-scene.open .envelope-center {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.envelope-hint {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── SOLAPA (flap) que se voltea ── */
.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  /* El triángulo SVG-free con clip-path */
  overflow: visible;
}

.flap-triangle {
  width: 100%;
  /* Triángulo apuntando hacia abajo usando clip-path */
  height: 100px;
  background: linear-gradient(170deg, #331318, #2a1115);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-top: 1px solid rgba(201,115,122,0.2);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}

/* Al abrir: la solapa rota hacia arriba */
.envelope-scene.open .envelope-flap {
  transform: rotateX(-175deg);
}

/* ============================================
   SECCIÓN 5: ÚLTIMO MENSAJE
   ============================================ */
.ultimo-section {
  background: radial-gradient(ellipse at 50% 60%, #1a080c 0%, #0d0608 70%);
  min-height: 60dvh;
  padding: 80px 20px;
}

.btn-mensaje {
  position: relative;
  padding: 16px 44px;
  background: linear-gradient(135deg, rgba(201,115,122,0.15), rgba(139,58,64,0.1));
  border: 1px solid rgba(201,115,122,0.5);
  border-radius: 50px;
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-style: italic;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
}

.btn-mensaje:hover,
.btn-mensaje:focus {
  background: linear-gradient(135deg, rgba(201,115,122,0.25), rgba(139,58,64,0.2));
  border-color: var(--rose);
  box-shadow: 0 8px 35px rgba(201,115,122,0.25);
  transform: translateY(-3px);
  outline: none;
}

.btn-mensaje:active { transform: translateY(0); }
.btn-mensaje .btn-shimmer { transition: transform 0.8s ease; }
.btn-mensaje:hover .btn-shimmer { transform: translateX(200%); }

/* Modal de último mensaje */
.mensaje-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,6,8,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.mensaje-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mensaje-card {
  position: relative;
  background: linear-gradient(145deg, #1e0c0f, #150809);
  border: 1px solid rgba(201,115,122,0.35);
  border-radius: 20px;
  padding: 44px 28px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(201,115,122,0.1);
  transform: scale(0.88) translateY(20px);
  transition: transform 0.5s var(--ease-spring) 0.1s;
  overflow: hidden;
}

.mensaje-overlay.active .mensaje-card {
  transform: scale(1) translateY(0);
}

.mensaje-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
}

.mensaje-close:hover {
  color: var(--rose-light);
  background: rgba(201,115,122,0.1);
}

.mensaje-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mensaje-sparkle-item {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: sparkle-float var(--dur) ease-out forwards;
}

@keyframes sparkle-float {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-120px) scale(0); opacity: 0; }
}

.mensaje-icon {
  font-size: 2.2rem;
  margin-bottom: 22px;
  animation: heart-beat 1.8s ease-in-out infinite;
}

.mensaje-texto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 4vw, 1.2rem);
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 24px;
}

.mensaje-firma {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
}

/* ============================================
   SECCIÓN RECUERDOS — GALERÍA
   ============================================ */
.recuerdos-section {
  background: linear-gradient(180deg, #0d0608 0%, #130810 50%, #0d0608 100%);
  padding: 80px 20px 100px;
}

.recuerdos-section .section-inner {
  max-width: 640px;
}

.recuerdos-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
}

/* Grid de fotos */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Tarjeta de foto */
.gallery-card {
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease, border-color 0.4s ease;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

.gallery-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 30px rgba(170,140,255,0.08);
  border-color: rgba(201,115,122,0.4);
}

.gallery-card:nth-child(1) { transition-delay: 0s; }
.gallery-card:nth-child(2) { transition-delay: 0.12s; }
.gallery-card:nth-child(3) { transition-delay: 0.24s; }

/* Imagen */
.gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: linear-gradient(145deg, #1e0c14, #160a10);
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-smooth);
  filter: brightness(0.92) saturate(1.05);
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

/* Overlay shimmer al hover */
.gallery-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(13,6,8,0.55) 100%
  );
  pointer-events: none;
}

/* Ícono de lupa */
.gallery-zoom-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(13,6,8,0.65);
  border: 1px solid rgba(201,115,122,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
  backdrop-filter: blur(6px);
}

.gallery-card:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

.gallery-zoom-icon svg {
  width: 14px;
  height: 14px;
  color: var(--rose-light);
}

/* Caption */
.gallery-caption {
  padding: 14px 16px 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ============================================
   VISOR DE FOTOS (lightbox)
   ============================================ */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.photo-viewer.active {
  opacity: 1;
  pointer-events: all;
}

.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,4,6,0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.photo-viewer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 480px;
  width: 100%;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.05s;
}

.photo-viewer.active .photo-viewer-inner {
  transform: scale(1) translateY(0);
}

.photo-viewer-img-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 50px rgba(201,115,122,0.1);
  border: 1px solid rgba(201,115,122,0.2);
  aspect-ratio: 4/5;
  background: linear-gradient(145deg, #1e0c14, #160a10);
}

.photo-viewer-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-viewer-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  color: var(--text-main);
  text-align: center;
  line-height: 1.7;
  opacity: 0.85;
  max-width: 360px;
}

.photo-viewer-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 2;
  background: rgba(201,115,122,0.1);
  border: 1px solid rgba(201,115,122,0.3);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 7px 11px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.photo-viewer-close:hover {
  background: rgba(201,115,122,0.22);
  color: var(--rose-light);
}

/* ============================================
   MODAL CARTA EXPANDIDA
   ============================================ */
.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.letter-modal.active {
  opacity: 1;
  pointer-events: all;
}

.letter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,6,8,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.letter-modal-card {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border-radius: 16px;
  padding: 40px 32px 36px;
  max-width: 420px;
  width: 100%;
  max-height: 80dvh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px rgba(201,115,122,0.15);
  transform: scale(0.85) translateY(40px);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.letter-modal.active .letter-modal-card {
  transform: scale(1) translateY(0);
}

.letter-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(201,115,122,0.12);
  border: 1px solid rgba(201,115,122,0.3);
  color: var(--rose-dark);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.letter-modal-close:hover {
  background: rgba(201,115,122,0.25);
  color: var(--rose);
}

.letter-modal-content {
  color: #3d1820;
}

.letter-modal-content .letter-greeting {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rose-dark);
  margin-bottom: 16px;
}

.letter-modal-content .letter-body {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.8;
  color: #5a2830;
  margin-bottom: 20px;
}

.letter-modal-content .letter-closing {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--rose-dark);
  line-height: 1.7;
}

.letter-modal-content .letter-closing em {
  font-style: italic;
  color: #c9737a;
}

/* ============================================
   REPRODUCTOR DE MÚSICA (oculto)
   ============================================ */
.music-player {
  display: none !important;
}

.music-player.hidden {
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.music-player.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.music-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

/* Visualizador de ondas */
.music-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  flex-shrink: 0;
}

.music-visualizer span {
  display: block;
  width: 3px;
  background: var(--rose);
  border-radius: 2px;
  min-height: 3px;
}

.music-visualizer.playing span:nth-child(1) { animation: wave 0.7s ease-in-out infinite; }
.music-visualizer.playing span:nth-child(2) { animation: wave 0.9s ease-in-out infinite 0.1s; }
.music-visualizer.playing span:nth-child(3) { animation: wave 0.6s ease-in-out infinite 0.2s; }
.music-visualizer.playing span:nth-child(4) { animation: wave 0.8s ease-in-out infinite 0.05s; }
.music-visualizer.playing span:nth-child(5) { animation: wave 0.7s ease-in-out infinite 0.15s; }

.music-visualizer:not(.playing) span { height: 3px !important; }

@keyframes wave {
  0%, 100% { height: 3px; }
  50%       { height: 16px; }
}

.music-info {
  flex: 1;
  overflow: hidden;
}

.music-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(201,115,122,0.5);
  background: rgba(201,115,122,0.1);
  color: var(--rose-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.play-btn:hover {
  background: rgba(201,115,122,0.25);
  border-color: var(--rose);
}

.play-btn svg {
  width: 14px;
  height: 14px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--rose) 50%, rgba(255,255,255,0.15) 50%);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: var(--rose-light);
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--rose-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.volume-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================
   CORAZONES FLOTANTES
   ============================================ */
#floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -60px;
  font-size: 0.9rem;
  opacity: 0;
  animation: float-heart var(--dur) ease-out forwards;
}

@keyframes float-heart {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.6; }
  50%  { transform: translateY(-50vh) translateX(var(--drift)) rotate(15deg); opacity: 0.3; }
  100% { transform: translateY(-110vh) translateX(calc(var(--drift) * 1.5)) rotate(-10deg); opacity: 0; }
}

/* ============================================
   REVEAL ANIMATIONS (scroll)
   ============================================ */
.reveal,
.reveal-delay {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-smooth);
}

.reveal-delay { transition-delay: 0.15s; }

.reveal.is-visible,
.reveal-delay.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow visible override */
.section-eyebrow.is-visible { opacity: 0.85; }

/* ============================================
   UTILIDADES
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE: TABLET / DESKTOP
   ============================================ */
@media (min-width: 640px) {
  .counter-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .timeline {
    position: relative;
    padding: 0 0 0 40px;
  }

  .timeline-line {
    display: block;
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--rose), var(--rose), transparent);
    opacity: 0.3;
  }

  .timeline-dot {
    display: flex;
    position: absolute;
    left: -34px;
    top: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 0 10px rgba(201,115,122,0.5);
  }

  .timeline-dot--special {
    background: var(--gold);
    width: 12px;
    height: 12px;
    left: -35px;
    box-shadow: 0 0 14px rgba(201,169,110,0.6);
  }

  .timeline-item { padding-left: 10px; }

  /* Sobre más grande en tablet */
  .envelope-scene { max-width: 360px; }
}

@media (min-width: 768px) {
  .section { padding: 100px 40px; }
  .music-player { max-width: 380px; }
}

/* ============================================
   NAVEGACIÓN POR PUNTOS (lateral derecha)
   Solo visible en desktop — oculta en móvil
   ============================================ */
.section-nav {
  display: none; /* oculta por defecto en móvil */
}

@media (min-width: 768px) {
  .section-nav {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }

  .section-nav.visible {
    opacity: 1;
    pointer-events: all;
  }
}

.nav-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  /* área táctil generosa en móvil */
  padding: 4px 0 4px 24px;
}

.nav-dot-inner {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(201,115,122,0.3);
  transition:
    width      0.35s var(--ease-spring),
    height     0.35s var(--ease-spring),
    background 0.35s ease,
    box-shadow 0.35s ease;
  flex-shrink: 0;
}

/* Etiqueta que aparece al hover */
.nav-dot-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

/* Hover: mostrar etiqueta */
.nav-dot:hover .nav-dot-label,
.nav-dot:focus .nav-dot-label {
  opacity: 1;
  transform: translateX(0);
}

/* Dot activo */
.nav-dot.active .nav-dot-inner {
  width: 9px;
  height: 9px;
  background: var(--rose);
  border-color: var(--rose);
  box-shadow: 0 0 10px rgba(201,115,122,0.5);
}

.nav-dot.active .nav-dot-label {
  color: var(--rose-light);
}