/* ============================================
   INVITACION DE BODA - Victor & Leticia
   Estilos y Animaciones
   ============================================ */

/* ---------- Variables ---------- */
:root {
  --gold: #C9A84C;
  --gold-light: #D4B96A;
  --gold-dark: #A8893A;
  --champagne: #F5E6CC;
  --cream: #FFF8F0;
  --dark: #2C2C2C;
  --dark-soft: #4A4A4A;
  --envelope-body: #D4A574;
  --envelope-flap: #C4955A;
  --envelope-inner: #E8CBA8;
  --seal-red: #8B2500;
  --seal-red-light: #A83A1A;

  --font-cursive: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  background-color: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   PANTALLA DEL SOBRE
   ============================================ */
#envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--champagne) 50%, #EDD9B7 100%);
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#envelope-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(201, 168, 76, 0.05) 0%, transparent 45%);
  pointer-events: none;
}

#envelope-screen.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* ---------- El Sobre (Realista 3D) ---------- */
.envelope {
  position: relative;
  width: 300px;
  height: 210px;
  perspective: 1000px;
  transition: transform 0.5s ease;
  transform: rotateX(4deg) rotateY(-1deg);
}

.envelope:hover {
  transform: rotateX(1deg) rotateY(0deg) scale(1.03) translateY(-6px);
}

/* Sombra proyectada en la "mesa" */
.envelope-shadow {
  position: absolute;
  bottom: -22px;
  left: 4%;
  width: 92%;
  height: 36px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.1) 40%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  filter: blur(8px);
  transition: all 0.5s ease;
}

.envelope:hover .envelope-shadow {
  bottom: -28px;
  filter: blur(12px);
  opacity: 0.7;
}

/* Interior del sobre (se ve al abrir la solapa) */
.envelope-interior {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  background: linear-gradient(180deg, #BF9960 0%, #C8A470 50%, #D4AD78 100%);
  clip-path: polygon(0 30%, 50% 0%, 100% 30%, 100% 100%, 0 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}

.envelope.opening .envelope-interior {
  opacity: 1;
}

.envelope-interior-pattern {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 8px,
      rgba(201, 168, 76, 0.08) 8px,
      rgba(201, 168, 76, 0.08) 9px
    );
  clip-path: polygon(0 30%, 50% 0%, 100% 30%, 100% 100%, 0 100%);
}

/* Cuerpo del sobre (parte frontal) */
.envelope-body {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg, #E8D5B8 0%, #DECCA8 20%, #D4C49A 50%, #CCBA90 80%, #C4B088 100%);
  border-radius: 4px;
  z-index: 5;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Textura de papel (fibras sutiles) */
.paper-texture {
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

/* Borde dorado fino en el sobre */
.envelope-gold-edge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 5%,
    rgba(201, 168, 76, 0.3) 20%,
    rgba(201, 168, 76, 0.5) 50%,
    rgba(201, 168, 76, 0.3) 80%,
    transparent 95%
  );
}

/* Pliegues diagonales visibles (marcas de doblado del sobre) */
.envelope-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    /* Pliegue diagonal izquierdo */
    linear-gradient(to top right,
      transparent 46%,
      rgba(0,0,0,0.04) 48%,
      rgba(0,0,0,0.09) 49.4%,
      rgba(255,255,255,0.06) 50.6%,
      rgba(255,255,255,0.03) 52%,
      transparent 54%
    ),
    /* Pliegue diagonal derecho */
    linear-gradient(to top left,
      transparent 46%,
      rgba(0,0,0,0.04) 48%,
      rgba(0,0,0,0.09) 49.4%,
      rgba(255,255,255,0.06) 50.6%,
      rgba(255,255,255,0.03) 52%,
      transparent 54%
    ),
    /* Bordes laterales */
    linear-gradient(90deg, rgba(0,0,0,0.03) 0%, transparent 3%, transparent 97%, rgba(0,0,0,0.03) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.04) 0%, transparent 8%);
  pointer-events: none;
}

