/* =========================================================
   Invitación Adriana & Raúl — estilos
   Móvil primero. En escritorio la invitación se muestra
   como una columna centrada del ancho de un teléfono.
   ========================================================= */

:root {
  /* Tipografía: cambia aquí la cursiva y la serif */
  --font-script: "Pinyon Script", "Snell Roundhand", cursive;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-classic: "Cormorant Garamond", Garamond, Georgia, serif;

  /* Colores */
  --ink: #1a1a1a;          /* texto principal */
  --ink-soft: #5c5c5c;     /* direcciones y textos secundarios */
  --paper: #ffffff;        /* fondo de la invitación */
  --outside: #2b2b2b;      /* fondo alrededor en escritorio */
  --gold: #b9a77f;         /* dorado suave de íconos y etiquetas */
  --gold-deep: #8f7c55;    /* dorado más oscuro para texto pequeño (mejor contraste) */
  --paper-warm: #e7e4de;   /* fondo tipo papel de la franja de padres */
  --btn: #7d6a45;           /* dorado profundo: texto blanco con contraste 5.2:1 */
  --btn-text: #ffffff;

  --page-max: 480px;
  --texture-fade: .20;      /* 0 = textura completa, 1 = blanco liso (antes .35) */
  --gutter: 22px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--outside);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.65;
  font-variant-numeric: lining-nums;   /* todos los números de la misma altura en toda la invitación */
}

img { display: block; max-width: 100%; }

h1, h2, p { margin: 0; }

.page {
  position: relative;
  isolation: isolate;
  max-width: var(--page-max);
  margin: 0 auto;
  background: transparent;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

/* ---------------- FONDO DE ORQUÍDEAS ----------------
   Capa fija detrás de toda la invitación: el contenido se desliza encima.
   Se hace con position: fixed porque background-attachment: fixed no funciona en iPhone. */
.page::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, var(--page-max));
  transform: translateX(-50%);
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, var(--texture-fade)), rgba(255, 255, 255, var(--texture-fade))),
    url("../img/fondo-orquideas.jpg") center / cover no-repeat,
    var(--paper);
  pointer-events: none;
}

/* ---------------- HERO ---------------- */
/* La foto se muestra completa (sin recorte) y el texto va encima */
.hero {
  /* Ajustes rápidos del hero:
     --hero-zoom      acerca la foto para poder moverla sin dejar huecos (1 = sin zoom)
     --hero-origin-x  punto desde donde se hace el zoom; más alto = la foto se recorre a la izquierda
     --hero-shade     intensidad del oscurecido (0 = nada, 1 = normal, 1.3 = más oscuro)
     --quote-top      altura de la cita (% del alto de la foto, 0% = borde superior)
     --mono-top       altura del centro del logo (% del alto de la foto)
     --mono-width     tamaño del logo (% del ancho de la foto)
     --hero-ratio     proporción del hero, igual al marco de Figma (ancho / alto) */
  --hero-zoom: 1.08;
  --hero-origin-x: 90%;
  --hero-shade: 1;
  --quote-top: 25%;
  --mono-top: 57%;
  --mono-width: 30cqi;
  --hero-ratio: 402 / 565;

  position: relative;
  container-type: inline-size;
  aspect-ratio: var(--hero-ratio);
  overflow: hidden;           /* recorta lo que sobra por el zoom y la proporción */
  color: #fff;
  /* Separada de los bordes y con esquinas redondas, como las fotos del carrusel */
  margin: 18px 18px 0;
  border-radius: 22px;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;  /* recorta de arriba, como en Figma; la pareja no se toca */
  transform: scale(var(--hero-zoom));
  transform-origin: var(--hero-origin-x) 50%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  text-align: center;
  isolation: isolate;
}

/* Capa oscura casi pareja en toda la foto, como en el Figma; un poco más fuerte arriba por la cita */
.hero__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--hero-shade);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, .45) 0%,
    rgba(0, 0, 0, .35) 35%,
    rgba(0, 0, 0, .30) 70%,
    rgba(0, 0, 0, .25) 100%
  );
}

