/* ======= GERAL ========== */

* {
    margin: 0;
    box-sizing: border-box;
    padding: 0;
}
:root {
    --hue: 180;
    --primary-color: hsla(var(--hue), 100%, 26%, 1);
    --headline: hsla(210, 11%, 15%, 1);
    --paragraph: hsla(210, 9%, 31%, 1);
    --brand-green: hsla(calc(var(--hue)- 22), 23%, 89%, 1);
    --brand-beige: hsla(39, 100%, 97%, 1);
    --brand-green-hover:hsla(var(--hue), 100%, 14%, 1);
    --bg-light: hsla(180, 23%, 89%, 1);
    --bg-light2: hsla(calc(var(--hue) + 10), 14%, 97%,1);




    font-size: 62.5%;

    --nav-height: 7.2rem;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'DM Sans';
    font-size: 1.6rem;
    text-align: center;
    overflow: overlay;
    background-color: var(--bg-light2);
}

.wrapper-flex {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.geral {
    width: min(50rem, 100%);
    margin: 0 auto;
    padding-inline: 2.4rem;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    width: -2rem;
    bottom: -2rem;
    position: relative;
}

section {
    padding-block: 10em;
}

section header h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.6rem;
}

section header h2 {
    font-weight: 700;
    font-size: 3.0rem;

    color: var(--headline);
    margin-bottom: 6rem;
}

section header h1 {
    font-size: 3.4rem;
    color: var(--headline);
    line-height: 130%;
    margin-bottom: 2.4rem;
}

.button {
    background-color: var(--primary-color);
    color: white;

    border: none;
    border-radius: 4rem;
    margin-bottom: 6.0rem;


    padding: 1.6rem 3.2rem;
    width: fit-content;

    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;

    margin-bottom: 6rem;
    text-decoration: none;
    transition: background 200ms;
}

.button:hover {
    background-color: var(--brand-green-hover);
}
/* ======= HEADER ========== */

#home::before {
    content: '';
    width: 100%;
    height: calc(81% + var(--nav-height));
    background-color: var(--bg-light);;
    display: block;

    position: absolute;
    top: 0;
    left: 0;
    z-index: -999;
}

#home {
    padding-block: 0;
    width: 100%;
    margin: 0 auto;
    padding-top: calc(4.1rem + var(--nav-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 2.4rem;
}

#home h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.6rem;
}

#home h1 {
    font-size: 3.4rem;
    color: var(--headline);
    line-height: 130%;
    margin-bottom: 2.4rem;
}

#home p {
    font-size: 1.8rem;
    line-height: 150%;
    font-weight: 400;
    color: var(--paragraph);
    margin-bottom: 3.2rem;
}

#home .button {
    margin: 0 auto;
    margin-bottom: 6rem;
}

.box {
    height: 47.0rem;
    background-color: var(--brand-beige);

    border: 1px solid var(--brand-green)  ;
    border-radius: 1.6rem;

    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-around;
}


.box-conteudo p {
    color: var(--primary-color);
    font-size: 1.6rem;
}

.box-conteudo h3 {
    color: var(--headline);
    font-size: 4.8rem;
}

/* CUSTOM COLORS */


#services .card circle {
    fill: var(--brand-green);
}

#navigation .logo path[fill*="#00856F"],
#backToTopButton circle {
    fill: var(--primary-color);
}

body.menu-expanded #navigation .logo path,
#navigation.scroll .logo path {
    fill: white;
}


button.open-menu path[stroke*="#00856F"],
#contact li path {
    stroke: var(--primary-color);
}

#navigation.scroll button.open-menu path[stroke*="#00856F"] {
    stroke: white;
}


/* ======= NAVIGATION ========== */

nav {
    display: flex;


    height: var(--nav-height);
    padding-inline: 2.4rem;

    width: 100%;
    position: fixed;
    top: 0;

    z-index: 100;

}

nav .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav.scroll {
    background-color: var(--primary-color);
}

/* ======= MENU EXPANDED ========== */
.menu,
.close-menu,
body.menu-expanded .open-menu {
    opacity: 0;
    visibility: hidden;
}

body.menu-expanded .menu,
body.menu-expanded .close-menu {
    opacity: 1;
    visibility: visible;
}

body.menu-expanded {
    overflow: hidden;
}

.menu {
    transform: translateY(100%);
}