/* Sombra sutil diagonal (como luz de ventana) */
.envelope-body::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.08) 70%, rgba(255,255,255,0.12) 100%);
  pointer-events: none;
}

/* Solapas laterales (se ven como pliegues bajo el cuerpo) */
.envelope-flap-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 55%;
  height: 62%;
  background: linear-gradient(90deg, #C8B48A 0%, #D0BC92 30%, #D8C89E 100%);
  clip-path: polygon(0 0, 0 100%, 100% 100%, 0% 0%);
  z-index: 3;
}

.envelope-flap-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 62%;
  background: linear-gradient(270deg, #C8B48A 0%, #D0BC92 30%, #D8C89E 100%);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  z-index: 3;
}

/* Lineas de pliegue en solapas laterales */
.envelope-flap-left::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.04) 0%, transparent 60%);
  clip-path: polygon(0 0, 0 100%, 100% 100%, 0% 0%);
}

.envelope-flap-right::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(225deg, rgba(0,0,0,0.04) 0%, transparent 60%);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Solapa inferior */
.envelope-flap-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(0deg, #C4B088 0%, #CCBA92 40%, #D4C49C 100%);
  clip-path: polygon(0 100%, 50% 0%, 100% 100%);
  z-index: 4;
}

.envelope-flap-bottom::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.02) 0%, transparent 50%);
  clip-path: polygon(0 100%, 50% 0%, 100% 100%);
}

/* Solapa superior (se abre con animacion 3D) */
.envelope-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, #D8C89E 0%, #D0C096 30%, #C8B68E 60%, #C0AE86 100%);
  clip-path: polygon(0 0, 50% 75%, 100% 0);
  z-index: 10;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1),
              z-index 0s linear 0.8s;
}

/* Forro interior de la solapa (se ve al girar) */
.flap-liner {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #BF9960 0%, #C8A470 50%, #B89058 100%);
  clip-path: polygon(0 0, 50% 75%, 100% 0);
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

/* Borde de pliegue en la solapa */
.envelope-flap-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 20%),
    linear-gradient(180deg, transparent 90%, rgba(0,0,0,0.06) 100%);
  clip-path: polygon(0 0, 50% 75%, 100% 0);
  pointer-events: none;
}

/* Animacion de apertura de la solapa */
.envelope.opening .envelope-flap-top {
  transform: rotateX(-180deg);
  z-index: 0;
}

/* Carta dentro del sobre */
.envelope-letter {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 82%;
  height: 65%;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF9F0 50%, #FFFDF8 100%);
  border-radius: 4px;
  z-index: 2;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.08),
    0 0 0 0.5px rgba(0,0,0,0.05);
  overflow: hidden;
  opacity: 0;
}

.letter-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px;
}

.letter-ornament-top,
.letter-ornament-bottom {
  color: var(--gold);
  font-size: 10px;
  opacity: 0.5;
  line-height: 1;
}

.letter-invite-text {
  font-family: var(--font-sans);
  font-size: 5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark-soft);
  opacity: 0.7;
  margin-bottom: 2px;
}

.letter-preview-text {
  font-family: var(--font-cursive);
  font-size: 18px;
  color: var(--gold);
  line-height: 1;
}

.letter-preview-date {
  font-family: var(--font-sans);
  font-size: 6px;
  letter-spacing: 0.2em;
  color: var(--dark-soft);
  opacity: 0.6;
  margin-top: 2px;
}

/* Borde dorado decorativo en la carta */
.envelope-letter::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 0.5px solid rgba(201, 168, 76, 0.25);
  border-radius: 3px;
  pointer-events: none;
}

/* Textura de papel de la carta */
.envelope-letter::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.01) 0%, transparent 5%, transparent 95%, rgba(0,0,0,0.01) 100%);
  pointer-events: none;
}

/* La carta sale del sobre */
.envelope.opening .envelope-letter {
  z-index: 12;
  animation: letterSlideOut 2.2s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
}

@keyframes letterSlideOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-115%);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  }
}

