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

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

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

a {
  text-decoration: none;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

.container {
  width: 320px;
  padding: 0 16px;
  margin: 0 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;
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

/*          HEADER          */
.header {
  border-bottom: 1px solid #e7e9fc;
  min-width: 320px;
  margin: 0 auto;
  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;
}

.header-menu-list {
  display: none;
}

.header-menu-link.current {
  position: relative;
  color: #404bbf;
}

.header-menu-link.current::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -1px;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
}

.navigation {
  display: flex;
  align-items: center;
}

.header-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;
  margin-right: 120px;
  padding: 16px 0;
}

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

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

.header-menu-link:hover,
.header-menu-link:focus {
  color: #404bbf;
}

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

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

.contacts-list {
  display: none;
}

.open-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: none;
  padding: 0;
}

.mob-menu {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: #ffffff;
  padding: 24px 24px 40px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  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);
}

.close-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 0;
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: auto;
  margin-bottom: 24px;
}

.mob-navigation {
}
.mob-menu-list {
}
.mob-menu-item:not(:last-child) {
  margin-bottom: 40px;
}
.mob-menu-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mob-menu-link.current {
  color: #404bbf;
}

.mob-contacts {
}
.mob-contacts-list {
  margin-bottom: 48px;
}
.mob-contacts-item:not(:last-child) {
  margin-bottom: 24px;
}
.mob-contacts-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  &:focus {
    color: #4d5ae5;
  }
}

.mob-social-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mob-social-item {
  width: 40px;
  height: 40px;
}
.mob-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  fill: #f4f4fd;
  background-color: #4d5ae5;
  border-radius: 50%;
}
.social-icon {
}

/*          HERO          */

.hero {
  padding: 72px 0;
  background-color: #2e2f42;
  max-width: 1440px;
  min-width: 320px;
  margin: 0 auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url('../images/hero-bg-mob.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  @media screen and (min-resolution: 2x) {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url('../images/hero-bg-mob2x.jpg');
  }
}

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

.hero-btn {
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #4d5ae5;
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  border-radius: 4px;
  border: none;
  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-btn:hover,
.hero-btn:focus {
  background-color: #404bbf;
}
/*          ABOUT             */

.about-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 72px;
}

.about-icon-box {
  display: none;
  justify-content: center;
  align-items: center;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  height: 112px;
  background-color: #f4f4fd;
  margin-bottom: 8px;
}

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

.about-item {
  width: 100%;
}

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

/*          TEAM          */
.team {
  background-color: #f4f4fd;
}

.team-container {
  padding: 0 28px;
}

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

.team-item-info {
  padding: 32px 0;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  /* gap: 24px; */
  gap: 72px;
}

.team-item {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  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);
}
.team-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

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

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

.team-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  fill: #f4f4fd;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  /* &:hover,
  &:focus {
    background-color: #404bbf;
  } */
}

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

/*          PORTFOLIO          */

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

.portfolio-img-box {
  position: relative;
  overflow: hidden;
}

.portfolio-image {
  width: 100%;
  height: auto;
}

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

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

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

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

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

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

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

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

/*          FOOTER          */
.footer {
  padding-top: 96px;
  padding-bottom: 96px;
  background-color: #2e2f42;
  min-width: 320px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  align-items: center;
  justify-content: center;
}

.footer-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;
  display: block;
  margin-bottom: 16px;
  text-align: center;
}
.footer-logo-color {
  color: #f4f4fd;
}
.footer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 288px;
}

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

.footer-social-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

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

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  fill: #f4f4fd;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  /* &:hover,
  &:focus {
    background-color: #31d0aa;
  } */
}

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

.footer-sub-title {
  display: block;
}

.footer-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

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

.sub-input::placeholder {
  color: #ffffff;
}

.footer-sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  border-radius: 4px;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border: none;
  fill: #ffffff;
}

.footer-send-icon {
  margin-left: 16px;
}

/* MODAL */

.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  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);
}

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

.modal {
  background-color: #fcfcfc;
  width: 288px;
  min-height: 623px;
  padding: 72px 16px 24px 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  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);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close:hover,
