:root {
    --footer-color: #f4f4fd;
    --primary-brand: #4d5ae5;
    --pressed-state: #404bbf;
    --dark: #2e2f42;
    --success: #31d0aa;
    --text: #434455;
    --subtle-text: #8e8f99;
    --accent: #e7e9fc;
    --light: #f4f4fd;
    --white: #ffffff;
    --modal-background: #fcfcfc;
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: "Roboto", sans-serif;
    color: var(--text);
    background-color: var(--white);
}

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

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

.header {
    border-bottom: 1px solid var(--accent);
    background-color: var(--white);
    box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 1px 6px rgba(46, 47, 66, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--primary-brand);
    text-decoration: none;
    margin-right: 76px;
}

.logo-span {
    color: var(--dark);
}

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

.nav-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--dark);
    text-decoration: none;
    padding: 24px 0;
    display: block;
    transition: color var(--transition);
    position: relative;
}

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

.nav-link.current {
    color: var(--pressed-state);
}

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

.contacts {
    font-style: normal;
}

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

.contact-link {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.contact-link:hover,
.contact-link:focus {
    color: var(--pressed-state);
}

.hero {
    background-color: var(--dark);
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
        url('../images/hero-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    max-width: 1440px;
    margin: 0 auto;
    padding: 188px 0;
    text-align: center;
}

.hero-title {
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    color: var(--white);
    max-width: 496px;
    margin: 0 auto 48px;
}

.hero-btn {
    background-color: var(--primary-brand);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: var(--white);
    cursor: pointer;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    min-width: 169px;
    transition: background-color var(--transition);
}

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

.section {
    padding: 120px 0;
}

.section-title {
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    text-align: center;
    color: var(--dark);
    margin-bottom: 72px;
}

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

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

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

.features-svg {
    width: 64px;
    height: 64px;
}

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

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

.team {
    background-color: var(--light);
}

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

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

.team-card-content {
    padding: 32px 0;
}

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

.team-role {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--text);
    margin-bottom: 8px;
}

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

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

.social-link {
    width: 100%;
    height: 100%;
    background-color: var(--primary-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}

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

.social-svg {
    fill: var(--light);
    width: 16px;
    height: 16px;
}

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

.portfolio-item {
    width: calc((100% - 48px) / 3);
    transition: box-shadow var(--transition);
}

.portfolio-item:hover {
    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);
}

.portfolio-image-wrapper {
    position: relative;
    overflow: hidden;
}

.portfolio-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-brand);
    color: var(--light);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform var(--transition);
}

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

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

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

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

.footer {
    background-color: var(--dark);
    padding: 100px 0;
}

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

.footer-logo-box {
    margin-right: 120px;
}

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

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

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

.footer-social-box {
    display: flex;
    flex-direction: column;
}

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

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

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

.footer-social-link {
    width: 100%;
    height: 100%;
    background-color: var(--primary-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}

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

.footer-social-svg {
    fill: var(--light);
    width: 24px;
    height: 24px;
}

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

svg {
    fill: currentColor;
}