*,
*::before,
*::after {
    box-sizing: border-box;
}

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

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

a {
    text-decoration: none;
    outline: none;
}

input,
textarea,
button {
    font: inherit;
}

button {
    cursor: pointer;
    color: currentColor;
    border: none;
}

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

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

body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #fff;
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1.5;
    font-weight: 400;
}

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

.section {
    margin: 0 auto;
    padding: 120px 0;
}

/* header */

.page-header {
    border-bottom: 1px solid #e7e9fc;
}

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

.header-nav {
    /* Box model */
    align-items: center;
    display: flex;
    /* Typography */
    text-decoration: none;
    color: #2e2f42;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.logo-header {
    margin-right: 76px;
    padding: 24px 0;
    /* Typography */
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e2f42;
    text-decoration: none;
}

.accent-header {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
}

.logo-header:hover, .logo-header:focus {
    text-decoration: underline;
    color: #404bbf;
}

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

.nav-link {
    padding: 24px 0;
    text-decoration: none;
    font-weight: 500;
    color: #2e2f42;
    display: block
}

.nav-link:hover, .nav-link:focus {
    color: #404bbf;
    text-decoration: underline;
}

.header-address {
    font-style: normal;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}

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

.address-link {
    padding: 24px 0;
    text-decoration: none;
    color: #434455;
    display: block;
}

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

/* main */
/* hero-section */

.hero-section {
    background-color: #2e2f42;
    color: #fff;
    text-align: center;
    padding: 188px 0;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    gap: 48px;
}

.hero-title {
    max-width: 496px;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07143;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
}

.order-button {
    border-radius: 4px;
    border: none;
    padding: 16px 32px;
    min-width: 169px;
    height: 56px;
    /* Typography */
    font-family: 'Roboto', sans-serif;
    background-color: #4d5ae5;
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
}

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

/* features-section */

.features-section {
    background-color: #fff;
}

.features-list {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.features-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
    flex-basis: calc((100% - 72px) / 4);
}

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

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

/* team-section */

.team-section {
    background: #f4f4fd;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

.team-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-basis: calc((100% - 72px) / 4);
    border-radius: 0 0 4px 4px;
    padding-bottom: 0;
    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);
    background: #fff;
}

.team-item-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 32px 16px;
}

.team-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
}

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

/* portfolio-section */

.portfolio-section {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

.portfolio-item-container {
    padding: 32px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    border-bottom: 1px solid #e7e9fc;
    border-left: 1px solid #e7e9fc;
    border-right: 1px solid #e7e9fc;
}

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

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

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

/* footer */

.page-footer {
    background-color: #2e2f42;
    color: #f4f4fd;
    padding: 100px 0;
    margin: 0 auto;
}

.logo-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 0px;
    margin-bottom: 16px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #f4f4fd;
    text-decoration: none;
}

.accent-footer {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
}

.logo-footer:hover, .logo-footer:focus {
    text-decoration: underline;
    color: #404bbf;
}

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