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

ul {
    list-style-type: none;
    margin-block: 0;
    padding-left: 0;
}
a {
    text-decoration: none;
}

h2, h3, h4, h5, h6 {
    color: #2e2f42;
    text-decoration: none;
}

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

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

.container {
    max-width: 320px;
    width: 100%;
    padding-left: 16px;  
    padding-right: 16px;
    margin: 0 auto;
}



.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;
    margin-right: auto;
    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: #2e2f42;
    padding-top: 24px;
    padding-bottom: 24px;
}
.accent {
    color: #4d5ae5;
}

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

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

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

.header-link:hover::after {
    width: 100%;
}

.link-active {
    color: #404bbf;
}

.link-active::after {
    content: "";
    position: absolute;
    border-radius: 2px;
    width: 100%;
    height: 4px;
    left: 0;
    display: inline-block;
    background-color: #404bbf;
    top: calc(100% - 3px);
}

.address {
    font-style: normal;
}

.address-list {
    display: none;
    gap: 40px;
    margin-left: auto;
}
 
.address-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);
}

.address-link:hover,
.address-link:focus {
    color: #404bbf;
}

.mob-menu-open {
    width: 24px;
    height: 24px;
    background-color: transparent;
    border: none;
}



.hero{
background-color: #2e2f42;
background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg-mob.jpg);
background-size: cover;
background-position: center;
width: 100%;
max-width: 1440px;
margin: 0 auto;
background-repeat: no-repeat;
}

@media screen and (min-resolution: 2x) {
    .hero {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg-mob-2x.jpg);
    }
}

.hero-container {
    padding-top: 72px;
    padding-bottom: 72px;
}

.hero-title {
font-weight: 700;
font-size: 36px;
line-height: 1.11;
letter-spacing: 0.02em;
text-align: center;
color: #fff;
max-width: 216px;
    margin: 0 auto;
    margin-bottom: 72px;
}

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

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


.features {
    padding-block: 96px;
}

.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-list {
    display: flex;
    gap: 72px;
    flex-wrap: wrap;
}

.features-item {
    width: 100%;
}

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

.features-text-container {
    display: flex;
    flex-wrap: wrap;
}

.features-subtitle {
    font-weight: 700;
font-size: 36px;
line-height: 1.11;
letter-spacing: 0.02em;
text-align: center;
margin: 0 auto;
color: #2e2f42;
margin-bottom: 8px;
}

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



.team {
background-color: #f4f4fd;
padding-block: 96px;
}

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

.team-list {
    display: flex;
    gap: 72px;
    flex-wrap: wrap;
    padding-left: 12px;
    padding-right: 12px;
}

.team-item {
    background-color: #fff;
    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);
    margin: 0 auto;
}

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

.socials-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding-top: 8px;
}

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

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

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

.team-subtitle {
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-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
text-align: center;
}


.portfolio {
    padding-block: 96px;
}

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

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

.portfolio-item {
    width: 100%;
    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-item-wrapper {
    position: relative;
    overflow: hidden;
}

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

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

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

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

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



.footer {
background-color: #2e2f42;
}

.footer-container {
width: 100%;
padding-top: 96px;
padding-bottom: 96px;
display: flex;
flex-wrap: wrap;
gap: 72px;
}

.footer-left-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
    max-width: 288px;
}

.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: #f4f4fd;
}
.accent {
    color: #4d5ae5;
}

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

.footer-socials {
    padding-left: 40px;
    padding-right: 40px;
}

.footer-socials-title {
    font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
text-align: center;
color: #fff;
}

.footer-socials-list {
    display: flex;
    gap: 16px;
    padding-top: 16px;
}

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

.footer-icon {
    fill: #f4f4fd;
}

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

.footer-subscribe-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    margin: 0 auto;
    color: #fff;
}

.footer-subscribe-form {
    display: flex;
        flex-wrap: wrap;
        gap: 16px;
    padding-top: 16px;
    align-items: center;
    justify-content: center;
}

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

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

.footer-input:focus {
    outline: transparent;
    border: 1px solid #31d0aa;
}

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

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

.subscribe-icon {
    fill: #fff;
    width: 24px;
    height: 24px;
}

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

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

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 288px;
    min-height: 623px;
    border-radius: 4px;
    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);
    padding: 72px 16px 24px 16px;
}

