:root {
    --page-bg: #0B090D;
    --grid-gap: .75rem;
    --grid-margin: 1.5rem;
    --text-color: white;
    --text-size: .75rem;
    /* --primary-color: #EE3231; */
    --primary-color: #a31a19;

    --h1-size: 1.75rem;
    --h2-size: 1.5rem;
    --h3-size: 1.25rem;

    --button-padding-y: 1rem;
    --button-padding-x: 2.25rem;
    --button-font-size: 1rem;

    --section-distance-top: 4.5rem;
    --subsection-distance-gap: 3.75rem;
}

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

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    /* melhora a legibilidade em tamanhos de fontes diferentes */
    font-weight: 400;
    font-style: normal;
    background: var(--page-bg) linear-gradient(to bottom, #1D0738ff 30%, #1D073800 50%) fixed;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    /* margin: 0 var(--grid-margin); */
    margin-left: var(--grid-margin);
    margin-right: var(--grid-margin);
}

.container-max-width {
    max-width: 90rem;
    margin-left: auto;
    margin-right: auto;
}

.no-wrap {
    text-wrap: nowrap;
}

.logoicon {
    /* background-color: #1D0738; */
    position: sticky;
    top: 0;
    width: 100%;
    left: 0;
    display: flex;
    justify-content: space-between;
    padding: 1.75rem;
    background-image: linear-gradient(to bottom, #1D0738ff 80%, #1D073800);
}

.logoicon__logo {
    width: 4.75rem;

    img {
        max-width: 100%;
    }
}

.nav-menu {
    ul {
        list-style-type: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: end;
        scroll-target-group: auto;
    }

    a {
        padding: .75rem;
        display: inline-block;
        border-bottom: 1px solid transparent;

        &:hover {
            border-bottom: 1px solid var(--primary-color);
        }
    }
}

.nav-menu :target-current {
    color: red;
    anchor-name: --current-link;
}

.menu-active-bar {
    height: 4px;
    width: anchor-size(width);
    background-color: var(--primary-color);

    position-anchor: --current-link;
    position: absolute;
    left: anchor(left);
    top: calc(anchor(bottom) - 1px);

    transition: all .55s linear(0, 0.013 0.6%, 0.05 1.2%, 0.2 2.5%, 0.949 6.7%, 1.2 8.4%, 1.286 9.2%, 1.35 10%, 1.392 10.8%, 1.411 11.6%, 1.411 12.2%, 1.401 12.8%, 1.343 14.2%, 1.258 15.5%, 1.016 18.7%, 0.914 20.4%, 0.856 21.9%, 0.831 23.5%, 0.834 24.7%, 0.858 26.1%, 0.996 30.7%, 1.037 32.4%, 1.06 33.9%, 1.07 35.4%, 1.061 37.7%, 0.989 43.8%, 0.971 47.2%, 1.012 59.1%, 0.995 70.8%, 1);
}

h1 {
    font-size: var(--h1-size);
    font-weight: 900;
    line-height: 1;
    text-wrap: balance;
}

.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.hero__title {
    margin-bottom: 1.25em;
}

.hero__title--upper {
    text-transform: uppercase;
    /* color: transparent;
    -webkit-text-stroke: 2px var(--text-color); */
    text-shadow: 2px 2px var(--text-color), -2px -2px var(--text-color), -2px 2px var(--text-color), 2px -2px var(--text-color);
    margin-top: .5rem;
    display: inline-block;
    color: #1D0738;
    display: block;
}

.btn {
    display: inline-block;
    padding: var(--button-padding-y) var(--button-padding-x);
    border-radius: 10rem;
    background-color: var(--primary-color);
    font-weight: 600;
    font-size: var(--button-font-size);
}

main>* {
    /* margin-top: var(--section-distance-top); */
    padding-top: var(--section-distance-top);
}

.h2 {
    text-align: center;
    font-weight: 900;
    font-size: var(--h2-size);
    text-wrap: balance;
}

.title--thin {
    font-weight: 200;
    font-style: italic;
    display: block;
}

.courses,
.courses__list {
    display: flex;
    flex-direction: column;
    gap: var(--subsection-distance-gap)
}

.courses__card {
    text-align: center;
}

.courses__card__img img {
    border-radius: .75rem;
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .5);
    content-visibility: auto;
    contain-intrinsic-size: 424px 240px;
}

.h3 {
    font-size: var(--h3-size);
    font-weight: 900;
    text-align: center;
}

p {
    font-size: var(--text-size);
}

.btn--stroke {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color)
}

.courses__card__content {
    margin-top: 1rem;

    p {
        margin: 1.625rem 0;
    }
}

.courses__card__ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}



main {

    /* Firefox */
    /* * {
        scrollbar-width: auto;
        scrollbar-color: var(--primary-color) transparent;
    } */

    /* Chrome, Edge, and Safari */
    *::-webkit-scrollbar {
        height: .25rem;
    }

    *::-webkit-scrollbar-track {
        background: transparent;
    }

    *::-webkit-scrollbar-thumb {
        background-color: var(--primary-color);
        /* border-radius: 0px;
        border: 12px solid #fff700; */
    }
}



