/* ===================================================================
   HOJA DE ESTILOS PERSONALIZADA - INVITACIÓN ROBERTO & ADRIANA
   Diseño de Alta Costura Digital, Microinteracciones y 60fps
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --color-gold: #d4af37;
  --color-gold-light: #f4e0ad;
  --color-gold-dark: #b38f28;
  --color-gold-sand: #e6ca85;
  --color-ivory: #fdfbf7;
  --color-ivory-soft: #f7f4ec;
  --color-dark-bg: #0d1410;
  --color-dark-card: #152019;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tipografías base */
body {
  font-family: var(--font-sans);
  background-color: var(--color-dark-bg);
  color: #2b2b2b;
  overflow-x: hidden;
}

.font-serif-title {
  font-family: var(--font-serif);
}

.font-editorial {
  font-family: var(--font-editorial);
}

.font-script {
  font-family: var(--font-script);
}

.font-sans-clean {
  font-family: var(--font-sans);
}

/* Scrollbar estética */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #0d1410;
}
::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f4e0ad;
}

/* ===================================================================
   1. PANTALLA DE INICIO (TARJETA SOBRE FLOTANTE 3D)
   =================================================================== */
#welcome-overlay {
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease;
  will-change: opacity, visibility;
}

#welcome-overlay.hidden-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-card {
  position: relative;
  background-color: var(--color-ivory);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 1.75rem;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(212, 175, 55, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  padding: 2.5rem 1.75rem;
  max-width: 25rem;
  width: 90%;
  animation: floatEnvelope 4s ease-in-out infinite alternate;
}

@media (min-width: 640px) {
  .envelope-card {
    padding: 3rem 2.25rem;
    max-width: 27rem;
  }
}

@keyframes floatEnvelope {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-8px) rotate(0.3deg);
  }
}

/* Círculo dorado de iniciales */
.gold-initials-ring {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 9999px;
  border: 2px solid var(--color-gold);
  background: radial-gradient(circle, rgba(253, 251, 247, 1) 0%, rgba(247, 241, 227, 0.7) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  position: relative;
}

.gold-initials-ring::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  border: 1px dashed rgba(212, 175, 55, 0.5);
}

/* Botón circular de apertura */
.btn-open-envelope {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e6ca85 0%, #d4af37 50%, #b38f28 100%);
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-open-envelope:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.6);
  color: #000;
}

.btn-open-envelope:active {
  transform: scale(0.96);
}

/* ===================================================================
   2. REGLA DE ENCUADRE DE FONDOS (AJUSTE COMPLETO AL BLOQUE EN CELULAR Y PC)
   =================================================================== */
.bg-section-cover {
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-color: var(--color-dark-bg);
}

@media (max-width: 768px) {
  .bg-section-cover {
    background-position: center 10% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
}

.hero-bg-container {
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ===================================================================
   3. SISTEMA DE PARTÍCULAS DORADAS FLOTANTES
   =================================================================== */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ===================================================================
   4. CONTROL DE AUDIO FLOTANTE
   =================================================================== */
.music-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(18, 24, 21, 0.85);
  backdrop-filter: blur(8px);
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.3);
  z-index: 50;
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-button:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
  color: #fff;
}

.music-button.is-playing i {
  animation: spinSlow 5s linear infinite;
}

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

/* Efecto ondas sonoras */
.music-wave {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1px solid var(--color-gold);
  opacity: 0;
  pointer-events: none;
}

.music-button.is-playing .music-wave {
  animation: wavePulse 2s infinite ease-out;
}

@keyframes wavePulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* ===================================================================
   5. LÍNEA DE TIEMPO LINEAL (ITINERARIO VERTICAL ANIMADO)
   =================================================================== */
.timeline-track {
  position: relative;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.75rem;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-gold) 15%, var(--color-gold) 85%, transparent);
  transform: translateX(-50%);
}

@media (min-width: 768px) {
  .timeline-track::before {
    left: 50%;
  }
}

.timeline-node {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.timeline-node.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   6. MASONRY GALLERY (SIN RECORTES)
   =================================================================== */
.masonry-container {
  column-gap: 1.25rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.45);
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ===================================================================
   7. FORMULARIO RSVP DE CONFIRMACIÓN
   =================================================================== */
.rsvp-card {
  background: rgba(18, 26, 21, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 2rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px rgba(212, 175, 55, 0.15);
}

.input-underline {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.45);
  padding: 0.75rem 0.25rem;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-underline:focus {
  border-bottom-color: var(--color-gold-light);
  box-shadow: 0 2px 0 0 var(--color-gold);
}

.input-underline::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* Select desplegable con estilo */
select.input-underline {
  cursor: pointer;
  background-color: #121a15;
}

select.input-underline option {
  background-color: #121a15;
  color: #ffffff;
  padding: 0.5rem;
}

/* Botón Píldora WhatsApp */
.btn-whatsapp-rsvp {
  background: linear-gradient(135deg, #e6ca85 0%, #d4af37 50%, #b38f28 100%);
  color: #0b120e;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 1rem 2.25rem;
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-whatsapp-rsvp:hover {
  background: linear-gradient(135deg, #f4e0ad 0%, #e6ca85 50%, #d4af37 100%);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.55);
  transform: translateY(-2px);
}

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

/* ===================================================================
   8. FOOTER / CRÉDITOS Y CAPTACIÓN
   =================================================================== */
.footer-link {
  position: relative;
  color: var(--color-gold);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--color-gold-light);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.footer-link:hover {
  color: var(--color-gold-light);
}

.footer-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===================================================================
   9. ELEMENTOS GENERALES CON ANIMACIÓN FADE-UP EN SCROLL
   =================================================================== */
.fade-up-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.fade-up-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   10. LIGHTBOX MODAL PARA FOTOGRAFÍAS
   =================================================================== */
#lightbox-modal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}
