*,
*::before,
*::after {
    box-sizing: border-box;
}

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

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

p {
    margin: 0;
}

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

a {
    text-decoration: none;
}

address {
    font-style: normal;
}

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

.section {
    padding: 120px 0;
}

.section-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2E2F42;
}

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

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

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

.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 {
    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;
    justify-content: space-between;
}

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

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

.logo-accent {
    color: #4D5AE5;
}

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

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

.header-menu-link::after {
    background-color: #404BBF;
    content: '';
    border-radius: 2px;
    width: 100%;
    height: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.header-menu-link.current::after {
    opacity: 1;
}

.header-menu-link:hover,
.header-menu-link:focus {
    color: #404BBF;
}

.header-contacts-list {
    display: flex;
    gap: 40px;
    align-items: center;
}

.header-contacts-link {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-contacts-link:hover,
.header-contacts-link:focus {
    color: #404BBF;
}

.hero {
    background-color: #2E2F42;
    padding: 188px 0;
    max-width: 1440px;
    margin: 0 auto;
    background-image:linear-gradient( 
        to bottom,
        rgba(46,47,66,0.7),
        rgba(46, 47, 66, 0.7)),
        url(../images/PeopleOffice.jpg);

    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;    
}

.hero-title {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    color: #fff;
    max-width: 496px;
    margin-bottom: 48px;
    text-align: center;
}

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

.hero-btn:hover,
.hero-btn:focus {
    background-color: #404BBF;
}

.features-title {
    text-align: left;
}

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

.features-item {
    width: calc((100% - 72px) / 4);
}

.features-item .icon-box {
    border: 1px solid #8E8F99;
    border-radius: 4px;
    background: #F4F4FD;
    display:flex;
    justify-content: center;
    align-items: center;
    height: 112px;
}


.features-subtitle {
    margin: 8px 0;
}

.team {
    background-color: #F4F4FD;
}

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

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

.team-item {
    background-color: #fff;
    width: calc((100% - 72px) / 4);
    border-radius: 0 0 4px 4px;
    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-content {
    padding: 32px 16px;
    text-align: center;
}

.team-subtitle {
    margin-bottom: 8px;
}

.team-social-links {
    display:flex;
    gap: 24px;
    margin-top: 8px;
    /* flex-wrap: wrap; */
}

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

.team-social-links-item .social-link:hover,
.team-social-links-item .social-link:focus {
    background-color: #404BBF;
}

.social-links-icon {
    fill: #F4F4FD;
}

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

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

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

.portfolio-item: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);
    cursor: pointer;
}

.portfolio-item-wrapper {
    position: relative;
    overflow: hidden;
}

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

.portfolio-item:hover .portfolio-item-text {
    transform: translateY(0);
}

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

.portfolio-subtitle {
    margin-bottom: 8px;
}

.footer {
    background-color: #2E2F42;
    padding: 100px 0;
}

.footer-wrapper {
    display: flex;
    align-items: baseline;
}

.footer-link {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #F4F4FD;
    margin-bottom: 16px;
    display: block;
}

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

.social-links-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
}

.social-links-container {
    margin-left: 120px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

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

.social-links-item .social-link:hover,
.social-links-item .social-link:focus {
    background-color: #31D0AA;
}

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

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

.subscribe-form {
    margin-top: 16px;
    display:flex;
    gap: 24px;
}

.subscribe-input {
    border: 1px solid #fff;
    border-radius: 4px;
    width: 264px;
    height: 40px;
    background-color: transparent;
    padding: 8px 16px;
    color: #FFF;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
}

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

.subscribe-input::placeholder {
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
}

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

.subscribe-btn:hover,
.subscribe-btn:focus {
    background-color: #31D0AA;
}

.subscribe-icon {
    fill: #fff;
}


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

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

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

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 408px;
    min-height: 584px;
    background-color: #fcfcfc;
    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);
    border-radius: 4px;
    transform: translate(-50%, -50%);
    padding: 72px 24px 24px 24px;
}

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

.modal-close:hover,
.modal-close:focus {
    background-color: #404BBF;
}

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

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

.modal-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
}

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

.modal-field:nth-child(4) {
    margin-bottom: 16px;
}

.modal-field:last-of-type {
    margin-bottom: 24px;
}

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

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

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

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

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

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

.modal-text-area {
    resize: none;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    width: 100%;
    height: 120px;
    background-color: transparent;
    padding: 8px 16px;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-text-area:focus {
    border-color: #4d5ae5;
}

.modal-text-area::placeholder {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
}

.modal-check:checked + .modal-check-label span {
    background-color: #404bbf;
    border: none;
}

.modal-check:checked + .modal-check-label .modal-check-icon {
    fill: #f4f4fd;
}

.modal-check-label {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.33333;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: flex;
    align-items: center;
    position: relative;

    /* a {
        line-height: 1.33333;
        text-decoration: underline;
        text-decoration-skip-ink: none;
        color: #4d5ae5;
    } */
}

.modal-check-label a {
    line-height: 1.33333;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}

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

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

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


.modal-send:hover,
.modal-send:focus {
    background-color: #404BBF;
}