.petalos-cempasuchil {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.petalos-cempasuchil__petalo {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 12px;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 40% 30%, #ffc93c, #f27a10 75%);
    box-shadow: 0 0 6px rgba(255, 150, 30, 0.6);
    opacity: 0;
    will-change: transform, opacity;
}

.petalos-cempasuchil__petalo--retirado {
    opacity: 0 !important;
    transition: opacity 4s ease-out;
}

@media (max-width: 767.98px) {
    .petalos-cempasuchil__petalo {
        width: 6px;
        height: 9px;
    }
}

.barra-muertos {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 16px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 140%, rgba(242, 122, 16, 0.28), transparent 60%),
        linear-gradient(90deg, #12031c, #3a0b4f 30%, #5c0f63 50%, #3a0b4f 70%, #12031c);
}

.barra-muertos::before,
.barra-muertos::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
}

.barra-muertos::before {
    top: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 201, 60, 0.45), transparent);
}

.barra-muertos::after {
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f27a10 20%, #ffc93c 50%, #f27a10 80%, transparent);
}

.barra-muertos__texto {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #f6dcc0;
    white-space: nowrap;
}

.barra-muertos__separador {
    width: 6px;
    height: 9px;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 40% 30%, #ffc93c, #f27a10 75%);
    box-shadow: 0 0 6px rgba(255, 150, 30, 0.8);
    transform: rotate(35deg);
}

.barra-muertos__guion {
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffc93c, transparent);
}

.barra-muertos__destacado {
    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: barra-muertos-brillo 5s ease-in-out infinite;
}

