/* ================================================================
   Invitación de Boda · Sofía & Carlos
   Estilo: Game of Thrones  ·  Solo móvil / vertical  ·  Pergamino
   ================================================================ */

:root {
  --parch: #f9eadd;         /* tono base de la textura de fondo */
  --parch-hi: #fdf6ec;
  --parch-lo: #ecdccb;
  --tinta: #241b12;          /* texto oscuro (casi negro cálido) */
  --tinta-tenue: #6a5a42;
  --sangre: #5BB8E8;         /* azul cielo */
  --boton: #2C7BAE;          /* azul medio para botones */
  --boton-hover: #1E6494;
  --oro: #9a7b3c;
  --oro-oscuro: #7c5f2c;
  --oro-claro: #c9a24b;
  --modal-bg: #0A2C4A;
  --marco: #16110e;          /* laterales (iPad / escritorio) */

  --f-titulo: "Cinzel", "Times New Roman", serif;
  --f-texto: "EB Garamond", Georgia, serif;

  --ancho: 430px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--marco); }

body {
  color: var(--tinta);
  font-family: var(--f-texto);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background: var(--marco);
}

/* ---- Columna vertical fija tipo móvil, sobre pergamino ---- */
.shell {
  position: relative;
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--parch);
  background-image: url("fondotodalainvitacion.webp");
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 100% auto;
}

/* Tablet / iPad: a pantalla completa, sin laterales oscuros */
@media (min-width: 431px) and (max-width: 1200px) {
  :root { --ancho: 100%; }
}

/* Escritorio: columna centrada tipo móvil con laterales oscuros */
@media (min-width: 1201px) {
  .shell {
    box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.18), 0 22px 70px rgba(0, 0, 0, 0.6);
  }
}

/* ============================ PORTADA ============================ */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 24px 58px;
}
.hero > *:not(.stain) { position: relative; z-index: 1; }

/* Mancha negra en la unión: encima de la sección 1 y la 2 a la vez */
.seam {
  position: relative;
  height: 0;
  z-index: 5;
}
.seam__img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  transform: translateY(50%);   /* centrada sobre la línea de unión */
  pointer-events: none;
  display: block;
}

/* "WEDDING IS COMING" (PNG blanco -> lo paso a negro) */
.coming {
  width: clamp(220px, 68vw, 300px);
  height: auto;
  filter: brightness(0) saturate(100%) opacity(0.92);
}

/* Nombres de los novios (texto gótico, iniciales en rojo) */
.names {
  margin-top: 6px;
  font-family: "UnifrakturMaguntia", var(--f-titulo);
  font-weight: 400;
  font-size: clamp(34px, 10.5vw, 52px);
  line-height: 1.1;
  color: var(--tinta);
  white-space: nowrap;
  filter: drop-shadow(0 2px 5px rgba(60, 30, 15, 0.28));
}
.names__ini { color: var(--sangre); font-size: 1.35em; }
.names__amp { font-size: .8em; margin: 0 .12em; }

/* Filete decorativo */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 60%;
  max-width: 230px;
  margin: 20px 0 2px;
}
.rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-oscuro), transparent);
}
.rule i {
  width: 7px;
  height: 7px;
  background: var(--oro-oscuro);
  transform: rotate(45deg);
}

/* ==================== CINTA DE FOTOS (marquee) ==================== */

