@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

/* variabili */
:root {
    --accent: #945E51;
    --white: #FBF9F1;
    --black: #322C2B;
    --gray: #444140;
    --light-gray: #615D5B;
    --yellow: #FFECB3;

    --xs: 8px;
    --s: 12px;
    /* misura intermedia perchè 8px è troppo piccolo */
    --m: 16px;
    --l: 24px;
    --xl: 32px;
    --xxl: 64px;

    /* misure elementi */
    --navbar-height: 60px;

    font-family: "Google Sans Flex", sans-serif;
    font-size: var(--m);
    font-weight: 500;
    color: var(--gray);
}


/* navbar */
nav {
    padding: 0 20px;
    margin: 0;
    height: var(--navbar-height);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--white);

    & img#nav-logo {
        height: 40px;
    }

    & .hamburger {
        height: 20px;
        width: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;

        & .line {
            transition: all .3s ease-in-out;
            background-color: var(--accent);
            width: 30px;
            height: 2px;
            transform: rotate(0deg);
        }

        &.open {
            justify-content: center;

            & .line[rotation="45"] {
                transform: rotate(45deg) translateY(2px);
            }

            & .line[rotation="-45"] {
                transform: rotate(-45deg) translateY(-2px);
            }

            & .line[despawn="true"] {
                display: none;
            }
        }
    }
}


#nav-menu {
    position: fixed;
    padding: 0;
    margin: 0;
    height: calc(100vh - var(--navbar-height));
    box-sizing: border-box;
    right: 0;
    z-index: 200;
    background-color: var(--white);
    width: 80vw;
    list-style: none;
    transition: all .3s ease-in-out;
    transform: translateX(0);
    padding: 10px 20px;

    &.hide {
        transform: translateX(100%);
    }

    & .nav-menu-hr {
        margin: 0;
        border-block-color: var(--light-gray);
    }

    & .nav-menu-option {
        width: 100%;
        padding: 10px 0;
        padding-left: 5px;
        box-sizing: border-box;

        & .nav-link {
            text-decoration: none;
            color: var(--black);
            font-weight: 600;
        }
    }
}

#nav-menu-barrier {
    width: 100vw;
    height: 100vh;
    background-color: #444140a2;
    position: fixed;
    left: 0;
    top: var(--navbar-height);
    transition: all .3s ease-in-out;
    backdrop-filter: blur(10px);

    &.hide {
        opacity: 0;
    }
}


/* body */

body {
    margin: 0;
    padding: 0;
    background-color: var(--white);
    position: relative;
}

.subtitle {
    text-align: center;
    font-size: var(--l);
    margin: 0;
}

section {
    padding: 64px 0;

    &#hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;

        & .title-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;

            & .title {
                font-size: var(--xl);
                font-family: "Bungee", sans-serif;
                color: var(--accent);
                font-weight: 500;
                margin: 0;
                text-align: center;
            }

            & .secondary-text {
                color: var(--gray);
            }
        }

        & .cta {
            display: block;
            padding: 10px;
            background-color: var(--accent);
            border: solid 3px var(--gray);
            border-bottom-width: 4px;
            border-radius: 5px;
            cursor: pointer;
            text-decoration: none;
            color: var(--white);
            font-size: var(--l);
            font-weight: 700;
        }
    }

    &#intro {
        box-sizing: border-box;
        color: var(--black);
        display: flex;
        flex-direction: column;
        gap: 32px;
        align-items: center;

        & .content {
            margin: 0;
            padding: 0 15px;
            font-weight: 400;
            text-align: left;
            width: 90vw;
            position: relative;

            & b {
                font-weight: 700;
            }

            & img {
                width: min(350px, 50vw);
                border-radius: 5px;
                border: solid 2px var(--black);
                float: left;
                top: 0;
                margin-right: var(--m);
            }
        }
    }

    &.qANDa {
        box-sizing: border-box;
        color: var(--black);
        display: flex;
        flex-direction: column;
        gap: 32px;

        & .content {
            margin: 0;
            padding: 0 15px;
            font-weight: 400;
            text-align: left;

            & b {
                font-weight: 700;
            }
        }
    }

}


/* footer */
footer {
    display: flex;
    flex-direction: column;

    & .footer-divider {
        /* width: 100vw; */
    }

    & .content {
        background-color: var(--gray);
        color: var(--white);
        padding: 32px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 64px;

        & .footer-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;

            & .footer-title {
                font-size: var(--m);
                font-family: "Bungee", sans-serif;
                text-align: center;
                margin: 0;
            }

            & .footer-line {
                width: 80vw;
                border-block-color: var(--yellow);
            }

            & .details-container {
                padding-top: 8px;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                font-size: var(--s);
            }
        }

        & .copyright {
            font-size: var(--s);
        }
    }
}

.hidden {
    display: none;
}










/* Stile Desktop */
@media (min-width: 1024px) {
    :root {
        --xs: 12px;
        /* misura intermedia perchè 8px è troppo piccolo */
        --s: 16px;
        --m: 24px;
        --l: 32px;
        --xl: 64px;
        --xxl: 96px;
    }

    #nav-menu {
        width: 40vw;
    }

    .subtitle {
        width: 60vw;
    }

    section#intro .content {
        width: 60vw;
    }

    section.qANDa {
        align-items: center;

        & .content {
            padding: 0;
            display: block;
            width: 50vw;
        }
    }
}