body {
  font-family: "Roboto", sans-serif;
  background-color: #ffffff;
  color: #434455;
}

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

button {
  cursor: pointer;
}

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

a {
  text-decoration: none;
}

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

address {
  font-style: normal;
}

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

/* common */

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

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

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

section {
  padding: 96px 0;
}
@media (min-width: 1158px) {
  section {
    padding: 120px 0px;
  }
}

/* header */

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

.navig-list,
.header-address {
  display: none;
}

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

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

.header-navig-link {
  color: #2e2f42;
}

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

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

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

  .navig-list {
    display: flex;
    align-items: center;
    gap: 40px;
  }

  .header-navig-logo {
    padding: 24px 0;
    margin-right: 120px;
  }

  .navig-link {
    display: block;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    padding: 24px 0;
  }

  .studio-link {
    color: #404bbf;
    position: relative;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .studio-link::after {
    content: "";
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
  }

  .header-address {
    display: block;
  }

  .address-list {
    display: flex;
    flex-direction: column;
    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);
  }
}

@media screen and (min-width: 1158px) {
  .header-navig-logo {
    margin-right: 76px;
  }

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

  .contacts-link:hover,
  .contacts-link:focus {
    color: #404bbf;
  }
}
/* mobile menu */

.mobile-menu {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.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;
  align-items: center;
  justify-content: center;
  background-color: rgba(253, 253, 255, 1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-bottom: 24px;
  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);
}

.icon-close {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mobile-menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  width: 151px;
  height: 200px;
}

.menu-list-link {
  display: block;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-list-studio {
  color: #404bbf;
}

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

.menu-address-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.menu-address-contacts {
  display: block;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-address-tel {
  color: #4d5ae5;
}

.mobile-menu-icons {
  display: flex;
  flex-direction: row;
  gap: 40px;
}

.team-social-list {
  width: 40px;
  height: 40px;
}

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

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

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

/* Hero Banner */

.hero-banner {
  background-color: #2e2f42;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 0;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/people-office-mobile.jpg");
  background-repeat: no-repeat;
  width: 320px;
  height: 432px;
  background-position: center;
  background-size: cover;
}

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

.hero-banner-text {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 72px;
  max-width: 216px;
}

.hero-banner-btn {
  background-color: #4d5ae5;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  border-radius: 4px;
  border: none;
  padding: 16px 32px;
  min-width: 169px;
  display: block;
  margin: auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/people-office-tablet.jpg");
    width: 768px;
    height: 100%;
    padding: 112px 0;
  }

  .hero-banner-text {
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 36px;
    max-width: 496px;
  }
  .hero-banner-btn {
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  }
}

@media (min-width: 1158px) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/people-office.jpg");
    width: 100%;
    height: 600px;
    padding: 188px 0;
  }

  .hero-banner-text {
    margin-bottom: 48px;
  }

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

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

/* benefits */

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

.benefits-variations {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}
.benefits-variations-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: left;
  color: #434455;
}

.benefits-icon-container {
  display: none;
}

@media (min-width: 768px) {
  .benefits-list {
    gap: 72px 24px;
  }

  .benefits-item {
    width: calc((100% - 24px) / 2);
  }
  .benefits-variations {
    text-align: left;
  }
}
@media (min-width: 1158px) {
  .benefits-list {
    gap: 24px;
  }

  .benefits-item {
    width: calc((100% - 72px) / 4);
  }
  .benefits-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    padding: 24px 100px;
    background-color: #f4f4fd;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    margin-bottom: 8px;
  }
  .benefits-variations {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
  }
  .benefits-variations-text {
    font-weight: 400;
  }
}

/* Our Team */

.our-team {
  background-color: #f4f4fd;
}

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

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

.team-member-item {
  background-color: #ffffff;
  align-items: center;
  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-member-info {
  padding: 32px 16px;
}

.team-member {
  text-align: center;
  margin-bottom: 8px;
}

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

.team-member-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .team-members-list {
    gap: 72px 24px;
  }
}
@media (min-width: 1158px) {
  .our-team-container {
    width: 1158px;
  }
  .team-members-list {
    gap: 24px;
  }
  .team-member-item {
    width: calc((100% - 72px) / 4);
  }
  .team-social-link:hover,
  .team-social-link:focus {
    background-color: #404bbf;
  }
}

/* Portfolio */

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

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