.belt {
  width: 100vw;
  max-width: var(--ancho);
  margin: 24px 0 28px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.belt__track {
  display: flex;
  width: max-content;
  will-change: transform;
  cursor: grab;
}
.belt__track.is-grab { cursor: grabbing; }
.belt__group { display: flex; gap: 10px; padding-right: 10px; }

.shot {
  flex: 0 0 auto;
  width: 176px;
  height: 232px;
  border: 1px solid var(--oro-oscuro);
  padding: 5px;
  background: var(--parch-hi);
  box-shadow: 0 8px 20px rgba(60, 40, 20, 0.18);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.03) sepia(0.12);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* ============================ VERSÍCULO ============================ */

.verse {
  font-family: var(--f-titulo);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: clamp(0.78rem, 3.3vw, 0.92rem);
  line-height: 1.9;
  color: var(--tinta-tenue);
  max-width: 340px;
}
.verse__ref {
  display: block;
  margin-top: 12px;
  color: var(--sangre);
  letter-spacing: 0.15em;
}

/* ========================== REPRODUCTOR ========================== */

.player {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.player__row { display: flex; align-items: center; gap: 24px; }

.player__ic {
  background: none;
  border: none;
  color: var(--tinta-tenue);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  transition: color 0.2s, transform 0.15s;
}
.player__ic:hover { color: var(--tinta); }
.player__ic:active { transform: scale(0.9); }
.player__ic svg { width: 24px; height: 24px; fill: currentColor; }

.player__play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--oro-oscuro);
  background: rgba(255, 255, 255, 0.5);
  color: var(--tinta);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.15s;
  box-shadow: 0 0 0 5px rgba(124, 95, 44, 0.08);
}
.player__play:active { transform: scale(0.94); }
.player__play svg { width: 28px; height: 28px; fill: currentColor; }
.player__play .ic-pause { display: none; }
.player.is-playing .player__play .ic-play { display: none; }
.player.is-playing .player__play .ic-pause { display: block; }
.player.is-playing .player__play {
  border-color: var(--sangre);
  box-shadow: 0 0 0 5px rgba(91, 184, 232, 0.12), 0 0 22px rgba(91, 184, 232, 0.22);
}

.player__bar {
  width: min(260px, 74vw);
  height: 2px;
  background: rgba(36, 27, 18, 0.22);
  cursor: pointer;
  position: relative;
}
.player__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--oro-oscuro), var(--sangre));
}

.player__cta {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.66rem, 2.9vw, 0.78rem);
  color: var(--tinta-tenue);
  transition: color 0.2s;
}
.player__cta:hover { color: var(--sangre); }

/* ======================= SECCIÓN 2: DETALLES ======================= */

.details {
  display: block;
  padding: 70px 0 76px;   /* aire arriba y abajo, separa de las manchas */
}
.details__card {
  text-align: center;
  color: #000;
  padding: 0 22px;
}
.details__crest {
  display: block;
  width: 44%;
  max-width: 190px;
  height: auto;
  margin: 0 auto 6px;
}
.details__name {
  font-family: "Allura", cursive;
  font-size: clamp(44px, 13vw, 58px);
  line-height: 1.05;
}
.details__amp {
  font-family: var(--f-texto);
  font-size: 24px;
  line-height: 1.3;
}
.details__caps {
  font-family: var(--f-titulo);
  font-size: clamp(15px, 4.4vw, 19px);
  line-height: 1.35;
  letter-spacing: .02em;
  margin: 14px auto 8px;
  max-width: 380px;
}
.details__caps--place { margin: 2px auto 8px; }
.details__script {
  font-family: "Allura", cursive;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.1;
}
.details__date {
  font-family: "Allura", cursive;
  font-size: clamp(30px, 9vw, 40px);
  margin-top: 10px;
}

/* ======================= SECCIÓN 3: ENLACES ======================= */

.links {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 60px 22px 72px;
}
.links > .maprow { position: relative; z-index: 1; }

/* Mapa de fondo (ilustración) */
.links__map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("mapa.webp");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.links__sea {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 0;
  font-family: var(--f-texto);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.15;
  text-align: center;
  color: rgba(58, 46, 34, 0.42);
  pointer-events: none;
}
.links__west {
  position: absolute;
  top: 33%;
  left: 50%;
  z-index: 0;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: clamp(2rem, 11vw, 2.8rem);
  color: rgba(58, 46, 34, 0.13);
  white-space: nowrap;
  pointer-events: none;
}

/* Filas alternadas castillo / texto */
.maprow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.maprow--rev { flex-direction: row-reverse; }
.maprow__art { flex: 0 0 44%; }
.maprow__art--wide { flex-basis: 54%; }
.maprow__art img {
  width: 100%;
  height: auto;
  display: block;
}
.maprow__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.link-title-img {
  display: block;
  width: clamp(142px, 44vw, 188px);
  height: auto;
  margin: 0 auto;
}
.link-time {
  margin-top: -2px;
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.66rem, 2.9vw, 0.8rem);
  color: var(--tinta-tenue);
}

