/* =========================
   RESET
========================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
}

/* =========================
   FONDO GLOBAL
========================= */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url('img/fondo-h.jpg') center / cover no-repeat;
}

/* =========================
   SECCIONES (STACK CINEMATIC)
========================= */
.section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  color: white;

  /* CROSSFADE */
  opacity: 0;
  transition: opacity 1.5s ease;
}

.section.visible {
  opacity: 1;
  z-index: 1;
}

/* =========================
   IMÁGENES
========================= */
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  transform: scale(1.02); /* leve zoom cinematic */
}

.bg0::before { background-image: url('img/bg6-h.jpg'); }
.bg1::before { background-image: url('img/bg1-h.jpg'); }
.bg2::before { background-image: url('img/bg2-h.jpg'); }
.bg3::before { background-image: url('img/bg3-h.jpg'); }
.bg4::before { background-image: url('img/bg4-h.jpg'); }
.bg5::before { background-image: url('img/bg5-h.jpg'); }
.bg6::before { background-image: none; }

/* =========================
   CONTENIDO
========================= */
.content {
  max-width: 900px;
  padding: 20px;
}

/* =========================
   TEXTO BASE
========================= */
h1, p {
  margin: 0;
}

/* =========================
   TEXTO POR PALABRAS
========================= */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.section.visible .word.show {
  opacity: 1;
  transform: translateY(0);
}

/* estilos */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;

  text-shadow:
    0 3px 10px rgba(0,0,0,0.6),
    0 6px 25px rgba(0,0,0,0.6);
}

p {
  font-size: 1.3rem;
  margin-top: 10px;

  text-shadow:
    0 2px 6px rgba(0,0,0,0.6);
}

/* =========================
   SECCIÓN FINAL
========================= */
.bg6 {
  background: transparent;
}

.bg6,
.bg6 h1,
.bg6 p {
  text-shadow: none;
  color: #333;
}


/* =========================
   INVITACIÓN PREMIUM
========================= */
.invitation-card {
  background: #ffffff;
  color: #2c2c2c;

  border: 2px solid #d4af37;
  border-radius: 18px;

  padding: 60px 50px;
  max-width: 520px;
  width: 90%;

  box-shadow: 0 20px 50px rgba(0,0,0,0.12);

  font-family: 'Playfair Display', serif;

  text-align: center;

  /* entrada elegante */
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: all 1s ease;
}

.section.visible .invitation-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.invitation-card .names {
  font-size: 2.8rem;
  font-weight: 600;
  color: #b38b00;

  margin-bottom: 20px;
}

.invitation-card .intro {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.invitation-card hr {
  border: none;
  height: 1px;
  background: rgba(0,0,0,0.15);

  margin: 25px 0;
}

.invitation-card p {
  margin: 10px 0;
  font-size: 1.05rem;
}

.invitation-card strong {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.invitation-card .footer {
  margin-top: 25px;
  font-style: italic;
  color: #666;
  font-size: 1.05rem;
}

.bg6 {
  display: flex;
  align-items: center;
  justify-content: center;
}

#music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;

  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;

  width: 50px;
  height: 50px;

  font-size: 20px;
  cursor: pointer;

  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 20;
}

#music-toggle::after {
  content: "Activar música";
  position: absolute;
  bottom: 55px;
  right: 0;
  font-size: 12px;
  opacity: 0.7;
  line-height: 1;
}

.framo {
    margin-left: 20%;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 3px solid lightgray !important;
}

/* =========================
   RESPONSIVE
========================= */
@media (orientation: portrait) {

  .invitation-card {
    padding: 40px 25px;
  }

  .invitation-card .names {
    font-size: 2.2rem;
  }

  .bg-fixed {
    background: url('img/fondo.jpg') center / cover no-repeat;
  }

  h1 { font-size: 2.2rem; }
  p { font-size: 1.1rem; }

  .bg0::before { background-image: url('img/bg6.jpg'); }
  .bg1::before { background-image: url('img/bg1.jpg'); }
  .bg2::before { background-image: url('img/bg2.jpg'); }
  .bg3::before { background-image: url('img/bg3.jpg'); }
  .bg4::before { background-image: url('img/bg4.jpg'); }
  .bg5::before { background-image: url('img/bg5.jpg'); }
}