main {
    overflow: hidden;
}

@font-face {
    font-family: 'Montserrat Alternates Medium';
    src: url('../fonts/MontserratAlternates-Medium.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Alternates Bold';
    src: url('../fonts/MontserratAlternates-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat Medium';
    src: url('../fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Montserrat Regular';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: 'Montserrat SemiBold';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 500;
}


:root {
    --mont-alt-med: 'Montserrat Alternates Medium';
    --mont-alt-bold: 'Montserrat Alternates Bold';
    --mont-ex-it: 'Montserrat Alternates ExtraBold Italic';
    --mont-reg: 'Montserrat Regular';
    --mont-med: 'Montserrat Medium';
    --mont-semi: 'Montserrat SemiBold';
    font-size: 62.5%;
    --main-grey: rgb(64, 64, 64);
    --mid-grey: rgb(42, 42, 42);
    --dark-grey: rgb(30, 29, 29);
    --white: rgb(255, 255, 255);
    --grey50: rgba(255, 255, 255, 0.5);
    --black: black;
}

* {
    font-family: var(--mont-reg), sans-serif;
    margin: 0;
}

*::selection {
    background: var(--dark-grey);
    color: var(--white);
}

.header__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-window {
    overflow: hidden;
    border-radius: 15px;
    border: none;
    background-color: rgb(30, 29, 29);
    margin: 10vw auto;
    width: 70vw;
    max-width: 60rem;
    background-image: url('../media/pseudo.png');
    background-position: bottom right;
}

.mobile-navigation {
    position: fixed;
    z-index: 999;
    overflow: hidden;
    border-radius: 10px;
    border: none;
    background-color: var(--mid-grey);
    margin: 10vw auto;
    width: 16rem;
    height: 14rem;
    padding: 1rem;
    background-image: url('../media/pseudo.png');
    background-position: bottom right;
}

.modal-window::backdrop {
    backdrop-filter: blur(1px);
}

.modal__info__wrapper {
    display: flex;
    flex-direction: column;
}

.modal__title {
    color: var(--white);
    text-align: center;
}

.modal__close__box {
    display: flex;
    justify-content: flex-end;
}

.modal__close__button {
    background: none;
    border: none;
}

.modal__close__button:hover,
.intro__button:hover {
    scale: 1.2;
    transition: 0.4s;
}

.modal__info__contacts {
    display: flex
}

.modal__info__icons__wrapper {
    display: flex;
    justify-content: center;
}

.modal__icon {
    width: 7rem;
}

.mobile-navigation__wrapper {
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 1rem;
}


header {
    background-color: var(--main-grey);
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0px 10px 15px 0px rgba(0, 0, 0, 0.2);
}

.logo__wrapper {
    display: flex;
    flex-direction: row;
    gap: 1.7rem;
    align-items: center;
}

.logo__name {
    color: var(--white);
    font-family: var(--mont-alt-med), sans-serif;
}

.navigation__wrapper {
    display: flex;
}

.navigation__link {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    font-family: var(--mont-alt-med), sans-serif;
}

.intro__title,
.location__title,
.projects__title {
    font-family: var(--mont-med);
    letter-spacing: -2%;
}

.intro__title {
    font-family: var(--mont-semi);
}

.intro__button {
    cursor: pointer;
    position: relative;
    color: var(--white);
    background: linear-gradient(to right, #898989, var(--main-grey));
    border: none;
    border-radius: 1rem;
    font-family: var(--mont-alt-med);
    line-height: 150%;
    box-shadow: 4px 4px 5px rgba(89, 89, 89, 0.7);
}

.intro__button:active {
    color: var(--white);
    background: linear-gradient(to right, #6293EF, #80acff);
    transition: 0.7s;
}

.projects__container {
    width: 100%;
    overflow-x: auto;
    /* горизонтальная прокрутка */
    padding-bottom: 1rem;
    /* место для скролла */
}

.projects__box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40rem, 1fr));
    grid-auto-flow: column;
    /* карточки в строку */
    grid-auto-columns: minmax(30rem, 1fr);
    /* размер новых колонок */
    gap: 3.5rem;
    width: max-content;
    /* растягивается по содержимому */
    padding: 1rem;
}

.projects__photo {
    object-fit: cover;
}

.projects__name,
.location__info {
    color: var(--black);
    font-family: var(--mont-med);
    padding-top: 1rem;
}

.projects__description {
    color: rgba(130, 130, 130, 1);
    padding: 0.5rem 0;
}

.projects__button {
    background: none;
    border: none;
    cursor: pointer;
}

footer {
    background-color: var(--main-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.6rem 3.5rem;
}

.footer__box {
    display: flex;
    flex-direction: column;
}

.footer__info,
.modal__info {
    color: var(--white);
    font-family: var(--mont-alt-med);
    text-align: center;
    text-decoration: none;
    align-items: center;
    display: flex;
}

@media (max-width: 1024px) {
    section {
        margin: 5rem 2.5rem 0;
    }

    .modal-window {
        height: 70vh;
        max-height: 22rem;
    }

    .modal__info__icons__wrapper {
        gap: 1rem;
    }

    .modal__icon {
        width: 4rem;
    }

    .modal__info__wrapper {
        padding: 1rem;
    }

    .header__wrapper {
        padding: 1rem;
    }

    .logo__image {
        max-width: 5rem;
    }

    .logo__name {
        font-size: 1.4rem;
    }

    .navigation__wrapper,
    .intro__button--desktop {
        display: none;
    }

    .mobile-navigation__link {
        font-size: 1.6rem;
    }

    .navigation__burger {
        background-color: var(--main-grey);
        border: none;
    }

    .intro {
        display: flex;
        flex-direction: column;
    }

    .intro__title {
        font-size: 2.2rem;
    }

    .intro__subtitle {
        font-size: 1.2rem;
        line-height: 150%;
        text-align: center;
        margin-top: 1.5rem;
        color: rgba(0, 0, 0, 0.75);
    }

    .intro__photo {
        margin-top: 1rem;
        border: none;
        border-radius: 1rem;
        max-height: 45rem;
        object-fit: cover;
    }

    .intro__button {
        margin-top: 2.5rem;
        padding: 1.4rem 1.8rem;
        font-size: 1.4rem;
        width: 18rem;
        align-self: center;
    }

    .location__title,
    .projects__title {
        font-size: 2.2rem;
        line-height: 150%;
    }

    .intro__title,
    .location__title,
    .projects__title {
        font-family: var(--mont-med);
        text-align: center;
        align-self: center;
    }

    .projects {
        margin-top: 8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }


    .projects__info {
        padding: 1.5rem 0;
        line-height: 150%;
        font-size: 1.4rem;
        text-align: center;
    }

    .projects__box {
        display: flex;
        gap: 1.5rem;
    }

    .project__card {
        max-width: 18rem;
        max-height: 25rem;
        display: flex;
        flex-direction: column;

    }

    .projects__photo {
        height: 18rem;
        width: 18rem;
        border-radius: 1rem;
    }

    .projects__name,
    .location__info {
        font-size: 1.4rem;
    }

    .projects__description {
        font-size: 1.2rem;
        text-align: center;
    }

    .location {
        margin: 8rem 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .location__box {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .location__info {
        text-align: center;
        max-width: 23rem;
    }

    .location__map {
        padding: 0 2rem;
        height: 22rem;
        margin-top: 2rem;
    }

    .map--desktop {
        display: none;
    }

    .footer__box {
        gap: 1rem;
        margin: 2rem 0;
    }

    .footer__info,
    .modal__info {
        font-size: 1.2rem;
    }
}

@media (min-width: 1024px) {

    main,
    .header__wrapper {
        max-width: 175rem;
        margin: 0 auto;
    }

    main {
        display: flex;
        flex-direction: column;
        align-items: left;
    }

    section {
        margin: 20rem 8rem 0;
    }

    .modal-window {
        height: 70vh;
        max-height: 45rem;
    }

    .modal__info__icons__wrapper {
        gap: 3rem;
    }

    .modal__icon {
        width: 8rem;
    }

    .modal__info__wrapper {
        padding: 4rem;
    }

    .modal__info {
        font-size: 2.3rem;
    }

    .modal__icon {
        padding-top: 3rem;
        width: 8rem;
    }

    header {
        padding: 4rem 3rem;
    }

    .logo__image {
        max-width: 8.2rem;
    }

    .logo__name {
        font-size: 2.6rem;
    }

    .navigation__wrapper {
        display: flex;
        flex-direction: row;
        gap: 8rem;
    }

    .navigation__burger,
    .intro__button--mobile {
        display: none;
    }

    .navigation__link {
        font-size: 2.3rem;
    }

    .intro {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 3rem;
    }

    .intro__title {
        font-size: 6.4rem;
        text-align: left;
    }

    .intro__subtitle {
        font-size: 2.4rem;
        line-height: 150%;
        margin-top: 4rem;
        color: rgba(0, 0, 0, 0.75);
    }

    .intro__photo {
        border-radius: 5rem 0;
        width: 45dvi;
        height: 45rem;
        object-fit: cover;
    }

    .intro__button {
        margin-top: 8rem;
        padding: 2.4rem 2.8rem;
        font-size: 2.4rem;
    }

    .location__title,
    .projects__title,
    .modal__title {
        font-size: 4.8rem;
        line-height: 150%;
        align-content: left;
    }

    .projects,
    .location {
        margin-top: 18rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .projects__info {
        padding: 3rem 0;
        line-height: 150%;
        font-size: 2.4rem;
    }

    /* .projects__box {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 35rem), 1fr));
        gap: 3.5rem;
        width: max-content;
    } */

    .project__card {
        padding: 1rem;
        max-height: 54rem;
        display: flex;
        flex-direction: column;
    }

    .projects__photo {
        height: 41rem;
        width: 100%;
        border-radius: 1rem;
    }

    .projects__name,
    .location__info {
        font-size: 2.6rem;
    }

    .projects__description {
        font-size: 2.4rem;

    }

    .location {
        flex-direction: row;
        gap: 3rem;
        margin: 20rem 8rem;
    }

    .location__box {
        display: flex;
        flex-direction: column;
        align-items: left;
        max-width: 40dvi;
    }

    .location__info {
        text-align: left;
    }

    .map--desktop {
        padding: 0 2rem;
        height: 58rem;
    }

    .map--mobile {
        display: none;
    }

    footer {
        display: flex;
        flex-direction: row;
        padding: 3rem 8rem;
        align-items: center;
        justify-content: space-around;
    }

    .footer__box {
        gap: 1rem;
        margin: 2rem 0;
        gap: 2.5rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 40dvi;
    }

    .footer__info,
    .modal__info {
        font-size: 2.2rem;
        text-align: left;
    }
}