/* Carta centrada en pantalla (fase expansion) */
.envelope-letter.centered {
  position: fixed !important;
  transition: top 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              left 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              width 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              height 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 1.5s ease,
              box-shadow 1.5s ease;
}

/* Sobre se desvanece durante expansion */
.envelope.expanding {
  transition: opacity 1s ease;
  opacity: 0;
}

/* Pantalla se desvanece al final */
#envelope-screen.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}

/* ---------- Sello de Lacre (Realista) ---------- */
.wax-seal {
  position: absolute;
  bottom: 38%;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  z-index: 11;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Sello dorado siguiendo la estetica de la pagina */
  background:
    radial-gradient(circle at 35% 30%, #DCCA7C 0%, #D4B96A 25%, #C9A84C 50%, #A8893A 75%, #8B7530 100%);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 230, 160, 0.3),
    inset 0 -3px 6px rgba(100, 75, 30, 0.35);
  animation: sealPulse 2.5s ease-in-out infinite;
  transition: opacity 1s ease, transform 1s ease;
}

/* Anillo exterior del sello (borde en relieve) */
.seal-outer-ring {
  position: absolute;
  inset: 3px;
  border: 1.5px solid rgba(255, 240, 180, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

/* Anillo interior */
.seal-inner-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 240, 180, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

/* Gotas de cera (forma irregular del sello) */
.seal-drips {
  position: absolute;
  inset: -6px;
  pointer-events: none;
}

.drip {
  position: absolute;
  background: radial-gradient(circle, #C9A84C, #A8893A);
  border-radius: 50%;
  box-shadow: inset 0 -1px 2px rgba(80,60,20,0.25);
}

.drip-1 {
  width: 10px;
  height: 8px;
  top: 3px;
  left: -1px;
  border-radius: 60% 40% 50% 50%;
}

.drip-2 {
  width: 8px;
  height: 10px;
  bottom: 0px;
  right: 4px;
  border-radius: 50% 50% 40% 60%;
}

.drip-3 {
  width: 9px;
  height: 7px;
  top: 8px;
  right: -2px;
  border-radius: 50% 60% 50% 40%;
}

.drip-4 {
  width: 7px;
  height: 9px;
  bottom: 5px;
  left: 2px;
  border-radius: 40% 50% 60% 50%;
}

.drip-5 {
  width: 8px;
  height: 6px;
  top: -1px;
  right: 14px;
  border-radius: 50% 50% 40% 40%;
}

/* Brillo del sello */
.seal-shine {
  position: absolute;
  top: 6px;
  left: 10px;
  width: 18px;
  height: 10px;
  background: radial-gradient(ellipse, rgba(255, 240, 180, 0.4), transparent);
  border-radius: 50%;
  transform: rotate(-25deg);
  pointer-events: none;
}

.seal-text {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 245, 210, 0.9);
  text-shadow:
    0 1px 1px rgba(80, 60, 20, 0.5),
    0 -1px 0 rgba(255, 240, 180, 0.2);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.envelope.opening .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
}

@keyframes sealPulse {
  0%, 100% {
    box-shadow:
      0 3px 8px rgba(0, 0, 0, 0.35),
      0 1px 3px rgba(0, 0, 0, 0.2),
      inset 0 2px 4px rgba(255, 230, 160, 0.3),
      inset 0 -3px 6px rgba(100, 75, 30, 0.35),
      0 0 0 0 rgba(201, 168, 76, 0);
  }
  50% {
    box-shadow:
      0 3px 8px rgba(0, 0, 0, 0.35),
      0 1px 3px rgba(0, 0, 0, 0.2),
      inset 0 2px 4px rgba(255, 230, 160, 0.3),
      inset 0 -3px 6px rgba(100, 75, 30, 0.35),
      0 0 15px 6px rgba(201, 168, 76, 0.25);
  }
}

/* ---------- Texto "Toca para abrir" ---------- */
.tap-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: tapFade 2s ease-in-out infinite;
}

@keyframes tapFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================
   PAJAROS ANIMADOS
   ============================================ */
.birds-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.birds-container.hidden {
  display: none;
}

.bird {
  position: absolute;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Pajaro SVG (loro colorido) */
.bird svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Aleteo de las alas via CSS en el SVG */
.bird .wing {
  transform-origin: 50% 100%;
  animation: flapWing 0.35s ease-in-out infinite alternate;
}

.bird .wing-right {
  transform-origin: 50% 100%;
  animation: flapWingR 0.35s ease-in-out infinite alternate;
}

@keyframes flapWing {
  0% { transform: rotate(30deg) scaleY(1); }
  100% { transform: rotate(-20deg) scaleY(0.9); }
}

@keyframes flapWingR {
  0% { transform: rotate(-30deg) scaleY(1); }
  100% { transform: rotate(20deg) scaleY(0.9); }
}

/* Variaciones de tamano */
.bird.size-sm svg { width: 42px; height: 34px; }
.bird.size-md svg { width: 58px; height: 46px; }
.bird.size-lg svg { width: 76px; height: 60px; }

/* Vuelo de izquierda a derecha */
@keyframes flyAcrossLR {
  0% {
    transform: translate(-60px, 0) scale(0.8);
    opacity: 0;
  }
  5% { opacity: 0.7; }
  50% {
    transform: translate(50vw, var(--drift-y, -30px)) scale(1);
    opacity: 0.7;
  }
  95% { opacity: 0.5; }
  100% {
    transform: translate(105vw, var(--end-y, -20px)) scale(0.7);
    opacity: 0;
  }
}

/* Vuelo de derecha a izquierda */
@keyframes flyAcrossRL {
  0% {
    transform: translate(105vw, 0) scaleX(-1) scale(0.8);
    opacity: 0;
  }
  5% { opacity: 0.7; }
  50% {
    transform: translate(50vw, var(--drift-y, -30px)) scaleX(-1) scale(1);
    opacity: 0.7;
  }
  95% { opacity: 0.5; }
  100% {
    transform: translate(-60px, var(--end-y, -20px)) scaleX(-1) scale(0.7);
    opacity: 0;
  }
}

/* Vuelo curvo ascendente */
@keyframes flyCurveUp {
  0% {
    transform: translate(-60px, 0) scale(0.6);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  40% {
    transform: translate(30vw, -15vh) scale(0.9);
  }
  70% {
    transform: translate(65vw, -25vh) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(105vw, -35vh) scale(0.7);
    opacity: 0;
  }
}

/* ============================================
   FOTO HERO FULLSCREEN
   ============================================ */
.section-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Overlay oscuro con gradiente para legibilidad del texto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.0) 40%,
    rgba(0, 0, 0, 0.25) 70%,
    rgba(0, 0, 0, 0.55) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5rem;
}

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

.hero-names {
  font-family: var(--font-cursive);
  font-size: 3rem;
  color: white;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-date {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.3em;
  margin-top: 0.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* Indicador de scroll */
.hero-scroll-hint {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ============================================
   CONTENIDO DE LA CARTA
   ============================================ */
.letter-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
  background: var(--cream);
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1s ease;
  overflow: hidden;
}

/* Padding interior para todo excepto el hero */
.letter-content > *:not(.section-hero) {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.letter-content.visible {
  opacity: 1;
}

.letter-content.hidden {
  display: none;
}

/* ---------- Encabezado / Monograma ---------- */
.letter-header {
  text-align: center;
  padding: 1rem 0 2rem;
}

.monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.monogram-letter {
  font-family: var(--font-cursive);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
}

.monogram-amp {
  font-family: var(--font-cursive);
  font-size: 2.5rem;
  color: var(--gold-light);
  line-height: 1;
  padding: 0 0.3rem;
}

/* ---------- Ornamentos SVG ---------- */
.ornament-svg {
  width: 160px;
  height: 16px;
  display: block;
  margin: 0 auto;
  opacity: 0.6;
}

.ornament-top,
.ornament-bottom {
  display: flex;
  justify-content: center;
}

/* ---------- Titulo "Nos Casamos" ---------- */
.section-title {
  text-align: center;
  padding: 1rem 0 2rem;
}

.main-title {
  font-family: var(--font-cursive);
  font-size: 3.5rem;
  color: var(--gold);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* ---------- Separadores ---------- */
.separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.5rem 0;
}

.separator.small {
  margin: 1.5rem auto;
  max-width: 200px;
}

.sep-line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-section.visible .sep-line,
.separator.fade-in-section.visible .sep-line {
  animation: lineGrow 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineGrow {
  from { width: 0; }
  to { width: 60px; }
}

.separator.small .fade-in-section.visible .sep-line,
.separator.small.fade-in-section.visible .sep-line {
  animation: lineGrowSmall 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineGrowSmall {
  from { width: 0; }
  to { width: 40px; }
}

.sep-diamond {
  transition: transform 0.5s ease;
}

.fade-in-section.visible .sep-diamond {
  animation: diamondSpin 0.8s ease forwards;
}

@keyframes diamondSpin {
  from { transform: rotate(0deg) scale(0); }
  to { transform: rotate(360deg) scale(1); }
}

.separator.small .sep-line {
  width: 40px;
}

.sep-diamond:not(.animated) {
  color: var(--gold);
  font-size: 0.6rem;
  opacity: 0.7;
}

/* ---------- Nombres ---------- */
.section-names {
  text-align: center;
  padding: 1rem 0 2rem;
}

.groom-name,
.bride-name {
  font-family: var(--font-cursive);
  font-size: 2.4rem;
  color: var(--dark);
  font-weight: 400;
  line-height: 1.3;
}

.names-and {
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  color: var(--gold);
  margin: 0.3rem 0;
}

/* ---------- Mensaje personal ---------- */
.section-message {
  text-align: center;
  padding: 1rem 0 2rem;
}

.personal-message {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--dark-soft);
  line-height: 1.8;
  max-width: 420px;
  margin: 0 auto;
}

/* ---------- Fecha ---------- */
.section-date {
  text-align: center;
  padding: 2rem 0;
}

.date-icon {
  margin-bottom: 1rem;
}

.date-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark-soft);
  margin-bottom: 0.3rem;
}

.date-day {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin: 0.2rem 0;
}

.date-month {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
}

.date-time {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--dark-soft);
  margin-top: 0.8rem;
  letter-spacing: 0.05em;
}

/* ---------- Lugar ---------- */
.section-venue {
  text-align: center;
  padding: 2rem 0;
}

.venue-icon {
  margin-bottom: 1rem;
}

.venue-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.venue-location {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}

/* Mapa embebido */
.venue-map-wrapper {
  margin: 1.2rem auto;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1.5px solid rgba(201, 168, 76, 0.25);
}

.venue-map {
  display: block;
  width: 100%;
  height: 250px;
  border: none;
}

.venue-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--gold);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.venue-map-link:hover {
  background: var(--gold);
  color: white;
}

/* ---------- Timeline ---------- */
.section-timeline {
  text-align: center;
  padding: 2.5rem 0;
}

.timeline-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.timeline {
  position: relative;
  max-width: 400px;
  margin: 2rem auto 0;
  padding: 1rem 0;
}

/* Linea vertical central (animada) */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
  opacity: 0.4;
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.section-timeline.line-visible::before {
  transform: translateX(-50%) scaleY(1);
}

/* Cada evento */
.tl-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
}

.tl-item:last-child {
  margin-bottom: 0;
}

/* Icono en el centro */
.tl-icon {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border: 1.5px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  color: var(--gold);
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tl-item.fade-in-section.visible .tl-icon {
  animation: iconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes iconPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.tl-icon svg {
  width: 28px;
  height: 28px;
}

/* Contenido texto */
.tl-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.tl-time {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
}

.tl-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
}

.tl-sublabel {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--dark-soft);
  letter-spacing: 0.05em;
}

/* Izquierda: contenido - icono */
.tl-left {
  flex-direction: row;
}

.tl-left .tl-content {
  text-align: right;
  padding-right: 1rem;
}

.tl-left .tl-icon {
  order: 2;
}

.tl-left .tl-content {
  order: 1;
}

/* Pseudo-elemento invisible para balance */
.tl-left::after {
  content: '';
  flex: 1;
  order: 3;
}

/* Derecha: icono - contenido */
.tl-right {
  flex-direction: row;
}

.tl-right .tl-content {
  text-align: left;
  padding-left: 1rem;
}

/* Pseudo-elemento invisible para balance */
.tl-right::before {
  content: '';
  flex: 1;
}

/* ---------- Hotel / Alojamiento ---------- */
.section-hotel {
  text-align: center;
  padding: 2.5rem 0;
}

.hotel-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.hotel-intro {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.8;
  max-width: 420px;
  margin: 1rem auto 1.5rem;
}

.hotel-intro strong {
  color: var(--dark);
  font-weight: 600;
}

/* Galeria del hotel */
.hotel-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.hotel-photo {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
}

.hotel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-photo.placeholder {
  background: linear-gradient(135deg, var(--champagne), #EDE0CC);
  border: 1.5px dashed var(--gold-light);
}

.hotel-photo .placeholder-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  opacity: 0.5;
}

.hotel-photo .placeholder-inner span {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--dark-soft);
  letter-spacing: 0.1em;
}