.hero__quote {
  position: absolute;
  top: var(--quote-top);
  left: 50%;
  transform: translateX(-50%);
  width: 86cqi;               /* 346 px en el iPhone, igual que en Figma */
  font-size: 16px;
  font-size: clamp(14px, 4cqi, 20px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.nowrap { white-space: nowrap; }

/* Logo AR translúcido, centrado sobre la foto.
   Sube o baja --mono-opacity para hacerlo más o menos visible. */
.hero__monogram {
  --mono-opacity: .55;
  position: absolute;
  left: 50%;
  top: var(--mono-top);
  width: var(--mono-width);
  max-width: 200px;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: var(--mono-opacity);
  /* sombra muy suave para que el blanco no se pierda sobre la piedra clara */
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .35));
  pointer-events: none;
}

/* ---------------- NOMBRES ---------------- */
.names {
  padding: 26px var(--gutter) 0;
  text-align: center;
}

.names__title {
  font-family: var(--font-script);
  font-weight: 400;          /* Pinyon Script solo existe en 400: evita la negrita falsa */
  font-synthesis: none;
  font-size: 46px;
  font-size: clamp(42px, 13.5vw, 56px);   /* más grande que antes (34–44 px) */
  line-height: 1.1;
  white-space: nowrap;
  color: var(--btn);                        /* dorado profundo #7d6a45 */
}

/* La "y" más pequeña y en dorado claro, igual que en el sobre */
.names__y {
  font-size: .78em;
  color: var(--gold);
  padding: 0 .04em;
}

/* "Adriana y Raúl" (sobre, título y firma): centrado óptico.
   En Pinyon Script el trazo final de la "l" sale ~0.3em de su caja hacia la derecha,
   así que el texto se veía cargado a la derecha. text-indent negativo recorre la tinta
   0.16em a la izquierda; en em para que se ajuste al tamaño de cada pantalla. */
.envelope__names,
.names__title,
.closing__sign {
  text-indent: -.32em;
}

/* ---------------- ORQUÍDEAS ---------------- */
.orchids {
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter) 10px;
}

.orchids img {
  width: 55%;
  max-width: 260px;
  height: auto;
}

/* ---------------- PADRES ---------------- */
.parents {
  padding: 10px 0 18px;
  text-align: center;
}

.parents__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: 24px;
  font-size: clamp(20px, 6vw, 28px);   /* en una sola línea: cabe incluso en celulares de 360 px */
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
  margin: 0 var(--gutter) 14px;
}

/* Dos bloques apilados: nombres arriba y la etiqueta debajo */
.parents__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 var(--gutter);
}