.btn {
  display: inline-block;
  background: var(--boton);
  color: #f4ede2;
  font-family: var(--f-titulo);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.78rem, 3.4vw, 0.92rem);
  padding: 11px 30px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 6px 16px rgba(44, 123, 174, 0.26);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { background: var(--boton-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(44, 123, 174, 0.3); }

/* Bloque de regalos */
.maprow--gifts { align-items: center; gap: 4px; margin-top: 6px; }
.gifts__text {
  flex: 1;
  font-family: var(--f-titulo);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.85;
  font-size: clamp(0.64rem, 2.9vw, 0.78rem);
  color: var(--tinta-tenue);
  text-align: left;
}
.gifts__art {
  flex: 0 0 50%;
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gifts__scroll {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s;
}
.gifts__art:hover .gifts__scroll { transform: scale(1.02); }
.gifts__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: auto;
  pointer-events: none;
}
/* "REGALOS" enmarcado como botón sutil sobre el pergamino */
.gifts__art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 27%;
  border: 1px solid rgba(44, 123, 174, 0.38);
  border-radius: 999px;
  background: rgba(44, 123, 174, 0.05);
  pointer-events: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.gifts__art:hover::before {
  background: rgba(44, 123, 174, 0.11);
  border-color: rgba(44, 123, 174, 0.6);
}

/* ==================== VENTANAS EMERGENTES ==================== */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 3, 4, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal__box {
  position: relative;
  width: 100%;
  max-width: 390px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 38px 24px 32px;
  text-align: center;
  color: #f1e7d5;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(20, 70, 130, 0.55), transparent 72%),
    var(--modal-bg);
  border: 1px solid rgba(201, 162, 75, 0.42);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 0 0 4px rgba(201, 162, 75, 0.08);
  animation: modalIn 0.26s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal__x {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: rgba(241, 231, 213, 0.55);
  cursor: pointer;
  transition: color 0.2s;
}
.modal__x:hover { color: #f1e7d5; }

.modal__crest {
  width: 78px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
  filter: brightness(1.9) sepia(0.5) saturate(1.6) hue-rotate(-6deg);
  opacity: 0.92;
}
.modal__kicker {
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.66rem;
  color: var(--oro-claro);
  margin-bottom: 8px;
}
.modal__title {
  font-family: var(--f-titulo);
  font-weight: 500;
  font-size: clamp(1.5rem, 7vw, 1.95rem);
  line-height: 1.15;
  color: #f5eddc;
}
.modal__title em {
  font-family: var(--f-texto);
  font-style: italic;
  font-weight: 400;
  color: #efe1c4;
}

.modal__sword {
  width: 150px;
  margin: 12px auto 14px;
  color: rgba(201, 162, 75, 0.75);
}
.modal__sword svg { width: 100%; height: auto; display: block; }

.modal__text {
  font-family: var(--f-texto);
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(241, 231, 213, 0.82);
  max-width: 300px;
  margin: 0 auto 20px;
}
.modal__note {
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
  color: rgba(241, 231, 213, 0.6);
  margin-bottom: 18px;
}

/* Opciones de la mesa de regalos */
.modal__opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px;
  text-decoration: none;
  background: rgba(244, 236, 219, 0.05);
  border: 1px solid rgba(201, 162, 75, 0.32);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.opt:hover {
  background: rgba(201, 162, 75, 0.13);
  border-color: var(--oro-claro);
  transform: translateY(-1px);
}
.opt__name {
  font-family: var(--f-titulo);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  color: #f5eddc;
}
.opt__sub {
  font-family: var(--f-texto);
  font-size: 0.82rem;
  color: rgba(241, 231, 213, 0.58);
}

/* Formulario de confirmación */
.form { text-align: left; }
.form__label {
  display: block;
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.62rem;
  color: var(--oro-claro);
  margin: 14px 0 6px;
}
.form__field {
  width: 100%;
  font-family: var(--f-texto);
  font-size: 0.98rem;
  color: #3f2a1c;
  background: #fdfaf5;
  border: 1px solid rgba(201, 162, 75, 0.5);
  border-radius: 0;
  padding: 11px 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form__field::placeholder { color: #a9967f; }
.form__field:focus {
  border-color: var(--oro-claro);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18);
}
select.form__field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237c5f2c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
textarea.form__field { resize: vertical; min-height: 82px; }

.form__submit {
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;
  font-family: var(--f-titulo);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #fbf6ec;
  background: #c2a05a;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.form__submit:hover { background: #b08e48; transform: translateY(-1px); }
.form__submit:disabled { opacity: 0.55; cursor: default; transform: none; }
.form__status {
  margin-top: 12px;
  text-align: center;
  font-family: var(--f-texto);
  font-size: 0.88rem;
  color: var(--oro-claro);
  min-height: 1.2em;
}

/* Botón de cierre / código de vestimenta */
.closing {
  padding: 8px 24px 40px;
  text-align: center;
}

/* ==================== SECCIÓN 4: CUENTA REGRESIVA ==================== */

.countdown {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: 110px;
  padding-bottom: 170px;
}
.countdown > *:not(.countdown__dragon) { position: relative; z-index: 1; }

.countdown__band {
  background: #0D3A5E;
  padding: 52px 22px 54px;
  margin-bottom: 56px;
}
.band-title {
  display: block;
  width: clamp(210px, 64vw, 290px);
  height: auto;
  margin: 0 auto;
}

.countdown__faltan {
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: clamp(1rem, 4.6vw, 1.3rem);
  color: var(--tinta);
  margin-bottom: 40px;
}

.countdown__clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 2.4vw, 14px);
  margin-bottom: 52px;
  padding: 0 4px;
}
.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.cd__num {
  font-family: var(--f-titulo);
  font-weight: 500;
  font-size: clamp(2rem, 11vw, 3rem);
  line-height: 1;
  color: var(--tinta);
}
.cd__lbl {
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(0.5rem, 2.5vw, 0.66rem);
  color: var(--tinta-tenue);
  margin-top: 14px;
}
.cd__sep {
  font-family: var(--f-titulo);
  font-size: clamp(1.4rem, 7.5vw, 2.2rem);
  line-height: 1;
  color: var(--tinta-tenue);
  padding-top: 5px;
}

.countdown__caption {
  display: block;
  width: clamp(240px, 80vw, 350px);
  height: auto;
  margin: 0 auto;
  filter: brightness(0);   /* PNG blanco -> negro */
}

.countdown__dragon {
  position: absolute;
  left: -18px;
  bottom: 18px;
  width: clamp(120px, 40vw, 180px);
  height: auto;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

/* ---- Ventana clara: código de vestimenta ---- */
.modal__box--light {
  color: var(--tinta);
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 72%),
    #f2ece1;
  border-color: rgba(201, 162, 75, 0.5);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 0 0 4px rgba(201, 162, 75, 0.1);
}
.modal__box--light .modal__x { color: rgba(36, 27, 18, 0.4); }
.modal__box--light .modal__x:hover { color: var(--tinta); }
.modal__box--light .modal__kicker { color: var(--oro-oscuro); }
.modal__box--light .modal__title { color: var(--tinta); }
.modal__box--light .modal__title em { color: var(--oro-oscuro); }
.modal__box--light .modal__sword { color: rgba(124, 95, 44, 0.7); }

.dress {
  display: flex;
  gap: 12px;
  margin: 6px 0 16px;
}
.dress__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.dress__figwrap {
  width: 100%;
  border: 1px solid rgba(201, 162, 75, 0.4);
  background: #f7f1e5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 10px;
  margin-bottom: 10px;
}
.dress__fig {
  height: clamp(112px, 32vw, 142px);   /* misma altura para ambas, tamaño moderado */
  width: auto;
  max-width: 100%;
  display: block;
}
.dress__who {
  font-family: var(--f-titulo);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--tinta);
  margin-bottom: 6px;
}
.dress__desc {
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.58rem;
  line-height: 1.7;
  color: var(--tinta-tenue);
}

.dress__forbidden {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 9px 22px;
  border: 1px solid rgba(91, 184, 232, 0.4);
  border-radius: 999px;
  background: rgba(91, 184, 232, 0.08);
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.64rem;
  color: #2C7BAE;
}

.swatches {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 8px;
  margin: 0 0 14px;
  padding: 0;
}
.swatches li {
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--f-titulo);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.5rem;
  line-height: 1.3;
  color: var(--tinta-tenue);
}
.sw {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(36, 27, 18, 0.18);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.06);
}

