body {
    font-family: "Roboto", sans-serif;
    color: #2e2f42;
    background-color: #fff;
}

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

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

address {
    font-style: normal;
}

button {
    cursor: pointer;
    font-family: inherit;
}

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

a {
    color: #434455;
    text-decoration: none;
}

.container {
    max-width: 1158px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/*---------------Header---------------*/

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

.header-container {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.header-logo {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e2f42;
    font-family: "Raleway", sans-serif;
    margin-right: 76px;
}

.header-logo-span {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
}

.header-link:hover,
.header-link:focus {
    color: #404bbf;
    text-decoration: none;
}

.address {
    font-style: normal;
}

.address-link:hover,
.address-link:focus {
    color: #404bbf;
    text-decoration: none;
    font-style: normal;
}

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

.header-link.inline {
    color: #404bbf;
}

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

.header-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    display: inline-block;
    padding-top: 24px;
    padding-bottom: 24px;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    padding: 24px 0;
}

.address-link {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    font-style: normal;
    display: inline-block;
    padding-top: 24px;
    padding-bottom: 24px;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/*---------------Main Tittle---------------*/

.main-title {
    background: #2e2f42;
    padding-top: 188px;
    padding-bottom: 188px;
}

.main-title-background {
    margin: 0 auto;
    max-width: 1440px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)),
    url('../images/office-bg.jpg');
}

.main-title-name {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07143;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    display: block;
    margin: 0 auto;
    max-width: 496px;
    margin-bottom: 48px;
}

.main-title-button {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background: #4d5ae5;
    cursor: pointer;
    border-radius: 4px;
    padding: 16px 32px;
    border: none;
    display: block;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/*---------------Our Features---------------*/

.features {
    padding-top: 120px;
    padding-bottom: 120px;
}

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

.features-list {
    display: flex;
    flex: 1;
    gap: 24px;
}

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

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

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

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

/*---------------Our Team---------------*/

.team {
    background: #f4f4fd;
    padding: 120px 0;
}

.team-link {
    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: #fff;
}

.team-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    display: block;
    margin-bottom: 72px;
}

.team-list {
    display: flex;
    flex: 1;
    gap: 24px;
}

.team-link {
    width: calc((100% - 24px * 3) / 4);
    border-radius: 0 0 4px 4px;
}

.team-link-wrapper {
    display: flex;
    flex-direction: column;
    padding: 32px 16px;
    gap: 8px;
}   

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

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

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

.team-item-icon {
    width: 40px;
    height: 40px;
}

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

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

.team-icon {
    fill: #f4f4fd;
}

/*---------------Our Portfolio---------------*/

.portfolio {
    padding: 120px 0;
}

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

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

.portfolio-link {
    width: calc((100% - 24px * 2) / 3);
    display: block;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-link:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-link:hover {
    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-image-wrapper {
    position: relative;
    overflow: hidden;
}

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

.portfolio-link-wrapper {
    display: flex;
    flex-direction: column;
    padding: 32px 16px;
    gap: 8px;
    border-left: 1px solid #e7e9fc;
    border-right: 1px solid #e7e9fc;
    border-bottom: 1px solid #e7e9fc;
    border-top: none;
}

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

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

/*---------------Footer---------------*/

.footer {
    background: #2e2f42;
    /*flex-direction: column;*/
    /*padding-top: 100px;
    padding-bottom: 100px;*/
    /*justify-content: center;*/
    padding: 100px 0;
}

.footer-container {
    display: flex;
    align-items: baseline;
    /*gap: 120px;*/
}

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

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

.footer-logo-span {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
}

.footer-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    max-width: 264px;
    /*margin-top: 16px;*/
}

.footer-icon-wrapper{
    margin-left: 120px;
}

.footer-icon-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
    font-family: "Roboto", sans-serif;
}

.footer-icon-list {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 16px;
}

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

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

.footer-icon {
    fill: #f4f4fd;
}

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

.footer-subscribe-wrapper {
    margin-left: auto;
}

.footer-subscribe-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
}

.footer-subscribe-form {
    display: flex;
    gap: 24px;
}

.footer-subscribe-label {}

.footer-subscribe-input {
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: transparent;
    min-width: 264px;
    min-height: 40px;
    flex-shrink: 0;
    padding-left: 16px;
    border-radius: 4px;
    border: 1px solid #fff;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
    outline: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-subscribe-input:focus {
    border-color: #31d0aa;
}

.footer-subscribe-input::placeholder {
    color: #fff;
}

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

.footer-subscribe-button:hover,
.footer-subscribe-button:focus {
    background-color: #31d0aa;
}

.footer-subscribe-icon {
    fill: #fff;
    margin-left: 16px;
}

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

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

.backdrop-modal {
    background-color: #fcfcfc;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px;
    border-radius: 4px;
    box-shadow:
        0 1px 1px 0 rgb(0 0 0 / 14%),
        0 1px 3px 0 rgb(0 0 0 / 12%),
        0 2px 1px 0 rgb(0 0 0 / 20%);
    transform: translate(-50%, -50%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.backdrop-modal-svg-close-button {
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop-modal-close-button:hover .backdrop-modal-svg-close-button,
.backdrop-modal-close-button:focus .backdrop-modal-svg-close-button {
    fill: #ffffff;
}

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

.backdrop-modal-input {
    font-size: medium;
    color: #2e2f42;
    background-color: transparent;
    width: 100%;
    height: 40px;
    padding-right: 16px;
    padding-left: 38px;
    border: 1px solid rgb(46 47 66 / 40%);
    border-radius: 4px;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop-modal-input:hover,
.backdrop-modal-input:focus {
    border: 1px solid #4d5ae5;
}

.backdrop-modal-input:required {
    border: 1px solid tomato;
}

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

.backdrop-modal-label-input {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.17;
    letter-spacing: 0.04em;
    text-align: left;
    color: #8e8f99;
    display: block;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.backdrop-input-wrapper {
    position: relative;
}

.backdrop-modal-field {
    margin-bottom: 8px;
}

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

.backdrop-modal-field-comment {
    margin-bottom: 16px;
}

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

.backdrop-modal-text-area:hover,
.backdrop-modal-text-area:focus {
    border: 1px solid #4d5ae5;
}

.backdrop-modal-check-label {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.17;
    letter-spacing: 0.04em;
    text-align: left;
    color: #8e8f99;
    display: flex;
    align-items: center;
    gap: 8px;
}

.backdrop-modal-field-checkbox {
    margin-bottom: 24px;
}

.backdrop-modal-policy-link {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}

.backdrop-modal-check-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border: 1px solid rgb(46 47 66 / 40%);
    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);
    background-color: transparent;
}

.backdrop-check-icon {
    fill: #f4f4fd;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop-modal-check:checked+.backdrop-modal-check-label>.backdrop-modal-check-box {
    background-color: #404bbf;
    border: none;
    /*fill: #8e8f99;*/
}

.backdrop-modal-check:checked+.backdrop-modal-check-label .backdrop-modal-check-box .backdrop-check-icon {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.backdrop-modal-send-button {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #e7e9fc;
    background-color: #4d5ae5;
    display: block;
    min-width: 169px;
    height: 56px;
    margin-right: auto;
    margin-left: auto;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 4px 0 rgb(0 0 0 / 15%);
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop-modal-send-button:hover,
.backdrop-modal-send-button:focus {
    color: #e7e9fc;
    background-color: #404bbf;
    cursor: pointer;
}