.parents__group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Línea dorada corta entre las dos familias */
.parents__divider {
  display: block;
  width: 56px;
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.parents__name {
  font-family: var(--font-classic);
  font-size: 17px;
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.3;
  color: #2f2a26;
  text-wrap: balance;
}

.parents__name + .parents__name { margin-top: 2px; }

.parents__label {
  margin-top: 6px;
  font-family: var(--font-classic);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------------- FECHA ----------------
   Formato de invitación clásica: mes arriba, día grande entre "Sábado" y "2027", hora abajo.
   Sin fondo propio: el fondo fijo de orquídeas sigue detrás. */
.date {
  padding: 8px var(--gutter) 30px;
  text-align: center;
}

.date__intro {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 14px;
}

.date__when {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date__month,
.date__time,
.date__side {
  font-variant-numeric: lining-nums;   /* "2027" y "4:30" con números de la misma altura */
}

.date__month,
.date__time {
  font-family: var(--font-classic);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;          /* compensa el espacio extra de la última letra */
  text-transform: uppercase;
  color: var(--gold-deep);
}

.date__month { margin-bottom: 6px; }
.date__time  { margin-top: 8px; }

.date__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

.date__side {
  padding: 6px 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  font-family: var(--font-classic);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2em;
  padding-left: .2em;
  text-transform: uppercase;
  color: var(--ink);
}

.date__day {
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 1;
  font-variant-numeric: lining-nums;   /* el 7 no baja de la línea */
  color: var(--ink);
}

/* ---------------- TEXTOS ---------------- */
.intro,
.story {
  padding: 26px var(--gutter);
  text-align: center;
}

.story p {
  max-width: 36ch;
  margin-inline: auto;
}

.intro {
  padding-top: 14px;
  padding-inline: 7%;         /* deja el texto de 346 px de ancho en el iPhone, como en Figma */
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
}

/* "Para siempre" en la cursiva de los nombres, como cierre de la historia */
.story__forever {
  margin-top: 4px;
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: 38px;
  font-size: clamp(34px, 10vw, 44px);
  line-height: 1.1;
  color: var(--ink);
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------------- TARJETAS ---------------- */
.card {
  margin: 8px 18px 28px;
  padding: 26px 18px 24px;
  background: var(--paper);
  text-align: center;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06);
}

.card__title {
  font-size: 16px;
  font-weight: 700;
}

/* ---------------- CUENTA REGRESIVA ---------------- */
.countdown__sub {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.countdown__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  margin-top: 18px;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.countdown__num {
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;  /* misma altura y sin "brincos" al cambiar */
}

.countdown__sep {
  font-size: 22px;
  line-height: 1.1;
  padding: 0 2px;
}

.countdown__label {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown__done {
  margin-top: 16px;
  font-size: 20px;
}

/* ---------------- CARRUSEL ---------------- */
/* Desplazamiento nativo: se desliza con el dedo y "ancla" en cada foto */
.gallery { margin: 6px 0 36px; }

.gallery__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar { display: none; }

/* Espaciadores invisibles al inicio y al final: centran la primera y la última foto.
   Ancho = (100% - 80% de la foto) / 2 - 12px del gap. Funcionan igual en Safari y Chrome. */
.gallery__track::before,
.gallery__track::after {
  content: "";
  flex: 0 0 calc(10% - 12px);
}

.gallery__track:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.gallery__item {
  flex: 0 0 80%;              /* como en Figma: deja ver el borde de la siguiente foto */
  margin: 0;
  scroll-snap-align: center;  /* cada foto se detiene centrada al deslizar */
  aspect-ratio: 3 / 4.2;
  border-radius: 22px;
  overflow: hidden;
  background: #eee;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.gallery__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfcfcf;
  transition: background .2s, transform .2s;
}

.gallery__dots span.is-active {
  background: var(--ink);
  transform: scale(1.2);
}

/* ---------------- CEREMONIA / RECEPCIÓN ---------------- */
.venue { padding-top: 22px; }

.venue__icon {
  display: block;
  width: 40px;
  height: auto;                /* alto según el dibujo: sin hueco extra bajo las copas */
  margin: 0 auto 4px;
  color: var(--gold);          /* mismo dorado que las etiquetas de los padres y las líneas de la fecha */
}

.venue__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

/* Hora del evento: misma cursiva dorada que el Itinerario */
.venue__time {
  margin: 6px 0 2px;
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: 30px;
  line-height: 1;
  color: var(--gold-deep);
}

.venue__place {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.venue__address {
  margin: 10px auto 0;
  max-width: 32ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 22px;
  background: var(--btn);
  color: var(--btn-text);
  font-family: var(--font-serif);
  font-size: 13px;
  text-decoration: none;
  border-radius: 999px;        /* forma de píldora; con 10px queda solo con las esquinas suaves */
}

.btn {
  border: 0;
  cursor: pointer;
  line-height: 1.3;
}

/* Variante con borde: para acciones secundarias como "Copiar CLABE" */
.btn--outline {
  background: transparent;
  color: var(--btn);
  box-shadow: inset 0 0 0 1px var(--btn);
}

/* ---------------- HOSPEDAJE ---------------- */
.stay {
  margin: 6px 0 30px;
  text-align: center;
}

.stay__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: 40px;
  font-size: clamp(34px, 10vw, 44px);
  line-height: 1.1;
  color: var(--ink);
}

.stay__intro {
  max-width: 34ch;
  margin: 8px auto 16px;
  padding: 0 var(--gutter);
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* Carrusel de tarjetas: mismo comportamiento que el de fotos */
.stay__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 0 18px;              /* abajo: espacio para la sombra de la tarjeta */
  scrollbar-width: none;
}

.stay__track::-webkit-scrollbar { display: none; }

.stay__track::before,
.stay__track::after {
  content: "";
  flex: 0 0 calc(14% - 12px);       /* centra la primera y la última tarjeta */
}

.stay__track:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.stay__card {
  flex: 0 0 72%;
  margin: 0;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px;
}

.stay__name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.stay__time {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.stay__card .btn { margin-top: auto; }      /* botón siempre abajo, aunque el nombre ocupe 2 líneas */
.stay__card .gifts__event { margin-bottom: 14px; }

/* ---------------- ITINERARIO ---------------- */
.timeline {
  padding: 8px var(--gutter) 34px;
  text-align: center;
}

.timeline__wrap {
  position: relative;
  max-width: 330px;
  margin: 18px auto 0;
}

.timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  text-align: left;
}

/* Línea vertical (posición y alto los calcula js/main.js) */
.timeline__track {
  position: absolute;
  left: 31px;
  width: 2px;
  background: #e6dcc8;
  border-radius: 2px;
  overflow: hidden;
}

.timeline__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--btn);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .15s linear;
}

/* Círculo apagado: crema con ícono dorado */
.timeline__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f7f2e8;
  border: 1px solid #e6dcc8;
  color: var(--gold);
  transition: background .5s ease, border-color .5s ease, color .5s ease, transform .5s ease;
}

.timeline__dot svg {
  width: 32px;
  height: auto;
}

/* Círculo encendido: dorado profundo con ícono blanco */
.timeline__item.is-active .timeline__dot {
  background: var(--btn);
  border-color: var(--btn);
  color: #fff;
  transform: scale(1.05);
}

/* Pulso suave al encenderse */
.timeline__item.is-active .timeline__dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--btn);
  animation: timeline-pulse 1s ease-out 1 forwards;
}