.dress__hint {
  font-family: var(--f-texto);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--tinta-tenue);
  margin-bottom: 16px;
}
.dress__foot {
  font-family: var(--f-texto);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--oro-oscuro);
  max-width: 300px;
  margin: 0 auto;
}

/* ==================== PORTADA: BOLETO (flip) ==================== */

/* Bloquea el scroll de la invitación mientras la portada está visible */
body:has(#cover:not(.is-gone)) { overflow: hidden; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--marco);
  transition: opacity 0.6s ease;
}
.cover.is-gone { opacity: 0; pointer-events: none; }

/* Escenario con la proporción exacta de la imagen de fondo */
.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 941 / 1672));
  aspect-ratio: 941 / 1672;
  container-type: inline-size;
}
.stage__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.stage__familia {
  position: absolute;
  left: 12%;
  top: 16.5%;
  font-family: "Allura", "Segoe Script", cursive;
  font-size: 5cqw;
  line-height: 1;
  color: #ece2d0;
  white-space: nowrap;
  transform: rotate(-1.5deg);
  transform-origin: left center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: opacity 0.4s;
}
.stage.is-open .stage__familia { opacity: 0; }

.stage__backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(8, 5, 6, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.stage.is-open .stage__backdrop { opacity: 1; pointer-events: auto; }

.ticket {
  position: absolute;
  left: -0.6%;
  top: 32.6%;
  width: 30.4%;
  z-index: 5;
  cursor: pointer;
  perspective: 1600px;
  transform: rotate(-7deg);
  transition: left 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              top 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  -webkit-tap-highlight-color: transparent;
}
.stage:not(.is-open) .ticket:hover { transform: rotate(-7deg) scale(1.045); }
.stage:not(.is-open) .ticket:active { transform: rotate(-7deg) scale(0.99); }

.ticket__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1089 / 1445;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.05, 0.2, 1);
}
.ticket__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ticket__face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
  -webkit-user-drag: none;
  user-select: none;
}
.ticket__face--back { transform: rotateY(180deg); }