body.menu-expanded .menu {
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-color);

    width: 100%;
    height: 100%;

    padding-top: var(--nav-height);

    transition: transform 300ms;
    transform: translateY(0);

}


.menu ul:nth-child(1) {
    display: flex;
    flex-direction: column;
    gap: 4.8rem;

    margin-top: 6rem;

    font-weight: 700;
    font-size: 2.4rem;
    line-height: 3.1rem;

}

.menu ul li a {
    text-decoration: none;
    color: white;
}

.menu .button {
    background: #FFFFFF;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 2.3rem;
    text-transform: uppercase;
    text-decoration: none;

    color: var(--primary-color);

    display: inline-block;
    padding: 1.6rem 3.2rem;

    margin-bottom: 8rem;
    margin-top: 4.8rem;
}

.menu .button:hover {
    background-color: var(--primary-color);
    color: white;

    filter: brightness(1.3);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3.2rem;
}

body.menu-expanded .logo,
nav.menu-expanded button {
    position: relative;
    z-index: 100;
}

.menu-expanded .logo svg path {
    fill: white;
}

nav.menu-expanded button path {
    stroke: white;
}

.open-menu {
    background-color: transparent;
    border: none;
}

.scroll .open-menu svg path{
    fill: #FFFFFF;
    stroke: #FFFFFF;
    border: none;
}

.menu-expanded .close-menu {
    z-index: 100;
    background-color: transparent;
    border: none;
}

.scroll svg path {
    fill: white;
}
.menu-expanded .social-links svg path {
    fill: none;
}


/* ======= SERVICES ========== */


#services header h4{
    font-size: 1.4rem;
    line-height: 150%;
    letter-spacing: 0.08rem;

    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1.6rem;
    margin-top: 10rem;
}

#services header h2 {
    font-weight: 700;
    font-size: 3.0rem;

    color: var(--headline);
    margin-bottom: 6rem;
}

#services .cards {
    display: flex;
    flex-direction: column;
    gap: 3.2rem ;
}



#services .card {
    padding: 2.4rem;
    text-align: left;

    background: white;

    border: 1px solid var(--brand-beige);
    box-sizing: border-box;
    border-radius: .6rem;
}

#services .card h3 {
    margin-block: 1.6rem;
}

/* ======= ABOUT ========== */

#about {
    text-align: left;
    padding-inline: 2.4rem;
}

#about header h2 {
    margin-bottom: 2.4rem;
}

.content p {
    color: var(--paragraph);
    margin-top: 2.4rem;
    margin-bottom: 6rem;
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 150%;
}


/* ======= Contact ========== */

#contact {
    text-align: left;
}

#contact header {
    margin-bottom: 3.2rem;
}

#contact ul {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;

    margin-bottom: 3.2rem;
}

#contact ul li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* ======= FOOTER ========== */

footer {
    background-color: var(--primary-color);
    padding-block: 6rem;

    text-align: left;

    color: white;
}

footer .logo {
    display: inline-block;
    margin-bottom: 2.4rem;
}

footer .logo svg {
    width: 26.6rem;
    height: 3.1rem;
    position: relative;
    left: -2rem;
}

footer .logo path {
    fill: white;
}

footer p {
    color: var(--brand-beige);
    line-height: 2;
    font-size: 1.4rem;
}


footer .social-links {
    margin-top: 3.2rem;
    justify-content: left;
}

/* ======= BACK TO TOP ========== */

#backToTopButton {
    position: fixed;
    bottom: 1rem;
    right: 2.5rem;

    opacity: 0;
    visibility: hidden;

    transform: translateY(100%);
    transition: 200ms;
}

#backToTopButton.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ======= RESPONSIVO ========== */

