.ofrenda-emblema {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 140px 30px 28px;
}

.ofrenda-emblema__fondo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 68%;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.5) 28%, #000 60%), linear-gradient(0deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.5) 28%, #000 60%), linear-gradient(0deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    mask-composite: intersect;
}

.ofrenda-emblema__fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 5, 16, 0.6), rgba(11, 5, 16, 0.25) 60%, rgba(11, 5, 16, 0.45));
}

.ofrenda-emblema__capa {
    position: absolute;
    inset: 0;
    background-position: center 30%;
    background-size: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 900ms ease, transform 6s ease-out;
}

.ofrenda-emblema__capa--visible {
    opacity: 0.75;
    transform: scale(1);
}

.ofrenda-emblema__columnas {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding-left: 50px;
}

.ofrenda-emblema__portada {
    flex: 0 0 auto;
}

.ofrenda-emblema__tira {
    flex: 1 1 auto;
    min-width: 0;
    container-type: inline-size;
}

.ofrenda-emblema__tira .papel-picado {
    margin: 0;
    padding: 0;
}

.ofrenda-emblema__titulo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    column-gap: 0.32em;
    white-space: nowrap;
    margin: 0;
    font-family: "Sancreek", "Montserrat", serif;
    font-size: clamp(30px, 4vw, 60px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.ofrenda-emblema__retrato {
    position: relative;
    display: flex;
}

.ofrenda-emblema__texto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ofrenda-emblema__palabra {
    position: relative;
    line-height: 1.18;
}

.ofrenda-emblema__marco {
    position: relative;
    display: block;
    width: 2.25em;
    height: 2.65em;
    padding: 0.08em;
    border-radius: 0.05em;
    background: linear-gradient(135deg, #f8dc8c 0%, #b07a1c 30%, #f3c96a 52%, #8a5a12 78%, #e6b552 100%);
    box-shadow: 0 0.06em 0.18em rgba(0, 0, 0, 0.7), inset 0 0 0 0.012em rgba(255, 255, 255, 0.45), inset 0 0 0.04em rgba(60, 30, 0, 0.6);
    transform: rotate(-3deg);
    animation: ofrenda-emblema-colgar 6s ease-in-out infinite;
}

.ofrenda-emblema__foto {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0.035em solid #f3e6c8;
    background: radial-gradient(ellipse at 50% 38%, #7a5434, #43291a 58%, #1e120a);
}

.ofrenda-emblema__foto::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(30, 16, 6, 0.65) 100%),
        linear-gradient(115deg, rgba(255, 240, 210, 0.12), transparent 40%);
    pointer-events: none;
    animation: ofrenda-emblema-parpadeo 3.2s steps(1) infinite;
}

.ofrenda-emblema__figura {
    --compas: 1.6s;
    position: absolute;
    top: 2%;
    left: -24%;
    width: 158%;
    opacity: 0;
    filter: sepia(0.3) saturate(0.9) contrast(1.05);
    transition: opacity 900ms ease;
}

.ofrenda-emblema__figura .bailarin__svg {
    filter: none;
}

.ofrenda-emblema__foto--revelada .ofrenda-emblema__figura {
    opacity: 1;
}

.ofrenda-emblema__subtitulo {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0.5em 0 0 0.15em;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    background: linear-gradient(100deg, #f27a10 0%, #ffc93c 35%, #fff1c9 50%, #ffc93c 65%, #f27a10 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: ofrenda-banner-brillo 5s ease-in-out infinite;
}

.ofrenda-emblema__vela {
    position: relative;
    display: inline-block;
}

.ofrenda-emblema__vela::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.74em;
    width: 0.19em;
    height: 0.36em;
    margin-left: -0.095em;
    border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
    background: radial-gradient(ellipse at 50% 74%, #fff 0 14%, #fff3b0 26%, #ffc93c 48%, #f27a10 74%, rgba(242, 122, 16, 0) 100%);
    filter: drop-shadow(0 0 0.08em rgba(255, 170, 40, 0.9));
    transform-origin: 50% 100%;
    animation: ofrenda-banner-flama 1.5s ease-in-out infinite;
}

.ofrenda-emblema__vela::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.7em;
    width: 0.9em;
    height: 0.9em;
    margin-left: -0.45em;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 180, 60, 0.35), rgba(255, 140, 20, 0.08) 45%, transparent 70%);
    pointer-events: none;
    animation: ofrenda-banner-resplandor 2.2s ease-in-out infinite;
}