@keyframes timeline-pulse {
  from { transform: scale(1);   opacity: .7; }
  to   { transform: scale(1.5); opacity: 0;  }
}

.timeline__time {
  font-family: var(--font-script);
  font-size: 24px;
  line-height: 1.1;
  color: var(--gold-deep);
}

.timeline__name {
  /* Si el título se parte en 2 líneas (celulares de 360 px), que queden juntas.
     line-height 1.25 + .2em de margen extra = el mismo alto que antes cuando es 1 línea */
  line-height: 1.25;
  margin: calc(2px + .2em) 0 calc(4px + .2em);
  font-family: var(--font-classic);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}

.timeline__text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .timeline__dot,
  .timeline__fill { transition: none; }
  .timeline__item.is-active .timeline__dot::after { animation: none; }
}

/* ---------------- CÓDIGO DE VESTIMENTA ---------------- */
.dress {
  padding: 6px var(--gutter) 34px;
  text-align: center;
}

.dress__photo {
  margin: 0 auto 22px;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
}

.dress__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dress__type {
  margin-top: 6px;
  font-family: var(--font-classic);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.dress__figures {
  display: block;
  width: 74%;                  /* la imagen ahora tiene margen a la izquierda para centrar la línea */
  max-width: 290px;
  height: auto;
  margin: 18px auto 16px;
}

.dress__note {
  max-width: 30ch;
  margin: 0 auto;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------------- REGALOS ---------------- */
.gifts-intro {
  padding: 4px var(--gutter) 14px;
  text-align: center;
}

/* Primera frase de Regalos destacada como cita: Cormorant cursiva dorada */
.gifts-intro__quote {
  max-width: 30ch;
  margin: 10px auto 0;
  font-family: var(--font-classic);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  color: var(--gold-deep);
}

.gifts-intro__text {
  max-width: 32ch;
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.gifts__stores {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

/* línea dorada entre las dos tiendas */
.gifts__stores::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}

.gifts__store {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.gifts__store .venue__place { margin-top: 0; text-wrap: balance; }

.gifts__event {
  margin-top: 6px;
  font-family: var(--font-classic);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.gifts__store .btn {
  margin-top: 12px;
  padding: 9px 18px;
}

/* Recuadro de datos bancarios (se despliega al tocar el botón) */
.bank {
  margin-top: 16px;
  padding: 16px 14px;
  border: 1px solid #e6dfcf;
  border-radius: 8px;
  background: #faf8f3;
}

.bank__list { margin: 0; }

.bank__list dt {
  font-family: var(--font-classic);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.bank__list dd {
  margin: 2px 0 12px;
  font-size: 15px;
  color: var(--ink);
}

.bank__clabe {
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .04em;
}

.bank .btn { margin-top: 2px; }

.bank__msg {
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gold-deep);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}


/* ---------------- CONFIRMACIÓN (RSVP) ---------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.rsvp {
  padding: 6px 0 40px;
  text-align: center;
}

.rsvp__photo {
  width: 70%;
  max-width: 260px;
  margin: 0 auto 20px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
}

.rsvp__photo img { width: 100%; height: 100%; object-fit: cover; }

.rsvp__deadline {
  margin-top: 6px;
  font-family: var(--font-classic);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.rsvp__card {
  margin-top: 18px;
  text-align: left;
}

.rsvp__guest {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.rsvp__seats {
  margin: 4px 0 18px;
  text-align: center;
  font-family: var(--font-classic);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* Sí / No como botones grandes, fáciles de tocar */
.rsvp__choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.rsvp__opt { position: relative; }

.rsvp__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.rsvp__opt span {
  display: block;
  padding: 11px 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--btn);
  color: var(--btn);
  text-align: center;
  font-size: 14px;
  transition: background .2s, color .2s;
}

.rsvp__opt input:checked + span {
  background: var(--btn);
  color: #fff;
}

.rsvp__opt input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rsvp__field { margin-bottom: 14px; }

.rsvp__field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.rsvp__opt-label { font-size: 12px; }

.rsvp__field input,
.rsvp__field select,
.rsvp__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6dfcf;
  border-radius: 8px;
  background: #faf8f3;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;            /* 16px evita que el iPhone haga zoom al escribir */
  appearance: none;
}

.rsvp__field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%),
                    linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.rsvp__field input:focus,
.rsvp__field select:focus,
.rsvp__field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 167, 127, .25);
}

