/* Globales */

html {
    font-size: 62.5%;
    box-sizing: border-box
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Lato', sans-serif;
}

/* Variables */

:root {
    --blanco: #fff;
    --amarillo: #ffd602;
    --rojo: #d5040a;
    --azul: #036cb6;
    --negro: rgba(26, 25, 25, 0);
}

/* Contenedor de toda la página */

.page {
    position: relative;
    height: 100vh;
}

/* Main */

.main-contenedor {
    position: absolute;
    z-index: 1;
    display: grid;
    grid-template-columns: 55% 45%;
    grid-template-rows: 20% 50% 30%;
    grid-template-areas: "nav aside"
                        "section aside"
                        "footer aside";
    height: 100%;
    width: 100%;
}

/* Barra de navegacion */

.nav-bar {
    background-color: var(--blanco);
    grid-area: nav;
    display: flex;
}
 
.navbar-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;

    animation: 2s nav-bar 0.5s ease-in-out;
}

    @keyframes nav-bar {
        0% {
            transform: translateY(-10rem);
        }
        100% {
            transform: translateY(0);
        }
    }

.navbar-content img {
    width: 7rem;
    margin-left: 3rem;
}

.navbar-content ul {
    display: flex;
    justify-content: space-evenly;
    list-style: none;
    width: 60rem;
}

.navbar-content ul li a {
    text-decoration: none;
    color: var(--rojo);
    font-weight: 300;
    font-size: 2rem;
}

.navbar-content ul li a:hover {
    font-weight: 700;
}

/* Contenido Principal */

.main-content {
    display: flex;
    grid-area: section;
    flex-direction: column;
    justify-content: center;
    margin-left: 3rem;

    animation: 2s main-content 0.5s ease-in-out;
}

    @keyframes main-content {
        0% {
            transform: translateY(-50rem);
        }
        100% {
            transform: translateY(0);
        }
    }

.main-content p:first-child {
    font-size: 4rem;
    font-weight: 300;
    margin: 0 0 -1.7rem 6rem;
}

.main-content h1 {
    font-size: 5rem;
    font-weight: 700;
    margin: 0;
}

.main-content p:last-child {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 0;
    text-align: justify;
    width: 60%;
}

/* Aside */

.side-content {
    display: grid; 
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    grid-area: aside;
}

.side-content p {
    transform: rotate(270deg);
    font-size: 4rem;
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    opacity: 0;

    animation-name: superman-text;
    animation-duration: 0.5s;
    animation-delay: 2.3s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

    @keyframes superman-text {
        0% {
            opacity: 0;
        }
        100% {
            opacity: 1;
        }
    }

.side-content img {
    width: 100%;
    height: 50rem;
    grid-column: 2/6;
    grid-row: 1/2;

    animation-name: img-superman;
    animation-duration: 3s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;

    transform: translateY(0rem);
}

    @keyframes img-superman {
        0%{
            transform: translateY(0rem);
        }
        50% {
            transform: translateY(3rem)
        }
        100% {
            transform: translateY(0rem)
        }
    }

.side-content div {
    background-color: var(--amarillo);
    grid-column: 4 / 7;
    grid-row: 1 / 2;
    height: 100vh;
}

/* Footer */

footer {
    background-color: var(--amarillo);
    display: flex;
    justify-content: space-evenly;
    align-items: flex-end;
    border-radius: 0 5rem 0 0;

    animation-name: footer;
    animation-duration: 1s;
    animation-delay: 2.5s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;

    transform: translateY(40rem);
}

    @keyframes footer {
        0%{
            transform: translateY(40rem);
        }
        100%{
            transform: translateY(0);
        }
    }

footer div {
    background-color: var(--azul);
    height: 50%;
    width: 13rem;
    border-radius: 2rem 2rem 0 0;
}

footer div img {
    position: absolute;
    bottom: 3rem;
    width: 15rem;
    transition: all 300ms;
}

footer div img:hover{
    transform: scale(1.4);
    transform: translateY(-0.7rem);
    cursor: pointer;
}


/* Loader */

.loader {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color:var(--amarillo);
    position: absolute;
    z-index: 3;

    animation-name: loader;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

    @keyframes loader {
        0% {
            opacity: 1;
            visibility: visible;
        }
        70% {
            opacity: 1;
            visibility: visible;
        }
        100% {
            opacity: 0;
            visibility: hidden;
        }
    }

.loader div {
    background-color: var(--azul);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    margin: 1rem;
    transform: scale(0);

    animation: esferas 2s ease-in-out infinite;
}

.loader div:nth-child(1) {
    animation-delay: 0.1s;
}

.loader div:nth-child(2) {
    animation-delay: 0.3s;
}

.loader div:nth-child(3) {
    animation-delay: 0.5s;
}

    @keyframes esferas {
        0% {
            transform: scale(0.5);
        }
        25% {
            transform: scale(1);
        }
        50% {
            transform: scale(1);
        }
        75% {
            transform: scale(1);
        }
        100% {
            transform: scale(0.5);
        }
    }

/* Modal */

.modal {
    width: 100%;
    height: 100%;
    background-color:  rgba(0,0,0,0.6);
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
}

.modal-content {
    background-color: var(--blanco);
    width: 50%;
    height: 50%;
}

.modal-close:hover {
    cursor: pointer;
}

.modal-slider {
    width: 30rem;
    height: 20rem;
    transform-style: preserve-3d;
}

.modal-slider input[type="radio"]{
    display: none;
}

.modal-cards {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 20rem;
}

.card {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    transition: transform 0.5s ease;
    cursor: pointer;
    display: grid;
    place-items: center;
    background-color: var(--amarillo);
    width: 50%;
    height: 100%;
}

.card img {
    width: 100%;
    height: 90%;
}

#radio-1:checked ~ .modal-cards #card-1,
#radio-2:checked ~ .modal-cards #card-2,
#radio-3:checked ~ .modal-cards #card-3 {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 1;
}

#radio-1:checked ~ .modal-cards #card-2,
#radio-2:checked ~ .modal-cards #card-3,
#radio-3:checked ~ .modal-cards #card-1 {
    transform: translateX(40%) scale(0.8);
    opacity: 0.5;
    z-index: 0;
}

#radio-1:checked ~ .modal-cards #card-3,
#radio-2:checked ~ .modal-cards #card-1,
#radio-3:checked ~ .modal-cards #card-2 {
    transform: translateX(-40%) scale(0.8);
    opacity: 0.5;
    z-index: 0;
}

/* JavaScript Assets */

.hidden {
    display: none;
}

.visible {
    display: grid;

}