* {
    box-sizing: border-box;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}
ul {
    margin: 0;
    padding-left: 0;
    list-style: none;}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
a {text-decoration: none; color: inherit;}



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

body {
    font-family: 'Roboto', sans-serif;
    color: #434455;
    background-color: #ffffff;
    line-height: 1.5;
}
ul {
    list-style-type: none;
}
.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;

}

.logo {
    font-family: "Raleway", sans-serif;
    line-height: 1.17;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    margin-right: 76px;
  
}
    .logo-web {color: #2e2f42;}
    .nav-list {display: flex;
    gap: 40px}

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

 .nav-link.current { position: relative;

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

 .nav-link:hover,
 .nav-link:focus {
            color: #404bbf;
        }
 .contacts {margin-left: auto;
     font-style: normal;
 }
 .contacts-list {
     display: flex;
     gap: 40px;
 }

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

 .contact-link:hover,
 .contact-link:focus,.nav-link.current {
     color: #404bbf;
 }
.main-page {
    text-align: center;
    padding: 188px 0;
    max-width: 1440px;
    margin: 0 auto;

    background-image:
        linear-gradient(rgba(46, 47, 66, 0.7),
            rgba(46, 47, 66, 0.7)),
        url('../images/people-office1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #2e2f42;
}

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

.order-button {
    background: #4d5ae5;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.04em;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    padding: 16px 32px;
    border-radius: 4px;
    display: inline-block;
    min-width: 169px;
    height: 56px;
    border: none;
   display: block;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
    .order-button:hover,
    .order-button:focus {
                    background: #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; }

    .features {padding: 120px 0;} 
    .features-icon { height: 112px;
              background-color: #f4f4fd;
                 border-radius: 4px;
             display: flex;
            align-items: center;
            justify-content: center;
             margin-bottom: 8px;
            border: 1px solid #8e8f99;
        }
    .features .features-title{
        font-size: 20px;
       font-weight: 500;
       line-height: 1.2;
        letter-spacing: 0.02em;
        color: #2e2f42;
        margin-bottom: 8px;}   
   .features-list {
       display: flex;
       gap: 24px;
   }
.features-item {
    flex: 0 1 calc((1158px - 24px * 3) / 4);
}

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



  .team { padding: 120px 0;
      background: #f4f4fd;
    
      text-align: center;
  }

  .team-title {
      color: #2e2f42;
      font-weight: 500;
      font-size: 36px;
      line-height: 1.11;
     letter-spacing: 0.02em;
    
      text-align: center;
      margin: 0 0 72px;
      text-transform: capitalize
      
      }
.team-item {
    background: #fff;
    border: 1px solid #e7e9fc;
    border-radius: 0 0 4px 4px;
    flex: 0 1 calc((1158px - 24px * 3) / 4);
    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);}
 .team-card {
            padding: 32px 0;
         }
.team-list {
    display: flex;
    gap: 24px;
}

.team-name {
    color: #2e2f42;
    letter-spacing: 0.02em;
     font-size: 20px;
    line-height: 1.2;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}
.team-job {
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}
.socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
}
.socials-item {
    width: 40px;
    height: 40px;
}
.socials-link { 
    width: 100%;
        height: 100%;
        border-radius: 50%;

         background-color: #4d5ae5;
          display: flex;
            align-items: center;
            justify-content: center;
            color: #f4f4fd;
            transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
        }

.socials-link:hover, .socials-link:focus {
    background-color: #404bbf;
}
.socials-icon {
    display: block;
    fill: currentColor;
    
}
.socials-icon {
    display: block;
}

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

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

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

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


.portfolio-item:hover,
.portfolio-item:focus {
    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-thumb {
    position: relative;
    overflow: hidden;
}


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

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

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



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



.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus .portfolio-overlay {
    transform: translateY(0);
}

.footer {
    background-color: #2e2f42;
    padding-top: 100px;
    padding-bottom: 100px;
}

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


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


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

.footer-web {
    color: #f4f4fd;
}


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


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



.footer .socials {
    display: flex;
    gap: 16px;
   
}



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

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


.socials-icon {
    display: block;
    fill: currentColor;
}


.footer .socials-link:hover,
.footer .socials-link:focus {
    background-color: #31d0aa;
}
.footer-subscribe {
    margin-left: auto;
}

.footer-subscribe-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;

    letter-spacing: 0.02em;
    color: #ffffff;
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    gap: 24px;
    align-items: center;
}

.subscribe-field {
    display: flex;

       flex-direction: column;
       width: 100%;
    max-width: 264px;
}

.subscribe-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #ffffff;
    margin-bottom: 4px;
}

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

.subscribe-input::placeholder {
    color: #ffffff;
}

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

.subscribe-button {
    display: inline-flex;
    justify-content: center;
      align-items: center;  min-width: 165px;
    height: 40px;
    border-radius: 4px;

    border: none;
    background-color: #4d5ae5;
    font-weight: 500;
       font-size: 16px;
     
    line-height: 1.5;
      letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.subscribe-icon {
    margin-left: 16px;
    fill: #ffffff;
}
.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%;

    transform: translate(-50%, -50%);
    width: 408px;
     min-height: 584px;
    background: #fcfcfc;
    border-radius: 4px;
    padding: 72px 24px 24px 24px;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14),
        0px 1px 3px rgba(0, 0, 0, 0.12), 0px 2px 1px rgba(0, 0, 0, 0.2);
          transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    justify-content: center;
    height: 24px;
    border-radius: 50%;
      padding: 0;

    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #e7e9fc;
    display: flex;
    align-items: center;
    
    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-icon {
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-close-btn:hover,
.modal-close-btn:focus {
     background-color: #404bbf;
    border: none;
}



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

.modal-title {
    font-weight: 500;
    font-size: 16px;

     line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
    margin-bottom: 16px;
}
.form-field {
    margin-bottom: 8px;
}

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

.input-wrapper {
    position: relative;
}
.form-input {
    width: 100%;
    height: 40px;

     border-radius: 4px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    background-color: transparent;
    padding-left: 38px;
     outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input:hover,
.form-input:focus {
    border-color: #4d5ae5;
}
.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus+.form-icon {
    fill: #4d5ae5;
}
.comment-field {
    margin-bottom: 16px;
}

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

.comment-input:hover,
.comment-input:focus {
    border-color: #4d5ae5;
}

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

.checkbox-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    cursor: pointer;
}
.checkbox-label:hover .checkbox-custom {
    border-color: #404bbf;
}

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

.checkbox-input:checked+.checkbox-label .checkbox-custom {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}

.checkbox-link {
    color: #4d5ae5;
    text-decoration: underline;
}
.modal-submit-btn {
    display: block;
    margin: 0 auto;
    min-width: 169px;
    height: 56px;
    border-radius: 4px;
    border: none;
      font-family: "Roboto", sans-serif;
     
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #ffffff;
    background-color: #4d5ae5;
    cursor: pointer;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-submit-btn:hover,
.modal-submit-btn:focus {
    background-color: #404bbf;
}