/* ==========================================================================
   Bautizo de Luca Castaldi · 12.12.2026
   Dirección de arte: pintura religiosa renacentista, cielo dorado y marfil.
   Mobile-first. Las escenas reciben --p (0→1) desde js/scroll.js.
   ========================================================================== */

/* Fuentes alojadas en el sitio (OFL, subconjunto latino): sin terceros, más rápido en móviles */
@font-face { font-family: 'Pinyon Script'; src: url('../assets/fuentes/pinyon-script.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../assets/fuentes/cinzel.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../assets/fuentes/cormorant.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../assets/fuentes/cormorant-italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../assets/fuentes/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }

:root {
  --tinta: #5f4b38;
  --tinta-suave: #7d6650;
  --oro: #a78455;
  --oro-claro: #e7cf94;
  --oro-profundo: #8a6a3e;
  --marfil: #fffaf0;
  --marfil-2: #f7ead9;
  --azul: #dce8f2;
  --salvia: #a1c6ba;
  --salvia-oscura: #6f948a;
  --error: #9b3d33;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --versal: 'Cinzel', 'Cormorant Garamond', serif;
  --guion: 'Pinyon Script', 'Cormorant Garamond', cursive;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;

  --alto: 100vh;
  --suave: cubic-bezier(.2, .7, .2, 1);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}
@supports (height: 100svh) { :root { --alto: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--tinta);
  font: 400 17px/1.75 var(--sans);
  background: #f4e3c8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.bloqueado { overflow: hidden; height: var(--alto); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }

/* ---------- Tipografía editorial ---------- */
.sobretitulo {
  font: 600 12.5px/1.6 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--oro-profundo);
  margin: 0 0 14px;
}
h2 {
  text-wrap: balance;
  font-family: var(--serif);
  font-size: clamp(40px, 11vw, 72px);
  line-height: 1;
  margin-bottom: 22px;
  color: #5a4532;
}
h3 { font: 500 clamp(28px, 7.6vw, 36px)/1.15 var(--serif); margin: 8px 0 10px; text-wrap: balance; }
.subtitulo { font: italic 400 clamp(24px, 6.6vw, 32px)/1.3 var(--serif); color: var(--tinta-suave); text-wrap: balance; }
.pequeno { font-size: 14.5px; line-height: 1.6; opacity: .92; }
.centro { text-align: center; }
.ornamento { width: min(240px, 70%); height: auto; margin: 22px auto; display: block; }

/* ==========================================================================
   CIELO FIJO
   ========================================================================== */
.cielo {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(#e5ece6, #fff5d9 40%, #f4d3ab 78%, #b9d7cc);
  pointer-events: none;
}
.cielo > * { position: absolute; will-change: transform; }
.cielo__pintura {
  inset: -6% -4%;
  background: url('../assets/img/cielo.webp') center 30% / cover no-repeat;
  opacity: .82;
}
.cielo__velo {
  inset: 0;
  background: linear-gradient(180deg, #eef4f6cc 0%, #fff8ea33 40%, #fff3df22 60%, #cfe6dccc 100%);
  opacity: .35;
  will-change: opacity;
}
.cielo__rayos {
  left: 50%;
  top: -18%;
  width: 170vmax;
  height: 170vmax;
  margin-left: -85vmax;
  margin-top: -85vmax;
  background: repeating-conic-gradient(from 0deg,
    #fff6dc00 0deg 5deg, #fff6dc55 7deg 9deg, #fff6dc00 11deg 17deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 8%, transparent 48%);
          mask-image: radial-gradient(circle, #000 0 8%, transparent 48%);
  opacity: .7;
  animation: girar 140s linear infinite;
}

/* Luz divina que sigue al puntero / dedo */
.cielo__luz {
  left: 0;
  top: 0;
  width: 70vmax;
  height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  background: radial-gradient(circle, #fffbeacc 0%, #fff4d466 26%, #fff4d400 62%);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 3;
}
.cielo__luz.activa { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cielo__luz { mix-blend-mode: screen; } }

/* Capas de nubes: mosaico vertical (parallax JS) + deriva horizontal (CSS) */
.nubes { left: 0; top: 0; width: 100%; height: calc(var(--alto) + var(--th)); }
.nubes__deriva {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% + var(--tw));
  background-repeat: repeat;
  background-size: var(--tw) var(--th);
  animation: deriva var(--vel) linear infinite;
  will-change: transform;
}
.nubes--fondo  { --tw: 150vh; --th: 140.6vh; --vel: 220s; opacity: .55; }
.nubes--medio  { --tw: 125vh; --th: 132.8vh; --vel: 160s; opacity: .62; }
.nubes--frente { --tw: 150vh; --th: 178.1vh; --vel: 120s; opacity: .45; }
.nubes--fondo  .nubes__deriva { background-image: url('../assets/img/nubes-fondo.webp'); }
.nubes--medio  .nubes__deriva { background-image: url('../assets/img/nubes-medio.webp'); animation-direction: reverse; }
.nubes--frente .nubes__deriva { background-image: url('../assets/img/nubes-frente.webp'); }

/* Bandada de palomas lejanas */
.bandada { inset: 0; }
.paloma-vuelo {
  position: absolute;
  left: 0;
  width: var(--tam, 44px);
  opacity: .9;
  animation: cruzar var(--dur, 26s) linear var(--retraso, 0s) infinite;
  will-change: transform;
}
.paloma-vuelo .paloma-svg { width: 100%; height: auto; overflow: visible; animation: planear 3.2s ease-in-out infinite alternate; }
.paloma-vuelo.izq { animation-name: cruzar-izq; }
.paloma-vuelo.izq .paloma-svg { transform: scaleX(-1); }
.ala-frente, .ala-tras { transform-box: view-box; animation: aletear var(--aleteo, .7s) ease-in-out infinite alternate; }
.ala-frente { transform-origin: 88px 58px; }
.ala-tras { transform-origin: 78px 57px; animation-delay: -.08s; }

/* ==========================================================================
   ENTRADA
   ========================================================================== */
.entrada {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 35%, #fffdf6f2 0%, #fff8eadd 45%, #f6e4c8e6 100%),
    url('../assets/img/cielo.webp') center / cover;
  transition: opacity 1.1s var(--suave), transform 1.4s var(--suave), visibility 0s 1.4s;
}
.entrada__contenido { max-width: 360px; }
.entrada__paloma {
  width: 150px;
  margin: 0 auto 6px;
  animation: flotar 6s ease-in-out infinite alternate;
}
.entrada__titulo {
  font: 400 clamp(70px, 24vw, 110px)/.9 var(--guion);
  color: #6e5235;
  margin: 4px 0 34px;
}
.entrada__titulo span {
  display: block;
  font: 500 15px/1 var(--versal);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--oro-profundo);
  margin-bottom: 18px;
}
.entrada .boton { margin-bottom: 14px; }
.entrada.abierta { opacity: 0; transform: scale(1.06); visibility: hidden; pointer-events: none; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 26px;
  border: 1px solid #a88c67;
  border-radius: 100px;
  background: #fffaf0d9;
  color: #6f5438;
  font: 600 12.5px/1.25 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--suave), background .25s, box-shadow .25s;
}
.boton svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.boton:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 10px 28px #8a6a3e26; }
.boton:active { transform: translateY(0) scale(.98); }
.boton--oro { background: linear-gradient(135deg, #b59468, #9d7c52); color: #fffaf0; border-color: #9d7c52; box-shadow: 0 10px 30px #8a6a3e33; }
.boton--oro:hover { background: linear-gradient(135deg, #a8875b, #8c6c44); }
.boton--ancho { width: 100%; }
.boton--grande { min-height: 56px; font-size: 13.5px; }
.boton--grande svg { width: 20px; height: 20px; }
.boton[disabled] { opacity: .6; cursor: progress; transform: none; }
.boton-texto {
  display: block;
  margin: 0 auto;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--tinta-suave);
  font: 500 14px var(--sans);
  letter-spacing: .04em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }

/* ==========================================================================
   ESCENAS
   ========================================================================== */
main { position: relative; }
.escena { position: relative; --p: 0; }
.escena[data-fija] { height: calc(var(--alto) * 2.1); }
.escena__fija {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: var(--alto);
  overflow: hidden;
}

/* ---------- 1 · Portada ---------- */
.portada .escena__fija { display: grid; place-items: center; text-align: center; }
.portada__texto {
  position: relative;
  z-index: 6;
  padding: 0 22px;
  margin-top: 9vh;
  transform: translate3d(0, calc(var(--p) * -32vh), 0) scale(calc(1 - var(--p) * .14));
  opacity: calc(1.15 - var(--p) * 2.1);
  text-shadow: 0 0 28px #fffaf0, 0 0 60px #fff6e6;
  will-change: transform, opacity;
}
.portada__titulo { display: block; margin: 6px 0 0; }
.portada__pre {
  display: block;
  font: 500 clamp(16px, 4.4vw, 20px)/1 var(--versal);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--oro-profundo);
}
.portada__nombre {
  display: block;
  font: 400 clamp(118px, 40vw, 220px)/.95 var(--guion);
  color: #6a4e31;
  margin: 8px 0 -6px;
  padding-right: .08em;
}
.portada__apellido {
  display: block;
  font: 500 clamp(30px, 9.4vw, 50px)/1 var(--versal);
  letter-spacing: .26em;
  margin-right: -.26em;
  color: #5a4532;
}
.portada .subtitulo { margin: 0 0 18px; font-size: clamp(25px, 7vw, 34px); }
.portada .sobretitulo { font-size: clamp(13px, 3.6vw, 15px); letter-spacing: .24em; color: #7a5a30; }

.portada__querubin {
  position: absolute;
  z-index: 4;
  top: max(2.5vh, env(safe-area-inset-top, 0px));
  width: min(31vw, 210px);
  filter: drop-shadow(0 12px 20px #6e4d2a30);
  animation: flotar 6.5s ease-in-out infinite alternate;
  pointer-events: none;
}
.portada__querubin--izq {
  left: -1vw;
  transform: translate3d(calc(var(--p) * -38vw), calc(var(--p) * -16vh), 0) rotate(calc(var(--p) * -14deg));
}
.portada__querubin--der {
  right: -1vw;
  top: calc(max(2.5vh, env(safe-area-inset-top, 0px)) + 4vh);
  animation-duration: 7.8s;
  animation-delay: -3s;
  transform: translate3d(calc(var(--p) * 38vw), calc(var(--p) * -12vh), 0) rotate(calc(var(--p) * 14deg));
}
@media (max-height: 720px) {
  .portada__querubin { width: min(25vw, 170px); }
  .portada__texto { margin-top: 12vh; }
}

/* Cortina de nubes: con el scroll las nubes suben desde los lados y cubren
   la portada como un telón; luego dejan paso a la siguiente sección */
.cortina { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.cortina__nube {
  position: absolute;
  bottom: -6vh;
  width: 135vw;
  max-width: none;
  will-change: transform;
}
.cortina__nube--izq {
  left: -70vw;
  transform: translate3d(calc(var(--p) * 42vw), calc(16vh - var(--p) * 62vh), 0) scale(calc(1 + var(--p) * .7));
  transform-origin: 30% 100%;
  animation: vaiven 11s ease-in-out infinite alternate;
}
.cortina__nube--der {
  right: -70vw;
  transform: translate3d(calc(var(--p) * -42vw), calc(20vh - var(--p) * 66vh), 0) scale(calc(-1 - var(--p) * .7), calc(1 + var(--p) * .7));
  transform-origin: 70% 100%;
  animation: vaiven 13s ease-in-out -4s infinite alternate-reverse;
}
.cortina__nube--centro {
  left: -18vw;
  width: 136vw;
  opacity: .95;
  transform: translate3d(0, calc(24vh - var(--p) * 30vh), 0) scale(calc(1 + var(--p) * .45));
  transform-origin: 50% 100%;
}
.cortina__bruma {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, #fffaf0f2 0%, #fff6e6cc 45%, #f8ead200 85%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
  opacity: min(clamp(0, calc((var(--p) - .45) * 3), .9), clamp(0, calc((1 - var(--p)) * 5), 1));
}
.indicador {
  position: absolute;
  z-index: 6;
  bottom: calc(22px + var(--seguro-abajo));
  left: 0;
  right: 0;
  z-index: 7;
  font: 600 12px var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #6f5438;
  opacity: calc(1 - var(--p) * 8);
}
.indicador i {
  display: block;
  width: 1px;
  height: 38px;
  margin: 10px auto 0;
  background: linear-gradient(#6f5438, transparent);
  transform-origin: top;
  animation: gotear 2.2s var(--suave) infinite;
}

/* Entrada en cascada de la portada al abrir la invitación */
.portada__texto > * { opacity: 0; transform: translateY(18px); }
.abierto .portada__texto > * { animation: aparecer 1.4s var(--suave) forwards; }
.abierto .portada__texto > :nth-child(2) { animation-delay: .25s; }
.abierto .portada__texto > :nth-child(3) { animation-delay: .65s; }
.abierto .portada__texto > :nth-child(4) { animation-delay: .85s; }
.abierto .portada__texto > :nth-child(5) { animation-delay: 1.05s; }
.portada__titulo > span { display: block; }
.abierto .portada__nombre { animation: escribir 2s var(--suave) .4s both; }

/* ---------- Bloques de contenido ---------- */
.bloque {
  position: relative;
  padding: 12vh 18px;
  display: flex;
  justify-content: center;
}
.arco {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  padding: 72px 26px 44px;
  text-align: center;
  background: linear-gradient(165deg, #fffcf4f0, #fff8ebe6);
  border: 1px solid #fffaf1;
  border-radius: 170px 170px 24px 24px;
  box-shadow: 0 24px 70px #886d3c24, inset 0 0 0 7px #fffaf0, inset 0 0 0 8px #d8c19a66;
}
.arco p { text-wrap: pretty; }
.arco > p:not(.sobretitulo):not(.subtitulo):not(.pequeno):not(.fecha-grande),
.arco [data-almuerzo] p { max-width: 24em; margin-inline: auto; font-size: 17.5px; line-height: 1.7; }
.versiculo { margin: 0; }
.versiculo p { font: italic 500 clamp(27px, 7.4vw, 38px)/1.28 var(--serif); color: #5f4630; margin: 0 auto 16px; max-width: 15em; text-wrap: balance; hyphens: none; }
.versiculo cite { font-style: normal; letter-spacing: .2em; font-size: 13px; }
.fecha-grande { font: 400 clamp(40px, 11vw, 66px)/1.05 var(--serif); color: #86694b; margin: 4px 0 12px; }
.arco .boton { margin: 10px 0 6px; }
.nota {
  margin: 26px auto 0;
  padding: 18px 20px;
  max-width: 460px;
  border-radius: 18px;
  background: #f6efe0;
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}
.nota strong { display: block; font: 500 23px/1.3 var(--serif); margin-bottom: 4px; }

/* Revelado al entrar en pantalla */
.revelar { opacity: 0; transform: translate3d(0, 46px, 0) scale(.97); transition: opacity 1.1s var(--suave), transform 1.3s var(--suave); }
.revelar.visible { opacity: 1; transform: none; }

/* ---------- 3 · Fecha ---------- */
.fecha { min-height: calc(var(--alto) * 1.1); display: grid; place-items: center; padding: 10vh 20px; text-align: center; }
.fecha__contenido { position: relative; z-index: 2; text-shadow: 0 0 26px #fffaf0, 0 0 50px #fff6e6; }
.fecha__dia { font: 500 18px/1 var(--versal); letter-spacing: .44em; margin: 8px 0 0 .44em; }
.fecha__numero {
  font: 400 clamp(150px, 50vw, 260px)/.9 var(--serif);
  color: #7a5c3b;
  margin: 0;
}
.fecha__numero span {
  display: inline-block;
  background: linear-gradient(180deg, #a3824f 10%, #d9bd82 50%, #8a6a3e 90%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px #fff8e8);
  transform: scale(calc(.82 + var(--p) * .3));
}
.fecha__mes { font: 500 clamp(18px, 5.2vw, 26px)/1 var(--versal); letter-spacing: .32em; margin-right: -.32em; }
.fecha__cuenta { margin-top: 20px; font: italic 500 24px/1.4 var(--serif); color: var(--tinta-suave); min-height: 1.4em; }
.fecha__paloma {
  position: absolute;
  z-index: 1;
  top: 0;
  right: -8vw;
  width: min(62vw, 380px);
  transform: translate3d(calc(var(--p) * -24vw), calc(-12vh + var(--p) * 36vh), 0) rotate(calc(-10deg + var(--p) * 14deg));
  opacity: .92;
  filter: drop-shadow(0 18px 30px #8a6a3e22);
}

/* Calendario */
.calendario { margin-top: 26px; }
.calendario__titulo { font: 600 13px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--oro-profundo); text-shadow: none; }
.calendario__botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.calendario .boton { text-shadow: none; }
.fecha__querubin {
  position: absolute;
  z-index: 1;
  left: -4vw;
  bottom: 8vh;
  width: min(36vw, 200px);
  transform: translate3d(calc(var(--p) * 14vw), calc(18vh - var(--p) * 34vh), 0) rotate(calc(-6deg + var(--p) * 10deg));
  filter: drop-shadow(0 12px 22px #6e4d2a2e);
}

/* ---------- 5 · Almuerzo (ángel que cruza) ---------- */
.almuerzo { overflow-x: clip; }
.almuerzo__angel {
  position: absolute;
  z-index: 1;
  top: 2vh;
  right: 0;
  width: min(54vw, 320px);
  transform: translate3d(calc(40vw - var(--p) * 120vw), calc(var(--p) * 14vh), 0) scaleX(-1) rotate(calc(var(--p) * 6deg));
  filter: drop-shadow(0 12px 24px #6e4d2a2e);
  pointer-events: none;
}

/* ==========================================================================
   FORMULARIO
   ========================================================================== */
.tarjeta {
  width: min(100%, 600px);
  padding: 44px 22px 32px;
  background: #fffaf1f2;
  border: 1px solid #fff;
  border-radius: 28px;
  box-shadow: 0 24px 70px #66543f22;
}
.tarjeta > .sobretitulo, .tarjeta > h2 { text-align: center; }
.formulario { margin-top: 18px; }
.campo { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.campo label, .campo legend {
  display: block;
  font: 600 15px/1.45 var(--sans);
  letter-spacing: .01em;
  margin: 0 0 9px;
  padding: 0;
}
.campo small { font-weight: 400; opacity: .75; }
abbr { text-decoration: none; color: var(--oro); }
.campo input[type="text"], .campo input[type="number"], .campo textarea {
  width: 100%;
  border: 1px solid #dacbb6;
  border-radius: 14px;
  background: #fffefa;
  padding: 14px 16px;
  color: #4f3f30;
  font: 16px/1.4 var(--sans); /* 16px evita el zoom automático en iOS */
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
          appearance: none;
}
.campo textarea { resize: vertical; min-height: 84px; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 4px #a7845526; }
.campo.invalido input[type="text"], .campo.invalido input[type="number"] { border-color: var(--error); }
.campo__error { color: var(--error); font-size: 14px; margin: 6px 2px 0; min-height: 0; }
.campo__error:empty { display: none; }

.opciones { display: grid; grid-template-columns: 1fr; gap: 9px; }
@media (min-width: 420px) { .opciones { grid-template-columns: 1fr 1fr; } }
.opcion { position: relative; margin: 0 !important; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #e0d2c0;
  border-radius: 14px;
  background: #fffcf7;
  font: 500 15.5px/1.3 var(--sans);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.opcion span::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #bca482;
  background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.opcion input:checked + span { border-color: var(--oro); background: #fbf2e1; box-shadow: 0 6px 18px #a7845522; }
.opcion input:checked + span::before { border-color: var(--oro); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--oro); }
.opcion input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 2px; }

.contador { display: flex; align-items: stretch; gap: 8px; max-width: 220px; }
.contador input[type="number"] { text-align: center; font-weight: 600; -moz-appearance: textfield; }
.contador input::-webkit-outer-spin-button, .contador input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.contador__btn {
  flex: none;
  width: 52px;
  border: 1px solid #dacbb6;
  border-radius: 14px;
  background: #fffcf7;
  color: var(--tinta);
  font: 400 24px/1 var(--serif);
  cursor: pointer;
}
.contador__btn:active { background: #f3e7d2; }
.acompanantes { display: grid; gap: 10px; }
.acompanantes .campo { margin: 0; }
.acompanantes label { font-weight: 500; font-size: 14px; opacity: .9; margin-bottom: 6px; }
.acompanantes .campo { animation: aparecer .5s var(--suave); }
[data-si-asiste] { transition: opacity .35s; }
.oculto-suave { display: none; }

.trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ayuda { font-size: 14px; line-height: 1.6; opacity: .85; margin: 16px 0 0; text-align: center; text-wrap: pretty; }
.ayuda a { color: #6f5438; font-weight: 600; white-space: nowrap; }
.estado { margin: 14px 0 0; min-height: 1.4em; font-size: 15px; line-height: 1.6; text-align: center; }
.estado.error { color: var(--error); }
.estado.aviso { color: #7a5a2c; background: #f6ecd8; padding: 12px 14px; border-radius: 12px; }
.estado.ok { color: #3f6b5e; }

.confirmacion { text-align: center; padding: 10px 0 0; outline: none; }
.confirmacion__icono { width: 66px; height: 66px; margin: 0 auto 10px; fill: none; stroke: var(--oro); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirmacion__icono circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: trazar 1s var(--suave) forwards; }
.confirmacion__icono path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: trazar .6s var(--suave) .7s forwards; }
.confirmacion__datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; max-width: 400px; margin: 18px auto 22px; font-size: 15.5px; }
.confirmacion__datos dt { font-weight: 600; color: var(--oro-profundo); }
.confirmacion__datos dd { margin: 0; overflow-wrap: anywhere; }
.confirmacion__codigo { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 18px 0 2px; }
.confirmacion__codigo strong { display: block; margin-top: 6px; font: 600 26px/1.2 var(--versal); letter-spacing: .14em; color: #6a4e31; }
.confirmacion__acciones { display: grid; gap: 6px; justify-items: center; margin-top: 16px; }

/* ==========================================================================
   7 · REVELACIÓN FINAL
   ========================================================================== */
.revelacion[data-fija] { height: calc(var(--alto) * 3.2); }
.revelacion {
  --r: clamp(0, calc((var(--p) - .12) / .58), 1);
  --t: clamp(0, calc(var(--p) * 5), 1);
}
.revelacion .escena__fija {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2.4vh;
  padding: max(7vh, env(safe-area-inset-top, 0px)) 18px 4vh;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, #fdfaf000 30%, #bfddd2aa 85%, #9cc4b6cc 100%);
}
.revelacion__texto {
  position: relative;
  z-index: 3;
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 30px), 0);
  text-shadow: 0 0 26px #fffaf0, 0 0 50px #fff6e6;
}
.revelacion__texto h2 { font-size: clamp(32px, 9vw, 56px); line-height: 1.05; margin-bottom: 10px; }
.revelacion__texto p:last-child { margin: 0; font: italic 500 21px/1.4 var(--serif); }
.revelacion__marco {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(80vw, 400px, calc(var(--alto) * .5 * 736 / 1104));
  aspect-ratio: 736 / 1104;
  border-radius: 50% 50% 22px 22px / 32% 32% 22px 22px;
  padding: 6px;
  background: linear-gradient(160deg, #f3e2bc, #c8a467 45%, #f6e7c4 70%, #b08a50);
  box-shadow: 0 0 calc(var(--r) * 90px) #fff3d0, 0 30px 70px #5d4a2e40;
  opacity: clamp(0, calc(var(--r) * 2.5), 1);
  transform: translate3d(0, calc((1 - var(--r)) * 6vh), 0) scale(calc(.92 + var(--r) * .08));
}
.revelacion__lienzo {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 35%, #fffef8, #f4e6c6 60%, #e3d0a4);
  -webkit-clip-path: circle(calc(var(--r) * 85%) at 50% 38%);
          clip-path: circle(calc(var(--r) * 85%) at 50% 38%);
  isolation: isolate;
}
.revelacion__lienzo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.28 - var(--r) * .28));
  opacity: calc(var(--r) * 1.6);
}
.revelacion__velo {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #fffef8 0%, #fff7dfee 40%, #fff3d400 80%);
  opacity: calc(1 - var(--r) * 1.15);
}
.revelacion__resplandor {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 55%;
  width: 160vmin;
  height: 160vmin;
  margin: -80vmin 0 0 -80vmin;
  background: radial-gradient(circle, #fff9e6 0%, #fff3d2aa 22%, #fff3d200 60%);
  transform: scale(calc(.4 + var(--r) * .8));
  opacity: calc(.2 + var(--r) * .8);
}
.revelacion__paloma {
  position: absolute;
  z-index: 4;
  top: 30vh;
  right: 2vw;
  width: min(30vw, 150px);
  transform: translate3d(calc((1 - var(--r)) * 45vw), calc((1 - var(--r)) * -30vh), 0) rotate(calc((1 - var(--r)) * 18deg));
  opacity: calc(var(--r) * 2 - .3);
  filter: drop-shadow(0 10px 20px #5d4a2e33);
}

.pie {
  padding: 36px 16px calc(46px + var(--seguro-abajo));
  background: linear-gradient(#9cc4b6, #8db7a9);
  text-align: center;
  color: #fffaf0;
  font: 400 22px var(--serif);
  letter-spacing: .04em;
}
.pie .ornamento { margin: 0 auto 10px; filter: brightness(1.8) saturate(.5); }
.pie p { margin: 0; }

/* ==========================================================================
   CONTROL DE MÚSICA
   ========================================================================== */
.musica {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: calc(16px + var(--seguro-abajo));
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #c9ad80;
  background: #fffaf0e8;
  color: #7a5c3b;
  box-shadow: 0 8px 26px #6e4d2a33;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.musica[hidden] { display: none; }
.musica svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.musica__ondas { position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; }
.musica__ondas i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid #c9ad80; opacity: 0; }
.musica.sonando .musica__tachado { display: none; }
.musica.sonando .musica__ondas i { animation: onda 3s ease-out infinite; }
.musica.sonando .musica__ondas i:nth-child(2) { animation-delay: 1s; }
.musica.sonando .musica__ondas i:nth-child(3) { animation-delay: 2s; }

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes vaiven { from { translate: -2vw 0; } to { translate: 2vw -1.5vh; } }
@keyframes deriva { to { transform: translate3d(calc(var(--tw) * -1), 0, 0); } }
@keyframes flotar { from { translate: 0 0; rotate: -1.2deg; } to { translate: 0 -16px; rotate: 1.5deg; } }
@keyframes aletear { from { transform: rotate(14deg) scaleY(.75); } to { transform: rotate(-26deg) scaleY(1.05); } }
@keyframes planear { from { translate: 0 0; } to { translate: 0 -14px; } }
@keyframes cruzar {
  from { transform: translate3d(-15vw, 0, 0); }
  to   { transform: translate3d(115vw, -12vh, 0); }
}
@keyframes cruzar-izq {
  from { transform: translate3d(115vw, 0, 0); }
  to   { transform: translate3d(-15vw, -8vh, 0); }
}
@keyframes gotear { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes aparecer { to { opacity: 1; transform: none; } }
@keyframes escribir {
  from { opacity: 0; -webkit-mask-position: 100% 0; mask-position: 100% 0; transform: translateY(10px); }
  to   { opacity: 1; -webkit-mask-position: 0 0; mask-position: 0 0; transform: none; }
}
.abierto .portada__nombre {
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
          mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%;
          mask-size: 260% 100%;
}
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes onda { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }

/* Pantallas horizontales: nubes de la cortina proporcionadas */
@media (min-aspect-ratio: 4/5) {
  .cortina__nube { width: 78vw; bottom: -10vh; }
  .cortina__nube--izq { left: -34vw; }
  .cortina__nube--der { right: -34vw; }
  .cortina__nube--centro { left: 11vw; width: 78vw; }
  .portada__querubin { width: min(18vw, 230px); }
}

/* Pantallas amplias: la experiencia sigue siendo vertical, centrada */
@media (min-width: 760px) {
  .arco { padding: 90px 70px 56px; }
  .tarjeta { padding: 56px 48px 40px; }
  .fecha__paloma { right: 8vw; }
}

/* ==========================================================================
   MOVIMIENTO REDUCIDO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.sin-movimiento .escena[data-fija] { height: auto; }
.sin-movimiento .escena__fija { position: relative; height: auto; min-height: var(--alto); padding-block: 10vh; }
.sin-movimiento .portada { --p: 0 !important; }
.sin-movimiento .revelacion { --p: 1 !important; }
.sin-movimiento .fecha, .sin-movimiento .almuerzo { --p: .5 !important; }
.sin-movimiento .cortina { display: none; }
.sin-movimiento .almuerzo__angel { transform: translate3d(20vw, 0, 0) scaleX(-1); }
.sin-movimiento .bandada, .sin-movimiento .cielo__rayos { display: none; }
.sin-movimiento .revelar { opacity: 1; transform: none; }
.sin-movimiento .portada__texto > * { opacity: 1; transform: none; animation: none; }
.sin-movimiento .portada__nombre { -webkit-mask-image: none; mask-image: none; }