.modal-close-button {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-close-button:focus .modal-icon {
    fill: #fff;
}

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


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

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

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

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

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

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

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

.modal-textarea:focus {
    outline: transparent;
    border-color: #4d5ae5;
}

.modal-check-label {
    display: flex;
    align-items: center;
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

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

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

.modal-check:checked + .modal-check-label .check-mark {
    border: 1px solid #404bbf;
    background-color: #404bbf;
    fill: #f4f4fd;
}

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

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



.mob-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fcfcfc;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mob-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mob-menu-close {
    display: block;
    margin-left: auto;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
    
.mob-menu-close:hover,
.mob-menu-close:focus {
    background-color: #404bbf;
}
    
.mob-menu-close-icon {
    fill: #2E2F42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
    
.mob-menu-close:hover .mob-menu-close-icon {
    fill: #fff;
}
    
.mob-menu-close:focus .mob-menu-close-icon {
    fill: #fff;
}

.mob-menu-item:not(:last-child) {
    margin-bottom: 40px;
}

.mob-menu-link {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

.mob-menu-link:hover,
.mob-menu-link:focus {
    color: #404bbf;
}

.link-active {
    color: #404bbf;
}

.mob-menu-address {
    font-style: normal;
}

.mob-menu-address-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 48px;
}

.mob-menu-address-link {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.address-link-tel {
    color: #4d5ae5;
}

.address-link-email {
    color: #434455;
}

.mob-menu-address-link:hover,
.mob-menu-address-link:focus {
    color: #404bbf;
}

.mob-menu-socials-list {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

.mob-menu-item-icon {
    fill: #f4f4fd;
}

.mob-menu-social-link:hover,
.mob-menu-social-link:focus {
    background-color: #404bbf;
}





@media screen and (min-width: 768px) {
    .container {
        max-width: 768px;
    }

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

    .header-list {
        display: flex;
    }

    .address-list {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .address-link {
        font-size: 12px;
        line-height: 1.16667;
        letter-spacing: 0.04em;
    }

    .mob-menu-open {
        display: none;
    }

    .hero {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg-tab.jpg);
    }

    .hero { 
        @media screen and (min-resolution: 2x) {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg-tab-2x.jpg);
        }
    }

    .hero-container {
        padding-top: 112px;
        padding-bottom: 112px;
    }

    .hero-title {
        font-size: 56px;
        line-height: 1.07;
        max-width: 496px;
        margin-bottom: 36px;
    }

    .features-list {
        gap: 72px 24px;
    }

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

    .features-subtitle {
        margin-left: 0;
        text-align: left;
    }

    .team-list {
        gap: 64px 24px;
        padding-left: 92px;
        padding-right: 92px;
    }

    .team-item {
        width: calc((100% - 24px) / 2);
    }

    .portfolio-list {
        gap: 72px 24px;
    }

    .portfolio-item {
        width: calc((100% - 24px) / 2);
    }

    .footer-container {
        align-items: baseline;
        padding-left: 92px;
        padding-right: 92px;
        gap: 72px 24px;
    }

    .footer-left-container {
        max-width: 264px;
    }

    .footer-logo {
        margin-right: auto;
    }

    .footer-socials {
        padding-left: 0;
        padding-right: 0;
    }

    .footer-socials-title {
        text-align: left;
    }

    .footer-subscribe {
        margin-right: auto;
    }

    .footer-subscribe-title {
        text-align: left;
    }

    .footer-subscribe-form {
        gap: 24px;
    }

    .footer-input {
        width: 264px;
    }

    .modal {
        max-width: 408px;
        min-height: 584px;
        padding: 72px 24px 24px 24px;
    }

    .modal-check-label {
        flex-wrap: nowrap;
    }

    .mob-menu.is-open {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}


@media screen and (min-width: 1158px) {
    .container {
        max-width: 1158px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-container {
        gap: 0;
    }

    .header-logo {
        margin-right: 76px;
    }

    .address-list {
        flex-wrap: nowrap;
        align-items: baseline;
        flex-direction: row;
        gap: 40px;
    }

    .address-link {
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
    }

    .hero {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg.jpg);
    }

    .hero { 
        @media screen and (min-resolution: 2x) {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/main-bg-2x.jpg);
        }
    }

    .hero-container {
        padding-top: 188px;
        padding-bottom: 188px;
    }

    .hero-title {
        font-size: 56px;
        line-height: 1.07;
        max-width: 496px;
        margin-bottom: 48px;
    }

    .features {
        padding-block: 120px;
    }

    .features-list {
        gap: 24px;
    }

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

    .features-item-container {
        display: flex;
    }

    .features-text-container {
        margin-top: 8px;
    }

    .features-subtitle {
        font-weight: 500;
        font-size: 20px;
        line-height: 1.2;
    }

    .features-text {
        font-weight: 400;
    }

    .team {
        padding-block: 120px;
    }

    .team-list {
        gap: 24px;
        padding-left: 0;
        padding-right: 0;
    }

    .team-item {
        width: calc((100% - 24px * 3) / 4);
    }

    .portfolio {
        padding-block: 120px;
    }

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

    .portfolio-item {
        width: calc((100% - 24px * 2) / 3);
        box-shadow: none;
        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);
    }

    .footer-container {
        padding-top: 100px;
        padding-bottom: 100px;
        flex-wrap: nowrap;
    }

    .footer-socials {
        margin-left: 120px;
    }

    .footer-subscribe {
        margin-left: auto;
        margin-right: 0;
    }
}