.hidden {
  display: none;
}

/* #region Basic, Reset */

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

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

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

a {
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.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: 96px 0;
}

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

/* #endregion */

/* #region Container */

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

/* #endregion */

/* #region 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;
}

.burger-icon {
  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 {
    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.current {
    position: relative;
  }

  .nav-link.current::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -1px;

    width: 100%;
    height: 4px;
    border-radius: 2px;

    background-color: #404bbf;
  }

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

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

  .contacts-link {
    display: block;
    font-size: 16px;
    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 {
  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;

  padding: 0;
  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 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-icon-close {
  display: block;
  margin: auto;
  fill: #2e2f42;

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

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

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

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

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

.mobile-nav-link {
  display: block;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;

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

.mobile-contacts {
  font-style: normal;
  display: block;
  margin-bottom: 48px;
}

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

.mobile-contacts-link {
  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);
}

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

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

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

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

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

/* #endregion */

/* #region SectionHero */
.container-hero {
  max-width: 100%;
  padding: 0;
}

.main-hero {
  max-width: 320px;
  margin: 0 auto;
  padding: 72px 0;
  background-color: #2e2f42;
  background-image: linear-gradient(rgb(46 47 66 / 70%), rgb(46 47 66 / 70%)),
    url(../images/hero-background@1x.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

@media (min-resolution: 192dpi) {
  .main-hero {
    background-image: linear-gradient(rgb(46 47 66 / 70%), rgb(46 47 66 / 70%)),
      url(../images/hero-background@2x.jpg);
  }
}

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

.hero-btn {
  display: block;
  border-radius: 4px;
  width: 169px;
  height: 56px;
  margin-left: auto;
  margin-right: auto;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  min-width: 169px;
  border: none;

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

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

@media screen and (min-width: 768px) {
  .main-hero {
    max-width: 768px;
    padding: 112px 0;
  }

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

@media screen and (min-width: 1158px) {
  .main-hero {
    max-width: 1440px;
    padding: 188px 0;
  }

  .hero-title {
    margin-bottom: 48px;
    font-size: 56px;
    line-height: 1.07;
  }
}

/* #endregion */

/* #region SectionFeatures */

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

.box-features-icon {
  display: none;
}

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

.features-item-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

@media screen and (min-width: 768px) {
  .features-list {
    column-gap: 24px;
  }

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

@media screen and (min-width: 1158px) {
  .features-list {
    align-items: center;
    gap: 24px;
  }

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

  .box-features-icon {
    display: flex;
    height: 112px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(142, 143, 153, 1);
    border-radius: 4px;
    background: #f4f4fd;
    margin-bottom: 8px;
  }

  .features-icon {
    margin: 24px 0;
  }

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

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

/* #endregion */

/* #region SectionTeam */

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

.container-team {
  max-width: 100%;
}

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

.team-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 72px;
  row-gap: 72px;
}

.team-card {
  width: 264px;
  border-radius: 0 0 4px 4px;
  background-color: #fff;
  text-align: center;
  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);
}

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

.card-job {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

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

.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-link:hover,
.social-link:focus {
  background-color: #404bbf;
}

.social-icon {
  fill: #f4f4fd;
}

.card-name-job {
  padding: 32px 0;
}

@media screen and (min-width: 768px) {
  .team-list {
    column-gap: 24px;
    row-gap: 64px;
  }
}

@media screen and (min-width: 1158px) {
  .team-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
  }
  .team-card {
    width: calc((100% - 72px) / 4);
  }
}
/* #endregion */

/* #region SectionPortfolio */

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

.portfolio-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 48px;
}

.portfolio-offer {
  box-sizing: border-box;
  width: 360px;

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

.offer-title-text {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.offer-thumb {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  inset: 0;
  transform: translateY(100%);

  display: flex;

  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  padding: 40px 32px;
  margin-bottom: 0;
  background-color: #4d5ae5;

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

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

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

.offer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

@media screen and (min-width: 768px) {
  .portfolio-list {
    column-gap: 24px;
    row-gap: 72px;
  }
  .portfolio-offer {
    width: 356px;
  }
}

@media screen and (min-width: 1158px) {
  .portfolio-list {
    column-gap: 24px;
    row-gap: 48px;
  }
  .portfolio-offer {
    box-shadow: none;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .portfolio-offer:hover {
    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);
  }
}
/* #endregion */

/* #region Footer */
.page-footer {
  background-color: #2e2f42;
  max-width: 100%;
  padding: 96px 0;
}

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

.logo-and-sosials {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.footer-logo {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  text-align: center;
}

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

.footer-text {
  width: 288px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  margin-bottom: 0;
}

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

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

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

.subscribe {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.input-field-subscribe:hover,
.input-field-subscribe:focus {
  border: 1px solid #31d0aa;
}

.input-field-subscribe::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
}

.subscribe-btn:hover,
.subscribe-btn:focus {
  background-color: #31d0aa;
}

.social-icon-subscribe {
  margin-left: 16px;
}

@media screen and (min-width: 768px) {
  .logo-and-sosials {
    display: flex;
    flex-direction: row;
    gap: 24px;
  }

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

  .footer-text {
    width: 264px;
  }
  .social-text {
    text-align: left;
  }

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

  .input-field-subscribe {
    width: 264px;
  }

  .subscribe-btn {
    margin: 0;
  }
}

@media screen and (min-width: 1158px) {
  .footer-container {
    flex-direction: row;
    gap: auto;
  }

  .logo-and-sosials {
    flex-direction: row;
    gap: 120px;
  }

  .subscribe {
    margin-left: auto;
  }
}

/* #endregion */

/* #region Backdrop, ModalWindow */
.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;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 288px;
  min-height: 623px;
  border-radius: 4px;
  padding: 72px 16px 24px 16px;

  transform: translate(-50%, -50%);

  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);
  background-color: #fcfcfc;

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

.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -100%);
}

.btn-close {
  position: absolute;
  top: 24px;
  right: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  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 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-close {
  display: block;
  margin: auto;
  fill: #2e2f42;

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

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

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

.form-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;

  margin-bottom: 16px;
}

.form-field {
  width: 100%;
  height: 58px;
  margin-bottom: 8px;
}

.field {
  position: relative;
}

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

.input-field {
  padding-left: 38px;
  border: 1px solid rgb(46 47 66 / 40%);
  border-radius: 4px;
  width: 256px;
  height: 40px;
  background-color: transparent;
  outline: transparent;

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

.icon-field {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: #2e2f42;

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

.input-field:hover,
.input-field:focus {
  border-color: #4d5ae5;
}

.input-field:hover + .icon-field,
.input-field:focus + .icon-field {
  fill: #4d5ae5;
}

.form-field-comments {
  height: 138px;
  margin-bottom: 16px;
}

.comment-field {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  background-color: transparent;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  height: 120px;

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

.comment-field::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(117, 117, 117, 0.5);
}

.checkbox-area {
  display: inline-flex;
  margin-bottom: 24px;
}

.custom-checkbox {
  display: inline-flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  cursor: pointer;
  fill: transparent;

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

.icon-check {
  margin: auto;
}

.field-label-checkbox {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 0;
}

.def-checkbox:checked + .field-label-checkbox .custom-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

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

.send-btn {
  border-radius: 4px;
  padding: 16px 32px;
  width: 169px;
  height: 56px;
  margin-left: auto;
  margin-right: auto;

  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
}

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }

  .input-field {
    width: 360px;
  }
}

/* #endregion */
