/* ========================= */
/* RESET */
/* ========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #fffff0;
}

/* ========================= */
/* TEXTURA DE PAPEL GLOBAL */
/* ========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("img/handmadepaper.webp");
  background-repeat: repeat;
  background-size: 280px 280px;
  background-position: center;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

/* Todo el contenido encima */
body > * {
  position: relative;
  z-index: 1;
}

/* ========================= */
/* INTRO */
/* ========================= */

#intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================= */
/* SOBRE */
/* ========================= */

.envelope {
  position: relative;
  width: 92vw;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

/* ========================= */
/* FONDOS */
/* ========================= */

.envelope-back-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fondo-verde {
  z-index: 0;
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  animation: fondoIn 1.4s ease-out forwards;
}

.fondo-flores {
  z-index: 1;
  opacity: 0;
  transform: scale(0.92);
  filter: blur(8px);
  animation: fondoIn 1.6s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes fondoIn {
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* ========================= */
/* IMÁGENES BASE */
/* ========================= */

.envelope img {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
}

.envelope-back { z-index: 2; }
.envelope-front {
  z-index: 6;
  pointer-events: none;
}

/* ========================= */
/* CONTENIDO INTERIOR */
/* ========================= */

.envelope-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
}

/* ========================= */
/* ELEMENTOS INTERNOS */
/* ========================= */

.envelope-element {
  position: absolute;
  pointer-events: none;
  transition: transform 1s ease;
}

/* ========================= */
/* FLORES */
/* ========================= */

.flower {
  transform: translateY(20px) scale(0.95);
  z-index: 6;
}

.flower-left { width: 34%; left: 22%; top: 42%; }
.flower-right { width: 34%; right: 18%; top: 52%; }
.flower-right-red { width: 28%; right: 25%; top: 50%; z-index: 6; }

.envelope.open .flower-left { transform: translateY(-10px) scale(1); }
.envelope.open .flower-right { transform: translateY(-14px) scale(1); }
.envelope.open .flower-right-red { transform: translateY(-18px) scale(1.05); }

/* ========================= */
/* FOTO NOVIOS */
/* ========================= */

.photo {
  width: 55%;
  left: 23%;
  top: 30%;
  z-index: 5;
  transform: translateY(50px) scale(0.9);
  transition: transform 1.2s ease;
}

.envelope.open .photo {
  transform: translateY(-45px) scale(1);
}

/* ========================= */
/* TEXTO HINT */
/* ========================= */

.hint {
  position: absolute;
  bottom: -56px;
  width: 100%;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777;
}

/* ========================= */
/* INVITACIÓN BASE */
/* ========================= */

#texto-invitacion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
  padding-bottom: 60px;
}

#texto-invitacion img {
  max-width: 90%;
  height: auto;
}

#texto-invitacion .secundaria {
  margin-top: 30px;
}

/* IS 3 desplazado */
#texto-invitacion img.extra {
  transform: translateX(25px);
}

/* ========================= */
/* CONTENEDOR OVERLAYS */
/* ========================= */
#invitacion-visual {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: -40px;

  min-height: 180vh;   /* 🔥 ESTO ES LO QUE FALTABA */
}
/* ========================= */
/* LETRA Y */
/* ========================= */

.letra-y {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.letra-y img {
  width: 500px;
  height: auto;
}

/* ========================= */
/* POLAROID */
/* ========================= */

.overlay-polaroid {
  position: absolute;
  top: 20%;
  right: 25%;
  z-index: 10;
}

.polaroid {
  background: #f8f8f6;
  padding: 14px 14px 40px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  transform: rotate(14deg);
}

.polaroid img {
  width: 230px;
  height: 240px;
  object-fit: cover;
}



/* ========================= */
/* PARROQUIA COMO OVERLAY */
/* ========================= */

.overlay-parroquia {
  position: absolute;
  top: 43%;        /* ⬇️ AHORA SÍ BAJA */
  left: 57%;       /* ➡️ AHORA SÍ COMPENSA */
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
}

.overlay-parroquia img {
  max-width: 75%;
  height: auto;
}

.parroquia-link {
  pointer-events: auto;   /* 🔑 REACTIVA EL CLICK */
  display: inline-block;
}

.parroquia-link img {
  display: block;
}



/* ========================= */
/* JARDÍN SAN ANDRÉS (OVERLAY) */
/* ========================= */

.overlay-jardin-texto {
  position: absolute;
  top: 59%;          /* 🔽 MÁS ABAJO QUE PARROQUIA */
  left: 55%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
}

.overlay-jardin-texto img {
  max-width: 80%;
  height: auto;
}

.jardin-link {
  pointer-events: auto;   /* 🔑 habilita el click */
  display: inline-block;
}

.jardin-link img {
  display: block;
}

/* evita estilos de link */
.jardin-link:visited {
  color: inherit;
}


/* ========================= */
/* IS 5 – BLOQUE BASE */
/* ========================= */

#texto-invitacion img.is5-base {
  margin-top: 70px;   /* separa claramente del jardín */
  max-width: 90%;
  height: auto;
}

/* ========================= */
/* IS 6 – BLOQUE BASE */
/* ========================= */

#texto-invitacion img.is6-base {
  margin-top: 10px;   /* separación editorial */
  max-width: 90%;
  height: auto;
}

/* ========================= */
/* CONTADOR REGRESIVO */
/* ========================= */

#contador-boda {
  margin-top: 5px;           /* separación desde IS 6 */
  display: flex;
  justify-content: center;
  gap: 40px;
  text-align: center;
}

.contador-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 15px;
}

.contador-item span {
  font-family: "Times New Roman", serif;
  font-size: 72px;
  font-weight: 500;
  line-height: 1;
  position: relative; /* 🔑 referencia para la línea */
}

