@font-face { font-family: Palatino Local; src: url("assets/P052-Roman.woff") format("woff"); font-display: swap; }
@font-face { font-family: Palatino Local; src: url("assets/P052-Italic.woff") format("woff"); font-style: italic; font-display: swap; }
@font-face { font-family: Palatino Local; src: url("assets/P052-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: Caligrafía; src: url("assets/Z003-MediumItalic.woff") format("woff"); font-display: swap; }

:root {
  --marfil: #f8efdd; --crema: #fff8e9; --tinta: #39281f; --oro: #806039;
  --oro-claro: #edd19c; --vino: #702530; --vino-oscuro: #47191e; --borde: #c3a678;
  --serif: "Palatino Local", Palatino, Georgia, serif;
  --script: Caligrafía, "Palatino Local", Georgia, serif;
  color: var(--tinta); background: var(--vino-oscuro);
  font-family: var(--serif); font-size: 17px;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, blockquote { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; overflow-wrap: break-word; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #b88249; outline-offset: 4px; }
h1:focus { outline: none; }
.boton { border: 1px solid var(--oro-claro); border-radius: .24rem; padding: .66rem 1.1rem; }
.boton-oro { background: var(--oro-claro); color: #421b1e; font-weight: 700; min-width: 12rem; }
.boton-oro:hover { background: #f7dfae; }
.boton-texto { background: transparent; color: var(--oro-claro); border: 0; padding: .42rem .6rem; text-decoration: underline; text-underline-offset: .23em; }

.portada {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(2.35rem, env(safe-area-inset-top)) 1rem max(2.35rem, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 30%, #743039, #48191f 68%, #3a1218);
  overflow: hidden;
}
.portada-interior { width: min(35rem, 100%); text-align: center; }
.nombre-portada { color: var(--oro-claro); font: clamp(2.45rem, 8vw, 4.2rem)/1 var(--script); margin-bottom: 1.6rem; }
.sobre {
  position: relative; width: 100%; aspect-ratio: 1.5; background: var(--marfil);
  border: 1px solid #c4a47a; border-radius: .26rem; perspective: 1050px;
  box-shadow: 0 1.15rem 2.5rem #200a0d80; isolation: isolate;
}
.interior-sobre {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(150deg, #d1b48e, #c9a778 76%, #b28d62);
  box-shadow: inset 0 0 .8rem #55341a70;
}
.tarjeta-sobre {
  position: absolute; z-index: 1; height: 91%; width: 85%; top: 5%; left: 7.5%;
  padding: 4% 18% 12%; object-fit: contain; background: var(--crema);
  border: 1px solid var(--borde); border-radius: .2rem;
  transition: transform .74s cubic-bezier(.2,.7,.2,1) .27s;
}
.bolsillo {
  position: absolute; z-index: 2; inset: 44% 0 0; border-radius: 0 0 .24rem .24rem;
  background: linear-gradient(145deg, #fbf1db, #f5e8cc);
  border-top: 1px solid #ba9c72;
  display: grid; place-items: center;
}
.bolsillo::before { content: ""; position: absolute; inset: .46rem; border: 1px solid #ccb38b8a; pointer-events: none; }
.marca-roja { display: flex; gap: 2%; align-items: center; justify-content: center; width: 58%; height: 77%; }
.adorno-manuscrito { width: 28%; max-height: 92%; object-fit: contain; }
.presente { width: 53%; }
.solapa {
  position: absolute; z-index: 3; inset: 0 0 auto; height: 51%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: linear-gradient(155deg, #fff8e9, #f7ebd1);
  border-radius: .24rem .24rem .12rem .12rem;
  box-shadow: 0 .27rem .46rem #6b4c2d55;
  transform-origin: center top; backface-visibility: hidden;
  transition: transform .57s cubic-bezier(.32,.05,.26,.98);
}
.marca-aniversario { height: 75%; width: 76%; object-fit: contain; }
.fecha-sobre { display: flex; justify-content: space-between; gap: .5rem; width: 80%; color: #694a2e; font-size: clamp(.72rem, 2.8vw, 1rem); }
.acciones-portada { display: grid; justify-items: center; gap: .55rem; margin-top: 1.6rem; transition: opacity .25s; }
.abriendo .solapa { transform: rotateX(177deg); }
.abriendo .tarjeta-sobre { transform: translateY(-58%) rotate(-2deg); }
.abriendo .acciones-portada { opacity: 0; }
.saliendo .portada-interior { opacity: 0; transform: translateY(-.65rem); transition: opacity .29s, transform .29s; }

.invitacion { width: min(52rem, 100%); margin-inline: auto; background: var(--marfil); }
.encabezado { padding: clamp(.65rem, 3.2vw, 1.5rem); }
.marco { position: relative; border: 1px solid var(--borde); }
.marco::after { content: ""; position: absolute; inset: .32rem; border: 1px solid #c3a6787a; pointer-events: none; }
.encabezado-interior {
  min-height: clamp(27rem, 65vw, 35rem);
  display: grid; align-items: center; overflow: hidden;
  background: linear-gradient(115deg, #fff8e8, #f5e8cd);
}
.encabezado-virgen {
  position: absolute; inset: 0 0 0 auto; width: auto; max-width: none;
  height: 100%; object-fit: contain; transform-origin: right center;
}
.encabezado-texto {
  z-index: 1; width: 63%; padding: 1.6rem 0 1.6rem clamp(1.1rem, 5vw, 4.1rem);
}
.emblema { width: clamp(7rem, 22vw, 13rem); margin-left: -.25rem; margin-bottom: 1rem; }
h1 { font: clamp(2.45rem, 6.7vw, 4.65rem)/.99 var(--script); color: var(--vino); max-width: 14ch; }
.nombre-invitacion { font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 700; color: var(--oro); margin: .75rem 0 .75rem; }
.fecha-invitacion { font-size: clamp(.98rem, 2.4vw, 1.12rem); line-height: 1.27; }
.fecha-invitacion span { display: inline-block; margin-top: .22rem; }
.ver-datos { display: inline-block; color: #623033; margin-top: .9rem; font-size: .94rem; line-height: 1.25; }
.dedicatoria {
  margin: 0 clamp(.65rem, 3.2vw, 1.5rem) 1.1rem;
  padding: clamp(1.7rem, 6vw, 3.8rem) clamp(1.45rem, 9vw, 7rem) 1.6rem;
}
.dedicatoria-texto { font-size: clamp(1.03rem, 2.2vw, 1.2rem); line-height: 1.53; }
.dedicatoria p + p { margin-top: .75rem; }
.lema-texto { color: var(--vino); margin-block: 1.35rem 1rem; font: clamp(1.9rem, 5vw, 2.9rem)/1.06 var(--script); }
.oracion { font-style: italic; }
.amen { color: var(--oro); font-style: italic; }
.arabesco { width: 7.2rem; margin: 1.45rem auto 0; }
.datos { background: var(--vino); color: var(--crema); padding: clamp(1.4rem, 5vw, 3rem); scroll-margin-top: 1rem; }
.sedes { border: 1px solid #be9b77; text-align: center; padding: clamp(1.15rem, 4vw, 2.1rem); margin-inline: auto; max-width: 40rem; }
.datos h2 { font: clamp(2.25rem, 5vw, 3rem)/1.03 var(--script); color: var(--oro-claro); }
.fecha-misa { font-weight: 700; line-height: 1.4; margin: .6rem 0 .55rem; }
.lugar { font-size: 1.16rem; }
.domicilio { margin-top: .28rem; line-height: 1.35; }
.reunion { max-width: 30rem; padding-top: 1.3rem; margin: 1.3rem auto 0; border-top: 1px solid #be9b77; }
.reunion > p:first-child { line-height: 1.43; margin-bottom: .4rem; }
.reverso { text-align: center; padding: clamp(1.1rem, 4vw, 2.2rem); }
.reverso-rojo { color: var(--crema); background: var(--vino); padding: clamp(2.2rem, 8vw, 4rem) .9rem; border: 1px solid #76402e; outline: 1px solid #bd9470; outline-offset: -.4rem; }
.reverso-rojo h2 { font: clamp(3rem, 9vw, 5rem)/1.02 var(--script); color: var(--oro-claro); }
.reverso-rojo p { font: clamp(1.72rem, 5vw, 2.5rem)/1.16 var(--script); max-width: 22ch; margin: .65rem auto 0; }
.reverso-marfil { border: 1px solid var(--borde); border-top: 0; padding: 2.5rem 1rem 1.4rem; background: #fbf2de; }
.lema { width: min(17rem, 76%); margin-inline: auto; }
.ornamento { width: 6.4rem; margin: 1.3rem auto 0; }
.pie { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.45rem; padding: .15rem 1rem 4.5rem; color: var(--vino); }
.volver { padding: 0; background: transparent; color: inherit; border: 0; text-decoration: underline; text-underline-offset: .22em; }
.control-musica {
  position: fixed; z-index: 4; bottom: max(.75rem, env(safe-area-inset-bottom)); right: max(.7rem, env(safe-area-inset-right));
  background: var(--vino-oscuro); color: var(--crema); box-shadow: 0 .15rem .75rem #200a0d38; font-size: .88rem;
}
.animar .encabezado-virgen { animation: imagen-entra .95s ease-out both; }
.animar .encabezado-texto > * { animation: texto-entra .55s ease-out both; }
.animar .encabezado-texto > :nth-child(2) { animation-delay: .14s; }
.animar .encabezado-texto > :nth-child(3) { animation-delay: .25s; }
.animar .encabezado-texto > :nth-child(4) { animation-delay: .35s; }
.animar .encabezado-texto > :nth-child(5) { animation-delay: .44s; }
.preparada { opacity: 0; transform: translateY(.75rem); }
.visible { opacity: 1; transform: none; transition: opacity .6s ease-out, transform .6s ease-out; }
@keyframes imagen-entra { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@keyframes texto-entra { from { opacity: 0; transform: translateY(.65rem); } to { opacity: 1; transform: none; } }
@media (max-width: 390px) {
  .encabezado-texto { width: 69%; }
  .encabezado-virgen { opacity: .92; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
.marca-aniversario { height: 59%; }
.arabesco-solapa { height: 13%; width: 34%; object-fit: contain; margin-bottom: .18rem; }