/* Caracteristicas del hotel */
.hotel-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.hotel-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 100px;
}

.hotel-feature span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dark-soft);
  letter-spacing: 0.03em;
  text-align: center;
}

/* ---------- Cuenta atras ---------- */
.section-countdown {
  text-align: center;
  padding: 2.5rem 0;
  background: linear-gradient(180deg, transparent, rgba(201, 168, 76, 0.06), transparent);
  margin: 1rem -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.countdown-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  padding: 0.8rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.15);
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gold-dark);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--dark-soft);
}

/* ---------- Galeria ---------- */
.section-gallery {
  text-align: center;
  padding: 2.5rem 0;
}

.gallery-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* Mosaico moderno con formas variadas */
.gallery-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: calc((50vw - 2.4rem) / 1);
  grid-auto-flow: dense;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Formas variadas */
.gi-tall {
  grid-row: span 2;
  border-radius: 20px;
}

.gi-wide {
  grid-column: span 2;
  grid-row: span 2;
  border-radius: 20px;
}

.gi-square {
  border-radius: 16px;
}

/* Bordes decorativos alternados */
.gallery-item:nth-child(1) { border-radius: 20px 8px 20px 8px; }
.gallery-item:nth-child(2) { border-radius: 8px 20px 8px 20px; }
.gallery-item:nth-child(3) { border-radius: 12px; }
.gallery-item:nth-child(4) { border-radius: 20px 8px 20px 8px; }
.gallery-item:nth-child(5) { border-radius: 8px 20px 8px 20px; }
.gallery-item:nth-child(6) { border-radius: 20px; }