.rsvp__hp { position: absolute; left: -9999px; }

.rsvp__submit {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
}

.rsvp__submit[disabled] { opacity: .6; cursor: wait; }

.rsvp__status {
  min-height: 1.3em;
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #9a3b2e;
}

.rsvp__done,
.rsvp__closed { text-align: center; }

.rsvp__done-title {
  font-family: var(--font-script);
  font-size: 40px;
  line-height: 1.1;
}

.rsvp__done-text {
  margin: 8px 0 16px;
  color: var(--ink-soft);
}

.rsvp__closed p { color: var(--ink-soft); }


/* ---------------- CIERRE ---------------- */
.closing {
  padding: 10px var(--gutter) 20px;
  text-align: center;
}

.closing__photo {
  max-width: 340px;
  margin: 0 auto 22px;
  aspect-ratio: 2 / 3;               /* proporción original de la foto: se ve completa, sin recortes */
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
}

.closing__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;           /* si algún día se recorta, que conserve la parte de arriba (rostros) */
}

/* Monograma en dorado: el PNG blanco se "pinta" con una máscara */
.closing__mono {
  width: 96px;
  aspect-ratio: 565 / 419;
  margin: 0 auto 18px;
  background: var(--gold);
  -webkit-mask: url("../img/monograma.png") center / contain no-repeat;
          mask: url("../img/monograma.png") center / contain no-repeat;
}

.closing__date {
  display: inline-block;
  padding: 8px 4px 8px calc(4px + .3em);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  font-family: var(--font-classic);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--ink);
}

