
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --crema: #f7f2e9;
  --azul: #182746;
  --dorado: #b99a68;
  --blanco: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--azul);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--dorado);
  color: var(--blanco);
}

/* PORTADA — DESDE TUS OJOS */

.portada {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 24px;
  background:
    radial-gradient(
      circle at 50% 35%,
      #304467 0%,
      #182746 55%,
      #101b32 100%
    );
  color: var(--crema);
  text-align: center;
}

.portada-contenido {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.etiqueta {
  display: block;
  color: var(--dorado);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.simbolo {
  margin: 30px 0 10px;
  color: var(--dorado);
  font-size: 34px;
}

.portada h1 {
  margin: 0;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -2px;
}

.subtitulo {
  margin: 20px 0 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-style: italic;
}

.separador {
  width: 70px;
  height: 1px;
  margin: 38px auto;
  background: var(--dorado);
}

.introduccion {
  max-width: 560px;
  margin: 0 auto 18px;
  font-size: 15px;
  line-height: 1.9;
  opacity: 0.88;
}

.boton-principal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 32px;
  padding: 16px 30px;
  border: 1px solid var(--dorado);
  border-radius: 3px;
  background: var(--dorado);
  color: #182746;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.boton-principal:hover {
  background: transparent;
  color: var(--crema);
}

.detalle-final {
  display: block;
  margin-top: 55px;
  font-size: 10px;
  letter-spacing: 3px;
  opacity: 0.55;
}

/* SECCIÓN PARA COMPARTIR */

.seccion-compartir {
  max-width: 800px;
  margin: 0 auto;
  padding: 110px 24px;
  text-align: center;
}

.seccion-compartir h2 {
  margin: 22px auto;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
}

.seccion-compartir p {
  max-width: 570px;
  margin: 0 auto;
}

.mensaje-proximamente {
  margin: 35px auto 0;
  padding: 24px;
  border: 1px solid #d9cdbb;
  color: var(--azul);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

/* PIE DE PÁGINA */

.pie-pagina {
  padding: 35px 20px;
  background: var(--azul);
  color: var(--crema);
  text-align: center;
}

.pie-pagina p {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
}

.pie-pagina span {
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0.6;
}

/* ADAPTACIÓN A CELULARES */

@media (max-width: 600px) {
  .portada {
    padding: 75px 22px;
  }

  .portada h1 {
    letter-spacing: -1px;
  }

  .introduccion {
    font-size: 14px;
  }

  .seccion-compartir {
    padding: 80px 22px;
  }
}

/* POLAROID — DESDE TUS OJOS */

.polaroid {
  width: min(320px, 78vw);
  margin: 48px auto 0;
  padding: 12px 12px 36px;
  background: #f7f2e9;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transform: rotate(-4deg);
  transition: transform 0.4s ease;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.03);
}

.polaroid img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center;
}

.polaroid p {
  margin: 18px 0 0;
  color: #182746;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  text-align: center;
}

@media (max-width: 600px) {
  .polaroid {
    width: min(260px, 78vw);
    margin-top: 36px;
  }

  .polaroid img {
    height: 290px;
  }
}

/* VENTANA DE RECUERDOS — DESDE TUS OJOS */

.modal-recuerdos {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 17, 31, 0.85);
  backdrop-filter: blur(8px);
}

.modal-recuerdos.abierto {
  display: flex;
}

.modal-contenido {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 48px 38px;
  background: #f7f2e9;
  color: #182746;
  border: 1px solid #d5c4a8;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.cerrar-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #182746;
  font-size: 30px;
  line-height: 1.5;
}

.modal-etiqueta {
  display: block;
  margin-bottom: 16px;
  color: #a18459;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.modal-contenido h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.2;
}

.modal-contenido > p {
  font-size: 14px;
  line-height: 1.8;
}

.selector-fotos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 28px 0 16px;
  padding: 28px 18px;
  border: 1px dashed #b99a68;
  background: #efe6d8;
  text-align: center;
  cursor: pointer;
}

.selector-icono {
  font-size: 32px;
}

.selector-fotos strong {
  font-size: 14px;
}

.selector-fotos small,
.nota-recuerdos {
  color: #6d6b67;
  font-size: 12px;
}

#contadorFotos {
  margin: 0 0 22px;
  font-size: 12px;
  text-align: center;
}

.modal-contenido label[for="nombreInvitado"] {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

#nombreInvitado {
  width: 100%;
  padding: 14px;
  border: 1px solid #d5c4a8;
  border-radius: 2px;
  background: #fffdf9;
  color: #182746;
}

.boton-enviar-recuerdos {
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border: none;
  background: #b99a68;
  color: #182746;
  font-weight: 700;
}

.boton-enviar-recuerdos:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nota-recuerdos {
  display: block;
  margin-top: 15px;
  text-align: center;
}

@media (max-width: 600px) {
  .modal-recuerdos {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-contenido {
    padding: 42px 22px 28px;
    max-height: 92vh;
    max-height: 92dvh;
  }
}

/* MENSAJE DEL INVITADO */

.etiqueta-mensaje {
  display: block;
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

#mensajeInvitado {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  padding: 14px;
  border: 1px solid #d5c4a8;
  border-radius: 2px;
  background: #fffdf9;
  color: #182746;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

#mensajeInvitado:focus-visible {
  outline: 2px solid #b99a68;
  outline-offset: 2px;
}

/* AJUSTE DEFINITIVO DEL CARRETE FOTOGRÁFICO */

#vistaPreviaFotos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 18px 0 26px;
}

#vistaPreviaFotos:empty {
  display: none;
}

#vistaPreviaFotos .miniatura-foto {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  overflow: hidden;
  padding: 5px;
  background: #fffdf9;
  border: 1px solid #d5c4a8;
  box-shadow: 0 3px 10px rgba(24, 39, 70, 0.12);
}

#vistaPreviaFotos .miniatura-foto img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

@media (max-width: 400px) {
  #vistaPreviaFotos {
    gap: 7px;
  }

  #vistaPreviaFotos .miniatura-foto {
    padding: 3px;
  }
}