/* ---------- Confirmar asistencia ---------- */
.section-rsvp {
  text-align: center;
  padding: 2.5rem 0;
}

.rsvp-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.rsvp-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.rsvp-text strong {
  color: var(--dark);
  font-weight: 600;
}

.rsvp-button {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.35);
  transition: all 0.3s ease;
  cursor: pointer;
}

.rsvp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
}

.rsvp-button:active {
  transform: translateY(0);
}

.rsvp-button.hidden {
  display: none;
}

/* ---------- Formulario RSVP ---------- */
.rsvp-form-wrapper {
  max-width: 420px;
  margin: 1.5rem auto 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.4s ease;
}

.rsvp-form-wrapper.hidden {
  display: none;
}

.rsvp-form {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.15);
  text-align: left;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group.hidden {
  display: none;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--dark);
  background: var(--cream);
  border: 1.5px solid rgba(201, 168, 76, 0.25);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.form-input::placeholder {
  color: #B0A898;
  font-weight: 300;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C9A84C' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Radio buttons personalizados */
.form-radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.3rem;
}

.form-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--dark-soft);
  cursor: pointer;
  position: relative;
}

.form-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(201, 168, 76, 0.4);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.form-radio input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--gold);
}

.form-radio input[type="radio"]:checked ~ .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

