.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%;
    max-width: 1440px;
    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: "Freckle Face", "Montserrat", cursive;
    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__logo {
    display: block;
    height: 2.65em;
    width: auto;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}

.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: #1d0c5c url('../../img/temporadas/muertos/fondo-retrato.svg') 50% 0 / cover no-repeat;
}

.ofrenda-emblema__foto::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(20, 8, 60, 0.55) 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__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-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;
    }
}

@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__marco,
    .ofrenda-emblema__foto::after,
    .ofrenda-emblema__capa,
    .ofrenda-emblema__petalo {
        animation: none;
    }
}
