/* Jardín — una boda mediterránea al aire libre. functions/invitacion/jardin.js
   Escrita para el móvil primero; en apaisado y pantalla ancha el arco va a un lado y el texto al otro. */
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/fraunces-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/hanken-grotesk-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/hanken-grotesk-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --cal: #FBF8F2;
  --arena: #F2EADB;
  --terracota: #B5583A;
  --terracota-tinta: #96432A;
  --oliva: #5C6838;
  --salvia: #AEB58E;
  --tinta: #2E2A22;
  --gris: #675F52;
  --linea: rgba(46, 42, 34, .14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --curva: cubic-bezier(.16, 1, .3, 1);
  --lateral: clamp(20px, 6vw, 88px);
  --arco: 999px 999px 0 0;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-variation-settings: "WONK" 0; margin: 0; background: var(--cal); color: var(--tinta); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }
.icono { width: 1.1em; height: 1.1em; flex: none; }
.visual-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.etiqueta { font: 600 11px/1.6 var(--sans); letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--terracota-tinta); }
.enlace {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding-bottom: 5px; border-bottom: 1px solid var(--terracota);
  font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: gap .4s var(--curva);
}
.enlace:hover { gap: 16px; }
.enlace .icono { color: var(--terracota); }
.cabeza { display: grid; justify-items: center; gap: 10px; margin-bottom: 46px; text-align: center; }
.cabeza h2 { font: 350 clamp(2.4rem, 10vw, 4.2rem)/1.04 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.arco { overflow: hidden; border-radius: var(--arco); background: var(--arena); }
.arco img { width: 100%; height: 100%; object-fit: cover; }
.rama { display: block; width: 180px; height: auto; overflow: visible; }
.rama-tallo { fill: none; stroke: var(--oliva); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; }
.rama-hojas path { fill: var(--salvia); stroke: var(--oliva); stroke-width: .8; }
.hoja { width: 22px; height: 22px; flex: none; fill: rgba(174, 181, 142, .45); stroke: var(--oliva); stroke-width: 1.2; stroke-linecap: round; }

/* ===== Barra ===== */
.barra {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: 54px; padding: 0 var(--lateral); padding-top: env(safe-area-inset-top); box-sizing: content-box;
  background: rgba(251, 248, 242, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea);
  transform: translateY(-110%); transition: transform .6s var(--curva);
}
.tras-portada .barra { transform: none; }
.barra-nombres { font: 400 1.2rem/1 var(--serif); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-accion { flex: none; padding: 10px 18px; border-radius: 99px; background: var(--terracota); color: var(--cal); font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: background .3s; }
.barra-accion:hover { background: var(--terracota-tinta); }

/* ===== Portada: el arco ===== */
.portada { position: relative; }
.portada-escena { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.portada-arco {
  position: absolute; inset: 0; margin: 0; background: var(--arena);
  clip-path: inset(calc(env(safe-area-inset-top) + 9svh) 13vw 41svh 13vw round 50vw 50vw 0 0);
}
.portada-arco img { width: 100%; height: 100%; object-fit: cover; }
.portada-texto { position: absolute; left: var(--lateral); right: var(--lateral); bottom: 5svh; display: grid; justify-items: center; gap: 10px; text-align: center; }
.portada:not(.con-foto) .portada-texto { inset: 0; align-content: center; }
.portada:not(.con-foto) .portada-escena::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(78vw, 30rem); height: min(80svh, 40rem); translate: -50% -50%;
  border: 1px solid rgba(181, 88, 58, .45); border-bottom: 0; border-radius: var(--arco);
}
.nombres { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .22em; font: 350 clamp(2.6rem, 12vw, 5.6rem)/1.02 var(--serif); letter-spacing: -.015em; }
.portada:not(.con-foto) .nombres { font-size: clamp(3.2rem, 16vw, 7rem); flex-direction: column; align-items: center; }
.j-y { font-size: .62em; color: var(--terracota); }
.letras { display: inline-block; white-space: nowrap; }
.letra { display: inline-block; }
.letra.hueco { width: .25em; }
.portada-fecha { font: 600 11px/1.6 var(--sans); letter-spacing: .26em; text-indent: .26em; text-transform: uppercase; color: var(--gris); }

/* ===== Cita ===== */
.cita { padding: 16svh var(--lateral) 6svh; text-align: center; }
.cita p { max-width: 36rem; margin: 0 auto; font: 350 clamp(1.7rem, 7vw, 2.8rem)/1.25 var(--serif); color: var(--oliva); text-wrap: balance; }

/* ===== Historia: el camino ===== */
.historia { padding: 12svh var(--lateral) 8svh; }
.camino { position: relative; display: grid; gap: 12svh; max-width: 64rem; margin: 0 auto; }
.paso { display: grid; justify-items: center; gap: 24px; text-align: center; }
.paso .arco { width: min(72vw, 22rem); aspect-ratio: 3 / 4; }
.paso-texto { display: grid; justify-items: center; gap: 8px; max-width: 30rem; }
.paso-anio { font: 400 clamp(2.6rem, 12vw, 4rem)/1 var(--serif); color: var(--terracota); font-variant-numeric: lining-nums; }
.paso h3 { font: 400 clamp(1.7rem, 7vw, 2.3rem)/1.15 var(--serif); text-wrap: balance; }
.paso-texto > p:not(.paso-anio) { color: var(--gris); }

/* ===== La fecha: el mes ===== */
.fecha { padding: 10svh var(--lateral); background: var(--arena); }
.fecha-hoja { display: grid; justify-items: center; width: min(100%, 30rem); margin: 0 auto; padding: 40px clamp(18px, 6vw, 40px) 36px; background: var(--cal); border-radius: 22px; box-shadow: 0 24px 50px -30px rgba(46, 42, 34, .4); text-align: center; }
.fecha-hoja h2 { margin-top: 10px; font: 350 clamp(2.4rem, 11vw, 3.6rem)/1 var(--serif); }
.fecha-hoja h2 span { font-style: normal; color: var(--terracota); }
.mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 2px; width: 100%; margin: 26px 0 22px; }
.mes-cab { padding-bottom: 8px; font: 600 10px/1 var(--sans); letter-spacing: .14em; color: var(--gris); }
.mes-dia { position: relative; display: grid; place-items: center; aspect-ratio: 1; font: 400 1.05rem/1 var(--serif); font-variant-numeric: lining-nums; }
.el-dia { font-weight: 600; color: var(--terracota-tinta); }
.circulo { position: absolute; inset: -18%; width: 136%; height: 136%; overflow: visible; fill: none; stroke: var(--terracota); stroke-width: 2.2; stroke-linecap: round; }
.circulo path { stroke-dasharray: 1; vector-effect: non-scaling-stroke; }
.fecha-larga { font: 400 1.25rem/1.35 var(--serif); }
.cuenta { margin-top: 22px; }
.cuenta-numeros { display: flex; justify-content: center; gap: clamp(14px, 5vw, 28px); }
.cuenta-casilla { display: grid; justify-items: center; gap: 4px; }
.cuenta-n { display: inline-block; font: 400 2.2rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--oliva); }
.cuenta-n.cambia { animation: cambiar .5s var(--curva); }
.cuenta-e { font: 600 9px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gris); }
.cuenta-pasada { display: none; font: 400 1.3rem/1.4 var(--serif); }
.cuenta.pasada .cuenta-numeros { display: none; }
.cuenta.pasada .cuenta-pasada { display: block; }