/* Campos condicionales - animacion */
.rsvp-fields {
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

.rsvp-fields.hidden {
  display: none;
}

.rsvp-no-fields {
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

.rsvp-no-fields.hidden {
  display: none;
}

/* Aviso DNI/Pasaporte hotel */
.form-notice {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--gold-dark);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  line-height: 1.5;
}

.hotel-notice.hidden {
  display: none;
}

/* Boton de enviar */
.rsvp-submit {
  display: block;
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
  transition: all 0.3s ease;
}

.rsvp-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
}

.rsvp-submit:active {
  transform: translateY(0);
}

.rsvp-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Mensaje de exito */
.rsvp-success {
  max-width: 420px;
  margin: 1.5rem auto 0;
  background: white;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(107, 143, 94, 0.2);
  text-align: center;
  animation: fadeInUp 0.5s ease forwards;
}

.rsvp-success.hidden {
  display: none;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #6B8F5E, #4A7040);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  line-height: 1;
}

.success-text {
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  color: #4A7040;
  margin-bottom: 0.5rem;
}

.success-subtext {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.6;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Animacion de puertas ---------- */
.doors-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  pointer-events: none;
}

.doors-overlay.hidden {
  display: none;
}

.door {
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.door-panel {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #3B2F20 0%, #4A3C2C 20%, #3B2F20 40%, #4A3C2C 60%, #3B2F20 80%, #4A3C2C 100%);
  position: relative;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.4);
}

