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

body:has(.backdrop.is-open) {
    overflow: hidden;
}
/*reset*/

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

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

a {
text-decoration: none;
}

img {
    display: block;
}

/*common */

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

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

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

.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 {
    padding: 24px 0;
    margin-right: 76px;
}

.header-logo .logo-part {
    color: #2e2f42;
}

.footer-logo .logo-part {
   color: #f4f4fd;
}

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

/* hero */

.hero {
    max-width: 1440px;
    height: 600px;
    background-color: #2e2f42;
    padding-top: 188px;
    padding-bottom: 188px;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), 
    rgba(46, 47, 66, 0.7)), url(../images/people-office.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0 auto;

}

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

}

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

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

/* features */

.section-two {
    padding: 120px 0;
    }

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

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

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

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

.features-list {
            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;
}

/* team */

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

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

.team-img {
    background-color: #fff;
    width: calc((100% - 72px) / 4);
    border-radius: 0px 0px 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-list {
            font-weight: 500;
        font-size: 20px;
        line-height: 1.2;
        letter-spacing: 0.02em;
        text-align: center;
        color: #2e2f42;
        margin-bottom: 8px;
}

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

.team-container {
    padding: 32px 0;
}

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

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

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

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

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

.team-soc-icon {
    fill: #f4f4fd;
}


/* portfolio */

.section-four {
    padding: 120px 0 120px 0;
}

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

.item-portfolio {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 48px;
}

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

.portfolio-app {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

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

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

.portfolio-list: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-list:hover .transform {
transform: translateY(0%);
}


.port-transform {
position: relative;
overflow: hidden;
}

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

/* footer */
.page-footer {
    background-color: #2e2f42;
    padding: 100px 0;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 16px;
}

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

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

.social-list {
    display: flex;
    gap: 16px;
}

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

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

.social-icon {
    fill: #f4f4fd;
}

.social-item {
    width: 40px;
    height: 40px;
}

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

.footer-info {
    margin-right: 120px;
}  

.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;
    padding: 72px 24px 24px 24px;
    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;
        border-radius: 4px;
        transform: translate(-50%, -50%);
        transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop:not(.is-open) .modal {
    transform: translate(-50%, -100%);
}

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

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

.modal-btn:hover,
.modal-btn:focus {
    border: none;
    fill: #fff;
    background-color: #404bbf;

}

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

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

.form {
    margin-bottom: 16px;
}

.modal-form-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: block;
    margin-bottom: 4px;
}
.modal-form-input {
    display: block;
    width: 100%;
    height: 58px;
    padding: 11px 38px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    outline: transparent;
        border-radius: 4px;
        width: 360px;
        height: 40px;
        transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
        background-color: transparent;
}

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

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

.modal-form-wrapper {
    margin-bottom: 8px;
position: relative;
}

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

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

.modal-form-message::placeholder {
    color: rgba(46, 47, 66, 0.4);
}

.form-agreement {
    margin-bottom: 24px;
}

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

input:checked + label > span {
background-color: #404bbf;
fill: #f4f4fd;
border: none;
}

.agreement-checkbox-icon {
    fill: #f4f4fd;
    
}

.agreement-wrapper {
    font-weight: 400;
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #8e8f99;
}

.accent-text {
    line-height: 1.3;
        text-decoration: underline;
        text-decoration-skip-ink: none;
        color: #4d5ae5;
}

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

.sub-input {
    width: 264px;
    height: 40px;
    border: 1px solid #ffffff;
    background-color: transparent;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    padding-left: 16px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    color: #ffffff;
}

.sub-btn {
    min-width: 165px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    background-color: #4D5AE5;
    border: none;
    border-radius: 4px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.container-sub {
    margin-left: 80px;
}

.sub-btn:hover {
    background-color: #404bbf;
}

.sub-input::placeholder {
    color: #fff;
}