@media (min-width: 1024px) {
/* ======= GERAL ========== */
body {
    overflow: auto;
}

section {
    padding-block: 16rem;
}

section header h2 {
    font-size: 4rem;
    line-height: 5.2rem;
}

.geral {
    width: min(112rem, 100%);
    display: grid;
}

.col-a {
    grid-area: A;
}

.col-b {
    grid-area: B;
}

/* ======= NAVIGATION ========== */

/* ======= RESET ========== */

    body footer {
        justify-content: initial;
    }

    section .box {
        height: initial;
    }

    img {
        width: initial;
        height: initial;
        position: initial;
        bottom: initial;
        max-width: 100%;
    }

    nav#navigation .wrapper-flex * {
        margin: 0;
        padding: 0;
        visibility: initial;
        display: initial;
        opacity: initial;
        flex-direction: initial;
        position: initial;
        font-size: initial;
        font-weight: initial;
        transform: initial;
        color: initial;
        background-color: initial;
        filter: initial;
    }

    nav#navigation .close-menu,
    nav#navigation .open-menu,
    nav#navigation .social-links {
        display: none;
    }

    nav#navigation .menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 57%;
    }

    nav#navigation .menu ul:nth-child(1) {
        display: flex;
        gap: 3.2rem;
    }

    nav#navigation .menu ul li a {
        color: var(--primary-color);
        opacity: 0.7;
    }

    nav#navigation .menu a.button {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 2.4rem;

        border: 1px solid var(--primary-color);
        border-radius: 4rem;

        color: var(--primary-color);
        font-weight: 700;
        font-size: 1.4rem;
        line-height: 1.8rem;
        text-transform: uppercase;
    }

    nav#navigation.scroll .menu ul li a {
        color: var(--bg-light2);
        opacity: 0.6;
    }

    nav#navigation.scroll .menu a.button {
        border-color: white;
        color: white;
    }

    nav#navigation .menu li a {
        transition: opacity .4s;
    }
    
    nav#navigation .menu li a.active,
    nav#navigation .menu li a:hover {
        opacity: 1;
        font-weight: 700;
    }

    nav#navigation .menu li a::after {
        content: '';
        width: 0%;
        height: 2px;
        background-color: var(--primary-color);

        position: relative;
        bottom: -1.8rem;
        left: -0.5rem;

        display: block;

        transition: width 0.2s;
    }

    nav#navigation .menu a.button:hover {
        background-color: var(--primary-color);
        color: white;
        border: none;
    }

    nav#navigation.scroll .menu li a::after {
        background-color: white;
    }

    nav#navigation .menu li a.active::after,
    nav#navigation .menu li a:hover::after {
        padding-inline: 0.8rem;
        width: 100%;
    }

    nav#navigation.scroll .menu li a.active,
    nav#navigation.scroll .menu li a:hover {
        opacity: 1;
    }

    nav#navigation.scroll .menu a.button.active,
    nav#navigation.scroll .menu a.button:hover {
        background-color: var(--primary-color);
        filter: brightness(1.2);
        border: none;
    }

    /* ======= HOME ========== */

    #home::before {
        height: calc(95% - var(--nav-height));
    }

    #home {
        padding-top: var(--nav-height);
    }

    #home .geral {
        grid-template-columns: 60.5rem 1fr;
        grid-template-areas:
        'A B'
        'C C' ;
    }

    #home .col-a {
        text-align: left;
        align-self: center;
    }

    #home h1 {
        font-size: 5.2rem;
    }

    #home .content p {
        font-size: 1.8rem;
    }

    #home .box .box-conteudo + .box-conteudo {
        border-left: 1px solid var(--primary-color);
    }

    #home .box .box-conteudo {
        flex: 1;
    }

    #home .box {
        grid-area: C;

        flex-direction: row;
        padding: 6rem;
        gap: 0;
    }

    #home .button {
        margin: 0;
    }

    #home img {
        width: 42rem;
        position: relative;
        bottom: -2.4rem;
    }

/* ======= SERVICES ========== */

    #services h2 {
        width: 47rem;
        margin-inline: auto;
    }

    #services .cards {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4rem;
    }

    #services .card {
        width: 30%;
        flex-grow: 1;
    }

/* ======= ABOUT ========== */
    #about .geral {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 'B A' ;
        gap: 6.7rem;
    }

    #about .col-a {
        align-self: center;
    }

    #about .content p {
        margin-bottom: 0;
    }

/* ======= CONTACT ========== */

    #contact .geral {
        grid-template-columns: 1fr 57.5rem;
        grid-template-areas: 'A B' ;
    }

    #contact h2 {
        width: 40.4rem;
    }


/* ======= FOOTER ========== */

    footer {
        padding-block: 8rem;
    }

    footer .geral {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 'A B';
    }

    footer .col-a {
        align-self: center;
    }

    footer .col-b .social-links {
        align-self: center;
        justify-content: end;
    }

    footer p {
        margin-bottom: 0;
    }

}
