body {
    font-family: "Roboto", sans-serif;
    background-color: #ffffff;
    color: #434455;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* Common */

.container {
    max-width: 320px;
    padding: 0 16px;
    margin: 0 auto;
}

@media screen and (min-width: 768px) {
    .container {
    max-width: 768px;
}
}

@media screen and (min-width: 1158px) {
    .container {
    max-width: 1158px;
    padding: 0 15px;
}
}

/* Header */

.header {
    border-bottom: 1px solid #e7e9fc;
    box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08), 0px 1px 1px rgba(46, 47, 66, 0.16), 0px 1px 6px rgba(46, 47, 66, 0.08);
}

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

.nav-list-item, .address-list {
    display: none;
}

.logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 117%;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
}

.header-logo {
    padding: 16px 0;
    display: block;
}

.logo-part {
    color: #2e2f42;
}

.menu-btn {
    padding: 0;
    border: none;
    background-color: transparent;
}

.menu-icon-open {
    display: block;
    fill: #2f2f37;
}

@media screen and (min-width: 768px) {
    .menu-btn {
    display: none;
}

.header-logo {
    padding: 24px 0;
    margin-right: 120px;
}

.nav-list {
    display: flex;
    align-items: center;
}

.nav-list-item {
    display: flex;
    gap: 40px;
}

.link {
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-weight: 500;
    color: #2e2f42;
    padding: 24px 0;
    display: block;
}

.studio {
    position: relative;
    color: #404bbf;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.studio::after {
    content: "";
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
}

.link:hover, .link:focus {
    color: #404bbf;
}

.address-list {
    font-style: normal;
    display: block;
}

.address-list-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-address {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    font-weight: 400;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.link-address:hover, .link-address:focus {
    color: #404bbf;
}
}

@media screen and (min-width: 1158px) {
    .header-logo {
    margin-right: 76px;
}

.address-list-item {
    flex-direction: row;
    gap: 40px;
}

.link-address {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
}

/* Mobile menu */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;

    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-container {
    position: relative;
    padding-top: 72px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mobile-menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-icon-close {
    fill: #2e2f42;
}

.mobile-menu-nav {
    margin-bottom: auto;
}

.menu-nav-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.menu-nav-item {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

.studio-part {
    color: #404bbf;
}

.menu-add {
    margin-bottom: 48px;
}

.menu-add-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.menu-add-item {
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #434455;
}

.numb-part {
    color: #4d5ae5;
}

.menu-social-list {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.menu-social-item {
    width: 40px;
    height: 40px;
}

.menu-social-icons {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-icon {
    fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}

/* Hero section */

.section-one {
    padding: 72px 0;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people-office.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-color: #2e2f42;
    margin: 0 auto;
}

.h-one {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.02em;
    max-width: 216px;
    margin: 0px auto 72px auto;
}

.button {
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
    background-color: #4d5ae5;
    color: #ffffff;
    display: block;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover,
.button:focus {
    background-color: #404bbf;
}

/* Hero section mob */

.section-one {
    max-width: 320px;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-mob-min.jpg);
}

@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
    .section-one {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-mob@2x-min.jpg);
    }
}

/* Hero section tab */

@media screen and (min-width: 768px) {
    .section-one {
        padding: 112px 0;
        max-width: 768px;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-tab-min.jpg);
    }

    .h-one {
        font-size: 56px;
        line-height: 1.07143;
        max-width: 496px;
        margin: 0px auto 36px auto;
    }

@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
        .section-one {
            background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-tab@2x-min.jpg);
        }
    }
}

/* Hero section desk */

@media screen and (min-width: 1158px) {
    .section-one {
        padding: 188px 0;
        max-width: 1440px;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-desk-min.jpg);
    }
    
    .h-one {
        margin: 0px auto 48px auto;
    }

@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
        .section-one {
            background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/office-desk@2x-min.jpg);
        }
    }
}

/* Benefits */