.closing__phrase {
  max-width: 28ch;
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.closing__love {
  margin-top: 18px;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

.closing__sign {
  margin-top: 2px;
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: 44px;
  font-size: clamp(38px, 11vw, 48px);
  line-height: 1.1;
  color: var(--ink);
}


/* La "y" de la firma: más pequeña y en dorado claro, igual que en el sobre */
.closing__y {
  font-size: .78em;
  color: var(--gold);
  padding: 0 .04em;
}

/* =========================================================
   SOBRE DE BIENVENIDA
   ========================================================= */
html.env-locked,
html.env-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

.envelope {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: env(safe-area-inset-top, 0px) 20px env(safe-area-inset-bottom, 0px);
  /* Fondo del sobre sin velo blanco: la textura de orquídeas se ve un poco más que en el resto de la invitación */
  background:
    url("../img/fondo-orquideas-sobre.jpg") center / cover no-repeat,   /* versión HD con relieve más marcado, solo en el sobre */
    #f7f2e8;
  text-align: center;
  /* Velocidad de la apertura: 1 = original (2.4 s), 1.4 ≈ 3.4 s, 1.2 ≈ 2.9 s.
     js/main.js lee este mismo valor para saber cuándo quitar el sobre. */
  --env-speed: 1.4;
  transition: opacity calc(.6s * var(--env-speed)) ease calc(1.7s * var(--env-speed));
}

.envelope[hidden] { display: none; }

.envelope__names {
  font-family: var(--font-script);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(38px, 11vw, 52px);
  line-height: 1.1;
  color: var(--ink);
}

/* La "y" entre los nombres: más pequeña y en dorado, como adorno (estilo invitación impresa) */
.envelope__y {
  font-size: .78em;
  color: var(--gold);
  padding: 0 .04em;
}

.envelope__date {
  margin-bottom: 26px;
  font-family: var(--font-classic);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;
  color: var(--gold-deep);
}

.envelope__hint {
  margin-top: 28px;
  font-family: var(--font-classic);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: opacity calc(.3s * var(--env-speed));
}

/* --- El sobre --- */
.env {
  position: relative;
  width: min(84vw, 360px);
  aspect-ratio: 10 / 7;
  perspective: 900px;
}

.env__back {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 6px;
  background: #e8dcc6;
  box-shadow: 0 18px 40px rgba(60, 45, 20, .25);
}

.env__card {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7%;
  height: 86%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 9%;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  transition: transform calc(.8s * var(--env-speed)) cubic-bezier(.2, .7, .2, 1) calc(.85s * var(--env-speed));
}

.env__mono {
  width: 34%;
  aspect-ratio: 565 / 419;
  background: var(--gold);
  -webkit-mask: url("../img/monograma.png") center / contain no-repeat;
          mask: url("../img/monograma.png") center / contain no-repeat;
}

.env__card-text {
  margin-top: 6px;
  font-family: var(--font-script);
  font-size: clamp(20px, 6vw, 26px);
  color: var(--ink);
}

/* Bolsillo frontal: papel con una "V" abierta arriba */
.env__pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 6px;
  background:
    linear-gradient(rgba(251, 248, 241, .85), rgba(244, 237, 224, .9)),
    url("../img/fondo-orquideas.jpg") center / cover;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}

.env__pocket svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Solapa superior: triángulo que gira hacia atrás */
.env__flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  z-index: 4;
  background:
    linear-gradient(rgba(246, 240, 228, .9), rgba(238, 229, 211, .95)),
    url("../img/fondo-orquideas.jpg") center / cover;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform calc(.6s * var(--env-speed)) ease-in-out calc(.25s * var(--env-speed));
}

/* Sello sobre la punta de la solapa */
.env__seal {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 5;
  width: 30%;              /* sello de cera ondulado: un poco más grande para que el logo se lea */
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 8px rgba(80, 55, 15, .35));
  animation: seal-pulse 2.4s ease-in-out infinite;
  transition: opacity calc(.3s * var(--env-speed)) ease, transform calc(.3s * var(--env-speed)) ease;
  -webkit-tap-highlight-color: transparent;
}

.env__seal img { display: block; width: 100%; height: auto; }

.env__seal:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@keyframes seal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.06); }
}

/* --- Secuencia de apertura --- */
.envelope.is-opening .envelope__hint { opacity: 0; }

/* Los nombres y la fecha se desvanecen mientras se abre la solapa,
   para que la tarjeta no los tape a medias al subir */
