:root {
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --green: #31d0aa;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cornflower: #e7e9fc;
  --cloud: #f4f4fd;
  --navy-blue-modal: #2e2f4266;
  --gray: 46 47 66;
  --white: #fff;
  --dairy: #fcfcfc;
  --font-family: "Roboto", sans-serif;
  --second-family: "Raleway", sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--white);
  color: var(--slate);
}

img {
  display: block;
}

ul,
ol {
  list-style: none;
  margin-block-start: 0;
  margin-block-end: 0;
  padding-inline-start: 0;
}

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

p {
  margin-block-start: 0;
  margin-block-end: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.page-header {
  border-bottom: 1px solid var(--cornflower);
  box-shadow:
    0px 2px 1px rgba(var(--gray) / 0.08),
    0px 1px 1px rgba(var(--gray) / 0.16),
    0px 1px 6px rgba(var(--gray) / 0.08);
}

.header-wrapper {
  display: flex;
  align-items: center;
}

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

.header-logo {
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
  display: flex;
  align-items: center;
  flex-direction: row;
  max-height: max-content;
  padding: 24px 0;
  margin-right: 76px;
}

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

.nav-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  max-height: max-content;
  gap: 40px;
}

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

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

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

.nav-link:hover::after,
.nav-link:focus::after {
  opacity: 1;
}

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

.contacts {
  font-style: normal;
  margin-left: auto;
}

.contacts .contacts-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-direction: row;
  gap: 40px;
}

.contacts-link {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
  white-space: nowrap;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 188px 0;
  background-image:
    linear-gradient(rgba(var(--gray) / 0.7), rgba(var(--gray) / 0.7)),
    url("../images/people-office.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  max-width: 1440px;
}

.hero-title {
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  margin-block-end: 48px;
  text-align: center;
  color: var(--white);
}

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

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

.benefits {
  display: flex;
  align-items: center;
  padding: 120px 0;
  width: 100%;
}

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

.benefits-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.benefits-item {
  flex-basis: calc((100% - 72px) / 4);
}

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

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

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

.our-team {
  display: grid;
  align-items: center;
  align-content: center;
  padding: 120px 0;
  background-color: var(--cloud);
  width: 100%;
}

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

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

.our-team .our-team-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.our-team-item {
  border-radius: 0 0 4px 4px;
  padding-block: 0px 32px;
  padding-inline: 0px;
  width: 264px;
  height: 428px;
  box-shadow:
    0 2px 1px 0 rgba(var(--gray) / 0.08),
    0 1px 1px 0 rgba(var(--gray) / 0.16),
    0 1px 6px 0 rgba(var(--gray) / 0.08);
  background-color: var(--white);
}

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

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

.our-team-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

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

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

.our-team-icon {
  fill: var(--cloud);
}

.our-portfolio {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  padding: 120px 0;
}

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

.our-portfolio-item {
  width: calc((100% - 48px) / 3);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 1px 0 rgba(var(--gray) / 0),
    0 1px 1px 0 rgba(var(--gray) / 0),
    0 1px 6px 0 rgba(var(--gray) / 0);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.our-portfolio-item:hover {
  box-shadow:
    0 2px 1px 0 rgba(var(--gray) / 0.08),
    0 1px 1px 0 rgba(var(--gray) / 0.16),
    0 1px 6px 0 rgba(var(--gray) / 0.08);
  cursor: pointer;
}

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

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

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

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

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

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

.page-footer {
  width: 100%;
  padding: 100px 0;
  background-color: var(--navy-blue);
  margin: 0 auto;
  align-content: center;
}

.footer-logo {
  display: inline-block;
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
  margin-bottom: 16px;
}

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

.page-footer .footer-descr {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);
  max-width: 272px;
}

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

.footer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: flex-start;
}

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

.footer-socials-title {
  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(--iris);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-social-icon {
  fill: var(--cloud);
}