.contador-item small {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #333;
}

/* Línea vertical editorial */
.contador-item:not(:last-child) span::after {
  content: "|";
  position: absolute;
  right: -39px;
  top: 50%;
  transform: translateY(-40%); /* 🎯 AJUSTE FINO */
  font-size: 64px;
  font-weight: 300;
  color: #000;
}


/* =========================
   FLOR DECORATIVA INTERMEDIA
   ========================= */

#decoracion-flor {
  position: relative;
  height: 0;
  z-index: 1;              /* 🔽 BAJO */
}

.flor-izquierda {
  position: absolute;
  left: 480px;            /* recargada al borde izquierdo */
  top: -130px;            /* sube hacia el contador */
  width: 240px;
  height: auto;
  pointer-events: none;
}
/* =========================
   CONFIRMAR ASISTENCIA
   ========================= */

#confirmar-asistencia {
  display: flex;
  justify-content: center;
  margin-top: 20px;      /* separación real desde contador */
  margin-bottom: 200px;
}

.is7-img {
  max-width: 75%;
  height: auto;
}

.is6-regalos {
  position: relative;
  max-width: 90%;
  margin-top: 10px;
}

.is6-regalos img {
  width: 100%;
  height: auto;
  display: block;
}

/* Texto base */
.regalo-text {
  position: absolute;
  font-family: "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a2e25;
  white-space: nowrap;
  text-decoration: none;   /* 🔑 quita subrayado */
  cursor: pointer;
}

/* Hover fino (desktop) */
.regalo-text:hover {
  opacity: 0.75;
}

/* Evita azul/púrpura de links */
.regalo-text:visited {
  color: #3a2e25;
}




/* =====================================
   RESPONSIVE – CELULARES
   ===================================== */
@media (max-width: 768px) {

  /* =========================
     INTRO / SOBRE
     ========================= */
  #intro {
    min-height: auto;
    padding-bottom: 40px;
  }

  .envelope {
    max-width: 340px;
  }

  .hint {
    bottom: -32px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  /* =========================
     CONTENEDOR PRINCIPAL
     ========================= */
  #invitacion-visual {
    min-height: auto;
    margin-top: 0;
    flex-direction: column;
    align-items: center;
  }

  /* =========================
     TEXTOS BASE (IS 1–7)
     ========================= */
  #texto-invitacion {
    margin-top: -10px;
    padding-bottom: 30px;
  }

  #texto-invitacion img {
    max-width: 95%;
    height: auto;
    transform: none !important;
  }

  /* =========================
     LETRA Y
     ========================= */
  .letra-y {
    position: absolute;
    top: 11%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
  }

  .letra-y img {
    width: 220px;
    height: auto;
  }

 /* =========================
   POLAROID – CELULAR (CORREGIDA)
   ========================= */
.overlay-polaroid {
  position: absolute;
  top: 20%;
  left: 75%;
  transform: translateX(-50%) rotate(5deg);
  z-index: 5;
}

.polaroid {
  background: #fff;
  padding: 6px 6px 20px;     /* 🔑 marco real */
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  width: fit-content;       /* 🔑 se ajusta al contenido */
}

.polaroid img {
  width: 70px;
  height: 80px;
  object-fit: cover;
  display: block;           /* evita espacios raros */
}



  /* =========================
     PARROQUIA
     ========================= */
  .overlay-parroquia {
    position: absolute;
    top: 43%;
    left: 54%;
    transform: translateX(-50%);
    z-index: 5;
  }

  .overlay-parroquia img {
    max-width: 85%;
    height: auto;
  }

  /* =========================
     JARDÍN SAN ANDRÉS
     ========================= */
  .overlay-jardin-texto {
    position: absolute;
    top: 59%;
    left: 54%;
    transform: translateX(-50%);
    z-index: 5;
  }

  .overlay-jardin-texto img {
    max-width: 85%;
    height: auto;
  }

  /* ---------- CONTADOR (RESPONSIVE AJUSTADO) ---------- */
#contador-boda {
  margin: 10px 0 4px;
  gap: 14px;
}

.contador-item span {
  font-size: 32px;      /* 🔽 antes 40 */
}

.contador-item small {
  font-size: 9px;       /* 🔽 antes 10 */
  letter-spacing: 0.12em;
}

.contador-item:not(:last-child) span::after {
  right: -14px;
  font-size: 34px;      /* proporcional */
  transform: translateY(-38%);
}


  /* ---------- FLOR INTERMEDIA (FIX REAL) ---------- */

  
  #decoracion-flor {
    position: relative;
    height: auto;      /* 🔑 deja de colapsar */
    display: flex;
    justify-content: flex-start;
    margin: 6px 0 10px;
  }

  .flor-izquierda {
  position: relative;
  left: auto;
  top: auto;
  width: 70px;
  height: auto;
  margin-left: 25px;
  margin-top: -40px;   /* 🔼 SUBE LA FLOR */
  pointer-events: none;
}



  /* ---------- CONFIRMAR ASISTENCIA ---------- */
   #confirmar-asistencia {
    position: relative;
    margin-top: -50px;   /* 🔑 SUBE IS 7 */
    margin-bottom: 120px;
    z-index: 5;          /* 🔑 estará encima */
  }

 .is7-img {
    max-width: 100%;
    height: auto;
  }

  .is6-regalos {
  max-width: 95%;
}

.regalo-text {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.regalo-text.amazon {
  bottom: 6%;
  left: 15%;
}

.regalo-text.liverpool {
  top: 40%;
  right: 25%;
}

.regalo-text.banco {
  bottom: 2%;
  right: 12%;
}

}
