:root {
  --azul: #87ceeb;
  --negro: #1a1a1a;
  --blanco: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Montserrat", sans-serif;
  background: var(--blanco);
  color: var(--negro);
  text-align: center;
  overflow-x: hidden;
}

/* TEXTURA */
.background-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.03;
}

/* HERO COMPLETO */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

.hero-body {
  position: relative;
  z-index: 2;
  color: white;
  width: 100%;
  padding: 24px 18px;
}
.hero-tag {
  font-size: 0.6rem;
  letter-spacing: 5px;
  margin-bottom: 20px;
}
.script-text {
  font-family: "Xanh Mono", serif;
  font-size: 1.5rem;
  font-style: italic;
  display: block;
  text-transform: none;
  margin-bottom: -10px;
}
.hero-title h1 {
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* CONTADOR HERO */
.hero-timer {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 6vw, 25px);
}
.t-col span {
  font-size: clamp(1.4rem, 7vw, 1.8rem);
  font-weight: 300;
  display: block;
}
.t-col p {
  font-size: 0.5rem;
  letter-spacing: 2px;
  opacity: 0.7;
}

/* SECCIONES */
.section-content {
  padding: 56px 18px;
}
.bg-soft {
  background: #f9f9f9;
}
.title-label {
  font-size: clamp(1.35rem, 6vw, 1.8rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 32px;
}

.event-date {
  margin: -16px auto 32px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.quote-serif {
  font-family: "Xanh Mono", serif;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  max-width: 42rem;
  padding: 0 4px;
  margin: 0 auto 30px;
}
.parents span {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: #999;
}
.parents h3 {
  font-size: 1.2rem;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ITINERARIO */
.itinerary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.it-step {
  max-width: 320px;
  padding: 0 8px;
}
.it-step i {
  font-size: 1.5rem;
  color: var(--negro);
  margin-bottom: 10px;
}
.it-hour {
  display: block;
  color: var(--azul);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 2px;
}
.it-step h3 {
  font-size: 1.1rem;
  margin: 10px 0;
  letter-spacing: 3px;
}
.it-step p {
  font-size: 0.9rem;
  color: #666;
}
.it-link {
  font-size: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--negro);
  border-bottom: 1px solid var(--azul);
  padding-bottom: 2px;
  display: inline-block;
  margin-top: 10px;
}
.it-line {
  width: 1px;
  height: 40px;
  background: #ddd;
}

/* DRESS CODE */
.dress-icons {
  font-size: 2.2rem;
  margin: 30px 0;
  display: flex;
  justify-content: center;
  gap: 50px;
  color: #ddd;
}
.blue-text {
  color: var(--azul);
}

/* --- ESTILOS RSVP --- */
.rsvp-box {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.btn-main {
  /* Dimensiones y Bloque */
  display: inline-block !important; /* Asegura que no se comporte como simple texto */
  width: 100%;
  max-width: 360px;
  min-width: 0;
  padding: 18px 16px !important;

  /* Colores */
  background-color: #1a1a1a !important; /* Negro Mate Sólido */
  color: #ffffff !important; /* Texto Blanco */

  /* Tipografía */
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none !important;

  /* Estilo */
  border: none;
  border-radius: 0px; /* Estilo editorial cuadrado */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Sombra para que "flote" sobre el blanco */

  /* Animación */
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Efecto al tocarlo en el celular */
.btn-main:active,
.btn-main:hover {
  background-color: #333333 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* galeria */
.swiper {
  width: 100%;
  height: clamp(280px, 65vh, 450px);
  margin-top: 20px;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent; /* O puedes poner el color de tu fondo */
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* FOTO COMPLETA SIEMPRE */
  border-radius: 8px;
}

/* Color de las flechas y puntitos */
.swiper-button-next,
.swiper-button-prev {
  color: #87daf3;
  transform: scale(0.7);
}
.swiper-pagination-bullet-active {
  background: #87daf3;
}

/* REPRODUCTOR DE MÚSICA */
.spotify-player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px);
  max-width: 400px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  z-index: 1000;
  overflow: hidden;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotify-player.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.spotify-player.expanded {
  height: min(450px, 100svh);
  bottom: 0;
  width: 100%;
  max-width: none;
  border-radius: 20px 20px 0 0;
}

/* Estado Minimizado */
.player-minimized {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.album-art {
  width: 45px;
  height: 45px;
  border-radius: 4px;
  object-fit: cover;
}
.track-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.track-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.artist-name {
  font-size: 0.7rem;
  opacity: 0.7;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
#play-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}
.expand-icon {
  font-size: 0.8rem;
  opacity: 0.5;
  transition: 0.3s;
}

/* Estado Expandido */
.player-expanded {
  padding: 24px 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spotify-player.expanded .player-expanded {
  display: flex;
}
.spotify-player.expanded .player-minimized {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
}

.expanded-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.expanded-header p {
  font-size: 0.6rem;
  letter-spacing: 2px;
}

.big-cover {
  width: min(220px, 60vw);
  height: min(220px, 60vw);
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}
.big-info h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  text-transform: none;
}
.big-info p {
  font-size: 1rem;
  color: var(--azul);
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.progress-filled {
  width: 45%;
  height: 100%;
  background: var(--azul);
  border-radius: 2px;
}

/* MESA DE REGALOS */
.gift-guide {
  max-width: 600px;
  margin: 0 auto;
}

.gift-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}

.gift-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.gift-card {
  padding: 30px;
  background: white;
  border: 1px solid #eee;
}

.gift-card i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--negro);
  opacity: 0.2;
}

.gift-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.gift-card p {
  font-size: 0.85rem;
  color: #777;
}

@media (min-width: 600px) {
  .gift-options {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .hero-body {
    padding: 32px;
  }

  .script-text {
    font-size: 1.8rem;
  }

  .hero-title h1 {
    font-size: 4rem;
    letter-spacing: 8px;
  }

  .hero-timer {
    gap: 25px;
  }

  .t-col span {
    font-size: 1.8rem;
  }

  .section-content {
    padding: 80px 25px;
  }

  .title-label {
    font-size: 1.8rem;
    margin-bottom: 50px;
  }

  .quote-serif {
    font-size: 1.8rem;
    line-height: 1.3;
    max-width: 90%;
  }

  .itinerary {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
  }

  .it-line {
    width: 40px;
    height: 1px;
  }

  .btn-main {
    width: auto;
    min-width: 280px;
    padding: 20px 30px !important;
    letter-spacing: 4px;
  }

  .player-expanded {
    padding: 30px;
  }
}

/* CONTENEDOR */
.envelope-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: transparent; /* CLAVE: Permite ver el Hero atrás */
}

.flap {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #f8f8f8; /* Color del sobre */
  transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1);
  z-index: 5;
}

/* Dibujando los 4 triángulos con clip-path */
.flap-top {
  top: 0;
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  border-bottom: 1px solid #ddd;
}

.flap-bottom {
  bottom: 0;
  clip-path: polygon(0 100%, 100% 100%, 50% 50%);
  border-top: 1px solid #ddd;
}

.flap-left {
  left: 0;
  clip-path: polygon(0 0, 0 100%, 50% 50%);
  border-right: 1px solid #ddd;
}

.flap-right {
  right: 0;
  clip-path: polygon(100% 0, 100% 100%, 50% 50%);
  border-left: 1px solid #ddd;
}

/* Sello y Texto */
.wax-seal {
  position: relative;
  width: 110px;
  height: 110px;
  background: #a11d33;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
}

.envelope-welcome {
  position: absolute;
  top: calc(50% + 120px);
  z-index: 6;
  text-align: center;
  transition: opacity 0.5s ease;
}

/* ANIMACIONES DE SALIDA (Hacia las esquinas) */
.envelope-container.open .flap-top {
  transform: translateY(-100%);
}
.envelope-container.open .flap-bottom {
  transform: translateY(100%);
}
.envelope-container.open .flap-left {
  transform: translateX(-100%);
}
.envelope-container.open .flap-right {
  transform: translateX(100%);
}
.envelope-container.open .wax-seal {
  opacity: 0;
  transform: scale(0);
}
.envelope-container.open .envelope-welcome {
  opacity: 0;
}

/* Desvanecimiento total del contenedor */
.envelope-container.fade-out {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.8s ease;
}

.photo-strip {
  width: 100%;
  height: 285px;
  margin: 40px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: #eee; /* Fondo neutro mientras carga */
}

.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: brightness(0.9);
}

@media (min-width: 1024px) {
  .photo-strip {
    height: 250px; /* Un poco más alta en monitores grandes */
  }
}

@media (min-width: 1024px) {
  .swiper {
    height: 450px;
  }
}
