*,
*::after,
*::before {
  box-sizing: border-box;
}

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

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

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

input:focus-visible {
  outline: none;
}

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

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

.wrap {
  /* display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 24px; */
}

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

body {
  font-family: "Roboto", sans-serif;
  color: #2e2f42;
}

/* ----------------------------------------- */
.mob-menu .container {
  /* height: 100vh; */
  min-height: 640px;
  padding-bottom: 40px;
}

.mob-contact-list {
  margin: 168px 0 48px 0;
}

.mob-navigation-item {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mob-navigation-item:not(:last-child) {
  margin-bottom: 40px;
}

.mob-navigation-link {
  color: inherit;
}

.mob-navigation-item:hover .mob-navigation-link {
  color: #404bbf;
}

.mob-contact-item {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
}

.mob-contact-link {
  color: inherit;
}

.mob-contact-item:not(:last-child) {
  margin-bottom: 24px;
}

.mob-contact-item:hover .mob-contact-link {
  color: #404bbf;
}

.btn-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 24px 24px auto;
  min-width: 24px;
  height: 24px;
  background-color: transparent;
  border-radius: 100%;
  border: 1px solid #e7e9fc;
  transition:
    border-color 350ms ease-in-out,
    fill 350ms ease-in-out;
}

.btn-menu-close:hover {
  border-color: #4d5ae5;
  fill: #4d5ae5;
}

.social-icon-list.mob-icon {
  justify-content: space-around;
}

/* ----------------------------------------- */

.header {
  border-bottom: 1px solid #e7e9fc;
}

.header-wrap {
  display: none;
}

.logo {
  padding: 24px 0;
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;

  color: #4d5ae5;
}

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

.navigation {
  font-size: 16px;
  font-weight: 500;
}

.navigation-social-list-link {
  color: #434455;
  padding: 24px 0;
  transition: color 350ms ease-in-out;
}

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

.active::after {
  content: "";
  display: inline-block;
  position: absolute;
  left: 0;
  bottom: -3px;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background: #404bbf;
}

/* ------------------------------------------- */
.hero {
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero/hero-mb_1x.jpeg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  text-align: center;
}

@media (min-resolution: 192dpi) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero/hero-mb_2x.jpeg);
  }
}

.hero-wrap {
  padding: 188px 0 292px 0;
}

.hero-title {
  margin-bottom: 42px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #fff;
}

.button {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;

  cursor: pointer;

  color: #fff;
  background-color: #4d5ae5;
  border-radius: 4px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

  transition: background-color 350ms ease-in-out;
}

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

/* ----------------------------------------- */
.section {
  padding: 96px 0;
}

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

.section-subtitle {
  text-align: center;
  /* font-size: 20px; */
  font-size: 36px;
  /* font-weight: 500; */
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #434455;
}

.section-description {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* --------------------------------------- */
.advantages-list {
  display: flex;
  flex-direction: column;
  row-gap: 72px;
}

.advantages-icon {
  display: none;
}

.thumb-advantages {
  display: none;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
}

.advantages-subtitle {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  text-align: center;
}

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

.personal-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 72px;
}

.personal-card {
  /* flex-basis: 260px; */
  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);
  background: #fff;
  text-align: center;
}

.personal-card-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.description-personal-card {
  padding: 32px 16px;
}

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

.social-icon-item {
  border-radius: 50%;
  background-color: #4d5ae5;
  transition: background-color 350ms ease-in-out;
}

.social-icon-item:hover {
  background-color: #404bbf;
}

.social-icon-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

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

/* ---------------------------------------- */

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

.portfolio-card {
  background-color: #fff;
}

.description-img-card {
  padding: 40px 32px 164px 32px;
  position: absolute;
  top: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background: linear-gradient(
    45deg,
    rgba(247, 209, 111, 0.7) 21%,
    rgba(109, 115, 73, 0.7) 50%,
    rgba(7, 13, 179, 0.7) 82%
  );
  background-blend-mode: normal;
  transform: translateY(100%);

  transition: transform 500ms ease-in-out;
}

.portfolio-card:hover .description-img-card {
  transform: translateY(0);
}

