html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    font-size: 12px;
    background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

p {
    margin: 0;
}

ul {
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    list-style-type: none;
}

img {
    display: block;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1158px;
    margin: 0 auto;
    padding: 0 15px 0 15px;
}

.nav-conteiner {
    display: flex;
    align-items: center;
}

.nav-item {
    padding: 24px 0;
}

.navigation {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.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);
}

.nav-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;
}

.nav-item-link.current {
    color: #404bbf;
    position: relative;
}

.nav-item-link::after {
    content: '';
    border-radius: 2px;
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    background-color: #404bbf;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-link:hover::after,
.nav-item-link:focus::after,
.nav-item-link.current::after {
    opacity: 1;
}

.accent-header {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e2f42;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-list .nav-item-link {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    background-color: #ffffff;
}

.nav-item-link {
    padding: 24px 0;
    position: relative;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-link:hover,
.nav-item-link:focus,
.nav-item-link.current {
    color: #404bbf;
}

.contacts {
    font-style: normal;

}

.contacts-list {
    display: flex;
    gap: 40px;
}

.contacts-list .contacts-item-link {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}

.contacts-item-link {
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-item-link:hover,
.contacts-item-link:focus {
    color: #404bbf;
}

.section-title {
    background-color: #2E2F42;
    padding: 188px 0;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/title.jpeg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    max-width: 1440px;
    margin: auto;
}

.title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;
    text-transform: capitalize;
    max-width: 496px;
    margin: 0 auto;

}

.title-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;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    margin-top: 48px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    ;
}

.title-button:hover,
.title-button:focus {
    background-color: #404BBF;
}

.section-post-title {
    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;
}

.post-title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
    text-transform: capitalize;
}

.post-title-list {
    display: flex;
    gap: 24px;
}

.post-title-item {
    width: calc((100% - 72px) / 4);
}

.post-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    background-color: #f4f4fd;
    border-radius: 4px;
    border: 1px solid #8e8f99;
    margin-bottom: 8px;
}

.post-title-subtitle {
    margin-bottom: 8px;
}

.subtitle {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

.text {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}

.section-team {
    background-color: #F4F4FD;
    padding: 120px 0;
}

.our-team {
    background-color: #FFFFFF;
}

.team-list {
    display: flex;
    gap: 24px;
}

.team-item {
    width: calc((100% - 72px) / 4);
    border-radius: 0px 0px 4px 4px;
    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);
}

.people {
    padding: 32px 0;
}

.team-subtitle {
    text-align: center;
    margin-bottom: 8px;
}

.team-post-title {
    margin-bottom: 72px;
}

.team-text {
    text-align: center;
    margin-bottom: 8px;
}

.team-list-img {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

.team-social-item {
    width: 40px;
    height: 40px;
}

.team-social-img {
    fill: #f4f4fd;
}

.team-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);
}

.team-social-link:hover,
.team-social-link:focus {
    background-color: #404bbf;
}

.section-portfolio {
    padding: 120px 0;
}

.portfolio-post-title {
    margin-bottom: 72px;
}

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    row-gap: 48px;
}

.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);
    background: #fff;

}

.portfolio-item:hover .portfolio-img-text {
    transform: translateY(0);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item {
    width: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card {
    position: relative;
    overflow: hidden;
}

.portfolio-img-text {
    position: absolute;
    top: 0;
    left: 0;
    color: #f4f4fd;
    background-color: #4d5ae5;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.app {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

.portfolio-subtitle {
    margin-bottom: 8px;
}

.footer {
    background-color: #2E2F42;
    padding: 100px 0;
}

.footer-contain {
    display: flex;
    align-items: baseline;
}

.footer-conteiner {
    margin-right: 120px;
}

.logo-footer {
    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;
}

.accent-footer {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #f4f4fd;
}

.footer-subscribe {

}

.text-footer {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    max-width: 264px;
    text-align: left;
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-social {
    margin-right: 80px;
}

.footer-list-img {
    display: flex;
    gap: 16px;
}

.footer-social-item {
    width: 40px;
    height: 40px;
}

.footer-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    display: flex;
    border-radius: 50%;
    align-items: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    justify-content: center;
}

.footer-link:hover,
.footer-link:focus {
    background-color: #31d0aa;
}

.footer-social-img {
    fill: #f4f4fd;
}

.footer-form {
    display: flex;
    gap: 24px;
}

.footer-input {
    border: 1px solid #fff;
    border-radius: 4px;
    background-color: transparent;
    width: 264px;
    height: 40px;
    line-height: 2;
    color: #ffffff;
    letter-spacing: 0.04em;
    padding-left: 16px;
    padding-right: 16px;
    outline: transparent;
    caret-color: #FFFFFF;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: center;
    transition: 250ms border-color linear;
    
    &::placeholder {
    font: 400 12px / 2 "Roboto", sans-serif;
    letter-spacing: 0.04em;
    color #ffffff;
    }
}

.subscribe-btn {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    padding: 8px 24px;
    min-width: 165px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4d5ae5;
    transition: 250ms background-color cubic-bezier(0.4, 0, 0.2, 1);
}

.subscribe-img {
    fill: #fff;
    align-items: center;
    justify-content: center;
    margin-left: 16px;
}

.subscribe-btn:hover,
.subscribe-btn:focus {
    background-color: #404BBF;
}

.modal-overlay {
   background-color: rgba(46, 47, 66, 0.4);
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 10;
   display: flex;
   justify-content: center;
   align-items: center;
   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);
}

.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    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;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 72px 24px 24px 24px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #e7e9fc;
    stroke-width: 1px;
    color: rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    top: 24px;
    right: 24px; 
    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);
}

.modal-close:hover,
.modal-close:focus {
    background-color: #404bbf;
    border: none;
    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;
    max-width: 360px;
    margin-bottom: 16px;
}

.icon-close {
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input {
    width: 100%;
    background-color: transparent;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    height: 40px;
    padding-left: 38px;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input:focus {
    border-color: #4d5ae5;
}

.modal-input:focus + .input-icon {
    fill: #4d5ae5;
}

.modal-input-label {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    margin-bottom: 4px;
}

.modal-field {
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    fill: #2E2F42;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-textarea-contain {
    margin-bottom: 16px;
}

.modal-textarea {
    width: 100%;
    height: 120px;
    padding-bottom: 16px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    background-color: transparent;
    padding: 8px 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    outline: transparent;
    resize: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-textarea:focus {
    border-color: #4D5AE5;
}

.modal-check-contain {
    margin-bottom: 24px;
}

.modal-check-label {
    align-items: center;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.modal-policy {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}

.modal-check:checked + .modal-check-label > .modal-check-box{
   background-color: #404bbf; 
   border: none;
   fill: #f4f4fd; 
}

.modal-check {
    display: flex; 
    transition: 250ms border-color linear;
}

.modal-check-box {
    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;
}

.modal-btn {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
    display: block;
    margin: 24px auto 0;
    border-radius: 4px;
    border: none;
    padding: 16px 32px;
    min-width: 169px;
    height: 56px;
    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: #4d5ae5;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn:hover,
.modal-btn:focus {
    background-color: #404BBF;
}