:root{
    --color-principal: #234518;
    --color-secundario: #92ad48;
}
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body{
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}
/* Preloader*/
.preloader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background-color: var(--color-principal);
    animation-fill-mode: forwards;
}
.preloader-iconos{
    display: flex;
    gap: 0.8rem;
}
.preloader-icono{
    width: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
/* rebote de los iconos en cadena */
.preloader-icono{
    animation-name: rebotarIcono;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-timing-function: ease-in-out;
}
.preloader-icono:nth-child(1){ animation-delay: 0s; }
.preloader-icono:nth-child(2){ animation-delay: 0.15s; }
.preloader-icono:nth-child(3){ animation-delay: 0.3s; }
.preloader-icono:nth-child(4){ animation-delay: 0.45s; }
.preloader-icono:nth-child(5){ animation-delay: 0.6s; }
.preloader-texto{
    color: var(--color-secundario);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
/* regla de animación del preloader */
@keyframes rebotarIcono{
    0%{
        transform: translateY(0);
    }
    50%{
        transform: translateY(-18px);
    }
    100%{
        transform: translateY(0);
    }
}
/* estilos hero */
.hero {
    text-align: center;
    padding: 1.2rem 0;
    background-color: var(--color-principal);
}
.hero-contenido h1 {
    font-size: 2rem;
    color: #ef9b1c;
    font-weight: 300;
    margin-bottom: 0.6rem;
    font-weight: bold;
}
.hero-contenido p {
    color: var(--color-secundario);
}
/* contenedor y combinaciones de la escena */
.escena{
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-image: url(../img/imagen1.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.escena > img{
    position: absolute;
}
.escena > img[src$=".gif"]{
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}
.totoro{
    bottom: 20%;
    left: 15%;
    width: 220px;
    animation-name: balancearTotoro;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}
.hollin{
    width: 40px;
    animation-name: flotarHollin;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}
.hollin-1{
    bottom: 30%;
    left: 40%;
}
.hollin-1 + .hollin-2{
    bottom: 25%;
    left: 46%;
    animation-delay: 0.5s;
}
.catbus{
    bottom: 8%;
    left: -300px;
    width: 300px;
    animation-name: correrCatbus;
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-timing-function: linear;
}
/* reglas de animación de la escena */
@keyframes balancearTotoro{
    0%{
        transform: rotate(-3deg);
    }
    100%{
        transform: rotate(3deg);
    }
}
@keyframes flotarHollin{
    0%{
        transform: translateY(0);
    }
    100%{
        transform: translateY(-15px);
    }
}
@keyframes correrCatbus{
    0%{
        left: -300px;
    }
    100%{
        left: 110%;
    }
}
/* estilos footer */
footer {
    text-align: center;
    background-color: var(--color-principal);
    padding: 1rem 0;
}
footer p {
    color: var(--color-secundario);
}
/* Media Queries */
@media (max-width: 900px){
    .hero-contenido h1{
        font-size: 1.6rem;
    }
    .totoro{
        width: 180px;
    }
    .catbus{
        width: 250px;
    }
}
@media (max-width: 600px){
    .preloader-icono{
        width: 36px;
    }
    .preloader-texto{
        font-size: 0.8rem;
        text-align: center;
        padding: 0 1rem;
    }
    .totoro{
        width: 150px;
    }
    .catbus{
        width: 220px;
    }
    .hollin{
        width: 30px;
    }
}