
:root {
  --noche: #0F1F1A;
  --bosque: #15302A;
  --musgo: #2E5A43;
  --musgo-osc: #1F3F2E;
  --salvia: #A9C2A6;
  --marfil: #F5F0DE;
  --texto: #E4E1D3;
  --texto-2: #B5C0B1;
  --oro: #E7CB79;
  --oro-claro: #F8EAB8;
  --oro-osc: #A9852F;
  --pergamino: #F7F2E4;
  --tinta: #22302A;
  --tinta-2: #5A6658;
  --linea-p: #DDD3BA;
  --linea: rgba(231, 203, 121, .22);
  --serif: "Cormorant Garamond", "Cormorant", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", "URW Chancery L", cursive;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 3.75rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--noche); }
body { margin: 0; background: var(--noche); color: var(--texto); font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.bloqueado { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--oro); text-underline-offset: .2em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.envoltura { width: calc(100% - 2.5rem); max-width: 68rem; margin-left: auto; margin-right: auto; }
p { margin: 0 0 1rem; }
::selection { background: rgba(231, 203, 121, .35); }

/* ---------- capa mágica (luciérnagas y polvo de hada) ---------- */
#magia { position: fixed; inset: 0; z-index: 110; pointer-events: none; }

/* ---------- apariciones ---------- */
.js .aparece { opacity: 0; filter: blur(7px); -webkit-filter: blur(7px); transform: translateY(16px) scale(.985); transition: opacity 1.1s ease, filter 1.1s ease, -webkit-filter 1.1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.js .aparece.visible { opacity: 1; filter: none; -webkit-filter: none; transform: none; }

/* ---------- títulos de sección ---------- */
section { padding: 5.5rem 0; position: relative; }
.cab { text-align: center; margin: 0 auto 3.25rem; max-width: 36rem; }
.cab .adorno { width: 11rem; height: auto; margin: 0 auto 1rem; display: block; color: var(--oro); filter: drop-shadow(0 0 6px rgba(231, 203, 121, .35)); }
.cab h2 { font: 500 2.7rem/1.05 var(--serif); margin: 0; color: var(--marfil); letter-spacing: .005em; text-shadow: 0 0 28px rgba(231, 203, 121, .18); }
.cab p { color: var(--texto-2); margin: .9rem auto 0; font: italic 400 1.3rem/1.4 var(--serif); }
@media (min-width: 48rem) { section { padding: 7.5rem 0; } .cab h2 { font-size: 3.6rem; } }

/* ---------- navegación ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding-top: env(safe-area-inset-top, 0px); background: rgba(15, 31, 26, .55); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.nav.con-borde { border-color: var(--linea); background: rgba(15, 31, 26, .82); }
.nav .envoltura { display: flex; align-items: center; gap: 1rem; height: var(--nav-h); }
.monograma { font: 400 2rem/1 var(--script); color: var(--oro); text-decoration: none; padding: .2rem 0; white-space: nowrap; text-shadow: 0 0 14px rgba(231, 203, 121, .45); }
.nav-links { display: none; list-style: none; margin: 0 0 0 auto; padding: 0; gap: 1.75rem; align-items: center; }
.nav-links a { color: var(--texto-2); text-decoration: none; font-size: .95rem; transition: color .2s, text-shadow .2s; }
.nav-links a:hover, .nav-links a[aria-current=page] { color: var(--oro-claro); text-shadow: 0 0 12px rgba(231, 203, 121, .6); }
.hoja-menu li a[aria-current=page] { color: var(--oro); }
.btn-menu { margin-left: auto; display: inline-flex; align-items: center; gap: .55rem; background: none; border: 0; color: var(--marfil); padding: .6rem .2rem; cursor: pointer; font-size: .95rem; min-height: 44px; }
.btn-menu i, .btn-menu i::before, .btn-menu i::after { display: block; width: 1.25rem; height: 1.5px; background: currentColor; position: relative; transition: transform .25s, background .25s; }
.btn-menu i::before, .btn-menu i::after { content: ""; position: absolute; left: 0; }
.btn-menu i::before { top: -6px; } .btn-menu i::after { top: 6px; }
.btn-menu[aria-expanded="true"] i { background: transparent; }
.btn-menu[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
.btn-menu[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }
.hoja-menu { position: fixed; inset: 0; z-index: 35; background: radial-gradient(ellipse at 50% 0%, #1D3C33, var(--noche) 70%); padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 2rem) 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; overflow-y: auto; }
.hoja-menu ul { list-style: none; margin: 0; padding: 0; }
.hoja-menu li a { display: block; font: 500 2.2rem/1.2 var(--serif); color: var(--marfil); text-decoration: none; padding: .7rem 0; border-bottom: 1px solid var(--linea); }
.hoja-menu .boton { margin-top: 2rem; align-self: stretch; }
@media (prefers-reduced-motion: no-preference) {
  .hoja-menu:not([hidden]) li { animation: brotar .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hoja-menu li:nth-child(2) { animation-delay: .06s; } .hoja-menu li:nth-child(3) { animation-delay: .12s; }
  .hoja-menu li:nth-child(4) { animation-delay: .18s; } .hoja-menu li:nth-child(5) { animation-delay: .24s; } .hoja-menu li:nth-child(6) { animation-delay: .3s; }
  @keyframes brotar { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
}
@media (min-width: 64rem) {
  .nav-links { display: flex; }
  .btn-menu, .hoja-menu { display: none !important; }
}

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem/1.2 var(--sans); padding: .95rem 1.8rem; min-height: 3.1rem; border-radius: 999px; border: 0; background: linear-gradient(180deg, var(--oro-claro), var(--oro) 55%, #D2B05A); color: #22302A; text-decoration: none; cursor: pointer; text-align: center; box-shadow: 0 0 0 1px rgba(248, 234, 184, .5), 0 6px 24px -6px rgba(231, 203, 121, .55); transition: box-shadow .3s, transform .3s; }
.boton:hover { box-shadow: 0 0 0 1px rgba(248, 234, 184, .8), 0 0 32px rgba(231, 203, 121, .55); transform: translateY(-1px); }
.boton.borde { background: transparent; color: var(--oro); box-shadow: inset 0 0 0 1px rgba(231, 203, 121, .6); }
.boton.borde:hover { background: rgba(231, 203, 121, .08); box-shadow: inset 0 0 0 1px var(--oro), 0 0 22px rgba(231, 203, 121, .25); }
.pergamino-c .boton.borde { color: var(--musgo); box-shadow: inset 0 0 0 1px rgba(46, 90, 67, .55); }
.pergamino-c .boton.borde:hover { background: rgba(46, 90, 67, .07); }
.boton.peque { padding: .6rem 1.15rem; min-height: 2.6rem; font-size: .93rem; }
.boton[disabled] { opacity: .6; cursor: wait; }
.nav-links .boton { padding: .55rem 1.15rem; min-height: 0; color: #22302A; text-shadow: none; }
.nav-links .boton:hover { color: #22302A; text-shadow: none; }

/* ---------- portada: bosque encantado ---------- */
.portada { min-height: 100vh; min-height: 100svh; padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 2rem) 0 clamp(9rem, 24vw, 15rem); display: flex; align-items: center; overflow: hidden; text-align: center;
  background: radial-gradient(ellipse 60% 40% at 72% 12%, rgba(248, 234, 184, .16), transparent 70%), linear-gradient(180deg, #0A1726 0%, #11263A 30%, #15332F 68%, var(--noche) 100%); }
.cielo { position: absolute; inset: 0; pointer-events: none; }
.estrellas { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; box-shadow: 569px 140px 0 0 rgba(255,248,220,0.7), 850px 367px 0 0.5px rgba(255,248,220,0.9), 472px 154px 0 0 rgba(255,248,220,0.5), 309px 237px 0 0.5px rgba(255,248,220,0.5), 24px 496px 0 0.5px rgba(255,248,220,0.5), 538px 288px 0 0 rgba(255,248,220,0.5), 858px 378px 0 0.5px rgba(255,248,220,0.7), 257px 55px 0 0 rgba(255,248,220,0.9), 815px 408px 0 0 rgba(255,248,220,0.35), 986px 410px 0 0 rgba(255,248,220,0.5), 137px 213px 0 0 rgba(255,248,220,0.5), 225px 348px 0 0.5px rgba(255,248,220,0.35), 209px 0px 0 0.5px rgba(255,248,220,0.5), 1098px 103px 0 0 rgba(255,248,220,0.35), 144px 212px 0 0.5px rgba(255,248,220,0.9), 304px 258px 0 0 rgba(255,248,220,0.7), 971px 125px 0 0 rgba(255,248,220,0.9), 954px 491px 0 0 rgba(255,248,220,0.7), 175px 147px 0 0 rgba(255,248,220,0.7), 542px 490px 0 0.5px rgba(255,248,220,0.5), 1057px 23px 0 0 rgba(255,248,220,0.7), 300px 27px 0 0.5px rgba(255,248,220,0.7), 1316px 93px 0 0.5px rgba(255,248,220,0.7), 1061px 375px 0 0 rgba(255,248,220,0.7), 456px 514px 0 0 rgba(255,248,220,0.5), 1255px 199px 0 0 rgba(255,248,220,0.9), 464px 204px 0 0.5px rgba(255,248,220,0.9), 728px 29px 0 0 rgba(255,248,220,0.7), 967px 265px 0 0 rgba(255,248,220,0.7), 915px 357px 0 0 rgba(255,248,220,0.35), 451px 104px 0 0 rgba(255,248,220,0.9), 402px 345px 0 0 rgba(255,248,220,0.9), 1278px 1px 0 0 rgba(255,248,220,0.7), 1317px 86px 0 0.5px rgba(255,248,220,0.35), 795px 204px 0 0 rgba(255,248,220,0.5), 888px 340px 0 0 rgba(255,248,220,0.9), 948px 411px 0 0.5px rgba(255,248,220,0.35), 325px 174px 0 0 rgba(255,248,220,0.35), 309px 476px 0 0.5px rgba(255,248,220,0.5), 1252px 485px 0 0.5px rgba(255,248,220,0.7), 319px 134px 0 0 rgba(255,248,220,0.35), 1330px 105px 0 0.5px rgba(255,248,220,0.5), 888px 199px 0 0 rgba(255,248,220,0.35), 515px 217px 0 0 rgba(255,248,220,0.5), 1201px 333px 0 0 rgba(255,248,220,0.9), 268px 62px 0 0.5px rgba(255,248,220,0.7), 938px 430px 0 0.5px rgba(255,248,220,0.5), 1089px 155px 0 0.5px rgba(255,248,220,0.35), 901px 187px 0 0.5px rgba(255,248,220,0.35), 306px 176px 0 0 rgba(255,248,220,0.9), 1267px 123px 0 0.5px rgba(255,248,220,0.35), 667px 494px 0 0 rgba(255,248,220,0.35), 508px 195px 0 0 rgba(255,248,220,0.35), 200px 519px 0 0 rgba(255,248,220,0.35), 129px 453px 0 0 rgba(255,248,220,0.5), 1418px 283px 0 0 rgba(255,248,220,0.9), 1039px 253px 0 0.5px rgba(255,248,220,0.7), 1145px 207px 0 0 rgba(255,248,220,0.5), 853px 124px 0 0 rgba(255,248,220,0.9), 647px 74px 0 0.5px rgba(255,248,220,0.5), 877px 74px 0 0 rgba(255,248,220,0.7), 250px 158px 0 0.5px rgba(255,248,220,0.7), 292px 259px 0 0 rgba(255,248,220,0.9), 449px 96px 0 0 rgba(255,248,220,0.9), 333px 229px 0 0 rgba(255,248,220,0.9), 1055px 413px 0 0 rgba(255,248,220,0.9), 400px 365px 0 0 rgba(255,248,220,0.35), 749px 19px 0 0 rgba(255,248,220,0.9), 902px 18px 0 0 rgba(255,248,220,0.7), 1059px 302px 0 0.5px rgba(255,248,220,0.35); }
.luna { position: absolute; top: calc(var(--nav-h) + 6%); right: 9%; width: clamp(54px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #FFFBEA, #F6E6AE 58%, #D9C27A); box-shadow: 0 0 50px 16px rgba(248, 234, 184, .22), 0 0 140px 60px rgba(248, 234, 184, .08); }
.niebla { position: absolute; left: -30%; width: 160%; height: 9rem; bottom: clamp(5rem, 13vw, 9rem); background: radial-gradient(ellipse at center, rgba(214, 232, 224, .16), transparent 68%); filter: blur(8px); pointer-events: none; }
.niebla.dos { bottom: clamp(2rem, 7vw, 5rem); opacity: .8; }
.arboles { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(150px, 24vw, 280px); pointer-events: none; }
.arboles svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; will-change: transform; }
.portada .contenido { position: relative; z-index: 2; width: 100%; }
.portada .antes { font: italic 400 1.45rem/1.3 var(--serif); color: var(--oro); margin: 0 0 1.25rem; text-shadow: 0 0 18px rgba(231, 203, 121, .4); }
.nombres { font: 500 3.6rem/1 var(--serif); margin: 0; color: var(--marfil); letter-spacing: .01em; text-shadow: 0 0 34px rgba(248, 234, 184, .28); text-wrap: balance; }
.nombres span { display: block; }
.nombres .y { font: 400 4rem/1 var(--script); margin: .15rem 0 .25rem; color: var(--oro);
  background: linear-gradient(110deg, #B8933A 20%, #FFF4C9 42%, #E7CB79 55%, #B8933A 75%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 0 12px rgba(231, 203, 121, .35)); }
.estrellita { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: 1.75rem auto 1.3rem; color: var(--oro); }
.estrellita::before, .estrellita::after { content: ""; height: 1px; width: 4rem; background: linear-gradient(90deg, transparent, rgba(231, 203, 121, .7)); }
.estrellita::after { transform: scaleX(-1); }
.estrellita svg { width: 1rem; height: 1rem; filter: drop-shadow(0 0 6px rgba(231, 203, 121, .8)); }
.portada .fecha { font: 500 1.55rem/1.35 var(--serif); margin: 0; color: var(--marfil); }
.portada .lugar { color: var(--salvia); margin: .3rem 0 0; }
.cuenta { display: flex; justify-content: center; gap: .9rem; margin: 2rem 0 2.25rem; }
.cuenta div { min-width: 3.6rem; }
.cuenta b { display: block; font: 500 2.3rem/1 var(--serif); color: var(--oro-claro); font-variant-numeric: lining-nums tabular-nums; text-shadow: 0 0 16px rgba(231, 203, 121, .45); }
.cuenta span { font-size: .78rem; color: var(--texto-2); }
@media (min-width: 30rem) { .cuenta { gap: 1.6rem; } .cuenta div { min-width: 4rem; } }
.cuenta-texto { font: italic 400 1.5rem/1.3 var(--serif); color: var(--oro); margin: 2rem 0 2.25rem; }
.flecha-baja { position: absolute; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); color: var(--oro); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; text-decoration: none; z-index: 3; opacity: .8; }
.flecha-baja svg { width: 1.2rem; }
@media (min-width: 48rem) { .nombres { font-size: 5.6rem; } .nombres .y { font-size: 5.4rem; } .portada .fecha { font-size: 1.85rem; } }
@media (prefers-reduced-motion: no-preference) {
  .estrellas { animation: titilar 4s ease-in-out infinite alternate; }
  .niebla { animation: deriva 38s ease-in-out infinite alternate; }
  .niebla.dos { animation-duration: 52s; animation-direction: alternate-reverse; }
  .nombres .y { animation: destello 7s linear infinite; }
  .portada .antes, .nombres span, .portada .detalles { animation: materializar 1.6s cubic-bezier(.2, .7, .2, 1) both; }
  .nombres span:nth-child(1) { animation-delay: .25s; } .nombres span:nth-child(2) { animation-delay: .55s, .55s; } .nombres span:nth-child(3) { animation-delay: .8s; }
  .nombres .y { animation: materializar 1.6s cubic-bezier(.2, .7, .2, 1) .55s both, destello 7s linear 2s infinite; }
  .portada .detalles { animation-delay: 1.2s; }
  .flecha-baja { animation: flotar 2.6s ease-in-out infinite; }
  @keyframes titilar { from { opacity: .55; } to { opacity: 1; } }
  @keyframes deriva { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
  @keyframes destello { from { background-position: 130% 0; } to { background-position: -130% 0; } }
  @keyframes materializar { from { opacity: 0; filter: blur(10px); transform: translateY(10px) scale(.98); } }
  @keyframes flotar { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
}

/* ---------- tarjetas de pergamino ---------- */
.pergamino-c { background: var(--pergamino); color: var(--tinta); border-radius: 6px; position: relative; box-shadow: 0 0 0 1px rgba(231, 203, 121, .25), 0 20px 50px -20px rgba(0, 0, 0, .7), 0 0 60px -10px rgba(231, 203, 121, .12); }
.pergamino-c::after { content: ""; position: absolute; inset: 8px; border: 1px solid var(--linea-p); border-radius: 3px; pointer-events: none; }
.pergamino-c a { color: var(--musgo); }

/* ---------- foto portada ---------- */
.foto-portada { padding-top: 2rem; }
.arco { width: min(100%, 26rem); margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 999px 999px 6px 6px; overflow: hidden; background: var(--bosque); box-shadow: 0 0 0 1px rgba(231, 203, 121, .35), 0 0 60px rgba(231, 203, 121, .15); }
.arco img { width: 100%; height: 100%; object-fit: cover; }
.foto-portada .frase-foto { text-align: center; font: italic 400 1.6rem/1.4 var(--serif); max-width: 30rem; margin: 2.25rem auto 0; color: var(--texto-2); }

/* ---------- historia: libro de cuentos ---------- */
.linea { list-style: none; margin: 0 auto; padding: 0; position: relative; max-width: 60rem; }
.linea::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: .55rem; width: 1px; background: linear-gradient(180deg, transparent, var(--oro) 8%, var(--oro) 92%, transparent); box-shadow: 0 0 8px rgba(231, 203, 121, .6); }
.momento { position: relative; padding: 0 0 2.75rem 2.6rem; }
.momento:last-child { padding-bottom: 0; }
.momento::before { content: ""; position: absolute; left: .15rem; top: 1.6rem; width: .8rem; height: .8rem; border-radius: 50%; background: radial-gradient(circle, #FFF7D6, var(--oro) 55%, rgba(231, 203, 121, 0) 72%); box-shadow: 0 0 14px 4px rgba(231, 203, 121, .55); }
.momento .hoja { padding: 1.6rem 1.4rem 1.4rem; }
.momento .cuando { font: italic 500 1.3rem/1.2 var(--serif); color: var(--oro-osc); margin: 0 0 .25rem; }
.momento h3 { font: 600 1.9rem/1.15 var(--serif); margin: 0 0 .8rem; color: var(--musgo-osc); }
.momento .texto { color: var(--tinta-2); white-space: pre-line; margin: 0; }
.momento .texto::first-letter { font: 600 3.3em/.8 var(--serif); float: left; margin: .1em .12em 0 0; color: var(--musgo); }
.momento img { margin-top: 1.25rem; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .momento::before { animation: latir 3.2s ease-in-out infinite; }
  .momento:nth-child(2)::before { animation-delay: .8s; } .momento:nth-child(3)::before { animation-delay: 1.6s; } .momento:nth-child(4)::before { animation-delay: 2.4s; }
  @keyframes latir { 0%, 100% { opacity: .65; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
}
@media (min-width: 52rem) {
  .linea::before { left: 50%; }
  .momento { width: 50%; padding: 0 3rem 3.5rem 0; }
  .momento::before { left: auto; right: -.4rem; }
  .momento:nth-child(even) { margin-left: 50%; padding: 0 0 3.5rem 3rem; }
  .momento:nth-child(even)::before { right: auto; left: -.4rem; }
  .momento .hoja { padding: 2rem 2rem 1.75rem; }
}

/* ---------- celebración ---------- */
#celebracion { background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(46, 90, 67, .35), transparent 70%); }
.eventos { display: grid; gap: 2rem; max-width: 46rem; margin: 0 auto; }
@media (min-width: 52rem) { .eventos.dos { grid-template-columns: 1fr 1fr; max-width: none; } .eventos.tres { grid-template-columns: repeat(3, 1fr); max-width: none; } }
.evento { text-align: center; padding: 2.75rem 1.5rem 1.75rem; display: flex; flex-direction: column; }
.evento .nombre-ev { font: 400 2.6rem/1 var(--script); color: var(--musgo); margin: 0 0 .9rem; }
.evento .hora { font: 600 2.8rem/1 var(--serif); margin: 0 0 .9rem; color: var(--tinta); font-variant-numeric: lining-nums; }
.evento .sitio { font: 600 1.55rem/1.25 var(--serif); margin: 0 0 .3rem; color: var(--musgo-osc); }
.evento .dir { color: var(--tinta-2); margin: 0 0 1rem; }
.evento .notas { color: var(--tinta-2); white-space: pre-line; font-size: .97rem; max-width: 28rem; margin: 0 auto 1.25rem; }
.evento .acciones { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; position: relative; z-index: 1; }
.mapa { width: 100%; aspect-ratio: 4/3; border: 0; margin: 1.5rem 0 0; background: #E9E2CF; display: block; border-radius: 4px; filter: sepia(.3) saturate(.85); position: relative; z-index: 1; }
.calendario { text-align: center; margin-top: 2.5rem; }

/* ---------- galería ---------- */
.galeria { -webkit-columns: 2 10rem; columns: 2 10rem; -webkit-column-gap: .8rem; column-gap: .8rem; }
@media (min-width: 52rem) { .galeria { columns: 3 15rem; column-gap: 1rem; } }
.galeria button { display: block; width: 100%; padding: 0; border: 0; background: var(--bosque); margin: 0 0 .8rem; cursor: zoom-in; -webkit-column-break-inside: avoid; break-inside: avoid; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(231, 203, 121, .2); transition: box-shadow .4s; }
.galeria img { width: 100%; height: auto; transition: transform .8s; }
@media (hover: hover) { .galeria button:hover { box-shadow: 0 0 0 1px rgba(231, 203, 121, .7), 0 0 28px rgba(231, 203, 121, .3); } .galeria button:hover img { transform: scale(1.04); } }
.visor { position: fixed; inset: 0; z-index: 60; background: #08100D; display: flex; align-items: center; justify-content: center; padding: calc(4rem + env(safe-area-inset-top, 0px)) .75rem calc(4rem + env(safe-area-inset-bottom, 0px)); touch-action: pan-y; }

.visor button { position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgba(231, 203, 121, .14); color: var(--oro-claro); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.visor .cerrar { top: calc(.9rem + env(safe-area-inset-top, 0px)); right: .9rem; }
.visor .ant { left: .75rem; } .visor .sig { right: .75rem; }
.visor .contador { position: absolute; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: var(--texto-2); font-size: .9rem; }

/* ---------- álbum de los invitados ---------- */
.subida { max-width: 32rem; margin: 0 auto 2.5rem; padding: 2.25rem 1.5rem 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.subida > * { position: relative; z-index: 1; }
.subida .sub { color: var(--tinta-2); margin: 0 0 1.4rem; max-width: 24rem; text-wrap: balance; }
.subida .sub.solo { margin: 0; }
.subida .campo { width: 100%; max-width: 20rem; margin: 0 0 1.25rem; text-align: center; }
.subida .campo label { display: block; margin-bottom: .1rem; }
.subida input[type=text] { font: 400 16px/1.4 var(--sans); color: var(--tinta); background: #FFFDF7; width: 100%; min-height: 3rem; border: 1px solid #CFC5AA; border-radius: 10px; padding: .75rem .9rem; text-align: center; -webkit-appearance: none; appearance: none; }
.subida input[type=text]:focus { outline: none; border-color: var(--musgo); box-shadow: 0 0 0 3px rgba(46, 90, 67, .18); }
.subida .boton { width: 100%; max-width: 20rem; }
.subida .nota { font-size: .85rem; color: var(--tinta-2); margin: 1rem 0 0; max-width: 22rem; text-wrap: balance; }
.cola { list-style: none; margin: 1.25rem 0 0; padding: 0; text-align: left; width: 100%; }
.cola li { padding: .6rem 0; border-top: 1px solid var(--linea-p); font-size: .92rem; color: var(--tinta-2); }
.cola .nombre-arch { display: flex; justify-content: space-between; gap: 1rem; }
.cola .nombre-arch span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta); min-width: 0; }
.cola .barra { height: 4px; border-radius: 4px; background: #E6DEC8; margin-top: .4rem; overflow: hidden; }
.cola .barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--oro-osc), var(--oro)); transition: width .2s; }
.cola .ok { color: var(--musgo); white-space: nowrap; } .cola .mal { color: #8A3324; }
.album-cab { display: flex; justify-content: center; margin: 0 0 1.25rem; }
.album-cab span { font: italic 400 1.25rem/1.3 var(--serif); color: var(--texto-2); }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
@media (min-width: 40rem) { .album { grid-template-columns: repeat(4, 1fr); gap: .7rem; } }
@media (min-width: 64rem) { .album { grid-template-columns: repeat(5, 1fr); gap: .8rem; } }
.album .pieza { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; margin: 0; overflow: hidden; border-radius: 6px; background: var(--bosque); cursor: zoom-in; box-shadow: 0 0 0 1px rgba(231, 203, 121, .2); transition: box-shadow .4s; }
.album .pieza img, .album .pieza video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: transform .8s; }
@media (hover: hover) { .album .pieza:hover { box-shadow: 0 0 0 1px rgba(231, 203, 121, .7), 0 0 24px rgba(231, 203, 121, .3); } .album .pieza:hover img { transform: scale(1.05); } }
.album .play { position: absolute; left: 50%; top: 50%; width: 2.8rem; height: 2.8rem; margin: -1.4rem 0 0 -1.4rem; border-radius: 50%; background: rgba(15, 31, 26, .55); box-shadow: 0 0 0 1px rgba(231, 203, 121, .6), 0 0 20px rgba(231, 203, 121, .3); display: grid; place-items: center; }
.album .play::after { content: ""; border-left: 12px solid var(--oro-claro); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.album .sello-mini { position: absolute; top: .35rem; right: .35rem; width: 2.1rem; height: 2.1rem; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.album .autor { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem .5rem .35rem; font-size: .72rem; line-height: 1.2; color: var(--marfil); text-align: left; background: linear-gradient(transparent, rgba(8, 16, 13, .8)); pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .album .pieza.nueva { animation: brotarPieza 1.2s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes brotarPieza { 0% { opacity: 0; transform: scale(.85); filter: blur(8px); box-shadow: 0 0 0 1px var(--oro), 0 0 40px var(--oro); } 60% { opacity: 1; filter: none; } }
}
.album-vacio, .pagina-vacia { text-align: center; color: var(--texto-2); font: italic 400 1.4rem/1.45 var(--serif); margin: 0 auto; max-width: 28rem; text-wrap: balance; }
.mas-album { text-align: center; margin-top: 1.75rem; }
.aviso-directo { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: rgba(15, 31, 26, .92); color: var(--oro-claro); border-radius: 999px; padding: .7rem 1.2rem; font-size: .95rem; box-shadow: 0 0 0 1px rgba(231, 203, 121, .5), 0 0 30px rgba(231, 203, 121, .25); white-space: nowrap; transition: opacity .5s, transform .5s; }
.aviso-directo.fuera { opacity: 0; transform: translate(-50%, 10px); }
.visor .visor-media { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.visor .visor-media img, .visor .visor-media video { max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100svh - 9rem); object-fit: contain; border-radius: 4px; }
.visor .visor-sello { position: absolute; top: .75rem; right: .75rem; width: 3.4rem; height: 3.4rem; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }

/* ---------- vídeos ---------- */
.videos { display: grid; gap: 2.5rem; max-width: 56rem; margin: 0 auto; }
.video { margin: 0; }
.video iframe, .video video { width: 100%; aspect-ratio: 16/9; border: 0; display: block; background: #000; border-radius: 6px; box-shadow: 0 0 0 1px rgba(231, 203, 121, .3), 0 0 40px rgba(231, 203, 121, .12); }
.video figcaption { text-align: center; font: italic 400 1.35rem/1.4 var(--serif); color: var(--texto-2); margin-top: .9rem; }

/* ---------- confirmación ---------- */
#confirmar { background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(46, 90, 67, .45), transparent 75%); }
.tarjeta-rsvp { max-width: 38rem; margin: 0 auto; padding: 3rem 1.25rem 2.5rem; }
.tarjeta-rsvp .cab { margin-bottom: 2rem; }
.tarjeta-rsvp .cab h2 { color: var(--musgo-osc); text-shadow: none; }
.tarjeta-rsvp .cab .adorno { color: var(--oro-osc); filter: none; }
@media (min-width: 40rem) { .tarjeta-rsvp { padding: 3.75rem 3rem 3.25rem; } }
@media (max-width: 24rem) { #confirmar .envoltura { width: calc(100% - 1.25rem); } .tarjeta-rsvp { padding: 2.75rem 1rem 2.25rem; } }
.rsvp { max-width: 30rem; margin: 0 auto; position: relative; z-index: 1; }
.rsvp .hola { text-align: center; font: 600 1.9rem/1.2 var(--serif); margin: 0 0 .5rem; color: var(--musgo-osc); text-wrap: balance; }
.rsvp .sub { text-align: center; color: var(--tinta-2); margin: 0 auto 2rem; }
.campo { display: grid; gap: .35rem; margin-bottom: 1rem; }
.campo label, .etq { font-size: .9rem; color: var(--tinta-2); }
.rsvp input[type=text], .rsvp select, .rsvp textarea { font: 400 16px/1.4 var(--sans); color: var(--tinta); background: #FFFDF7; width: 100%; min-height: 3rem; border: 1px solid #CFC5AA; border-radius: 10px; padding: .75rem .9rem; -webkit-appearance: none; appearance: none; }
.rsvp select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A6658' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.rsvp textarea { min-height: 6rem; resize: vertical; }
.rsvp input:focus, .rsvp select:focus, .rsvp textarea:focus { outline: none; border-color: var(--musgo); box-shadow: 0 0 0 3px rgba(46, 90, 67, .18); }
.codigo-form { display: grid; gap: .75rem; }
.codigo-form input { text-transform: uppercase; letter-spacing: .18em; text-align: center; }
.persona { border: 0; border-top: 1px solid var(--linea-p); padding: 1.5rem 0 .5rem; margin: 0; min-width: 0; }
.persona:first-of-type { border-top: 0; padding-top: .25rem; }
.persona legend { float: left; width: 100%; padding: 0; font: 600 1.6rem/1.2 var(--serif); margin: 0 0 .9rem; color: var(--tinta); }
.persona legend + * { clear: both; }
.eleccion { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .5rem; }
.eleccion label { position: relative; display: block; }
.eleccion input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; left: 0; top: 0; cursor: pointer; }
.eleccion span { display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; min-height: 3rem; padding: .5rem .4rem; border-radius: 999px; border: 1px solid #CFC5AA; color: var(--tinta); background: #FFFDF7; transition: background .2s, border-color .2s, color .2s, box-shadow .3s; }
.eleccion input:checked + span { background: var(--musgo); border-color: var(--musgo); color: var(--marfil); box-shadow: 0 0 18px rgba(46, 90, 67, .35); }
.eleccion input[value="no"]:checked + span { background: #6B6A5C; border-color: #6B6A5C; box-shadow: none; }
.eleccion input:focus-visible + span { outline: 2px solid var(--musgo); outline-offset: 2px; }
.detalle-si { padding-top: .75rem; }
.aviso { border-radius: 10px; padding: .85rem 1rem; margin: 0 0 1rem; background: #F6E3DC; color: #7A2E23; }
.enviar { width: 100%; margin-top: .5rem; }
.resumen-rsvp { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.resumen-rsvp li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--linea-p); }
.resumen-rsvp li span:first-child { font: 600 1.3rem/1.3 var(--serif); }
.resumen-rsvp .estado { font-size: .92rem; text-align: right; }
.resumen-rsvp .si { color: var(--musgo); } .resumen-rsvp .no { color: var(--tinta-2); }
.rsvp .pie-rsvp { text-align: center; }
.rsvp .pie-rsvp p { color: var(--tinta-2); }
.otro-codigo { display: block; margin-top: 1.75rem; font-size: .9rem; color: var(--tinta-2) !important; text-align: center; }

/* ---------- dudas y regalo ---------- */
.preguntas { max-width: 44rem; margin: 0 auto; }
.preguntas details { border-bottom: 1px solid var(--linea); }
.preguntas details:first-child { border-top: 1px solid var(--linea); }
.preguntas summary { cursor: pointer; padding: 1.3rem 2.5rem 1.3rem 0; font: 500 1.5rem/1.3 var(--serif); color: var(--marfil); list-style: none; position: relative; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: ""; position: absolute; right: .5rem; top: 50%; width: .6rem; height: .6rem; border-right: 1.5px solid var(--oro); border-bottom: 1.5px solid var(--oro); transform: translateY(-75%) rotate(45deg); transition: transform .3s; }
.preguntas details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.preguntas details p { white-space: pre-line; color: var(--texto-2); padding-bottom: 1.25rem; margin: 0; }
#regalo { text-align: center; }
#regalo .texto-regalo { max-width: 36rem; margin: 0 auto; color: var(--texto-2); white-space: pre-line; }
.cuenta-banco { display: inline-flex; flex-direction: column; align-items: center; gap: .9rem; margin-top: 2rem; padding: 1.75rem 2rem; max-width: 100%; }
.cuenta-banco code { font: 600 1.35rem/1.4 var(--serif); letter-spacing: .06em; overflow-wrap: anywhere; font-variant-numeric: lining-nums; position: relative; z-index: 1; }
.cuenta-banco button { position: relative; z-index: 1; }

/* ---------- pie ---------- */
footer { text-align: center; padding: 4.5rem 0 calc(4rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, #0A1612 60%); }
footer .sello-pie { width: 5.5rem; margin: 0 auto 1.5rem; filter: drop-shadow(0 0 16px rgba(231, 203, 121, .25)); }
footer .nombres-pie { font: 500 2.6rem/1.1 var(--serif); margin: 0 0 .5rem; color: var(--marfil); }
footer .nombres-pie em { font: 400 2.6rem/1 var(--script); color: var(--oro); font-style: normal; }
footer p { margin: 0; color: var(--texto-2); }
footer .fin { font: italic 400 1.3rem/1.4 var(--serif); color: var(--oro); margin-top: 1.5rem; }

/* ---------- sobre de bienvenida ---------- */
.intro { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--marfil); overflow: hidden;
  background: radial-gradient(ellipse 70% 45% at 50% 35%, rgba(46, 90, 67, .55), transparent 70%), linear-gradient(180deg, #0A1726, #12291F 60%, #0A1612); transition: opacity .9s ease, visibility .9s, filter .9s; }
.intro.fuera { opacity: 0; visibility: hidden; filter: blur(10px); }
.intro .estrellas { opacity: .8; }
.intro .para { font: italic 400 1.25rem/1.4 var(--serif); color: var(--salvia); margin: 0; }
.intro .quien { font: 400 2.7rem/1.15 var(--script); margin: .25rem 0 0; color: var(--oro-claro); max-width: 22rem; text-wrap: balance; text-shadow: 0 0 20px rgba(231, 203, 121, .45); }
.intro .titulo-intro { position: relative; z-index: 1; transition: opacity .4s; }
.intro.abierta .titulo-intro { opacity: 0; }
.sobre { position: relative; width: 20rem; max-width: 86vw; aspect-ratio: 1.45; -webkit-perspective: 1400px; perspective: 1400px; z-index: 1; }
.sobre .fondo { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, #2E5A43, #1F3F2E); border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 60px rgba(231, 203, 121, .12); }
.sobre .carta { position: absolute; left: 6%; right: 6%; bottom: 5%; height: 88%; background: var(--pergamino); border-radius: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--tinta); padding: 1rem; z-index: 2; transition: transform 1.1s cubic-bezier(.25, .8, .3, 1) .9s, box-shadow 1.1s .9s; }
.sobre .carta small { font: italic 500 .95rem/1 var(--serif); color: var(--tinta-2); }
.sobre .carta b { font: 600 1.8rem/1.1 var(--serif); margin: .45rem 0; color: var(--musgo-osc); }
.sobre .carta b em { font-family: var(--script); color: var(--oro-osc); font-style: normal; font-weight: 400; }
.sobre .bolsillo { position: absolute; inset: 0; z-index: 3; background: #EFE7D2; -webkit-clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); border-radius: 4px; }
.sobre .bolsillo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(0, 0, 0, .06), transparent 40%), linear-gradient(200deg, rgba(0, 0, 0, .06), transparent 40%); }
.sobre .solapa { position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 4; background: #F4EDDA; -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; -webkit-transform-origin: 50% 0; transition: transform .8s cubic-bezier(.5, 0, .3, 1) .25s, z-index 0s .6s; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .1)); border-radius: 4px 4px 0 0; }
.sobre .sello { position: absolute; left: 50%; top: 62%; width: 4.8rem; height: 4.8rem; z-index: 5; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; transition: transform .4s, opacity .4s; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)) drop-shadow(0 0 12px rgba(231, 203, 121, .25)); }
.sobre .sello svg { width: 100%; height: 100%; }
.intro.abierta .sello { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
.intro.abierta .solapa { transform: rotateX(180deg); -webkit-transform: rotateX(180deg); z-index: 1; }
.intro.abierta .carta { transform: translateY(-58%); box-shadow: 0 0 40px rgba(231, 203, 121, .35); }
.intro .acciones-intro { display: flex; flex-direction: column; align-items: center; gap: .9rem; transition: opacity .3s; position: relative; z-index: 1; }
.intro.abierta .acciones-intro { opacity: 0; }
.intro .saltar { background: none; border: 0; color: var(--texto-2); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; font-size: .9rem; padding: .5rem; }
@media (prefers-reduced-motion: no-preference) {
  .intro:not(.abierta) .sello { animation: respirar 2.4s ease-in-out infinite; }
  @keyframes respirar { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
}
@media (min-width: 48rem) { .sobre { width: 26rem; } .sobre .carta b { font-size: 2.2rem; } .sobre .sello { width: 5.6rem; height: 5.6rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  #magia { display: none; }
}

/* ---------- cabecera de cada página ---------- */
.cabecera-pagina { position: relative; overflow: hidden; text-align: center; padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 3.5rem) 0 clamp(6rem, 16vw, 9rem);
  background: radial-gradient(ellipse 60% 50% at 70% 10%, rgba(248, 234, 184, .12), transparent 70%), linear-gradient(180deg, #0A1726 0%, #12283A 40%, #15332F 80%, var(--noche) 100%); }
.cabecera-pagina .arboles { height: clamp(90px, 14vw, 170px); }
.cabecera-pagina .titulo { position: relative; z-index: 2; }
.cabecera-pagina .adorno { width: 11rem; height: auto; margin: 0 auto 1rem; display: block; color: var(--oro); filter: drop-shadow(0 0 6px rgba(231, 203, 121, .35)); }
.cabecera-pagina h1 { font: 500 2.9rem/1.05 var(--serif); margin: 0; color: var(--marfil); text-shadow: 0 0 28px rgba(231, 203, 121, .2); text-wrap: balance; }
.cabecera-pagina .entradilla { font: italic 400 1.35rem/1.4 var(--serif); color: var(--oro); margin: .8rem auto 0; max-width: 30rem; text-wrap: balance; }
@media (min-width: 48rem) { .cabecera-pagina h1 { font-size: 4rem; } }
@media (prefers-reduced-motion: no-preference) { .cabecera-pagina .titulo { animation: materializar 1.3s cubic-bezier(.2, .7, .2, 1) both; } }
.pagina { padding-top: 1rem; }
.saludo { text-align: center; font: italic 400 1.35rem/1.4 var(--serif); color: var(--oro); margin: -1rem 0 2rem; }

/* ---------- puertas de la portada ---------- */
#puertas { padding-top: 3.5rem; }
.puertas { display: grid; gap: 1rem; grid-template-columns: 1fr; max-width: 60rem; margin: 0 auto; }
@media (min-width: 40rem) { .puertas { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .puertas { grid-template-columns: repeat(3, 1fr); } }
.puerta { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .35rem; min-height: 9.5rem; padding: 1.75rem 1.25rem; text-decoration: none; color: var(--tinta); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.puerta > * { position: relative; z-index: 1; }
.puerta .icono { width: 2.4rem; height: 2.4rem; color: var(--oro-osc); margin-bottom: .2rem; }
.puerta strong { font: 600 1.7rem/1.15 var(--serif); color: var(--musgo-osc); }
.puerta span { font-size: .92rem; color: var(--tinta-2); text-wrap: balance; }
.puerta:hover, .puerta:focus-visible { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(231, 203, 121, .6), 0 24px 50px -20px rgba(0, 0, 0, .7), 0 0 50px -6px rgba(231, 203, 121, .35); }
.puerta.destacada { background: linear-gradient(180deg, #FBF3D6, #F2E2AE); }
.puerta.destacada strong { color: var(--musgo); }
@media (min-width: 64rem) { .puertas .puerta.destacada { grid-column: span 3; min-height: 8rem; } }
@media (min-width: 40rem) and (max-width: 63.99rem) { .puertas .puerta.destacada { grid-column: span 2; } }

/* ---------- transición entre páginas ---------- */
body > main, body > footer, .cabecera-pagina { transition: opacity .42s ease, filter .42s ease; }
body.saliendo > main, body.saliendo > footer { opacity: 0; filter: blur(8px); }
@media (prefers-reduced-motion: no-preference) {
  body > main { animation: entrarPagina .7s ease backwards; }
  @keyframes entrarPagina { from { opacity: 0; filter: blur(6px); } }
}

/* ---------- música de fondo ---------- */
.boton-musica { position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 3.1rem; height: 3.1rem; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(15, 31, 26, .82); color: var(--oro); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(231, 203, 121, .5), 0 0 22px rgba(231, 203, 121, .25); transition: box-shadow .3s, transform .3s; }
.boton-musica:hover { transform: scale(1.06); box-shadow: 0 0 0 1px var(--oro), 0 0 30px rgba(231, 203, 121, .45); }
.boton-musica .nota { width: 1.35rem; height: 1.35rem; }
.boton-musica .ondas { display: none; gap: 3px; align-items: flex-end; height: 1.1rem; }
.boton-musica .ondas i { display: block; width: 3px; height: 40%; background: var(--oro); border-radius: 2px; }
.boton-musica[aria-pressed="true"] .nota { display: none; }
.boton-musica[aria-pressed="true"] .ondas { display: flex; }
.boton-musica.espera { animation: llamar 2s ease-in-out infinite; }
.boton-musica .titulo-musica { position: absolute; left: calc(100% + .6rem); white-space: nowrap; font-size: .85rem; color: var(--oro-claro); background: rgba(15, 31, 26, .85); padding: .4rem .8rem; border-radius: 999px; box-shadow: 0 0 0 1px rgba(231, 203, 121, .35); opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.boton-musica.con-titulo .titulo-musica { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .boton-musica[aria-pressed="true"] .ondas i { animation: onda 1s ease-in-out infinite; }
  .boton-musica .ondas i:nth-child(2) { animation-delay: .2s !important; } .boton-musica .ondas i:nth-child(3) { animation-delay: .4s !important; }
  @keyframes onda { 0%, 100% { height: 30%; } 50% { height: 100%; } }
  @keyframes llamar { 0%, 100% { box-shadow: 0 0 0 1px rgba(231, 203, 121, .5), 0 0 22px rgba(231, 203, 121, .25); } 50% { box-shadow: 0 0 0 1px var(--oro), 0 0 36px rgba(231, 203, 121, .6); } }
}
