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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --hue: 76;
    /*--primary-color: hsl(var(--hue), 100%, 26%);*/
    --primary-color: hsl(var(--hue), 43%, 44%);
    --headline: hsl(210, 11%, 15%);
    --paragraph: hsl(210, 9%, 31%);

    --brand-beige: hsl(39, 100%, 97%);
    --brand-light: hsl(calc(var(--hue) - 22), 23%, 89%);
    --brand-light-2: hsl(calc(var(--hue) + 10), 14%, 97%);
    --brand-dark: hsl(var(--hue), 100%, 14%);

    --bg-light: hsl(180, 14%, 97%);

    font-size: 62.5%; /* 100% = 16 px - 62.5% = 10px --- 1rem = 10px */

    --nav-height: 7.2rem;
}

html {
    /* chrome://flags/#smooth-scrolling */
    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-light);
}

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

ul {
    list-style: none;
}

section {
    padding-block: 10rem;
}

section header h4 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 150%;
    letter-spacing: 0.08rem;
    color: var(--primary-color);

    text-transform: uppercase;

    margin-bottom: 1.6rem;
}

section header h2 {
    font-size: 3rem;
    line-height: 3.9rem;

    color: var(--headline);
}

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

    margin-bottom: 2.4rem;
}

section .content p {
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 150%;

    color: var(--paragraph);

    margin-bottom: 4rem;
}

section img {
    max-width: 100%;
}

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

    border: none;
    border-radius: 4rem;

    margin-bottom: 6rem;

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

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

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

    text-decoration: none;

    transition: background 0.2s;
}

.button:hover {
    background-color: var(--brand-dark);
}

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

.social-links path {
    stroke: var(--primary-color);
}

/* custom colors */

#backToTopButton circle {
    fill: var(--primary-color);
}

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

/* ======= NAV ====== */

nav {
    display: flex;

    height: var(--nav-height);

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

    z-index: 100;

    background-color: #fff;
}

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

nav .wrapper .menu .button {
    margin-inline: auto;
    margin-block: 4rem;
}

nav.scroll {
    background-color: #fff;
}

nav .logo img {
    width: 15rem;
}

nav button {
    background: none;
    border: none;
    cursor: pointer;
}

nav .menu,
nav .close-menu {
    position: fixed;
}

/* ======= MENU-EXPANDED ====== */

body.menu-expanded {
    overflow: hidden;
}

body.menu-expanded > :not(nav) {
    visibility: hidden;
}

.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;
}

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

body.menu-expanded .menu {
    top: 0;
    left: 0;

    background: #fff;

    width: 100vw;
    height: 100vh;

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

    transition: transform 700ms;
    transform: translateX(0%);
}

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

    margin-top: 6rem;

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

.menu ul li a {
    color: var(--primary-color);
    text-decoration: none;
}

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

body.menu-expanded .logo path {
    fill: #fff;
}

body.menu-expanded button path {
    stroke: var(--primary-color);
}

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

#home {
    padding-block: 0;
    padding-top: var(--nav-height);
    /* padding-top: calc(4.1rem + var(--nav-height)); */
}

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

    margin-bottom: 3.2rem;
}

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

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

#home .banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(/assets/img/banner.svg);
    background-size: cover;
    margin-bottom: 5rem;
    max-width: 100%;
    min-height: 18rem;
    width: 100vw;
    height: 25vh;
}

#home .banner .text-box {
    color: #fff;
    text-align: left;
    width: min(50rem, 100%);
    padding-inline: 3.5rem;
    text-transform: uppercase;
}

#home .wrapper .content .button {
    margin-inline: auto;
}

#home .stats {
    width: 100%;
    padding-block: 4rem;
    margin-inline: auto;

    background-color: var(--brand-beige);
    border: 1px solid var(--brand-light);
    border-radius: 0.6rem;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6rem;
}