/* Textura madera */
.door-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 20px,
      rgba(255,255,255,0.02) 20px,
      rgba(255,255,255,0.02) 21px
    ),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 47px,
      rgba(0,0,0,0.05) 47px,
      rgba(0,0,0,0.05) 48px
    );
}

/* Marco de la puerta */
.door-frame {
  position: absolute;
  inset: 20px;
  border: 3px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
}

.door-frame::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 2px;
}

/* Tirador */
.door-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 40px;
  background: linear-gradient(180deg, #D4B96A, #A8893A, #D4B96A);
  border-radius: 6px;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.3),
    inset 0 1px 2px rgba(255,255,255,0.3);
}

.door-left .door-handle {
  right: 35px;
}

.door-right .door-handle {
  left: 35px;
}

/* Animacion de apertura */
.door-left .door-panel {
  transform-origin: left center;
  animation: doorOpenLeft 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.door-right .door-panel {
  transform-origin: right center;
  animation: doorOpenRight 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes doorOpenLeft {
  0% { transform: perspective(1200px) rotateY(0deg); }
  100% { transform: perspective(1200px) rotateY(-105deg); }
}

@keyframes doorOpenRight {
  0% { transform: perspective(1200px) rotateY(0deg); }
  100% { transform: perspective(1200px) rotateY(105deg); }
}

/* ---------- Regalos ---------- */
.section-gifts {
  text-align: center;
  padding: 2.5rem 0;
}

.gifts-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.gifts-icon {
  margin: 1rem 0;
}

.gifts-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.8;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.bank-details {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 2;
}

.bank-details strong {
  color: var(--gold-dark);
  font-weight: 500;
}

/* ---------- Acordeon (FAQ + Regalos) ---------- */
.accordion-item {
  max-width: 420px;
  margin: 0 auto 0.5rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: rgba(201, 168, 76, 0.05);
}

.accordion-arrow {
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1.2rem 1rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.7;
}

.accordion-body.hidden {
  display: none;
}

/* ---------- Album compartido ---------- */
.section-album {
  text-align: center;
  padding: 2.5rem 0;
}

.album-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.album-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark-soft);
  line-height: 1.8;
  max-width: 380px;
  margin: 1rem auto 1.5rem;
}

