.hidden {
    display: none;
}

:root {
    --iris: #4d5ae5;
    --ocean: #404bbf;
    --navy-blue: #2e2f42;
    --green: #31d0aa;
    --slate: #434455;
    --light-slate: #8e8f99;
    --cornflower: #e7e9fc;
    --cloud: #f4f4fd;
    --navy-blue-modal: rgba(46, 47, 66, 0.4);
    --grey: rgba(46, 47, 66, 0.7);
    --white: #fff;
    --dairy: #fcfcfc;
}

/*base*/
body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-weight: 400;
}

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

a {
    text-decoration: none;
}

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

h2 {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    text-align: center;
    color: #2e2f42;
}

ul,
ol {
    list-style-type: none;
    margin: 0;
    padding-left: 0;
}

button {
    margin: 0;
    padding: 0;
    border-color: transparent;
    background-color: transparent;
    cursor: pointer;
}

/*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;
    }
}

section {
    padding: 96px 0;
}

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

.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;
}
/*header*/

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

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

.nav-list, .contacts {
    display: none;
}

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

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

.header-studio {
    color: #2e2f42;
}

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

@media screen and (min-width: 768px) {
    .burger-btn {
        display: none;
    }
    .header-logo {
        padding: 24px 0;
        margin-right: 120px;
    }
    .header-nav {
        display: flex;
        align-items: center;
    }
    .nav-list {
        display: flex;
        align-items: center;
        gap: 40px;
    }
    .menu-nav {
        display: block;
        font-weight: 500;
        color: #2e2f42;
        padding: 24px 0;
        transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .studio-psevdoclass {
        position: relative;
        color: #404bbf;
    }
    
    .studio-psevdoclass::after {
        content: "";
        width: 100%;
        position: absolute;
        display: block;
        bottom: -1px;
        top: 68px;
        background-color: #404BBF;
        border-radius: 2px;
        height: 4px;
    }
    .menu-nav:hover,
    .menu-nav:focus {
        color: #404bbf;
    }
    .contacts {
        display: block;
        font-style: normal;
        color: #434455;
    }
    .contacts-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .mail-tel {
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #434455;
        display: block;
        transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mail-tel:hover,
    .mail-tel:focus {
        color: #404bbf;
    }
}

@media screen and (min-width: 1158px) {
    .header-logo {
        margin-right: 76px;
    }
    .contacts-list {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }
    .mail-tel {
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
        padding: 24px 0;
    }
    
}

/*mobile menu*/
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.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-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    fill: #2E2F42;
    background-color: #E7E9FC;
    width: 24px;
    height: 24px;
    border-radius: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    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);
}

.mobile-menu-modal-close:hover, .mobile-menu-modal-close:focus {
    border: none;
    background-color: #404bbf;
}

.mobile-menu-modal-close:hover>.mobile-menu-modal-close-svg,
.mobile-menu-modal-close:focus>.mobile-menu-modal-close-svg {
    fill: #ffffff;
}

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

.mobile-menu-nav-list {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 40px;
}

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

.mobile-menu-nav-list-studio {
    color: #404bbf
}

.mobile-menu-contacts-list {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

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

.mobile-menu-mail-tel:hover, .mobile-menu-mail-tel:focus {
    color: #4D5AE5;
}

.mobile-menu-icon-pack {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: row;
    gap: 40px;
}

.mobile-menu-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #4d5ae5;
    border-radius: 50%;
}

.mobile-menu-icon-svg {
    fill: #f4f4fd;
}

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

/*modal*/
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);
   
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

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

.contact-form-paragraph {
    font-weight: 500;
    text-align: center;
    color: #2E2F42;
    margin-bottom: 16px;
}

.contact-form-input-wrapper {
    margin-bottom: 8px;
}

