/* Fuentes */
@font-face {
    font-family: "Espacio";
    src: url("assets/fonts/PLANK___.TTF") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Bonita";
    src: url("assets/fonts/CartographCF-Regular.otf");
    font-weight: normal;
    font-style: normal;
}

/* Resetear y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

:root {
    --neon-green: rgb(94, 199, 34);
    --border-solid: 2px solid;
    --border-dashed: 2px dashed;
    --white: white;
    --dark-green: rgb(12, 132, 96);
    --green: rgb(26, 184, 136);
    --brillar: brillar 3s ease-in-out infinite;
    --flotar: flotar 3s ease-in-out infinite;
    --pistacho: rgb(182, 214, 0);
    --box-shadow: 0px 0px 10px var(--dark-green);
    --box-shadow-contrast: 0px 0px 10px var(--white);
}


html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* BARRA DE NAVEGACIÓN */

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: var(--border-solid) var(--neon-green);
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.navegacion__container {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo__link {
    font-family: Espacio;
    font-size: 1.5rem;
    color: var(--neon-green);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 10px;
}

.nav__links__menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav__link {
    text-decoration: none;
    color: var(--neon-green);
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border: var(--border-solid, --neon-green);
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.15s;
}

.nav__link:hover {
    color: var(--white);
    background-color: var(--neon-green);
    box-shadow: 0 0 5px var(--neon-green);
}

.nav__menu__btn {
    display:none;
    background: none;
    text-align: center;
    padding: 0.2rem 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    border: var(--border-solid) var(--neon-green);
    color: var(--neon-green);
}

/* HACER APARECER EL BOTÓN */

@media (max-width:785px) {
    .nav__menu__btn {
        display: block;
    }
    .nav__links__menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 76px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        border-bottom: var(--border-solid) var(--neon-green);
        padding: 1rem;
        gap: 1.5rem;
    }
    .nav__links__menu.open {
        display:flex;
    }
}

/* CABECERA */

#cabecera__container {
    display: flex;
    flex-direction: row;
    border-bottom: var(--border-solid) var(--neon-green);
    justify-content: space-evenly;
    padding: 1rem;
    background: var(--white);
}

.sprite__animation {width: 64px; height: 64px; background-size: cover; animation: playFrames 2s steps(4) infinite; image-rendering: pixelated; image-rendering: crisp-edges;}

/* ANIMACIÓN */

@keyframes playFrames {
    from {background-position: 0px;}
    to {background-position: -256px;}
}

#cromo__amarillo {
    background-image: url(assets/slime-amarillo.PNG);
}
#cromo__azul {
    background-image: url(assets/slime-azul.PNG);
}
#cromo__verde {
    background-image: url(assets/slime-verde.PNG);
}
#cromo__rojo {
    background-image: url(assets/slime-rojo.PNG);
}
.cromo__naranja {
    background-image: url(assets/slime-naranja.PNG);
}
.cromo__morado {
    background-image: url(assets/slime-morado.PNG);
}
#robot {
    background-image: url(assets/robot.PNG);
}

/* MAIN */

.hero {
    max-height: 100vh;
}

.hero__main.container {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-areas: "texts picture";
    gap: 2em;
    align-items: center;
    justify-content: space-evenly;
}

.hero__texts {
    justify-self: center;
    grid-area: texts;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 2rem;
}

.hero__picture {
    grid-area: picture;
}

.hero__title {
    animation: flotar 3s ease-in-out infinite;
}
.hero__title a {
    font-size: 2.6rem;
    font-family: Espacio;
    letter-spacing: 2px;
    color: rgb(9, 135, 78);
}

.hero__subtitle {
    font-size: 1.5rem;
    margin: 1rem 0;
    font-weight: 500s;
    color: rgb(157, 212, 45);
}

.hero__img {
    width: 100%;
}

.hero__boton {
    border: 2px solid green;
    max-width: 300px;
    padding: 1rem;
    text-decoration: none;
    color: rgb(9, 135, 78);
    font-size: 1.2em;
    margin-top: 1rem;
    text-align: center;
    border-radius: 10px;
}

.hero__boton:hover {
    color: white;
    background-color: rgb(9, 135, 78);
    box-shadow: 0 0 5px rgb(9, 135, 78);
}

@media (max-width: 970px) {
    .hero__main.container {
        grid-template-columns: 1fr;
        grid-template-areas: "texts" "picture";
    }
    .hero__img {
        max-width: 100%;
    }
    .hero__texts {
        text-align: center;
        justify-self: center;
        place-items: center;
        max-width: 100%;
    }
}

/* FOOTER */
.footer__container {
    text-align: center;
    padding-top:2rem;
    bottom: 0;
    justify-self: flex-end;
    margin-top: 2rem;
}

.footer__container p {
    text-transform: uppercase;
    font-weight: 500;
    color: rgb(66, 137, 107);
}
.footer__container span {
    font-family: "Espacio";
    letter-spacing: 3px;
    margin: 0 1rem;
    color: rgba(94, 199, 34);
    font-size: 20px;
}

.footer__container small {
    text-transform: capitalize;
    color: grey;
}

/* ANIMACIONES */
@keyframes playFrames {
    from {background-position: 0px;}
    to {background-position: -256px;}
}

@keyframes playFrames256 {
    from {background-position: 0px;}
    to {background-position: -1024px;}
}

@keyframes parpadeo {
    0%, 100% {opacity: 1;}
    50% {opacity: 0.5;}
}

@keyframes brillar {
    0%, 100% {text-shadow: 0 0 5px rgb(0, 214, 129, 0.2)}
    50% {text-shadow: 0 0 12px rgb(0, 214, 129, 0.5), 0 0 20px rgb(0, 214, 129, 0.2)} 
    
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* PARTÍCULAS */
.particulas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particula {
    position: absolute;
    bottom: 0;
    left: var(--x);
    color: var(--c);
    font-size: 1.5rem;
    animation: subirParticula 3s var(--delay) ease-in infinite;
    opacity: 0;
}

@keyframes subirParticula {
    0%   { transform: translateY(0) scale(0.5);   opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateY(-260px) scale(1.2); opacity: 0; }
}