.hidden {
  display: none;
}
body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #fff;
}

/* reset */

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

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

a {
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

/* common */

.container {
  max-width: 320px;
  padding: 0 16px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding: 0 15px;
  }
}

/* header */

.page-header {
  border-bottom: 1px solid #e7e9fc;
  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);
}

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

.nav-list,
.contacts {
  display: none;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

.header-logo {
  padding: 16px 0;
  display: block;
}

.header-logo .logo-part {
  color: #2e2f42;
}

.burger-btn {
  padding: 0;
  border: none;
  background-color: transparent;
  display: block;
  fill: #2f2f37;
}

@media screen and (min-width: 768px) {
  .burger-btn {
    display: none;
  }
  .header-nav {
    display: flex;
    align-items: center;
  }
  .nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
  }
  .header-logo {
    padding: 24px 0;
    margin-right: 120px;
  }

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

  .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background-color: #404bbf;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .contacts {
    font-style: normal;
    display: block;
  }

  .contacts-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .contacts-link {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-link:hover,
  .nav-link:focus,
  .contacts-link:hover,
  .contacts-link:focus,
  .nav-link.current {
    color: #404bbf;
  }
}

@media screen and (min-width: 1158px) {
  .header-logo {
    margin-right: 76px;
  }
  .contacts-list {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .contacts-link {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
}

/* mobile menu */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;

  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-nav {
  margin-bottom: auto;
}

.mobile-menu-nav-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mobile-menu-nav-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mobile-menu-nav-link:hover,
.mobile-menu-nav-link:focus,
.mobile-menu-nav-link.current {
  color: #404bbf;
}

.mobile-menu-contacts {
  margin-bottom: 48px;
}

.mobile-menu-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-style: normal;
}

.mobile-menu-contacts-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-contacts-link:hover,
.mobile-menu-contacts-link:focus {
  color: #4d5ae5;
}

.mobile-social-media-list {
  display: flex;
  gap: 40px;
  padding: 0;
  margin: 0;
  justify-content: center;
  list-style: none;
}

.mobile-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-media-link:hover,
.mobile-media-link:focus {
  background-color: #31d0aa;
}

.mobile-social-icon {
  fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}

/* hero-banner */

.hero-banner {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 320px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-banner {
  text-align: center;
  padding: 72px 0;
}

.page-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 216px;
  margin-left: auto;
  margin-right: auto;
}

.hero-banner-btn {
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  padding: 16px 32px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 72px;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-banner-btn:hover,
.hero-banner-btn:focus {
  background-color: #404bbf;
}

/* hero-banner-background-image */

/* mobile */

@media (max-width: 767px) and (min-resolution: 96dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      <img srcset= "./images/photo.jpg 1x, ./img/photo@2x.jpg 2x" src=
        "./images/.jpg" alt= "" / > (../images/dark-bg-1x.jpg);
  }
}

@media (max-width: 767px) and (min-resolution: 192dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/dark-bg-2x.jpg);
  }
}

/* tablet */

@media (min-width: 768px) and (min-resolution: 96dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/dark-bg-tab-1x.jpg);
  }
}

@media (min-width: 768px) and (min-resolution: 192dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/dark-bg-tab-2x.jpg);
  }
}

/* desctop */

@media (min-width: 1158px) and (min-resolution: 96dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/people-office-1x.jpg);
  }
}

@media (min-width: 1158px) and (min-resolution: 192dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/people-office-2x.jpg);
  }
}

@media screen and (min-width: 768px) {
  .hero-banner {
    max-width: 768px;
    padding: 112px 0;
  }
  .page-title {
    font-size: 56px;
    line-height: 107%;
    max-width: 496px;
  }
  .hero-banner-btn {
    margin-top: 36px;
  }
}

@media screen and (min-width: 1158px) {
  .hero-banner {
    max-width: 1440px;
    padding: 188px 0;
  }
  .page-title {
    max-width: 496px;
  }
  .hero-banner-btn {
    margin-top: 48px;
  }
}

/* benefits */

.benefits {
  padding: 96px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(100%);
}

.benefits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  width: 100%;
}

.benefits-icon {
  display: none;
}

.benefits-subtitle {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

.benefits-descr {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #434455;
}

@media screen and (min-width: 768px) {
  .benefits-list {
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }
  .benefits-list-item {
    width: calc((100% - 24px) / 2);
  }
  .benefits-subtitle {
    text-align: start;
  }
}

@media screen and (min-width: 1158px) {
  .benefits {
    padding: 120px 0;
  }
  .benefits-list {
    gap: 24px;
  }
  .benefits-list-item {
    width: calc((100% - 72px) / 4);
  }
  .benefits-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4fd;
    height: 112px;
    margin-bottom: 8px;
    border: 1px solid #8e8f99;
    border-radius: 4px;
  }
  .benefits-icon-item {
    display: flex;
    margin: 24px auto;
  }
  .benefits-subtitle {
    font-weight: 500;
    font-size: 20px;
    line-height: 120%;
  }
  .benefits-descr {
    font-weight: 400;
  }
}

/* team-members */

.team-members {
  background-color: #f4f4fd;
  padding: 98px 12px;
}

.team-members-title {
  margin-bottom: 72px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.team-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  width: 100%;
}

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

.team-members-list-item {
  background-color: #fff;
  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);
}

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

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

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

.social-list {
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
  justify-content: center;
  list-style: none;
}

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

.social-icon {
  fill: #f4f4fd;
}

.social-link:hover,
.social-link:focus {
  background-color: #404bbf;
}

@media screen and (min-width: 768px) {
  .team-members {
    background-color: #f4f4fd;
    padding: 98px 92px;
  }
  .team-members-list {
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 64px;
    column-gap: 24px;
  }
  .team-members-list-item {
    width: calc((100% - 24px) / 2);
  }
}

@media screen and (min-width: 1158px) {
  .team-members {
    background-color: #f4f4fd;
    padding: 120px 0;
  }
  .team-members-list {
    display: flex;
    gap: 24px;
    padding: 0 16px;
  }
  .team-members-list-item {
    width: calc((100% - 72px) / 4);
  }
}

/* portfolio */

.portfolio {
  padding: 96px 0;
}

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

.portfolio-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  width: 100%;
}

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

.portfolio-card {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

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

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

.overlay {
  display: none;
}

@media screen and (min-width: 768px) {
  .portfolio-card-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }
  .portfolio-list-item {
    width: calc((100% - 24px) / 2);
  }
}

@media screen and (min-width: 1158px) {
  .portfolio {
    padding: 120px 0;
  }
  .portfolio-card-list {
    row-gap: 48px;
    column-gap: 24px;
  }
  .portfolio-list-item {
    width: calc((100% - 48px) / 3);
    box-shadow: none;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .thumb {
    position: relative;
    overflow: hidden;
  }
  .overlay {
    display: flex;
    position: absolute;
    top: 0;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    padding: 40px 32px;
    color: #f4f4fd;
    background-color: #4d5ae5;
    width: 100%;
    height: 100%;
    transform: translatey(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .portfolio-list-item-descr {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    color: #f4f4fd;
  }

  .portfolio-list-item:hover .overlay {
    transform: translatey(0%);
  }

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

/* footer */

.page-footer {
  background-color: #2e2f42;
}
