.exit-modal {
  --exit-modal-font: TRYGrtsk, sans-serif;
  --exit-modal-bg: #ffffff;
  --exit-modal-title: #06142b;
  --exit-modal-text: #06142b;
  --exit-modal-border: #afafaf;
  --exit-modal-accent: #8a694f;
  --exit-modal-hover: #8a694f;
  --exit-modal-logo: #ffffff;
  --exit-modal-logo-mobile: #06142b;

  display: none;
  width: 100%;
  max-width: 836px;
  padding: 0;
  background-color: transparent;
}

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

.exit-modal__content {
  position: relative;
  max-width: 776px;
  margin-inline: 30px;
  padding: 27px 30px;
  border-radius: 12px;
  background-color: var(--exit-modal-bg);
  color: var(--exit-modal-text);
  font-family: var(--exit-modal-font);
  line-height: 1.5;
}

.exit-modal__title {
  margin: 0 0 12px;
  color: var(--exit-modal-title);
  font-size: 45px;
  font-weight: 500;
  line-height: 1.5;
}

.exit-modal__description {
  max-width: 430px;
  margin: 0 0 19px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.exit-modal__projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 19px;
  padding: 0;
  list-style: none;
}

.exit-modal__project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--exit-modal-border);
  border-radius: 12px;
}

.exit-modal__project-image {
  aspect-ratio: 222 / 175;
  overflow: hidden;
}

.exit-modal__project-img {
  display: block;
  width: 100%;
  height: 100%;
}

.exit-modal__project-body {
  display: flex;
  flex-direction: column;
  padding: 17px 17px 21px;
}

.exit-modal__project-logo {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: block;
  background-color: var(--exit-modal-logo);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.exit-modal__project-logo--luna {
  width: 79px;
  height: 24px;
  -webkit-mask-image: url("../img/exit-modal/logo-luna.svg");
  mask-image: url("../img/exit-modal/logo-luna.svg");
}

.exit-modal__project-logo--sky {
  width: 74px;
  height: 31px;
  -webkit-mask-image: url("../img/exit-modal/logo-sky.svg");
  mask-image: url("../img/exit-modal/logo-sky.svg");
}

.exit-modal__project-logo--karetnaya {
  width: 60px;
  height: 33px;
  -webkit-mask-image: url("../img/exit-modal/logo-karetnaya.svg");
  mask-image: url("../img/exit-modal/logo-karetnaya.svg");
}

.exit-modal__project-class {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.exit-modal__project-divider {
  width: 100%;
  height: 1px;
  margin: 15px 0 6px;
  background-color: var(--exit-modal-border);
}

.exit-modal__project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--exit-modal-text);
  font-size: 10px;
  font-weight: 400;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.exit-modal__project-link:hover,
.exit-modal__more:hover,
.exit-modal__project-link:hover .exit-modal__arrow,
.exit-modal__more:hover .exit-modal__arrow {
  color: var(--exit-modal-hover);
}

.exit-modal__arrow {
  display: block;
  width: 29px;
  height: 29px;
  color: var(--exit-modal-accent);
  transition: color 0.3s ease;
}

.exit-modal__arrow-circle {
  fill: transparent;
  transition: fill 0.3s ease;
}

.exit-modal__arrow-icon {
  fill: currentColor;
  transition: fill 0.3s ease;
}

.exit-modal__project-link:hover .exit-modal__arrow-circle,
.exit-modal__more:hover .exit-modal__arrow-circle {
  fill: currentColor;
}

.exit-modal__project-link:hover .exit-modal__arrow-icon,
.exit-modal__more:hover .exit-modal__arrow-icon {
  fill: var(--exit-modal-bg);
}

.exit-modal__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  color: var(--exit-modal-text);
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.3s ease;
}

.exit-modal__close {
  position: absolute;
  top: 23px;
  right: 28px;
  padding: 0;
  border: none;
  background-color: transparent;
  color: var(--exit-modal-title);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.exit-modal__close:hover {
  transform: rotate(90deg);
}

.exit-modal__close-icon {
  display: block;
  width: 21px;
  height: 21px;
}

@media screen and (max-width: 768px) {
  .exit-modal__content {
    padding: 21px 23px;
  }

  .exit-modal__title {
    margin-bottom: 4px;
    font-size: 32px;
  }

  .exit-modal__description {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .exit-modal__projects {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 8px;
  }

  .exit-modal__project {
    flex-direction: row;
    min-height: 100px;
  }

  .exit-modal__project-image {
    flex: 0 0 48%;
    aspect-ratio: 129 / 98;
  }

  .exit-modal__project-body {
    width: 100%;
    padding: 10px 15px;
  }

  .exit-modal__project-logo {
    position: static;
    background-color: var(--exit-modal-logo-mobile);
  }

  .exit-modal__project-logo--luna {
    width: 61px;
    height: 19px;
  }

  .exit-modal__project-logo--sky {
    width: 55px;
    height: 23px;
  }

  .exit-modal__project-logo--karetnaya {
    width: 46px;
    height: 25px;
  }

  .exit-modal__project-class {
    margin-top: auto;
    font-size: 10px;
  }

  .exit-modal__project-divider {
    margin: 3px 0 6px;
  }

  .exit-modal__project-link {
    font-size: 6px;
  }

  .exit-modal__arrow {
    width: 19px;
    height: 19px;
  }

  .exit-modal__more {
    font-size: 10px;
  }

  .exit-modal__close {
    top: 21px;
    right: 17px;
  }

  .exit-modal__close-icon {
    width: 15px;
    height: 15px;
  }
}
