/* styles.css - Estilos Premium para Invitación Digital XV Audrey */

/* Importación de tipografías desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --color-negro: #0A0A0A;
  --color-carbon: #121212;
  --color-dorado: #D4AF37;
  --color-dorado-brillo: #F3E5AB;
  --color-rojo: #8B0000;
  --color-rojo-brillante: #C8102E;
  --color-marfil: #FCFBF7;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
  --font-script: 'Alex Brush', cursive;
}

body {
  background-color: var(--color-negro);
  color: #FFFFFF;
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* Tipografías personalizadas */
.font-serif-elegant {
  font-family: var(--font-serif);
}

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

/* --- Animación de Pantalla de Inicio / Sobre --- */
#welcome-screen {
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
  z-index: 9999;
}

.welcome-fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

/* Tarjeta Sobre Flotante */
.envelope-card {
  background-color: var(--color-marfil);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
              0 0 0 1px rgba(212, 175, 55, 0.15) inset;
  color: var(--color-negro);
  position: relative;
  overflow: hidden;
}

/* Efecto de Brillo Metálico Dorado */
.gold-gradient-text {
  background: linear-gradient(135deg, #B58A26 0%, #F5E093 25%, #B58A26 50%, #F5E093 75%, #A37A1A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-gradient-bg {
  background: linear-gradient(135deg, #B58A26 0%, #F5E093 30%, #D4AF37 50%, #F5E093 70%, #A37A1A 100%);
}

.gold-border {
  border-image: linear-gradient(135deg, #B58A26, #F5E093, #B58A26) 1;
}

/* Sello de lacre dorado */
.golden-seal {
  background: radial-gradient(circle, #F5E093 0%, #D4AF37 60%, #AA7C11 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15),
              inset 0 2px 4px rgba(255, 255, 255, 0.4),
              inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #F5E093;
}

/* --- Ajuste Crítico de Imágenes de Fondo (bg-contain bg-top) --- */
.custom-bg-section {
  background-position: top center;
  background-size: contain;
  background-repeat: no-repeat;
  position: relative;
  /* El color sólido del fondo rellenará el espacio restante abajo si el contenedor es más alto */
  background-color: var(--color-negro); 
}

/* Overlay elegante para legibilidad */
.dark-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.3) 0%, rgba(10, 10, 10, 0.8) 70%, rgba(10, 10, 10, 1) 100%);
  pointer-events: none;
}

.dark-overlay-full {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 10, 10, 0.65);
  pointer-events: none;
}

/* --- Sistema de Partículas Flotantes --- */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.particle {
  position: absolute;
  display: block;
  pointer-events: none;
  opacity: 0;
}

/* Animación de caída y oscilación */
@keyframes fall-and-sway {
  0% {
    transform: translateY(-10px) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

/* Diferentes tipos de partículas */
.particle-petal {
  background-color: var(--color-rojo-brillante);
  border-radius: 50% 0 50% 50%;
  width: 10px;
  height: 12px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.particle-sparkle {
  background: radial-gradient(circle, #FFF 10%, var(--color-dorado-brillo) 60%, transparent 100%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 8px #FFF, 0 0 12px var(--color-dorado);
}

/* --- Itinerario / Línea de Tiempo --- */
.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-dorado) 15%, var(--color-dorado) 85%, transparent);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .timeline-container::before {
    left: 20px;
    transform: none;
  }
}

/* Animación de aparición scroll (Reveal) */
.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Galería Masonry --- */
.gallery-img-container {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s;
}

.gallery-img-container:hover {
  transform: scale(1.03);
  border-color: var(--color-dorado);
}

.gallery-img-container img {
  transition: transform 0.6s ease;
}

.gallery-img-container:hover img {
  transform: scale(1.05);
}

/* --- Botón de Audio y Animación de Ondas --- */
#music-toggle-btn {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
              0 0 0 2px rgba(212, 175, 55, 0.2);
}

.music-wave {
  position: absolute;
  border: 2px solid var(--color-dorado);
  border-radius: 50%;
  inset: -4px;
  opacity: 0;
  pointer-events: none;
}

.music-playing .music-wave {
  animation: pulse-wave 2s infinite linear;
}

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

/* --- Entradas del Formulario RSVP --- */
.rsvp-input {
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 2px solid rgba(212, 175, 55, 0.2);
  transition: border-color 0.3s, background-color 0.3s;
}

.rsvp-input:focus {
  border-bottom-color: var(--color-dorado);
  background-color: rgba(255, 255, 255, 0.07);
  outline: none;
}

.rsvp-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* --- Micro-interacciones generales --- */
.btn-gold-pulse {
  position: relative;
  z-index: 1;
}

.btn-gold-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-dorado);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transform: scale(1);
  transition: transform 0.4s, opacity 0.4s;
}

.btn-gold-pulse:hover::after {
  transform: scale(1.05);
  opacity: 0.15;
}

/* Contador */
.countdown-item {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.15);
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.05);
}

/* Ajuste de fondo del itinerario solicitado por el usuario */
#itinerary-section {
  background-size: cover !important;
  background-position: center !important;
}