@keyframes barra-muertos-brillo {
    0%, 100% {
        background-position: 100% 0;
    }

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

@media (max-width: 575.98px) {
    .barra-muertos__texto {
        gap: 8px;
        font-size: 10px;
        letter-spacing: 0.2em;
    }

    .barra-muertos__guion {
        width: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .barra-muertos__destacado {
        animation: none;
    }
}

.petalos-menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.petalos-menu__petalo {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 10px;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 40% 30%, #ffc93c, #f27a10 75%);
    box-shadow: 0 0 5px rgba(255, 150, 30, 0.55);
    opacity: 0;
    will-change: transform, opacity;
}

@media (max-width: 767.98px) {
    .petalos-menu__petalo {
        width: 5px;
        height: 8px;
    }
}

@property --amplitud {
    syntax: "<number>";
    inherits: true;
    initial-value: 0.6;
}

.bailarines {
    --tamano: 110px;
    --compas: 1.1s;
    position: absolute;
    z-index: 3;
    height: calc(var(--tamano) * 1.264);
    clip-path: inset(-200px -200px 0 -200px);
    pointer-events: none;
}

.bailarines[hidden] {
    display: none;
}

.bailarin {
    --amplitud: 0.6;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
    display: block;
    width: var(--tamano);
    pointer-events: auto;
    aspect-ratio: 255.15 / 322.49;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transform: translateY(105%);
    transition: --amplitud 700ms ease-in-out, transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bailarin--calavera {
    transition-delay: 0s, 180ms;
}

.bailarines__petalo {
    z-index: 2;
}

.bailarines__petalo--en-piso {
    z-index: 0;
}

.bailarines--visibles .bailarin {
    transform: translateY(9.8%);
}

.bailarines--visibles .bailarin--calavera {
    transform: translateY(5.3%);
}

.bailarines--caminando .bailarin--catrina g[class],
.bailarines--caminando .calavera-torso {
    animation: none;
}

.bailarines--fiesta .bailarin {
    --amplitud: 1.5;
}

.bailarin:focus-visible {
    outline: 2px solid #f7931e;
    outline-offset: 4px;
    border-radius: 12px;
}

.bailarin__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 0 14px rgba(228, 0, 124, 0.3));
}

.bailarin__svg g[class] {
    transform-box: view-box;
    animation-duration: var(--compas);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.bailarin__svg g.catrina-torso {
    transform-origin: 130px 160px;
    animation-name: catrina-rebote;
    animation-duration: calc(var(--compas) / 2);
}

.catrina-cabeza {
    transform-origin: 118px 132px;
    animation-name: catrina-cabeceo;
}

.catrina-falda {
    transform-origin: 130px 158px;
    animation-name: catrina-vuelo;
}

.catrina-brazo {
    transform-origin: 172px 147px;
    animation-name: catrina-saludo;
}

.catrina-mano-falda {
    transform-origin: 79px 158px;
    animation-name: catrina-jalon;
}

.catrina-pie-derecho {
    transform-origin: 177px 284px;
    animation-name: catrina-zapateo;
}

.catrina-pie-izquierdo {
    transform-origin: 90px 290px;
    animation-name: catrina-zapateo;
    animation-delay: calc(var(--compas) / -2);
}

.calavera-torso {
    transform-origin: 112px 196px;
    animation-name: calavera-vaiven;
}

.calavera-cabeza {
    transform-origin: 112px 122px;
    animation-name: calavera-cabeceo;
}

.calavera-pierna-derecha {
    transform-origin: 125px 206px;
}

.calavera-pierna-izquierda {
    transform-origin: 100px 204px;
}

.calavera-puno-izquierdo {
    transform-origin: 89px 144px;
    animation-name: calavera-puno;
}

.calavera-puno-derecho {
    transform-origin: 141px 170px;
    animation-name: calavera-puno;
    animation-delay: calc(var(--compas) / -2);
    animation-direction: reverse;
}

@keyframes catrina-rebote {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(calc(var(--amplitud) * 2.5px));
    }
}

@keyframes catrina-cabeceo {
    0%, 100% {
        transform: translateY(0) rotate(calc(var(--amplitud) * -6deg));
    }
    25%, 75% {
        transform: translateY(calc(var(--amplitud) * 2.5px)) rotate(0deg);
    }
    50% {
        transform: translateY(0) rotate(calc(var(--amplitud) * 6deg));
    }
}

@keyframes catrina-vuelo {
    0%, 100% {
        transform: translateY(0) skewX(calc(var(--amplitud) * -4deg));
    }
    25%, 75% {
        transform: translateY(calc(var(--amplitud) * 2.5px)) skewX(0deg) scaleX(1.02);
    }
    50% {
        transform: translateY(0) skewX(calc(var(--amplitud) * 4deg));
    }
}

@keyframes catrina-saludo {
    0%, 100% {
        transform: rotate(calc(var(--amplitud) * -12deg));
    }
    50% {
        transform: rotate(calc(var(--amplitud) * 12deg));
    }
}

@keyframes catrina-jalon {
    0%, 100% {
        transform: rotate(calc(var(--amplitud) * 6deg));
    }
    50% {
        transform: rotate(calc(var(--amplitud) * -6deg));
    }
}

@keyframes catrina-zapateo {
    0%, 40%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    15% {
        transform: translateY(calc(var(--amplitud) * -5px)) rotate(calc(var(--amplitud) * -5deg));
    }
}

@keyframes calavera-vaiven {
    0%, 100% {
        transform: translateY(0) rotate(calc(var(--amplitud) * 3deg));
    }
    25%, 75% {
        transform: translateY(calc(var(--amplitud) * 2.5px)) rotate(0deg);
    }
    50% {
        transform: translateY(0) rotate(calc(var(--amplitud) * -3deg));
    }
}

@keyframes calavera-cabeceo {
    0%, 100% {
        transform: rotate(calc(var(--amplitud) * -5deg));
    }
    25%, 75% {
        transform: rotate(0deg) translateY(calc(var(--amplitud) * 1.5px));
    }
    50% {
        transform: rotate(calc(var(--amplitud) * 5deg));
    }
}

@keyframes calavera-puno {
    0%, 100% {
        transform: rotate(calc(var(--amplitud) * -10deg));
    }
    20% {
        transform: rotate(calc(var(--amplitud) * 12deg));
    }
    50% {
        transform: rotate(calc(var(--amplitud) * -10deg));
    }
}

@media (max-width: 767.98px) {
    .bailarines {
        --tamano: 78px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bailarin {
        transition: none;
    }

    .bailarin__svg g[class] {
        animation: none;
    }
}