#home .stat h3 {
    font-size: 4.8rem;
    color: var(--headline);
    line-height: 130%;

    margin-bottom: 0.4rem;
}

#home .stat p {
    margin: 0;
    color: var(--primary-color);
}

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

#services {
    text-align: left;
}

#services header h2 {
    margin-bottom: 6rem;
}

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

#services .card {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 2.4rem;
    text-align: left;

    background: #fff;

    border: 1px solid var(--brand-light);
    border-radius: 0.6rem;
}

#services .card img {
    width: 15rem;
    margin-inline: auto;
}

#services .card h3 {
    text-align: center;
    padding-block: 2rem;
    color: var(--primary-color);
}

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

#about {
    text-align: left;
}

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

/* ======= NUTRITION ====== */

#nutrition {
    text-align: left;
}

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

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

#contact {
    text-align: left;
}

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

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

#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: #fff;
    padding-block: 6rem;
    text-align: left;
}

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

footer .logo img {
    width: 23.6rem;
}

footer p {
    color: var(--primary-color);
    line-height: 1.5;
    margin-bottom: 3.2rem;
}

footer .social-links {
    justify-content: flex-start;
    gap: 3rem;
}

/* BACK TO TOP */

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

    opacity: 0;
    visibility: hidden;

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

#backToTopButton svg:hover circle {
    fill: var(--brand-dark);
}

#backToTopButton.show {
    opacity: 1;
    visibility: visible;

    transform: translate(0);
}

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

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

    .wrapper {
        width: min(112rem, 100%);
        padding-inline: 4rem;
        display: grid;
    }

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

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

    section {
        padding-block: 12rem;
    }

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

    /* ======= NAV ====== */

    /* reset */

    nav#nav .wrapper * {
        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#nav .wrapper {
        padding-inline: 2.4rem;
    }

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

    nav#nav .menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: min(79rem, 82%);
        margin-right: 2rem;
    }

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

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

    nav#nav .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#nav .menu a.button:hover {
        background-color: var(--primary-color);
        border: none;
        color: #fff;
    }

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

    nav#nav.scroll .menu a.button {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    nav#nav .menu li a {
        transition: opacity 0.4s;
    }

    nav#nav .menu li a:hover {
        opacity: 1;
        font-weight: 700;
    }

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

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

        display: block;

        transition: width 0.2s;
    }

    nav#nav.scroll .menu li a::after {
        background-color: var(--primary-color);
    }

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

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

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

    nav#nav.scroll .menu a.button:hover {
        background-color: var(--primary-color);
        color: #fff;
        border: none;
        /* filter: brightness(1.3); */
    }

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

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

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

    #home .banner {
        height: 35vh;
        min-height: 35rem;
    }

    #home .banner .text-box {
        width: min(112rem, 100%);
    }

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

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

    /* #home .col-b {
        align-self: center;
    } */

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

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

    #home .stats {
        grid-area: C;

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

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

    #home .stats .stat {
        flex: 1;
    }

    #home .wrapper .content .button {
        margin-inline: 0;
    }

    #home .wrapper img {
        width: 44rem;
    }

    /* ======= SERVICES ====== */
    #services {
        text-align: center;
    }

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

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

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

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

    #about .wrapper {
        grid-template-columns: 40rem 1fr;
        grid-template-areas: 'B A';
        gap: 6.7rem;
    }

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

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

    /* ======= NUTRITION ====== */

    #nutrition .wrapper {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 'A B';
        gap: 6.7rem;
    }

    #nutrition .col-a,
    #nutrition .col-b {
        align-self: center;
    }

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

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

    #contact .wrapper {
        grid-template-columns: 55rem 1fr;
        grid-template-areas: 'A B';
        gap: 6.7rem;
    }

    #contact .col-a,
    #contact .col-b {
        align-self: center;
    }

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

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

    footer {
        padding-block: 8rem;
    }

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

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

    footer .col-b {
        align-self: center;
        justify-self: flex-end;
    }
}