.description-portfolio-card {
  padding: 32px 0 32px 8px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

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

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

.footer .logo {
  margin-bottom: 18px;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
}

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

.footer-icon-item:hover {
  background-color: #31d0aa;
}

.footer-subtitle {
  margin-bottom: 16px;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}

.footer-description {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-subtitle {
  text-align: center;
}

.footer-text {
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.social-media {
  margin: 72px 0;
}

.social-media .social-icon-list {
  column-gap: 16px;
}

.footer-form-input {
  margin-bottom: 16px;
  border: 1px solid #fff;
  border-radius: 4px;
  width: 288px;
  height: 40px;
  padding-right: 16px;
  padding-left: 16px;
  background-color: transparent;
  color: #fff;
  /* border: none; */
}

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

.footer-form .button {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  align-items: center;
  gap: 8px 16px;
  height: 40px;
}

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

/* ---------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  /* display: flex;
    justify-content: center;
    align-items: center; */
  background: rgba(46, 47, 66, 0.4);

  opacity: 0;
  visibility: hidden;
  cursor: none;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  cursor: auto;
}

.modal {
  position: absolute;
  max-width: 408px;
  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: #fcfcfc;
  padding: 72px 24px 24px 24px;
  border-radius: 4px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-close {
  position: absolute;
  top: 24px;
  right: 24px;
  min-width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;

  border: none;
  border-radius: 100%;
  fill: #2e2f42;
}

.form-call-back {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

textarea[name="description"] {
  padding-top: 8px;
  padding-left: 16px;
  height: 120px;
  resize: none;
}

textarea::placeholder {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.input-wrap {
  position: relative;
}

.modal-input {
  width: 100%;
  height: 40px;
  padding-left: 38px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  transition: border 300ms ease-in-out;
}

.form-icon {
  position: absolute;
  top: 50%;
  left: 19px;
  transform: translateY(-50%);
  width: 18px;
  height: 24px;
  transition: fill 300ms ease-in-out;
}

.modal-input:focus {
  border: 1px solid #4d5ae5;
}

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

.privacy-wrap {
  display: flex;
  align-items: center;
}

.modal-checkbox {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  fill: transparent;
  transition:
    background-color 300ms ease-in-out,
    fill 300ms ease-in-out;
}

.privacy-icon {
  position: absolute;
}

.modal-check-rules:checked + .privacy-wrap .modal-checkbox {
  background-color: #404bbf;
  fill: #f4f4fd;
  border: none;
}

.police {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.modal-field + .button {
  align-self: center;
  min-width: 169px;
}

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

  /* ---------------------------------- */

  .mob-menu {
    display: none;
  }

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

  .navigation-wrap {
    display: flex;
  }

  .navigation-list-link {
    position: relative;
    padding: 24px 0;
    color: #2e2f42;
    transition: color 350ms ease-in-out;
  }

  .navigation-list-item:not(:last-child) {
    margin-right: 24px;
  }

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

  /* ---------------------------------- */

  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero/hero_tablet_1x.jpeg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    text-align: center;
  }

  @media (min-resolution: 192dpi) {
    .hero {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero/hero_tablet_2x.jpeg);
    }
  }

  /* ------------------------------------ */

  .advantages-list {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 24px;
  }

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

  .advantages-subtitle {
    text-align: start;
  }

  /* ------------------------------------ */

  .personal-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 64px 24px;
  }

  /* -------------------------------------- */

  .portfolio-list {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 24px;
  }

  /* ---------------------------------------- */

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

  /* -------------------------------------- */

  .footer .logo {
    margin-right: auto;
    margin-left: 0;
  }

  .footer-wrap.container {
    max-width: 584px;
  }

  .footer-wrap {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer-form {
    display: flex;
  }

  .footer-form-input {
    margin-bottom: 0;
    width: 264px;
  }

  .social-media {
    margin-left: 24px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .footer-form .button {
    margin-left: 24px;
  }

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

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

  .container {
    max-width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* ------------------------------------ */

  .header-wrap {
    justify-content: start;
  }

  .navigation {
    margin-left: 76px;
  }

  .navigation-social-list {
    flex-direction: row;
    margin-left: auto;
  }
  /* ----------------------------------- */

  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero/hero-pc_1x.jpeg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    text-align: center;
  }

  @media (min-resolution: 192dpi) {
    .hero {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero/hero-pc_2x.jpeg);
    }
  }

  /* ------------------------------------ */

  .advantages-list {
    row-gap: 0;
  }

  .advantages-item {
    flex-basis: calc((100% - 72px) / 4);
  }

  .thumb-advantages {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }

  .advantages-icon {
    display: block;
  }

  .advantages-subtitle {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    text-align: start;
  }

  /* ------------------------------------- */

  .portfolio-card {
    flex-basis: calc((100% - 48px) / 3);
  }

  /* ------------------------------------- */

  .footer-wrap.container {
    max-width: 1158px;
  }

  .footer-wrap {
    justify-content: space-between;
  }
}