.section-benefits {
    padding: 96px 0;
}

.benefits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
}

.benefits-item {
    width: 100%;
}

.benefits-icons-container {
    display: none;
}

.benefits-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
    text-align: center;
}

.benefits-p {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #434455;
    letter-spacing: 0.02em;
}

@media screen and (min-width: 768px) {
    .benefits-list {
        display: flex;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 72px;
    }

    .benefits-item {
        width: calc((100% - 24px) / 2);
    }

    .benefits-title {
        text-align: start;
    }
}

@media screen and (min-width: 1158px) {
    .section-benefits {
        padding: 120px 0;
    }

    .benefits-list {
        gap: 24px;
    }

    .benefits-item {
        width: calc((100% - 3 * 24px) / 4);
    }

    .benefits-icons-container {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 112px;
        background-color: #f4f4fd;
        border-radius: 4px;
        border: 1px solid #8e8f99;
        margin-bottom: 8px;
    }

    .benefits-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    }

    .benefits-p {
    font-weight: 400;
    font-size: 16px;
    }
}

/* Our team */

.container-sections-three {
    padding: 0 28px;
}

.section-three {
    padding: 96px 0;
    background-color: #f4f4fd;
}

.our-team {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    text-align: center;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    color: #2e2f42;
    margin-bottom: 72px;
}

.team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
}

.img-background {
    width: 100%;
    border-radius: 0px 0px 4px 4px;
    background-color: #ffffff;
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
    ;
}

.container-team {
    padding: 32px 0;
    box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08), 0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

.team-item {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
    margin-bottom: 8px;
}

