@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --padding-container: 100px 0;
    --color-title: #333;
}

* {
    margin: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
}

.container--loader {
    background-color: #333;
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    transition: all 1.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    border-top-color: transparent;
    animation: loader 1.2s linear infinite;
}

@keyframes loader {
    to {
        transform: rotate(360deg);
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
}

.hero {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    display: grid;
    grid-template-rows: 100px 1fr;
    color: #fff;
    margin-bottom: -80px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, #0000008c 0%, #0000008c 100%), url('../images/background-contact.jpg');
    background-size: cover;
    background-position: center;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 95%, 0 80%);
    z-index: -1;
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 15px;
    background-color: #f0eded;
}

::-webkit-scrollbar-thumb {
    background-color: #a2a2a2;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

::-webkit-scrollbar-corner {
    background-color: #f5f5f5;
}

/* Nav */

.nav {
    padding: 10px;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav__title {
    font-weight: 300;
    display: inline-block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.nav__logo:hover .nav__title {
    transform: scale(0.9);
}

.nav__link {
    margin-left: auto;
    padding: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 2em;
}

.nav__items {
    list-style: none;
}

.nav__links {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav__links span {
    display: inline-block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.nav__links:hover span {
    transform: scale(1.2);
}

.nav__menu {
    margin-left: auto;
    cursor: pointer;
    display: none;
}

.nav__img {
    display: block;
    width: 30px;
}

.nav__close {
    display: var(--show, none);
}


/* Hero container */

.hero__container {
    max-width: 800px;
    --padding-container: 0;
    display: grid;
    grid-auto-rows: max-content;
    align-content: center;
    gap: 1em;
    padding-bottom: 100px;
    text-align: center;
    margin-top: -50px;
}

.hero__title {
    font-size: 3rem;
}

.hero__paragraph {
    margin-bottom: 20px;
}

.subtitle {
    color: var(--color-title);
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: left;
}

/* contact */

.contact {
    text-align: center;
    margin-bottom: -30px;
}

.contact__container {
    width: 50%;
    margin: 0 auto;
}

.contact__name {
    margin: 20px 0;
    font-size: 2rem;
    margin-bottom: 25px;
}

.contact__paragraph {
    line-height: 1.7;
}

.contact__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.contact__form label {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 18px;
}

.contact__form input,
.contact__form textarea {
    width: 80%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    outline: none;
}

.contact__form textarea {
    height: 75px;
    resize: none;
}

.contact__form button[type="submit"] {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.contact__form button[type="submit"]:hover {
    transform: scale(1.1);
    background-color: #28292a;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

#message-error-name,
#message-error-email,
#message-error-text {
    display: none;
    background-color: #ff0000;
    color: #fff;
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    margin-top: 0px;
    margin-bottom: 8px;
    width: 80%;
    height: 45px;
    align-items: center;
    text-align: left;
    font-size: 1.15rem;
}

#message-error-name li,
#message-error-email li,
#message-error-text li {
    display: list-item;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding-left: 20px;
    line-height: 45px;
}

/* Footer */

.footer {
    background-color: #333;
}

.footer__copy {
    --padding-container: 30px 0;
    text-align: center;
    color: #fff;
}

.footer__copyright {
    font-weight: 300;
}

.footer__icons {
    margin-bottom: 10px;
}

.footer__img {
    width: 30px;
    transform: scale(1);
    transition: transform 0.5s ease;
}

.footer__img:hover {
    transform: scale(1.3);
}

/* Media queries */

@media (max-width:800px) {
    ::-webkit-scrollbar {
        width: 0px;
    }
    
    .nav {
        --padding-container: 0;
    }

    .hero {
        margin-bottom: -100px;
    }

    .nav__menu {
        display: block;
    }

    .nav__link {
        gap: 1em;
    }

    .nav__link--menu {
        position: fixed;
        background-color: #000;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: .7s opacity;
    }

    .nav__link--show {
        --show: block;
        opacity: 1;
        pointer-events: unset;
    }

    .nav__close {
        position: absolute;
        top: 30px;
        right: 30px;
        width: 30px;
        cursor: pointer;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .contact {
        margin-bottom: -50px;
    }

    .contact__paragraph {
        text-align: justify;
        line-height: 1.5;
    }

    .contact__form input,
    .contact__form textarea {
        width: 100%;
    }

    #message-error-name,
    #message-error-email,
    #message-error-text {
        width: 100%;
    }
}

@media (max-width:600px) {
    .hero__title {
        font-size: 2rem;
    }

    .hero__paragraph {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 1.8rem;
    }

    .contact__container {
        width: 90%;
    }
}

@media (max-width:320px) {

    #message-error-name,
    #message-error-email,
    #message-error-text {
        font-size: 1rem;
    }
}