.ofrenda-emblema__vela:nth-of-type(2)::before {
    animation-delay: -0.6s;
}

.ofrenda-emblema__vela:nth-of-type(2)::after {
    animation-delay: -1.1s;
}

.ofrenda-emblema__palabra:first-child .ofrenda-emblema__vela::before {
    animation-delay: -0.9s;
}

.ofrenda-emblema__camino {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: visible;
    pointer-events: none;
}

.ofrenda-emblema__petalo {
    position: absolute;
    width: 12px;
    height: 16px;
    margin: -8px 0 0 -6px;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 40% 30%, #ffc93c, #f27a10 70%, #d4500a);
    box-shadow: 0 0 6px rgba(255, 150, 30, 0.45);
    animation: ofrenda-banner-brisa var(--duracion, 3s) ease-in-out var(--retraso, 0s) infinite alternate;
}

.ofrenda-emblema__petalo--amarillo {
    background: radial-gradient(circle at 40% 30%, #ffe27a, #ffb21f 70%, #e88a0c);
}

.ofrenda-emblema__petalo--rojizo {
    background: radial-gradient(circle at 40% 30%, #ff9a3c, #e2560c 70%, #a8350a);
}

.ofrenda-emblema__petalo--destello {
    animation:
        ofrenda-banner-brisa var(--duracion, 3s) ease-in-out var(--retraso, 0s) infinite alternate,
        ofrenda-banner-destello 5s ease-in-out var(--retraso, 0s) infinite;
}

@keyframes ofrenda-banner-brillo {
    0%, 100% {
        background-position: 100% 0;
    }

    50% {
        background-position: 0 0;
    }
}

@keyframes ofrenda-banner-brisa {
    from {
        translate: 0 0;
        rotate: 0deg;
    }

    to {
        translate: var(--desplazamiento) calc(var(--desplazamiento) * -0.5);
        rotate: var(--giro);
    }
}

@keyframes ofrenda-banner-destello {
    0%, 70%, 100% {
        scale: 1;
    }

    80% {
        scale: 1.45;
    }

    88% {
        scale: 0.9;
    }
}

@keyframes ofrenda-emblema-colgar {
    0%, 100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(-1.5deg);
    }
}

@keyframes ofrenda-emblema-parpadeo {
    0%, 100% {
        opacity: 1;
    }

    47% {
        opacity: 0.85;
    }

    49% {
        opacity: 1;
    }

    83% {
        opacity: 0.92;
    }
}

@keyframes ofrenda-banner-flama {
    0%, 100% {
        transform: scale(1, 1) skewX(0deg);
    }

    25% {
        transform: scale(0.92, 1.1) skewX(3deg);
    }

    50% {
        transform: scale(1.05, 0.94) skewX(-2deg);
    }

    75% {
        transform: scale(0.96, 1.06) skewX(1.5deg);
    }
}

@keyframes ofrenda-banner-resplandor {
    0%, 100% {
        opacity: 1;
    }

    40% {
        opacity: 0.7;
    }

    65% {
        opacity: 0.9;
    }
}


@media (max-width: 1100px) {
    .ofrenda-emblema__columnas {
        flex-direction: column;
        gap: 28px;
        padding-left: 0;
    }

    .ofrenda-emblema__tira {
        width: 100%;
    }
}

@media (max-width: 767px) {

    .ofrenda-emblema {
        padding: 28px 20px 20px;
    }

    .ofrenda-emblema__fondo {
        width: 100%;
    }

    .ofrenda-emblema__columnas {
        flex-direction: column;
        gap: 28px;
        padding-left: 0;
    }

    .ofrenda-emblema__tira {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ofrenda-emblema__vela::before,
    .ofrenda-emblema__vela::after,
    .ofrenda-emblema__marco,
    .ofrenda-emblema__foto::after,
    .ofrenda-emblema__capa,
    .ofrenda-emblema__subtitulo,
    .ofrenda-emblema__petalo {
        animation: none;
    }
}