.album-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.album-qr canvas {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 12px;
  background: white;
}

.album-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--gold);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.album-link:hover {
  background: var(--gold);
  color: white;
}

/* ---------- Preguntas frecuentes ---------- */
.section-faq {
  text-align: center;
  padding: 2.5rem 0;
}

.faq-title {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.faq-list {
  margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.letter-footer {
  text-align: center;
  padding: 2rem 0 3rem;
}

.footer-names {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--gold);
  margin: 1rem 0 0.3rem;
}

.footer-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--dark-soft);
  margin-bottom: 1rem;
}

/* ============================================
   BOTON DE MUSICA
   ============================================ */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(255, 248, 240, 0.95);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.music-toggle:hover {
  background: var(--gold);
  color: white;
}

.music-toggle.hidden {
  display: none;
}

.music-toggle .music-icon-off {
  display: none;
}

.music-toggle.paused .music-icon-on {
  display: none;
}

.music-toggle.paused .music-icon-off {
  display: block;
}

/* ============================================
   ANIMACIONES DE SCROLL (fade-in mejorado)
   ============================================ */
.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.8s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variaciones de direccion para items alternos del timeline */
.tl-left.fade-in-section {
  transform: translateX(-50px) translateY(25px);
  transition: opacity 1.8s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-right.fade-in-section {
  transform: translateX(50px) translateY(25px);
  transition: opacity 1.8s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-left.fade-in-section.visible,
.tl-right.fade-in-section.visible {
  transform: translateX(0) translateY(0);
}

/* Delay escalonado para la galeria */
.gallery-mosaic .fade-in-section:nth-child(1) { transition-delay: 0s; }
.gallery-mosaic .fade-in-section:nth-child(2) { transition-delay: 0.2s; }
.gallery-mosaic .fade-in-section:nth-child(3) { transition-delay: 0.4s; }
.gallery-mosaic .fade-in-section:nth-child(4) { transition-delay: 0.6s; }
.gallery-mosaic .fade-in-section:nth-child(5) { transition-delay: 0.8s; }
.gallery-mosaic .fade-in-section:nth-child(6) { transition-delay: 1s; }

/* Efecto escala sutil para fotos al aparecer */
.gallery-item.fade-in-section {
  transform: translateY(40px) scale(0.88);
  transition: opacity 2s ease, transform 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item.fade-in-section.visible {
  transform: translateY(0) scale(1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (min-width: 480px) {
  .envelope {
    width: 360px;
    height: 250px;
  }

  .wax-seal {
    width: 68px;
    height: 68px;
  }

  .seal-text {
    font-size: 15px;
  }

  .letter-preview-text {
    font-size: 26px;
  }

  .hero-names {
    font-size: 3.5rem;
  }

  .main-title {
    font-size: 4rem;
  }

  .monogram-letter {
    font-size: 5rem;
  }

  .gallery-mosaic {
    grid-auto-rows: calc((50vw - 2.7rem) / 1);
  }

  .countdown-number {
    font-size: 3rem;
  }

  .countdown-item {
    min-width: 85px;
  }

  .venue-map {
    height: 300px;
  }

  .letter-content > *:not(.section-hero) {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Desktop */
@media (min-width: 768px) {
  .envelope {
    width: 420px;
    height: 295px;
  }

  .wax-seal {
    width: 76px;
    height: 76px;
  }

  .seal-text {
    font-size: 17px;
  }

  .letter-preview-text {
    font-size: 30px;
  }

  .hero-names {
    font-size: 4rem;
  }

  .main-title {
    font-size: 4.5rem;
  }

  .groom-name,
  .bride-name {
    font-size: 2.8rem;
  }

  .date-day {
    font-size: 6rem;
  }

  .venue-map {
    height: 350px;
  }

  .gallery-mosaic {
    grid-auto-rows: 260px;
  }
}