.team-list-p {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #434455;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}

.icons-list {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.icons-list-item {
    width: 40px;
    height: 40px;
}

.icons-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icons-link:hover,
.icons-link:focus {
    background-color: #404bbf;
}

.team-icons {
    fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
    .container-sections-three {
        padding: 0 108px;
    }

    .team-list {
        column-gap: 24px;
        row-gap: 64px;
    }

    .img-background {
        width: calc((100% - 24px) / 2);
    }
}

@media screen and (min-width: 1158px) {
    .container-sections-three {
        padding: 0 15px;
    }

    .section-three {
        padding: 120px 0;
    }

    .team-list {
        gap: 24px;
    }

    .img-background {
        width: calc((100% - 3 * 24px) / 4);
    }
}

/* Our portfolio */

.section-portfolio {
    padding: 96px 0;
}

.portfolio {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    text-align: center;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    color: #2e2f42;
    margin-bottom: 72px;
}

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.portfolio-list-item {
    width: 100%;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-list-item:hover,
.portfolio-list-item:focus {
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-list-item:hover .p-overlay {
    transform: translateY(0%);
}

.container-img {
    position: relative;
    overflow: hidden;
}

.p-overlay {
    position: absolute;
    top: 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    padding: 40px 32px;
    background-color: #4d5ae5;
    height: 100%;
    width: 100%;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.container-portfolio {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

.portfolio-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
}

.portfolio-list-p {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #434455;
    letter-spacing: 0.02em;
}

@media screen and (min-width: 768px) {
    .portfolio-list {
        column-gap: 24px;
        row-gap: 72px;
    }

    .portfolio-list-item {
        width: calc((100% - 24px) / 2);
    }
}

@media screen and (min-width: 1158px) {
    .section-portfolio {
        padding: 120px 0;
    }

    .portfolio-list {
        column-gap: 24px;
        row-gap: 48px;
    }

    .portfolio-list-item {
        width: calc((100% - 48px) / 3);
    }
}

/* Footer */

.footer {
    padding: 96px 0;
    background-color: #2e2f42;
}

.container-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
}

.link-logo-footer {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    display: block;
    margin-bottom: 16px;
    text-align: center;
}

.webstudio-footer {
    color: #f4f4fd;
}

.p-footer {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #f4f4fd;
    letter-spacing: 0.02em;
    width: 288px;
}

.container-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.p-social {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
}

.social-list {
    justify-content: center;
    display: flex;
    gap: 16px;
}

.social-item {
    width: 40px;
    height: 40px;
}

.social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover,
.social-link:focus {
    background-color: #31d0aa;
}

.footer-icons {
    fill: #f4f4fd;
}

.form-footer-p {
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-align: center;
}

.form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.form-label-footer {
    display: flex;
    flex-direction: column;
}

.form-input-footer {
    width: 288px;
    height: 40px;
    border: 1px solid #ffffff;
    background-color: transparent;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    padding-left: 16px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    color: #ffffff;
}

.form-button-footer {
    width: 165px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
}

.icon-subscribe {
    margin-left: 16px;
}

@media screen and (min-width: 768px) {
    .container-foot {
        flex-direction: row;
        justify-content: start;
        align-items: baseline;
        column-gap: 24px;
        row-gap: 72px;
        padding: 0 0 0 108px;
    }

    .link-logo-footer {
        text-align: start;
    }

    .p-footer {
        width: 264px;
    }

    .p-social {
        text-align: start;
    }

    .social-list {
        justify-content: start;
    }

    .container-footer {
        width: calc((100% - 24px) / 2);
        }

    .form-footer-p {
        text-align: start;
        }

    .form-footer {
        flex-direction: row;
        column-gap: 24px;
        row-gap: 72px;
        }

    .form-input-footer {
        width: 264px;
    }
}

@media screen and (min-width: 1158px) {
    .footer {
        padding: 100px 0;
        }

    .container-foot {
        display: flex;
        align-items: baseline;
        flex-wrap: nowrap;
        gap: 0px;
        padding: 0 15px;
        }

    .container-logo {
        margin-right: 120px
        }

    .container-footer {
        margin-right: 80px;
        }

    .form-button-footer {
        min-width: 165px;
    }
}

/* Modal overlay */

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-color: rgba(46, 47, 66, 0.4);

    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    padding: 72px 16px 16px 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fcfcfc;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14),
        0px 1px 3px rgba(0, 0, 0, 0.12),
        0px 2px 1px rgba(0, 0, 0, 0.2);
    ;
    border-radius: 4px;
    width: 288px;
    min-height: 584px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.but-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.but-close:hover,
.but-close:focus {
    background-color: #404bbf;
    border: none;
    fill: #ffffff;
}

.icon-close {
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-close:hover,
.icon-close:focus {
    fill: #ffffff;
}

.modal-p {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 16px;
}

.container-label {
    margin-bottom: 8px;
}

.form-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: block;
    margin-bottom: 4px;
}

.container-form {
    position: relative;
    padding: 0;
}

.form-input {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    background-color: transparent;
    padding-left: 38px;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:hover,
.form-input:focus {
    border-color: #4d5ae5;
}

.form-input:focus+.icon-form {
    fill: #4d5ae5;
}

input::placeholder {
    color: #ffffff;
}

.icon-form {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-form:hover,
.icon-form:focus {
    fill: #4d5ae5;
}

.container-form-area {
    margin-bottom: 16px
}

.textarea {
    width: 100%;
    height: 120px;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    background-color: transparent;
    padding: 8px 16px;
    outline: transparent;
    resize: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.textarea:hover,
.textarea:focus {
    border-color: #4d5ae5;
}

.container-checkbox {
    margin-bottom: 24px;
}

.form-label-privacy {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.privacy-span {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 2px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1), fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    fill: transparent;
    margin-right: 8px;
}

input:checked+label>span {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}

.privacy-link {
    color: #4d5ae5;
}

.but-send {
    display: block;
    min-width: 169px;
    height: 56px;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    background-color: #4d5ae5;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    border-radius: 4px;
}

@media screen and (min-width: 768px) {
    .modal {
        width: 408px;
        padding: 72px 24px 24px 24px;
    }
}