*,
*::before,
*::after {
  box-sizing: border-box;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

body {
  background-color: #fff;
  color: #434455;
  font-family: "roboto", sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
ul {
  text-decoration: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
}
a {
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}

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

.header {
  border-bottom: 1px solid #e7e9fc;
}
.header .container {
  display: flex;
  align-items: center;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.16667;
  letter-spacing: 0.03em;
  color: #2e2f42;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  margin-right: 76px;
  padding: 24px 0;
}
.logo-span {
  color: #4d5ae5;
}

.page-nav {
  display: flex;
  gap: 40px;
  /* margin-right: 332px; */
  /* padding: 24px 0; */
}
.page-nav .link {
  font-weight: 500;
  font-size: 16px;
  color: #2e2f42;
  letter-spacing: 0.02em;
  padding: 24px 0;
  display: block;
}

.address {
  margin-left: auto;
}

.contact {
  display: flex;
  gap: 40px;
}
.contact .link {
  font-style: normal;
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  padding: 24px 0;
  display: block;
}

.contact .link:hover,
.contact .link:focus,
.page-nav .link:hover,
.page-nav .link:focus,
.logo:hover,
.logo:focus {
  color: #404bbf;
}
.main-page-button:hover,
.main-page-button:focus {
  background-color: #404bbf;
}

.main-page .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.main-page {
  background-color: #2e2f42;
  padding: 188px 0;
}
.main-page-text {
  font-weight: 700;
  font-size: 56px;
  color: #fff;
  line-height: 1.07143;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 496px;
  margin-bottom: 48px;
}
.main-page-button {
  background-color: #4d5ae5;
  padding: 16px 32px;
  text-align: center;
  color: white;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}
/* hidden h2 in  section features */
.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;
}

/* region Features */

.features {
  padding: 120px 0;
}

.features-items {
  display: flex;
  gap: 24px;
}
.features-items li {
  width: calc((100% - (24px * 3)) / 4);
}

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

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

/* region Team */
.team {
  background-color: #f4f4fd;
  padding: 120px 0;
}
.team-items {
  display: flex;
  gap: 24px;
}

.team-link {
  background-color: #fff;
  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);
  border-radius: 0 0 4px 4px;
  width: calc((100% - (24px * 3)) / 4);
}

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

  padding-bottom: 72px;
}

.team-text-box {
  padding: 32px 16px;
}

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

  margin-bottom: 8px;
}
.team-items-title-describe {
  color: #434455;
  text-align: center;
  letter-spacing: 0.02em;
}

/* #region portfolio */

.portfolio {
  padding: 120px 0;
}

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

.portfolio-items {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}
.portfolio-items li {
  width: calc((100% - (24px * 2)) / 3);
}

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

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

/* #region footer */

.page-footer {
  padding: 100px 0;
}
.page-footer .container {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

.footer-description {
  color: #f4f4fd;
  max-width: 264px;
  /* margin-top: 16px; */
}
.page-footer {
  background-color: #2e2f42;
}

.logo-white {
  color: #f4f4fd;
}