.envelope__names,
.envelope__date,
.envelope__place {
  transition: opacity calc(.5s * var(--env-speed)) ease calc(.3s * var(--env-speed));
}

.envelope.is-opening .envelope__names,
.envelope.is-opening .envelope__date,
.envelope.is-opening .envelope__place { opacity: 0; }

.envelope.is-opening .env__seal {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
}

.envelope.is-opening .env__flap {
  transform: rotateX(180deg);
  animation: flap-behind calc(.6s * var(--env-speed)) calc(.25s * var(--env-speed)) forwards;   /* a mitad del giro, la solapa pasa detrás de la tarjeta */
}

@keyframes flap-behind {
  0%, 49%   { z-index: 4; }
  50%, 100% { z-index: 1; }
}

.envelope.is-opening .env__card { transform: translateY(-58%); }

.envelope.is-opening { opacity: 0; }

/* Celular en horizontal: el sobre se achica para que quepa todo */
@media (max-height: 500px) and (orientation: landscape) {
  .envelope { gap: 0; }
  .envelope__names { font-size: 30px; }
  .envelope__date { margin-bottom: 0; }
  .envelope__place { margin-bottom: 10px; }
  .env { width: min(64vh, 300px); }      /* alto del sobre ≈ 45% de la pantalla */
  .envelope__hint { margin-top: 12px; }
}

/* Movimiento reducido: solo se desvanece */
@media (prefers-reduced-motion: reduce) {
  .envelope { transition: opacity .4s ease; }
  .env__seal { animation: none; }
  .env__flap, .env__card, .env__seal,
  .envelope__names, .envelope__date, .envelope__place { transition: none; }
}

/* ---------------- MÚSICA DE FONDO ----------------
   Círculo dorado fijo abajo a la derecha. Tachado = en pausa. */
.music {
  position: fixed;
  right: max(16px, calc((100vw - var(--page-max)) / 2 + 16px));  /* en escritorio, dentro de la columna */
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 900;                      /* debajo del sobre (1000) */
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--btn);
  color: #fff;
  box-shadow: 0 4px 12px rgba(60, 45, 20, .28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: music-in .6s ease both;
}

.music[hidden] { display: none; }
.music svg { width: 16px; height: 16px; }
.music__slash { opacity: 0; transition: opacity .2s; }
.music.is-paused .music__slash { opacity: 1; }
.music:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@keyframes music-in {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .music { animation: none; }
}

/* ---------------- ESCRITORIO ---------------- */
@media (min-width: 520px) {
  body { padding: 32px 0; }
  .page {
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__track { scroll-behavior: auto; }
  .gallery__dots span { transition: none; }
}

/* Pantallas más anchas que un celular vertical que NO usan la versión sitio web
   (p. ej. celular de lado): a los costados se ve el fondo de orquídeas en lugar del gris oscuro.
   Velo crema un poco más fuerte que dentro de la invitación para que la columna resalte. */
@media (min-width: 520px) {
  body {
    background:
      linear-gradient(rgba(240, 233, 220, .6), rgba(240, 233, 220, .6)),
      url("../img/fondo-orquideas.jpg") center / cover fixed,
      #f0e9dc;
  }
  .page { box-shadow: 0 16px 50px rgba(60, 45, 20, .22); }
}

/* Galería: la foto horizontal en blanco y negro (a113) se recorta en el carrusel vertical del celular;
   se encuadra hacia la derecha para que se vea la cara de Adriana y la mano con el anillo */
.gallery__item img[src$="a113.jpg"] { object-position: 72% 50%; }

/* Lugar debajo de la fecha en el sobre: mismo estilo de etiqueta, un poco más pequeño.
   El espacio hacia el sobre (26px) pasa de la fecha a esta línea */
.envelope__date { margin-bottom: 0; }
.envelope__place {
  margin: 4px 0 26px;
  font-family: var(--font-classic);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
@media (max-height: 500px) and (orientation: landscape) {
  .envelope__place { margin-bottom: 10px; }
}

/* Lugar debajo de la hora en la fecha de la invitación (mismo estilo que en el sobre) */
.date__place {
  display: block;
  margin-top: 4px;
  font-family: var(--font-classic);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