.contact-form-input {
    border: 1px solid rgba(46, 47, 66, 0.4);
    padding: 11px 38px 11px 38px;
    border-radius: 4px;
    width: 100%;
    height: 40px;
    background-color: transparent;
    color: #2E2F42;
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.contact-form-inputsvg-wrapper {
    fill: #2e2f42;
    position: relative;
}

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

.contact-form-input:focus~.contact-form-svgs {
    fill: #4d5ae5;
}

.contact-form-textarea-wrapper {
    margin-bottom: 16px;
}

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

.contact-form-textarea:focus {
    border-color: #4d5ae5;
}

.contact-form-textarea::placeholder {
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    font-size: 12px;
}

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

.contact-form-checkbox-wrapper {
    display: flex;
    margin-bottom: 24px;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 8px;
}

.contact-form-custom-checkbox {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    margin-right: 8px;
    fill: transparent;
    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);
}

.contact-form-checkbox-input:checked+.contact-form-checkbox-label>.contact-form-custom-checkbox {
    background-color: #404bbf;
    border: none;
    fill: var(--cloud);
}

.contact-form-checkbox-input:focus+.contact-form-checkbox-label>.contact-form-custom-checkbox {
    border-color: #404bbf;
}

.contact-form-custom-checkbox-svg {
    display: block;
    fill: #fff;
    visibility: hidden;
    transition: visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-checkbox-input:checked+.contact-form-checkbox-label .contact-form-custom-checkbox-svg {
    visibility: visible;
}

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

.contact-form-checkbox-label-link {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    line-height: 1.33333;
    color: var(--iris);
}

.contact-form-submit-button {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    padding: 16px 32px;
    min-width: 169px;
    height: 56px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background: #4d5ae5;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.5;
    border: none;
    text-align: center;
    color: #fff;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
        
.contact-form-submit-button:hover,
.contact-form-submit-button:focus {
    background-color: #404BBF;
}

@media screen and (min-width: 768px) {
    .mobile-contact-form-modal {
        max-width: 408px;
        min-height: 584px;
    }
}

/*hero section*/
.first-section {
    background-color: #2e2f42;
    padding: 72px 0;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/hero/background-hero.jpg);
    min-width: 320px;
    min-height: 432px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0 auto;
}

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

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

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

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

@media screen and (min-width: 768px) {
    .first-section {
        padding: 112px 0;
        min-width: 768px;
        min-height: 436px;
    }
    .slogan {
        font-size: 56px;
        line-height: 1.07143;
        max-width: 496px;
        margin-bottom: 36px;
    }
}

@media screen and (min-width: 1158px) {
    .first-section {
        padding: 188px 0;
        max-width: 1440px;
    }
    
    .slogan {
        max-width: 496px;
        margin-bottom: 48px;
    }
}

/*benefits section*/

.icon-bnf {
    display: none;
}

.bnf-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
    justify-content: center;
    align-items: center;
}

.bnf-li {
    flex: 1 1 100%;
}

.bnf-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 8px;
}

.bnf-text {
    font-weight: 500;
    color: #434455;
}

@media screen and (min-width: 768px) {
    .bnf-list {
        gap: 72px 24px;
    }
    .bnf-title {
        text-align: start;
    }
    .bnf-li {
        flex: 1 1 calc((100% - 72px) / 2);
    }
}

@media screen and (min-width: 1158px) {
    .icon-bnf {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 264px;
        height: 112px;
        background-color: #F4F4FD;
        border: 1px solid #8E8F99;
        border-radius: 4px;
        margin-bottom: 8px;
    }
    .icon-bnf svg {
        width: 64px;
        height: 64px;
        margin: 0;
    }
    .bnf-title {
        font-weight: 500;
        font-size: 20px;
        line-height: 1.2;
    }
    
    .bnf-list {
        gap: 24px;
    }
    .bnf-li {
        flex: 1 1 calc((100% - 72px) / 4);
    }
}

/*team section*/
.section-team {
    background-color: #f4f4fd;
}

.team-title {
    margin-bottom: 72px;
}

.team-list {
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 72px;
}

.name-and-job-container {
    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);
    background: #ffffff;
}

.names {
    padding-top: 32px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
    color: #2e2f42;
}

.work {
    text-align: center;
    margin-bottom: 8px;
}

.icon-pack-team {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    padding-bottom: 32px;
}

.team-list-elem {
    width: 40px;
    height: 40px;
}

