/*
 * Invitación animada del Baby Shower (galería, página de cada diseño y enlace del invitado).
 * La dibuja static/babyshowerapp/invitacion-animada.js sobre el fondo real del diseño.
 *
 * Tamaños en función del ancho de la tarjeta (--w, en px, lo pone el JS con
 * ResizeObserver) y no con unidades cqw: así también funciona en Safari < 16.
 * Todo el movimiento se apaga con "reducir movimiento".
 */
.bsi { position:relative; display:block; overflow:hidden; background:#F4EFFB; --w:300px; --h:520px; }
.bsi-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.bsi-fx { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:1; }
.bsi-tx { position:absolute; z-index:2; text-align:center; color:#46679f; line-height:1.08; pointer-events:none; }
.bsi-tx p { margin:0; text-shadow:0 0 5px #fff, 0 0 2px #fff; overflow-wrap:anywhere; }
.bsi-t1 { font:400 calc(var(--w) * .12) / 1.05 "Great Vibes", cursive; }
.bsi-t2 { font:700 calc(var(--w) * .05) / 1.1 "Dancing Script", cursive; color:#c9668c; margin-top:calc(var(--w) * .006) !important; }
.bsi-t3 { font:600 calc(var(--w) * .038) / 1.15 "Dancing Script", cursive; color:#5b5368; margin-top:calc(var(--w) * .02) !important; }
.bsi-t4 { font:400 calc(var(--w) * .074) / 1.1 "Great Vibes", cursive; margin-top:calc(var(--w) * .006) !important; }
.bsi-t5 { font:600 calc(var(--w) * .038) / 1.2 "Dancing Script", cursive; color:#5b5368; margin-top:calc(var(--w) * .014) !important; }

/* Partículas */
.bsi-p { position:absolute; bottom:-14%; will-change:transform; }
.bsi-globo { width:calc(var(--w) * .09); height:calc(var(--w) * .11); border-radius:50% 50% 48% 48%;
    box-shadow:inset calc(var(--w) * -.012) calc(var(--w) * -.014) 0 rgba(0,0,0,.08), inset calc(var(--w) * .014) calc(var(--w) * .014) 0 rgba(255,255,255,.45);
    animation:bsi-sube linear infinite; }
.bsi-globo::after { content:""; position:absolute; left:50%; top:100%; width:1px; height:calc(var(--w) * .1); background:rgba(120,120,140,.55); }
.bsi-corazon { width:calc(var(--w) * .06); height:calc(var(--w) * .06); animation:bsi-sube linear infinite; }
.bsi-corazon::before { content:""; position:absolute; inset:0; background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 C10 60 0 35 18 18 C32 5 46 12 50 24 C54 12 68 5 82 18 C100 35 90 60 50 90Z'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 C10 60 0 35 18 18 C32 5 46 12 50 24 C54 12 68 5 82 18 C100 35 90 60 50 90Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.bsi-destello { bottom:auto; width:calc(var(--w) * .04); height:calc(var(--w) * .04); background:#fff;
    clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);
    filter:drop-shadow(0 0 3px #fff6c9); animation:bsi-brilla ease-in-out infinite; }
.bsi-confeti { width:calc(var(--w) * .02); height:calc(var(--w) * .03); bottom:auto; top:-6%; animation:bsi-cae linear infinite; }
@keyframes bsi-sube { to { transform:translate(calc(var(--w) * .04), calc(var(--h) * -1.2)); } }
@keyframes bsi-cae { to { transform:translate(calc(var(--w) * .06), calc(var(--h) * 1.15)) rotate(720deg); } }
@keyframes bsi-brilla { 0%, 100% { opacity:0; transform:scale(.3); } 50% { opacity:1; transform:scale(1) rotate(45deg); } }
.bsi.bsi-paused .bsi-p { animation-play-state:paused; }

/* Sobre que se abre (enlace del invitado y vista grande) */
.bsi-env { position:absolute; inset:0; z-index:4; border:0; padding:0; margin:0; cursor:pointer; background:rgba(251,231,239,.55);
    display:block; width:100%; transition:opacity .5s ease .7s, visibility 0s linear 1.2s; }
.bsi-env .bk, .bsi-env .fr, .bsi-env .fl { position:absolute; left:6%; right:6%; top:24%; height:46%; border-radius:12px; }
.bsi-env .bk { background:linear-gradient(#f7d6e2, #f2c3d4); }
.bsi-env .fr { background:linear-gradient(160deg, #fbe4ec, #f4cddb); clip-path:polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
    box-shadow:0 10px 30px rgba(80,40,80,.25); }
.bsi-env .fl { background:linear-gradient(#f9dbe6, #efbccf); clip-path:polygon(0 0, 100% 0, 50% 58%); transform-origin:top;
    transition:transform .6s ease; z-index:2; }
.bsi-env .seal { position:absolute; left:50%; top:47%; width:62px; height:62px; margin:-31px 0 0 -31px; border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #d987a6, #a94b72); color:#fff; font:700 15px/62px "Dancing Script", cursive;
    z-index:3; box-shadow:0 3px 8px rgba(0,0,0,.25); transition:opacity .3s; }
.bsi-env .tap { position:absolute; left:0; right:0; top:74%; z-index:3; font:700 14px/1.2 Nunito, system-ui, sans-serif; color:#6a3f73; }
.bsi-env:focus-visible { outline:3px solid #7C5CD6; outline-offset:-3px; }
.bsi.bsi-open .bsi-env { opacity:0; visibility:hidden; pointer-events:none; }
.bsi.bsi-open .bsi-env .fl { transform:rotateX(180deg); }
.bsi.bsi-open .bsi-env .seal, .bsi.bsi-open .bsi-env .tap { opacity:0; }

@media (prefers-reduced-motion: reduce) {
    .bsi-p { display:none; }
    .bsi-env { display:none; }
}