.stage.is-open .ticket {
  left: 50%;
  top: 50%;
  width: 78%;
  transform: translate(-50%, -50%) rotate(0deg);
  z-index: 20;
  cursor: default;
}
.stage.is-open .ticket__inner { transform: rotateY(180deg); }

.ticket__content {
  position: absolute;
  inset: 15% 15% 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.4cqw;
  text-align: center;
  color: #2c2118;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease 0.55s;
}
.stage.is-open .ticket__content { opacity: 1; pointer-events: auto; }

.tk-hello {
  font-family: "Cinzel", serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 4cqw;
  line-height: 1.4;
}
.tk-rule {
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8a6d3a, transparent);
}
.tk-info {
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 4.4cqw;
  line-height: 1.2;
}
.tk-info b { font-weight: 700; font-size: 1.3em; }

.tk-go {
  margin-top: 1.5cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  background: none;
  border: 0;
  cursor: pointer;
  color: #5BB8E8;
  font-family: "Cinzel", serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 2.9cqw;
  transition: color 0.2s;
}
.tk-go:hover { color: #2C7BAE; }
.tk-go svg {
  width: 7.5cqw;
  height: 7.5cqw;
  animation: tkBob 1.6s ease-in-out infinite;
}
@keyframes tkBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(28%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal__box { animation: none; }
  .cover, .ticket, .ticket__inner, .stage__backdrop, .ticket__content { transition-duration: 0.001s; }
  .tk-go svg { animation: none; }
}
