/* -----RESET----- */

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #fff;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

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

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

a {
  text-decoration: none;
}

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

/* ---COMMON--- */

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

/* ---HEADER--- */

.header {
  color: #2e2f42;
  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);
  background: #fff;
}

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

.logotype {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-style: normal;
  color: inherit;
}

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

.header-logo-span {
  color: #4d5ae5;
}

.burger-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-icon {
  display: block;
  fill: #2f2f37;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  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;
}

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

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

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

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

.mob-menu-address-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.mob-menu-email-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-style: normal;
  color: inherit;
}

.mob-menu-tel-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-style: normal;
  color: #4d5ae5;
}

/* .mob-menu-address-link:hover,
.mob-menu-address-link:focus {
  color: #4d5ae5;
} */

.mobile-menu .social-list {
  gap: 40px;
  justify-content: space-between;
}

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

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

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

.navigation-list,
.address {
  display: none;
}

/* ---HERO--- */

.hero {
  padding: 72px 0;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/hero-image-1x.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0 auto;
}

.hero-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  /* line-height: 1.07; */
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  margin: 0 auto 72px;
  max-width: 216px;
}

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

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

/* ---FEATURES--- */

.features {
  padding: 96px 0;
}

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

.features-item-text {
  font-weight: 500;
}

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

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
}

.features-item {
  width: 100%;
}

.features-icon-wrapper {
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 100%;
  height: 112px;
  background-color: #f4f4fd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  display: none;
}

/* ---TEAM--- */

.team {
  background-color: #f4f4fd;
  padding: 96px 0;
}

.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;
  margin-bottom: 72px;
}

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

.team-item {
  background: #fff;
  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-text {
  padding: 32px 16px;
}

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

.team-item-position {
  text-align: center;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  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;
}

/* ---PORTFOLIO--- */

.portfolio {
  padding: 96px 0;
}

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

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

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

.portfolio-item-wrapper {
  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-img-wrapper {
  position: relative;
  overflow: hidden;
}

.portfolio-hover-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  color: #f4f4fd;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* .portfolio-item:hover,
.portfolio-item:focus {
  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-item:hover .portfolio-hover-text,
.portfolio-item:focus .portfolio-hover-text {
  transform: translateY(0);
}

/* ---FOOTER--- */

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

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-logo-span {
  color: #4d5ae5;
}

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

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

.footer-social-title {
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

.footer-social-list {
  display: flex;
  gap: 16px;
}

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

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

.footer-email-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.footer-email-title {
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

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

.footer-email-input {
  border: 1px solid #fff;
  border-radius: 4px;
  background-color: transparent;
  width: 264px;
  height: 40px;
  padding: 8px 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}

.footer-email-input:focus,
.footer-email-input:hover {
  border-color: #31d0aa;
}

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

.footer-email-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  padding: 8px 24px;
  width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  color: #fff;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-email-button:hover,
.footer-email-button:focus {
  background-color: #31d0aa;
}

.footer-email-icon {
  fill: #fff;
}

/* ---MODAL--- */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  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);
}

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

.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 72px 16px 24px;
  border-radius: 4px;
  max-width: 288px;
  width: 100%;
  min-height: 584px;
  background-color: #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);

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

.modal-title {
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
  max-width: 256px;
}

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

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

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

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

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

.modal-input-wrapper {
  position: relative;
}

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

.modal-textarea {
  resize: none;
  height: 120px;
  padding: 8px 16px;
  margin-bottom: 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

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

.modal-checkbox-span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition:
    border-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-checkbox:checked + .modal-checkbox-label .modal-checkbox-span {
  background-color: #404bbf;
  border-color: #404bbf;
}

.modal-checkbox:checked + .modal-checkbox-label .modal-checkbox-icon {
  fill: #f4f4fd;
}

.modal-checkbox:hover + .modal-checkbox-label .modal-checkbox-span,
.modal-checkbox:focus + .modal-checkbox-label .modal-checkbox-span {
  border-color: #404bbf;
}

.privacy-link {
  /* display: block; */
  font-size: inherit;
  letter-spacing: inherit;
  color: #4d5ae5;
  line-height: 1.33;
  text-decoration: underline;
}

.modal-submit-button {
  display: block;
  width: 169px;
  height: 56px;
  margin: 24px auto 0;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 16px 32px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

  .burger-btn,
  .mobile-menu {
    display: none;
  }

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

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

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

  .navigation-link {
    font-weight: 500;
    font-size: inherit;
    display: block;
    padding: 24px 0;
    font-style: normal;
    color: inherit;
    position: relative;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

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

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

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

  .address {
    display: block;
  }

  .address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

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

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

  .hero {
    padding: 112px 0;
  }

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

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

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

  .features-item-title {
    text-align: left;
  }

  .features-item-text {
    font-weight: 500;
  }

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

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

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

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

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

  .footer .container {
    padding: 0 108px;
  }

  .footer-logo {
    justify-content: flex-start;
  }

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

  .footer-wrapper {
    gap: 72px 24px;
    align-items: baseline;
    justify-content: start;
  }

  .footer-social-wrapper {
    align-items: flex-start;
  }

  .footer-email-wrapper {
    align-items: flex-start;
    width: 100%;
  }

  .footer-form {
    gap: 24px;
  }

  .modal {
    padding: 72px 24px 24px;
    max-width: 408px;
  }

  .modal-title {
    max-width: 360px;
  }

  .modal-checkbox-text {
    flex-direction: row;
    gap: 4px;
  }
}

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

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

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

  .address-link {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    padding: 24px 0;
  }

  .hero {
    padding: 188px 0;
    max-width: 1440px;
  }

  .hero-title {
    font-size: 56px;
    max-width: 496px;
    margin: 0 auto 48px;
  }

  .features {
    padding: 120px 0;
  }

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

  .features-list {
    gap: 24px;
  }

  .features-item {
    width: calc((100% - 24px * 3) / 4);
  }

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

  .features-icon-wrapper {
    display: flex;
  }

  .team {
    padding: 120px 0;
  }

  .team .container {
    padding: 0 15px;
  }

  .team-list {
    gap: 24px;
  }

  .team-item {
    width: calc((100% - 24px * 3) / 4);
  }

  .portfolio {
    padding: 120px 0;
  }

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

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

  .portfolio-item:hover,
  .portfolio-item:focus {
    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 .container {
    padding: 0 15px;
  }

  .footer {
    padding: 100px 0;
  }

  .footer-wrapper {
    flex-wrap: nowrap;
    gap: 0;
  }

  .footer-social-wrapper {
    margin-left: 120px;
  }

  .footer-email-wrapper {
    justify-content: flex-start;
    margin-left: auto;
  }

  .footer-form {
    flex-wrap: nowrap;
  }
}
