:root {
    --iris: #4d5ae5;
    --ocean: #404bbf;
    --navy-blue: #2e2f42;
    --green: #31d0aa;
    --slate: #434455;
    --light-slate: #8e8f99;
    --cornflower: #e7e9fc;
    --cloud: #f4f4fd;
    --navy-blue-modal: rgba(46, 47, 66, 0.4);
    --grey: rgba(46, 47, 66, 0.7);
    --white: #fff;
    --dairy: #fcfcfc;
}

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

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

img {
    display: block;
}

a {
    text-decoration: none;
}

body {
    font-family: Roboto, sans-serif;
    font-size: 16px;
    color: var(--slate);
    background-color: var(--white);
    font-weight: 400;
}

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

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

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

/* header */
.header .container {
    display: flex;
    align-items: center;
}

.header {
    border-bottom: 1px solid var(--cornflower);
    align-items: center;
    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);
    background: var(--white);
}

.header-logo,
.header-logo-web {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.header-logo {
    color: var(--navy-blue);
}

.header-logo-web {
    color: var(--iris);
}

.nav {
    margin-left: 76px;
}

.nav-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--navy-blue);
    padding-top: 24px;
    padding-bottom: 24px;
    display: block;
    position: relative;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active {
    color: var(--ocean);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    background-color: var(--ocean);
    border-radius: 2px;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--ocean);
}

.contacts {
    margin-left: auto;
}

.contacts-link {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
    font-style: normal;
    padding-top: 24px;
    padding-bottom: 24px;
    display: block;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover,
.contacts-link:focus {
    color: var(--ocean);
}

.contacts ul {
    display: flex;
    gap: 40px;
}

/* hero */
.hero {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;

    background-color: #2e2f42;

    background-image:
        linear-gradient(var(--grey), var(--grey)),
        url("../images/people-office-bg.jpg");

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    text-align: center;
    padding-top: 188px;
    padding-bottom: 188px;
}

.hero-title {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    color: #ffffff;
    max-width: 496px;
    margin: 0 auto 48px;
}

.hero-btn {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    background: var(--iris);
    color: var(--white);
    cursor: pointer;
    padding: 16px 32px;
    border-radius: 4px;
    border: none;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.hero-btn:hover,
.hero-btn:focus {
    background-color: var(--ocean);
}

/* features */
.features {}

.features-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    width: 264px;
    margin-bottom: 8px;
    background-color: var(--cloud);
    border-radius: 4px;
    border: 1px solid var(--light-slate);
}

.our-features {
    color: var(--slate);
}

.features-grid {
    display: flex;
    gap: 24px;
}


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

.features-subtitle {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navy-blue);
    margin-bottom: 8px;
}

.features-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
}

/* team */
.team {
    background: var(--cloud);
}

.our-team {
font-weight: 700;
font-size: 36px;
line-height: 1.11111;
letter-spacing: 0.02em;
text-align: center;
color: var(--navy-blue);
margin-bottom: 72px;
}

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

.team-card {
    background-color: var(--white);
    width: calc((100% - 72px) / 4);
    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);
}

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

.team-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--navy-blue);
    margin-bottom: 8px;
}

.team-position {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--slate);
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
}

.team-social-link {
    width: 40px;
    height: 40px;
    background-color: var(--iris);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--cloud);

    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.team-social-link:hover,
.team-social-link:focus {
    background-color: var(--ocean);
}

.team-social-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* portfolio */
.portfolio {}

.our-portfolio {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--navy-blue);
    margin-bottom: 72px;
}

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

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

.portfolio-card:hover,
.portfolio-card:focus-within {
    box-shadow:
        0 2px 1px rgba(46, 47, 66, 0.08),
        0 1px 1px rgba(46, 47, 66, 0.16),
        0 1px 6px rgba(46, 47, 66, 0.08);
}

.portfolio-content {
    padding: 32px 16px;
    border: 1px solid var(--cornflower);
    border-top: none;
}

.portfolio-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navy-blue);
    margin-bottom: 8px;
}