.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    top: 0;
}

.btn--center {
    margin: auto;
}

.sm-hide {
    display: none;
}

@media screen and (width <=64em) {
    .sm-sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
        top: 0;
    }
}


@media screen and (width > 64em) {

    :root {
        --h1-size: 3.25rem;
        --h2-size: 2.25rem;
        --h3-size: 1.75rem;
        --button-font-size: 1.25rem;
        --text-size: 1rem;

        --grid-gap: 1.25rem;
        --grid-margin: 2rem;
    }

    body {
        background: var(--page-bg) linear-gradient(to bottom, #1D0738ff 30%, #1D073800 50%) no-repeat;
        background-size: 100% 100vh;

    }

    .md-hide {
        display: none;
    }

    .md-show {
        display: revert;

        /* 
        display: initial; Define a propriedade com o valor padrão inicial definido pela especificação CSS.
        No exemplo, uma div deixa de ter display block por padrão e passa a ter display inline
        */

        /* 
        display: unset; Combina o comportamento de initial e inherit
        - Se a propriedade herda por padrão, o unset fará com que ela herde o valor do elemento pai (como inherit).
        - Se a propriedade não herda por padrão, o unset reseta ao valor inicial padrão do CSS (como initial).
        */

        /*
        display: revert; Reverte para o padrão, voltando ao que foi definido pelo agente de usuario
        */
    }

    .header {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        padding-top: 4.375rem;
        padding-bottom: 3.375rem;
        background-image: linear-gradient(to bottom, #1d0738fc, #1d0738f2 70%, #1D073800);
        z-index: 3;
    }

    .logoicon__logo {
        width: 8rem;
        margin: auto;
    }

    .nav-menu {
        margin-top: 1.75rem;
    }

    .nav-menu ul {
        flex-direction: row;
        justify-content: center;
    }

    .hero {
        gap: 4.5rem;
    }

    .hero__cta {
        position: relative;
        left: .5rem;

        &::before {
            content: "";
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 5rem;
            height: 5rem;
            background-image: url(../images/target.png);
            background-size: 100%;
            background-repeat: no-repeat;
            transform: translate(-50%, -50%);
        }
    }

    .courses__title {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--grid-gap);

        &::before,
        &::after {
            content: "";
            width: 12.5rem;
            height: 3.875rem;
            display: inline-block;

            background-image: url(../images/estrelas.png);
            background-size: 100%;
            background-repeat: no-repeat;
        }

        &::after {
            transform: scale(-1, 1);
        }
    }

    .courses {
        gap: calc(var(--subsection-distance-gap) * 1.25)
    }

    .courses__card {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: var(--grid-gap);
        text-align: left;
    }

    .courses__card__img {
        grid-column: 1 / 4;
        width: 100%;
    }

    .courses__card__content {
        grid-column: 4 / -1;

        .h3 {
            text-align: inherit;
        }
    }

    .courses__card__ctas {
        flex-direction: row;
        justify-content: end;
    }


    p {
        line-height: 1.4;
    }

    p:not(:first-child) {
        margin-top: var(--grid-gap);
    }

}

@media screen and (width > 90em) {
    :root {
        --grid-margin: 4rem;
        --h1-size: 4rem;
        --h2-size: 2.5rem;
        --h3-size: 2rem;

        --section-distance-top: 9rem;
        --subsection-distance-gap: 7.75rem;
    }

    main {
        *::-webkit-scrollbar {
            height: .5rem;
        }

    }

    .header {
        padding: 3rem 0;
    }

    .header .container {
        display: flex;
        justify-content: space-between;
    }

    .nav-menu {
        margin: 0;
    }

    .logoicon__logo {
        width: 8rem;
        margin: 0;
    }

    .courses__card {
        grid-template-columns: repeat(12, 1fr);
    }

    .courses__card__img {
        grid-column: 2/6;
    }

    .courses__card__content {
        grid-column: 6 / -2;
    }

    .hero {

        background-image: url(../images/css.png),
            url(../images/html.png),
            url(../images/figma.png),
            url(../images/js.png);

        background-repeat: no-repeat;
        background-position: left 5% top,
            right 5% top,
            left -2% bottom 5%,
            right -2% bottom 5%;

        margin: 0;
        padding: var(--subsection-distance-gap) var(--grid-margin) 3rem;
    }

    .hero .container {
        display: grid;
        /* gap: 5rem; */
        grid-template-columns: repeat(12, 1fr);
    }

    .hero .container>* {
        grid-column: 2 / -2;
    }




    .lg-show {
        display: revert;
    }

    .no-js {

        .carousel-btn,
        .indicator {
            display: none;
        }
    }



    .hero {
        --parallax-speed-1: .2;
        --parallax-speed-2: .4;
    }
}