.modal-close:focus {
  background-color: #404bbf;
  border: none;
}

.modal-btn-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover .modal-btn-icon,
.modal-close:focus .modal-btn-icon {
  fill: #ffffff;
}

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

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

.modal-input {
  height: 40px;
  padding-left: 38px;
  padding-right: 16px;
}

.input-wrapper {
  position: relative;
}

.modal-field {
  margin-bottom: 8px;
}

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

.modal-element {
  width: 100%;
  background-color: transparent;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  outline: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input:focus {
  border-color: #4d5ae5;
}

.modal-input:focus + .input-icon {
  fill: #4d5ae5;
}

.modal-textarea {
  height: 120px;
  padding: 8px 16px;
  resize: none;
  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);
}

.modal-textarea:focus {
  border-color: #4d5ae5;
}

.modal-textarea::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-field-textarea {
  margin-bottom: 16px;
}

.modal-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.policy-link {
  line-height: 1.33;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.modal-check:checked + .modal-check-label > .modal-fake-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.modal-fake-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  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);
  fill: transparent;
}

.modal-field-checkbox {
  margin-bottom: 24px;
}

.modal-btn {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  border: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

  /* Tablet HEADER */
  .header {
    min-width: 768px;
  }

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

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

  .contacts-link {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
  }

  .open-menu-btn {
    display: none;
  }

  /* Tablet HERO */
  .hero {
    padding: 112px 0;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url('../images/hero-bg-tab.jpg');

    @media screen and (min-resolution: 2x) {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url('../images/hero-bg-tab2x.jpg');
    }
  }

  .hero-title {
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 36px;
    max-width: 496px;
  }

  /* Tablet ABOUT */
  .about-list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 72px 24px;
  }

  .about-item {
    width: calc((100% - 24px) / 2);
  }

  .about-item-title {
    text-align: start;
  }

  /* Tablet TEAM */

  .team-container {
    padding: 0 108px;
  }

  .team-list {
    gap: 64px 24px;
  }

  /* Tablet PORTFOLIO  */

  .portfolio-list {
    gap: 72px 24px;
  }

  /* Footer fot tablet*/
  .footer-container {
    gap: 72px 24px;
    align-items: baseline;
    justify-content: start;
    padding-left: 108px;
    padding-right: 164px;
  }

  .footer-logo {
    text-align: left;
  }

  .footer-title {
    text-align: left;
  }

  .footer-text {
    max-width: 264px;
  }

  .footer-form {
    flex-direction: row;
    gap: 24px;
  }

  .sub-input {
    width: 264px;
  }

  /* Tablet Modal */

  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }
}

@media (min-width: 1158px) {
  .container {
    width: 1158px;
    padding: 0 15px;
  }
  .section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  /* Desktop HEADER */
  .header {
    max-width: 1440px;
  }

  .header-logo {
    margin-right: 76px;
  }

  .contacts-link {
    padding: 24px 0;
  }

  .contacts-list {
    flex-direction: row;
    gap: 40px;
  }

  .contacts-link {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }

  /* Desktop HERO */
  .hero {
    padding: 188px 0;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url('../images/hero-bg.jpg');
    @media screen and (min-resolution: 2x) {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url('../images/hero-bg2x.jpg');
    }
  }
  .hero-title {
    margin-bottom: 48px;
  }

  /* SECTION ABOUT */

  .about-icon-box {
    display: flex;
  }

  .about-item-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
  }

  .about-list {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .about-item {
    width: calc((100% - 72px) / 4);
  }

  .about-item-text {
    font-weight: 400;
  }

  /* Desktop Team */

  .team-container {
    padding: 0;
  }

  .about-list {
    flex-wrap: nowrap;
    gap: 24px;
  }

  /* Desktop PORTFOLIO */

  .portfolio-list {
    gap: 48px 24px;
  }

  /* Footer for desktop */

  .footer {
    padding-top: 100px;
    padding-bottom: 100px;
  }
  .footer-container {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
  }

  .footer-info {
    margin-right: 120px;
  }

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