.portfolio-position {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
}
.portfolio-thumb {
    position: relative;
    overflow: hidden;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;
    padding: 40px 32px;

    background-color: rgba(77, 90, 229, 0.9);

    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-overlay-text {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--cloud);
}

.portfolio-card:hover .portfolio-overlay {
    transform: translateY(0);
}

/* footer */
.footer {
    background: var(--navy-blue);
    padding-top: 100px;
    padding-bottom: 100px;
}

.footer-container {
    display: flex;
    align-items: baseline;
    gap: 0;
}
.footer-info {
    margin-right: 120px;
}

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

.footer-social-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--white);
    margin-bottom: 16px;
}

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

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

.footer-social-link:hover,
.footer-social-link:focus,
.footer-social-link:focus-visible {
    background-color: var(--green);
}
.footer-social-icon {
    width: 24px;
    height: 24px;
    fill: #f4f4fd;
}

.footer-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--cloud);
    max-width: 264px;
    margin-top: 16px;
}

.footer-logo,
.footer-logo-web {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.footer-logo {
    color: var(--cloud);
}

.footer-logo-web {
    color: var(--iris);
}

.footer-subscribe-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--white);
    margin-bottom: 16px;
}

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

.footer-subscribe-input {
    width: 264px;
    height: 40px;
    padding-left: 16px;

    background-color: transparent;
    border: 1px solid var(--white);
    border-radius: 4px;

    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: var(--white);

    outline: none;

    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-subscribe-input::placeholder {
    color: var(--white);
}

.footer-subscribe-input:focus {
    border-color: var(--green);
}

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

.footer-subscribe-btn:hover,
.footer-subscribe-btn:focus {
    background-color: var(--green);
}

.footer-subscribe-icon {
    fill: currentColor;
}

/* Modal */

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

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

    padding: 72px 24px 40px;
}

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

.modal-close {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    background-color: var(--cloud);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    position: absolute;
    top: 24px;
    right: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    line-height: 0;
    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: var(--navy-blue);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover,
.modal-close:focus {
    background-color: var(--iris);
    border: none;
}

.modal-close:hover .modal-close-icon,
.modal-close:focus .modal-close-icon {
    fill: var(--white);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 16px;

    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--navy-blue);
}

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

.modal-label {
    display: block;

    font-weight: 400;
    font-size: 12px;
    line-height: 1.16;
    letter-spacing: 0.04em;
    color: #8e8f99;
    margin-bottom: 4px;
}

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

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

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

.modal-input:hover,
.modal-input:focus {
    border-color: var(--iris);
}

.modal-input:hover+.modal-input-icon,
.modal-input:focus+.modal-input-icon {
    fill: var(--iris);
}

.modal-input::placeholder {
    font-size: 12px;
    line-height: 1.16;
    letter-spacing: 0.04em;
    color: var(--light-slate);
}

.modal-textarea {
    height: 120px;
    resize: none;
    padding: 8px 16px;
}

.modal-checkbox {
    margin-top: 16px;
    margin-bottom: 24px;
}

.modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 12px;
    line-height: 1.16;
    letter-spacing: 0.04em;
    color: var(--light-slate);
}

.modal-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 2px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-checkbox-custom svg {
    fill: var(--white);
    opacity: 0;
}

.modal-checkbox-input:checked+.modal-checkbox-label .modal-checkbox-custom {
    background-color: var(--iris);
    border: none;
}

.modal-checkbox-input:checked+.modal-checkbox-label .modal-checkbox-custom svg {
    opacity: 1;
}

.modal-checkbox-link {
    color: var(--iris);
    text-decoration: underline;
}

.modal-submit {
    display: block;
    margin: 0 auto;

    min-width: 169px;
    height: 56px;

    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;

    color: var(--white);
    background-color: var(--iris);

    border: none;
    border-radius: 4px;

    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);

    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-submit:hover,
.modal-submit:focus {
    background-color: var(--ocean);
}

.modal-submit {
    margin-top: 24px;
}