/* ===== El día ===== */
.programa { padding: 14svh var(--lateral); }
.horas { max-width: 40rem; margin: 0 auto; }
.horas li { display: grid; grid-template-columns: 22px 4.4rem 1fr; gap: 14px; align-items: start; padding: 20px 0; border-bottom: 1px dashed rgba(92, 104, 56, .4); }
.horas .hoja { margin-top: 3px; }
.horas time { font: 400 1.35rem/1.2 var(--serif); color: var(--terracota-tinta); font-variant-numeric: lining-nums tabular-nums; }
.horas h3 { font: 400 1.5rem/1.2 var(--serif); }
.horas-donde { margin-top: 4px; font: 600 10.5px/1.5 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--oliva); }
.horas-nota { margin-top: 4px; font-size: .96rem; color: var(--gris); }

/* ===== Dónde ===== */
.donde { padding: 12svh var(--lateral); background: var(--arena); }
.donde-lista { display: grid; gap: 64px; justify-items: center; }
.sitio { display: grid; justify-items: center; gap: 6px; max-width: 24rem; text-align: center; }
.sitio .arco { width: min(70vw, 20rem); aspect-ratio: 3 / 4; margin-bottom: 20px; }
.sitio h3 { font: 400 1.9rem/1.1 var(--serif); text-wrap: balance; }
.sitio-municipio { color: var(--gris); }