.svg-team-li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 50%;
    background-color: #4d5ae5;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.svg-team-li:hover,
.svg-team-li:focus {
    background-color: #404BBF;
}

.svg-manage {
    display: block;
    fill: var(--cloud);
}

@media screen and (min-width: 768px) {
    .team-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 64px 24px;
    }
    .team-card {
        width: ((100% - 24px) / 2);
    }
}

/*portfolio section*/
.portfolio-title {
    margin-bottom: 72px;
}

.portfolio-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.portfolio-list-elements {
    display: block;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0%);
}

.portfolio-list-elements:hover,
.portfolio-list-elements:focus {
    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);
}

.portfolio-list-elements:hover p,
.portfolio-list-elements:focus p {
    transform: translateY(0%);
}

.portfolio-list-elements:hover .portfolio-overlay,
.portfolio-list-elements:focus .portfolio-overlay {
    transform: translateY(0);
}

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

.portfolio-img img {
    width: 288px;
    height: 280px;
    object-fit: cover;
    display: block;
}

.examples-names {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    color: #2e2f42;
    margin-bottom: 8px;
}

.type-of-examples:hover {
    fill: var(#F4F4FD)
}

.portfolio-content {
    border-bottom: 1px solid #e7e9fc;
    border-left: 1px solid #e7e9fc;
    border-right: 1px solid #e7e9fc;
    padding: 32px 16px;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    color: #f4f4fd;
    background-color: #4d5ae5;
    width: 100%;
    height: 100%;
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 768px) {
    .portfolio-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 72px 24px;
    }
    .portfolio-list-elements {
        width: ((100% - 24px) / 2);
    }
    .portfolio-img img {
        width: 356px;
        height: 300px;
    }
}

@media screen and (min-width: 1158px) {
    .portfolio-list {
        gap: 48px 24px;
    }
    .portfolio-list-elements {
        width: ((100% - 48px) / 3);
    }
    .portfolio-img img {
        width: 360px;
        height: 300px;
    }
}

/*footer*/
.footer {
    background-color: #2e2f42;
}

.container-footer {
    padding-top: 96px;
    padding-bottom: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 72px;
}

.footer-logo {
    display: block;
    margin-bottom: 16px;
    text-align: center;
}

.footer-text {
    color: #F4F4FD;
    width: 288px;
}

.footer-studio {
    color: #f4f4fd;
}

.footer-section-text {
    font-weight: 500;
    text-align: center;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-sm-container {
    margin: 0 auto;
}

.icon-pack-footer {
    display: flex;
    gap: 16px;
}

.icon-footer {
    width: 40px;
    height: 40px;
}

.svg-footer-li svg {
    display: block;
}

.svg-footer-li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    background-color: #4d5ae5;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.svg-footer-li:hover,
.svg-footer-li:focus {
    background-color: #31d0aa;
}

.svg-footer {
    fill: #f4f4fd;
}

.footer-subs-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.footer-subs-input::placeholder {
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #ffffff;
    opacity: 0.6;
}

.footer-subs-inputemail-container {
    display: flex;
}

.footer-subs-button {
    align-self: center;
    background-color: #4d5ae5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    border-radius: 4px;
    padding: 8px 24px;
    width: auto;
    height: 40px;
    gap: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-send-icon {
    fill: #fff;
}

.footer-subs-button:hover,
.footer-subs-button:focus {
    background-color: #404BBF;
}

@media screen and (min-width: 768px) {
    .container-footer {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 72px;
        justify-content: baseline;
        align-items: flex-start;
    }
    .footer-logo {
        text-align: start;
    }
    .footer-text {
        width: 264px;
    }
    .footer-sm-container {
        margin: 0;
    }
    .footer-section-text {
        text-align: start;
    }
    .footer-subs-form {
        flex-direction: row;
        gap: 16px;
    }
}

@media screen and (min-width: 1158px) {
    .container-footer {
        flex-wrap: nowrap;
        gap: 0;
    }
    .logo-footer-container {
        margin-right: 120px;
    }
    .footer-sm-container {
        margin-right: 80px;
    }
}