/*------------------------------------
   ? CONFIGURACIÓN
------------------------------------*/
.rediEscenas {
    --escenario__ancho: 1100px;
    --escenario__layout: 1fr;
    --escenas__layout: 1fr;
    --escena__ancho: 210px;
}

@media (min-width: 565px) {
    .rediEscenas {
        --escenario__layout: minmax(200px, auto) 1fr;
    }
}

@media (min-width: 767px) {
    .rediEscenas {
        --escenas__layout: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .rediEscenas {
        --escenas__layout: repeat(4, 1fr);
    }
}

.escena--1 {
    --escena__color: #006D31;
}

.escena--2 {
    --escena__color: #FFB41D;
}

.escena--3 {
    --escena__color: #67ABB7;
}

.escena--4 {
    --escena__color: #9B6314;
}











/*------------------------------------
   ?Animaciones
------------------------------------*/

@-webkit-keyframes escenaVisitado {
    0% {
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

@keyframes escenaVisitado {
    0% {
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

@-webkit-keyframes tada {
    0% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        -webkit-transform: translate(-50%, -50%) scale(1.05);
        -moz-transform: translate(-50%, -50%) scale(1.05);
        -ms-transform: translate(-50%, -50%) scale(1.05);
        -o-transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes tada {
    0% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        -webkit-transform: translate(-50%, -50%) scale(1.05);
        -moz-transform: translate(-50%, -50%) scale(1.05);
        -ms-transform: translate(-50%, -50%) scale(1.05);
        -o-transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }
}

@-webkit-keyframes error {
    0% {
        filter: grayscale(0);
        -webkit-filter: grayscale(0);
    }

    1% {
        filter: grayscale(1);
        -webkit-filter: grayscale(1);
    }

    0%,
    100% {
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        -webkit-transform: translateY(-10px);
                transform: translateY(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        -webkit-transform: translateY(10px);
                transform: translateY(10px);
    }

    99% {
        filter: grayscale(1);
        -webkit-filter: grayscale(1);
    }

    100% {
        filter: grayscale(0);
        -webkit-filter: grayscale(0);
    }
}

@keyframes error {
    0% {
        filter: grayscale(0);
        -webkit-filter: grayscale(0);
    }

    1% {
        filter: grayscale(1);
        -webkit-filter: grayscale(1);
    }

    0%,
    100% {
        -webkit-transform: translateY(0);
                transform: translateY(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        -webkit-transform: translateY(-10px);
                transform: translateY(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        -webkit-transform: translateY(10px);
                transform: translateY(10px);
    }

    99% {
        filter: grayscale(1);
        -webkit-filter: grayscale(1);
    }

    100% {
        filter: grayscale(0);
        -webkit-filter: grayscale(0);
    }
}






/*------------------------------------
   ? Redi
------------------------------------*/


.rediEscenas {
    max-width: var(--escenario__ancho);
    width: 100%;
}

@media (max-width: 767px) {
    .backdrop header h1 {
        font-size: 37px;
    }

    .backdrop header {
        font-size: 1em;
        padding: 15px 10px;
    }
}

.escenario {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: var(--escenario__layout);
    grid-template-columns: var(--escenario__layout);
    gap: 15px;
    justify-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.escenas {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: var(--escenas__layout);
    grid-template-columns: var(--escenas__layout);
    gap: 10px;
    justify-items: center;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: start;
}

.escena .personaje.origen {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;

    position: relative;
    width: 100%;
    height: 100%;
    background-color: #fff;
}

.backdrop .contenido {
    overflow: initial;
}

.personaje-completado {
    opacity: .4;
}

@media (max-width: 767px) {
    .personaje-completado {
        opacity: 0;
    }
}

.escena {
    position: relative;
    max-width: var(--escena__ancho);
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-flow: column wrap;
            flex-flow: column wrap;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border-radius: 15px;
    background-color: var(--escena__color);
}

.escena.escena--personaje {
    -ms-flex-item-align: start;
        -ms-grid-row-align: start;
        align-self: start;
    position: -webkit-sticky;
    position: sticky;
    top: 2px;
    z-index: 99;
}

.escena .personaje,
.escena__img {
    margin: 0 auto;
}


.escena__img {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 250px;
    height: 0;
    padding-bottom: 174%;
    border-radius: 0 0 15px 15px;
    border: 4px solid var(--escena__color);
    position: relative;
}

.escena__contenido {
    padding: 5px 8px;
    border-radius: 15px 15px 0 0;
    background-color: var(--escena__color);
}


.escena__texto {
    display: block;
    color: #fff;
    line-height: 1.2;
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;

    font-size: 0;
    -webkit-transition: opacity .3s, font-size .4s, -webkit-transform .4s;
    transition: opacity .3s, font-size .4s, -webkit-transform .4s;
    -o-transition: transform .4s, opacity .3s, font-size .4s;
    transition: transform .4s, opacity .3s, font-size .4s;
    transition: transform .4s, opacity .3s, font-size .4s, -webkit-transform .4s;
    opacity: 0;
    -webkit-transform: scale(0);
        -ms-transform: scale(0);
            transform: scale(0);
}

.visitado .escena__texto {
    font-size: 20px;
    opacity: 1;
    -webkit-transform: scale(1);
        -ms-transform: scale(1);
            transform: scale(1);
    padding: 5px;
}

.escena__textoVisible {
    display: block;
    text-align: center;
    color: #fff;
    background-color: hsla(0, 0%, 0%, .2);
    padding: 5px;
    border-radius: 10px;
}

@media (max-width: 767px) {
    .escena.destino {
        min-height: 105vw;
    }
}

.escena1 {
    background-image: url("../img/escena1.png");
}

.visitado .escena1 {
    background-image: url("../img/escena1v.png");
    animation: escenaVisitado .6s linear;
    -webkit-animation: escenaVisitado .6s linear;
}

.escena2 {
    background-image: url("../img/escena2.png");
}

.visitado .escena2 {
    background-image: url("../img/escena2v.png");
    animation: escenaVisitado .6s linear;
    -webkit-animation: escenaVisitado .6s linear;
}

.escena3 {
    background-image: url("../img/escena3.png");
}

.visitado .escena3 {
    background-image: url("../img/escena3v.png");
    animation: escenaVisitado .6s linear;
    -webkit-animation: escenaVisitado .6s linear;
}

.escena4 {
    background-image: url("../img/escena4.png");
}

.visitado .escena4 {
    background-image: url("../img/escena4v.png");
    animation: escenaVisitado .6s linear;
    -webkit-animation: escenaVisitado .6s linear;
}

.personaje {
    border: 2px dashed #543108;
    border-radius: 10px;
    padding: 8px;
    max-width: 400px;
    width: 100%;
    height: 100%;
}

.personaje__img {
    height: 100%;
    width: auto;
    cursor: url(../img/cursor-grab.cur), url(../img/cursor-grab.png), move;
}

.escena--error {
    -webkit-animation: error .6s;
            animation: error .6s;
}