/* ===== Galería: arcos, círculos y arcos al revés ===== */
.galeria { padding: 12svh var(--lateral); }
.galeria-rejilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: center; max-width: 66rem; margin: 0 auto; }
.galeria-foto { overflow: hidden; background: var(--arena); }
.galeria-foto img { width: 100%; height: 100%; object-fit: cover; }
.f-1 { aspect-ratio: 3 / 4; border-radius: var(--arco); }
.f-2 { aspect-ratio: 1; border-radius: 50%; }
.f-3 { aspect-ratio: 3 / 4; border-radius: 0 0 999px 999px; }

/* ===== Lo práctico ===== */
.practico { padding: 12svh var(--lateral); background: var(--arena); }
.practico dl { display: grid; gap: 26px; max-width: 46rem; margin: 0 auto; }
.practico-fila dt { display: flex; align-items: center; gap: 10px; font: 400 1.5rem/1.2 var(--serif); }
.practico-fila dd { margin: 6px 0 0 32px; color: var(--gris); }

/* ===== Confirmar ===== */
.confirmar { padding: 14svh var(--lateral); }
.confirmar-hoja { display: grid; justify-items: center; width: min(100%, 32rem); margin: 0 auto; padding: 46px 28px 40px; border: 1px solid rgba(181, 88, 58, .4); border-radius: 999px 999px 24px 24px; text-align: center; }
.confirmar-hoja h2 { margin-top: 14px; font: 350 clamp(2.3rem, 10vw, 3.4rem)/1.05 var(--serif); text-wrap: balance; }
.confirmar-texto { margin-top: 12px; color: var(--gris); }
.confirmar-botones { display: grid; gap: 10px; width: 100%; margin-top: 28px; }
.boton {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 20px; border-radius: 99px; background: var(--oliva); color: var(--cal);
  font: 600 11px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; transition: background .3s;
}
.boton b { color: #E7EBD2; }
.boton:hover { background: #4A552D; }

/* ===== Regalo ===== */
.regalo { display: grid; justify-items: center; padding: 10svh var(--lateral) 12svh; text-align: center; }
.regalo > p { max-width: 32rem; color: var(--gris); }
.metodos { width: min(100%, 30rem); margin-top: 26px; border-top: 1px solid var(--linea); text-align: left; }
.metodo { border-bottom: 1px solid var(--linea); }
.metodo summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 2px; font: 400 1.35rem/1 var(--serif); }
.metodo summary::-webkit-details-marker { display: none; }
.metodo summary .icono { color: var(--terracota); width: 20px; height: 20px; }
.metodo summary::after { content: "+"; margin-left: auto; font: 300 1.5rem/1 var(--sans); color: var(--terracota); transition: transform .4s var(--curva); }
.metodo[open] summary::after { transform: rotate(45deg); }
.metodo-cuerpo { display: grid; gap: 14px; padding: 0 2px 20px; }
.metodo-dato { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.metodo-etiqueta { width: 100%; font: 600 9.5px/1.5 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--terracota-tinta); }
.metodo-valor { font: 400 1.3rem/1.3 var(--serif); font-variant-numeric: lining-nums; }
.metodo-valor.iban { font: 500 .98rem/1.5 var(--sans); letter-spacing: .04em; word-break: break-all; }
.metodo-copiar { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--linea); border-radius: 99px; background: none; color: inherit; cursor: pointer; font: 600 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.metodo-copiar.hecho { border-color: var(--oliva); color: var(--oliva); }

/* ===== Pie ===== */
.pie { display: grid; justify-items: center; gap: 14px; padding: 12svh var(--lateral) 30px; background: var(--arena); text-align: center; }
.pie-nombres { font: 350 clamp(2.2rem, 9vw, 3.4rem)/1.1 var(--serif); }
.pie-marca { margin-top: 10svh; font: 600 9.5px/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gris); }

