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

h1,h2,h3,p {
    margin: 0;
}

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

a {
    text-decoration: none;
}

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

textarea {
    resize: none;
}

.container { 
    max-width: 1158px; 
    margin: 0 auto; 
    padding: 0 15px;
}
.page-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;
}
.page-nav {
  display: flex;
  align-items: center;
}
.header-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;
    margin-right: 76px;
}
.header-logo {
    padding: 24px 0;
    margin-right: 76px;
}
.header-logo .logo-part {
    color: #2e2f42;
}
.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

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

.contacts {
    font-style: normal;
    margin-left: auto;
}

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

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

.nav-link:hover,.nav-link:focus,.contacts-link:hover,.contacts-link:focus,.nav-link.current {
    color: #404bbf;
}

.section-hero {
    max-width: 1440px;
    margin: 0 auto;
    background: #2e2f42;
    padding: 188px 0;
    background-position: center;
    background-size: cover;
    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;
}
.title-hero {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    max-width: 496px;
    margin-bottom: 48px;
    margin: 0 auto 48px;
}
.btn-order {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: #4d5ae5;
    display: block;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-order:hover, .btn-order:focus {
    background-color: #404bbf;
}
.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;
}
.section-features {
    padding: 120px 0;
}
.features-list {
    display: flex;
    gap: 24px;
}
.features-items {
    flex-basis: calc((100% - 3 * 24px) / 4);
}
.features-wrapper {
    border: 1px solid #8e8f99;
    border-radius: 4px;
    background-color: #f4f4fd;
    padding: 24px 100px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;

}
.features-item {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
}
.features-item {
    margin-bottom: 8px;
}
.features-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.strategy-antenna {
    color: #404bbf;
}

.section-team {
    background: #f4f4fd;
    padding: 120px 0;
}
.mean-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    text-transform: capitalize;
    margin-bottom: 72px;
}
.team-list {
    display: flex;
    gap: 24px;
}

.team-item {
    background: #fff;
    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);
    flex-basis: calc((100% - 3 * 24px) / 4);
    border-radius: 0px 0px 4px 4px;
}
.team-title-text {
    padding: 32px 0;
    margin-bottom: 8px;
}
.team-title {
    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;
    margin-bottom: 8px;
}

.social-list {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.socials-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4d5ae5;
    fill: #F4F4FD;
    stroke: #F4F4FD;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.socials-link:hover,
.socials-link:focus {
    background-color: #404bbf;
}
.portfolio {
    padding-top: 120px;
    padding-bottom: 120px;
}
.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 48px;
}
.portfolio-item {
    background: #fff;
    flex-basis: calc((100% - 2 * 24px) / 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);
    transform: translateY(0%)
}
.thumb {
    position: relative;
    overflow: hidden; 
}
.overlay-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    text-align: left;
    background-color: #4d5ae5;
    padding: 40px 32px;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item:hover .overlay-text {
    transform: translateY(0);
}
.portfolio-item-container {
    border: 1px solid #e7e9fc;
    border-top: none;
    padding: 32px 16px;
}
.portfolio-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
    margin-bottom: 8px;
}
.portfolio-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
}

.page-footer {
    background: #2e2f42;
    padding-top: 100px;
    padding-bottom: 100px;
}
.footer-container {
    display: flex;
    align-items: flex-start;
    align-items: baseline;

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

.footer-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;
    display: inline-block;
    margin-bottom: 16px;
}

.footer-logo .logo-part {
    color: #f4f4fd;
}
.footer-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    max-width: 264px;
}
.social-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
}
.footer-social-list{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.socials-link.footer-link:hover,
.socials-link.footer-link:focus {
    background-color: #31d0aa;
}

.socials-link.footer-link:active {
    background-color: #31d0aa;
}

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

.subscribe-form {
    display: flex;
    align-items: center;
    gap: 24px;
}
.subscribe-input {
    padding-top: 8px;
    padding-left: 16px;
    padding-bottom: 8px;
    background: none;
    border: 1px solid #fff;
    border-radius: 4px;
    width: 264px;
    height: 40px;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em; 
    color: #ffffff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}
 .subscribe-input::placeholder {
    color: #bbb;
}

.btn-subscribe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: none;
    border-radius: 4px;
    padding: 8px 24px;
    width: 165px;
    background-color: #4d5ae5;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
    min-width: 165px;
}

.subscribe-icon {
    fill: #fff;
}

.btn-subscribe:hover,
.btn-subscribe:focus {
    background-color: #404bbf;
}
.backdrop {

    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);
}
.backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
     
    width: 408px;
    min-height: 584px;
    border-radius: 4px;
    padding: 72px 24px 24px 24px;

    transform: translate(-50%, -50%);

    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;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
    
.backdrop:not(.is-open) .modal {
    transform: translate(-50%, -100%);
}

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

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

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

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

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

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

.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-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    border-color: #4D5AE5;
}
.form-input:focus+svg {
    fill: #4d5ae5;;
}

.form-textarea {
    margin-bottom: 16px;
}
.form-comment {
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); 
}
.form-comment:focus {
    border-color: #4D5AE5;
}

.form-field textarea:focus::placeholder {
    color: rgba(46, 47, 66, 0.4);
}

.modal-terms {
    margin-bottom: 24px;
}

.modal-terms-text {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99
}
.privacy-policy {
    line-height: 1.34;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}
.modal-terms-checkbox {
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    width: 16px;
    height: 16px;

    display: inline-flex;
    justify-content: center;
    align-items: center;
    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);
}
.modal-terms-checkbox:active {
    background-color: #404BBF;
}
.modal-icon {
    fill: #f4f4fd;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
input:checked+label>span {
    background-color: #404bbf;
    border: none;
    fill: #F4F4FD
}
.form-button {
    display: block;
    cursor: pointer;
    margin: 0 auto;
    border-radius: 4px;
    border: none;
    min-width: 169px;
    height: 56px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: #4d5ae5;
    font-family: "Roboto", sans-serif; 
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-button:hover,
.form-button:focus {
    background-color: #404bbf;
}