.portfolio-item {
  width: 100%;
  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 {
  position: relative;
  overflow: hidden;
}

.overlay-portfolio {
  position: absolute;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  top: 0;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  color: #f4f4fd;
  background-color: #4d5ae5;
  padding: 40px 32px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

@media (min-width: 768px) {
  .portfolio-list {
    gap: 72px 24px;
    justify-content: center;
  }

  .portfolio-item {
    width: calc((100% - 24px) / 2);
    box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08);
  }
}

@media (min-width: 1158px) {
  .portfolio-container {
    width: 1158px;
  }
  .portfolio-list {
    gap: 48px 24px;
  }

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

  .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);
    cursor: pointer;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Footer */

.footer {
  background-color: #2e2f42;
  color: #f4f4fd;
  padding-top: 96px;
  padding-bottom: 96px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
}

.footer-container-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 288px;
}

.footer-logo {
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

.footer-link-logo {
  color: #f4f4fd;
}

.footer-link-text {
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
}

.footer-container-social {
  width: 208px;
  height: 80px;
  margin-left: auto;
  margin-right: auto;
}

.footer-social-media {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

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

.footer-social-link {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  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-icon {
  fill: #f4f4fd;
}
.footer-container-form {
  text-align: center;
}

.footer-text-form {
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.footer-input {
  border: 1px solid #ffffff;
  border-radius: 4px;
  width: 288px;
  height: 40px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: transparent;
  padding-left: 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  opacity: 0.3;
}

.footer-input::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  opacity: 0.6;
}

.footer-btn {
  font-family: "Roboto", sans-serif;
  color: #ffffff;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  min-width: 165px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.footer-btn-icon {
  margin-left: 16px;
  fill: #ffffff;
}

@media (min-width: 768px) {
  .footer {
    padding-top: 108px;
    padding-bottom: 108px;
    padding-left: 108px;
    padding-right: 108px;
  }
  .footer-container {
    gap: 72px 24px;
    width: 552px;
  }

  .footer-container-logo {
    width: 264px;
  }

  .footer-container-social {
    margin-left: 0px;
  }

  .footer-social-media {
    text-align: left;
  }

  .footer-container-form {
    width: 453px;
    height: 80px;
  }

  .footer-text-form {
    margin-bottom: 16px;
    text-align: left;
  }
  .footer-form {
    flex-wrap: nowrap;
    gap: 24px;
  }
  .footer-input {
    width: 264px;
  }
}

@media (min-width: 1158px) {
  .footer {
    padding-top: 96px;
    padding-bottom: 96px;
  }
  .footer-container {
    width: 1158px;
    flex-wrap: nowrap;
    gap: 0;
    align-items: baseline;
  }

  .footer-container-logo {
    margin-right: 120px;
    justify-content: start;
  }

  .footer-container-social {
    margin-right: 80px;
  }

  .footer-input {
    opacity: 1;
  }

  .footer-input::placeholder {
    opacity: 1;
  }

  .footer-social-link:hover,
  .footer-social-link:focus {
    background-color: #31d0aa;
  }
}

/* Modal */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 288px;
  min-height: 623px;
  background: #fcfcfc;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 16px 24px;
  overflow-y: auto;
  position: absolute;
}

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

.icon-close {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

input {
  font-family: inherit;
}
.modal-text {
  margin-bottom: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

.form-container {
  margin-bottom: 8px;
}

.form-label {
  display: block;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}

.input-container {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding-left: 34px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container-comment {
  margin-bottom: 16px;
}

.form-comment {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-comment::placeholder {
  opacity: 0.5;
}

.form-privacy {
  margin-bottom: 24px;
}

.form-label-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.privacy-span {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  flex-shrink: 0;
}

.form-checkbox:checked + .form-label-privacy > .privacy-span {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}
.form-privacy-link {
  color: #4d5ae5;
  text-decoration: underline;
}

.form-btn {
  margin: 0 auto;
  display: block;
  font-family: "Roboto", sans-serif;
  border-radius: 4px;
  min-width: 169px;
  height: 56px;
  border: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px;
  }
}
@media (min-width: 1158px) {
  .btn-close:hover,
  .btn-close:focus {
    background-color: #404bbf;
    border: none;
    fill: #ffffff;
  }

  .form-input:focus {
    border-color: #4d5ae5;
  }
  .form-input:focus + .form-icon {
    fill: #4d5ae5;
  }

  .form-comment:focus {
    border-color: #4d5ae5;
  }
}