/* El encuadre que elige la pareja (modelo.js → fx-N fy-N) */
.fx-0 { --fx: 0%; } .fy-0 { --fy: 0%; }
.fx-10 { --fx: 10%; } .fy-10 { --fy: 10%; }
.fx-20 { --fx: 20%; } .fy-20 { --fy: 20%; }
.fx-30 { --fx: 30%; } .fy-30 { --fy: 30%; }
.fx-40 { --fx: 40%; } .fy-40 { --fy: 40%; }
.fx-50 { --fx: 50%; } .fy-50 { --fy: 50%; }
.fx-60 { --fx: 60%; } .fy-60 { --fy: 60%; }
.fx-70 { --fx: 70%; } .fy-70 { --fy: 70%; }
.fx-80 { --fx: 80%; } .fy-80 { --fy: 80%; }
.fx-90 { --fx: 90%; } .fy-90 { --fy: 90%; }
.fx-100 { --fx: 100%; } .fy-100 { --fy: 100%; }
img[class*="fx-"] { object-position: var(--fx, 50%) var(--fy, 50%) !important; }

/* ===== Apaisado y pantalla ancha ===== */
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) {
  /* Ancho para que quepa una foto apaisada de dos personas */
  .portada-arco { clip-path: inset(calc(9svh + 20px) 47vw 0 5vw round 50vw 50vw 0 0); }
  .con-foto .portada-texto { left: 55vw; right: var(--lateral); top: 0; bottom: 0; align-content: center; }
  .paso { grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; text-align: left; }
  .paso .arco { justify-self: end; width: min(100%, 24rem); max-height: 80svh; }
  .paso-texto { justify-items: start; }
  .paso.par .arco { order: 2; justify-self: start; }
  .paso:not(:has(.arco)) { grid-template-columns: 1fr; text-align: center; }
  .paso:not(:has(.arco)) .paso-texto { justify-items: center; margin: 0 auto; }
  .horas li { grid-template-columns: 22px 6rem 1fr; }
  .donde-lista { grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem)); justify-content: center; gap: 6vw; }
  .sitio .arco { max-height: 70svh; }
  .galeria-rejilla { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .practico dl { grid-template-columns: 1fr 1fr; column-gap: 50px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .portada-escena { min-height: 0; }
  .nombres { font-size: 12svh; }
  .rama { width: 120px; }
}

/* ===== Movimiento ===== */
.letras .letra:nth-child(1) { --n: 1; }
.letras .letra:nth-child(2) { --n: 2; }
.letras .letra:nth-child(3) { --n: 3; }
.letras .letra:nth-child(4) { --n: 4; }
.letras .letra:nth-child(5) { --n: 5; }
.letras .letra:nth-child(6) { --n: 6; }
.letras .letra:nth-child(7) { --n: 7; }
.letras .letra:nth-child(8) { --n: 8; }
.letras .letra:nth-child(9) { --n: 9; }
.letras .letra:nth-child(10) { --n: 10; }
.letras .letra:nth-child(11) { --n: 11; }
.letras .letra:nth-child(12) { --n: 12; }
.letras .letra:nth-child(13) { --n: 13; }
.letras .letra:nth-child(14) { --n: 14; }
.letras .letra:nth-child(15) { --n: 15; }
.letras .letra:nth-child(16) { --n: 16; }
.letras .letra:nth-child(17) { --n: 17; }
.letras .letra:nth-child(18) { --n: 18; }
.letras .letra:nth-child(19) { --n: 19; }
.letras .letra:nth-child(20) { --n: 20; }
.letras .letra:nth-child(21) { --n: 21; }
.letras .letra:nth-child(22) { --n: 22; }
.letras .letra:nth-child(23) { --n: 23; }
.letras .letra:nth-child(24) { --n: 24; }
@keyframes trazar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes brotar { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes posar { from { opacity: 0; transform: translateY(.3em); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes revelar { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes cambiar { from { opacity: 0; transform: translateY(-40%); } to { opacity: 1; transform: none; } }
@keyframes crecer-arco { from { opacity: 0; transform: translateY(5svh); } }
@keyframes abrir-arco { to { clip-path: inset(0 0 0 0 round 0 0 0 0); } }
@keyframes irse { to { opacity: 0; transform: translateY(-6svh); } }
@media (prefers-reduced-motion: no-preference) {
  .portada-arco { animation: crecer-arco 1.6s .2s cubic-bezier(.6, 0, .2, 1) backwards; }
  .letra { animation: posar 1s calc(.7s + var(--n, 1) * 55ms) var(--curva) both; }
  .portada .etiqueta, .portada-fecha, .j-y { animation: aparecer 1.2s 1.2s ease both; }
  .portada .rama-tallo { animation: trazar 1.8s 1s ease both; }
  .portada .rama-hojas path { animation: brotar .7s ease both; transform-box: fill-box; transform-origin: 0 100%; }
  .rama-hojas path:nth-child(1) { animation-delay: 1.3s; } .rama-hojas path:nth-child(2) { animation-delay: 1.4s; }
  .rama-hojas path:nth-child(3) { animation-delay: 1.6s; } .rama-hojas path:nth-child(4) { animation-delay: 1.7s; }
  .rama-hojas path:nth-child(5) { animation-delay: 1.9s; } .rama-hojas path:nth-child(6) { animation-delay: 2s; }
  .rama-hojas path:nth-child(7) { animation-delay: 2.2s; } .rama-hojas path:nth-child(8) { animation-delay: 2.3s; }
  @supports (animation-timeline: view()) {
    /* Al bajar, el arco se abre hasta llenar la pantalla: se entra en el jardín */
    .portada.con-foto { view-timeline: --jardin; height: 210svh; }
    .portada.con-foto .portada-escena { position: sticky; top: 0; }
    .portada.con-foto .portada-arco { animation: crecer-arco 1.6s .2s cubic-bezier(.6, 0, .2, 1) backwards, abrir-arco linear forwards; animation-timeline: auto, --jardin; animation-range: normal, contain 0% contain 85%; }
    .portada.con-foto .portada-texto { animation: irse linear both; animation-timeline: --jardin; animation-range: contain 0% contain 35%; }
    .revela { animation: revelar linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .circulo path { animation: trazar linear both; animation-timeline: view(); animation-range: entry 40% cover 55%; }
    .pie .rama-tallo { animation: trazar linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  }
  .js-revela .revela { transition: opacity 1s var(--curva), transform 1s var(--curva); }
  .js-revela .revela:not(.visto) { opacity: 0; transform: translateY(34px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* WebGL (jardin/sol.js) */
.cine-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; }
.cine-activo > .cine-lienzo { opacity: 1; }
.portada-arco.cine-activo img { visibility: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* Foco visible para teclado y lectores de pantalla (no sale al tocar) */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* Tamaño de dedo (44 px, lo que pide Apple) y anclas que no quedan bajo la barra.
   Lo comprueba herramientas/revisar.mjs */
[id] { scroll-margin-top: 78px; }
#inicio { scroll-margin-top: 0; }
.enlace { min-height: 44px; align-items: flex-end; margin-top: 12px; }
.metodo-copiar { min-height: 42px; }
.barra-accion { min-height: 40px; display: inline-flex; align-items: center; }
.barra-nombres { line-height: 44px; }
.pie-marca a { display: inline-block; padding: 14px 3px; margin: -14px 0; }

/* Pantalla ancha: la foto va DENTRO del arco (encuadrada en el arco, no en la
   pantalla) y es el arco el que crece hasta llenarla. Con el recorte sobre una
   foto a pantalla completa, las caras del centro caían en el borde del arco. */
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) {
  .portada-arco { clip-path: none !important; inset: calc(9svh + 20px) 47vw 0 5vw; border-radius: 24vw 24vw 0 0; overflow: hidden; }
}
@keyframes abrir-ancho { to { inset: 0; border-radius: 0; } }
@media (prefers-reduced-motion: no-preference) and (min-width: 900px), (prefers-reduced-motion: no-preference) and (orientation: landscape) and (min-width: 640px) {
  @supports (animation-timeline: view()) {
    .portada.con-foto .portada-arco { animation-name: crecer-arco, abrir-ancho; }
  }
}

/* ===== Confirmar con enlace personal (comun.js → formularioConfirmar).
   Igual en las siete plantillas: hereda el color y la letra de cada una. */
.rsvp { display: grid; gap: 18px; width: 100%; max-width: 34rem; margin: 22px auto 0; text-align: left; }
.rsvp-saludo { margin: 0; font-size: 1.15em; }
.rsvp-hecho { margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid currentColor; font-weight: 600; }
.rsvp-nota { margin: 0; }
.rsvp fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.rsvp legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.rsvp-asiste { display: flex; flex-wrap: wrap; gap: 10px; }
.rsvp-asiste legend { width: 100%; }
.rsvp-asiste label { flex: 1 1 9rem; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); cursor: pointer; }
.rsvp-asiste label:has(input:checked) { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.rsvp-asiste input { width: 20px; height: 20px; margin: 0; accent-color: currentColor; }
.rsvp-si, .rsvp-personas { display: grid; gap: 18px; }
.rsvp-persona { display: grid; gap: 10px; padding-top: 14px !important; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent) !important; }
.rsvp-campo { display: grid; gap: 6px; }
.rsvp-campo > span { font-size: .88em; }
.rsvp input:not([type=radio]), .rsvp select, .rsvp textarea { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: color-mix(in srgb, currentColor 5%, transparent);
  color: inherit; font: inherit; font-size: max(16px, 1em); }
.rsvp select option { color: #111; background: #fff; }
.rsvp textarea { min-height: 90px; resize: vertical; }
.rsvp input:focus-visible, .rsvp select:focus-visible, .rsvp textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.rsvp-enviar { justify-self: start; min-height: 48px; cursor: pointer; font: inherit; }
.rsvp-whatsapp { display: flex; flex-wrap: wrap; gap: 10px; }
.rsvp:has(input[name="asiste"][value="no"]:checked) .rsvp-si { display: none; }
.rsvp:has(select[name="n"] option[value="1"]:checked) .rsvp-persona:nth-child(n+2) { display: none; }
.rsvp:has(select[name="n"] option[value="2"]:checked) .rsvp-persona:nth-child(n+3) { display: none; }
.rsvp:has(select[name="n"] option[value="3"]:checked) .rsvp-persona:nth-child(n+4) { display: none; }
.rsvp:has(select[name="n"] option[value="4"]:checked) .rsvp-persona:nth-child(n+5) { display: none; }
.rsvp:has(select[name="n"] option[value="5"]:checked) .rsvp-persona:nth-child(n+6) { display: none; }
.rsvp:has(select[name="n"] option[value="6"]:checked) .rsvp-persona:nth-child(n+7) { display: none; }
.rsvp:has(select[name="n"] option[value="7"]:checked) .rsvp-persona:nth-child(n+8) { display: none; }
.rsvp:has(select[name="n"] option[value="8"]:checked) .rsvp-persona:nth-child(n+9) { display: none; }
.rsvp:has(select[name="n"] option[value="9"]:checked) .rsvp-persona:nth-child(n+10) { display: none; }
.rsvp:has(select[name="n"] option[value="10"]:checked) .rsvp-persona:nth-child(n+11) { display: none; }
.rsvp:has(select[name="n"] option[value="11"]:checked) .rsvp-persona:nth-child(n+12) { display: none; }
.rsvp:has(select[name="n"] option[value="12"]:checked) .rsvp-persona:nth-child(n+13) { display: none; }
.rsvp:has(select[name="n"] option[value="13"]:checked) .rsvp-persona:nth-child(n+14) { display: none; }
.rsvp:has(select[name="n"] option[value="14"]:checked) .rsvp-persona:nth-child(n+15) { display: none; }
.rsvp:has(select[name="n"] option[value="15"]:checked) .rsvp-persona:nth-child(n+16) { display: none; }
.rsvp:has(select[name="n"] option[value="16"]:checked) .rsvp-persona:nth-child(n+17) { display: none; }
.rsvp:has(select[name="n"] option[value="17"]:checked) .rsvp-persona:nth-child(n+18) { display: none; }
.rsvp:has(select[name="n"] option[value="18"]:checked) .rsvp-persona:nth-child(n+19) { display: none; }
.rsvp:has(select[name="n"] option[value="19"]:checked) .rsvp-persona:nth-child(n+20) { display: none; }
