/* Свои стили сайта: анимации, наведение, мобильное меню, лайтбокс. */

/* ---------- Анимации ---------- */

/* Появление при загрузке. Прячем блок, только если работает JS. */
html.js [data-appear] {
  opacity: 0.001;
  transform: translateY(var(--appear-y, 0px));
}

/* Появление при прокрутке («Slide in bottom»). Прячем блок, только если работает JS. */
html.js [data-reveal] {
  opacity: 0 !important;
  transform: translateY(150px) !important;
}
html.js [data-reveal].is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition:
    opacity 0.4s ease-out,
    transform 0.55s cubic-bezier(0.34, 1.25, 0.64, 1);
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal],
  [data-appear] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Наведение ---------- */

@media (hover: hover) {
  /* Кнопка (основная и белая) */
  .site-8s2c9 {
    transition: background-color 0.3s ease;
  }
  .site-8s2c9 h3.site-text {
    transition: color 0.3s ease, font-size 0.3s ease;
  }
  .site-8s2c9 .site-waq5no {
    transition: background-color 0.3s ease, width 0.3s ease;
  }
  .site-8s2c9:hover h3.site-text {
    --site-text-color: rgb(195, 131, 243) !important;
  }
  .site-8s2c9:hover .site-waq5no {
    --17ht5cx: rgb(195, 131, 243) !important;
    --fpzlwg: rgb(195, 131, 243) !important;
  }
  .site-8s2c9.site-v-1pnhj3n:hover h3.site-text {
    --site-font-size: 19px !important;
  }
  .site-8s2c9.site-v-1pnhj3n:hover .site-waq5no {
    width: 25px;
  }
  .site-8s2c9.site-v-1f79qoy:hover {
    background-color: rgb(246, 246, 246) !important;
  }

  /* Ссылки mail / telegram / hh.ru */
  .site-UT5PH p.site-text {
    transition: color 0.3s ease;
  }
  .site-UT5PH:hover p.site-text {
    --site-text-color: rgb(195, 131, 243) !important;
    text-decoration: underline !important;
  }

  /* Карточки проектов */
  .site-h6Rxh .site-7sd4qa {
    transition: transform 0.3s cubic-bezier(0.37, 0.01, 0.56, 1);
  }
  .site-h6Rxh .site-iyzv8a h2.site-text {
    transition: color 0.3s ease;
  }
  .site-h6Rxh:hover .site-7sd4qa {
    transform: scale(1.05) !important;
  }
  .site-h6Rxh:hover .site-iyzv8a h2.site-text {
    color: rgb(142, 82, 255) !important;
  }
}

/* ---------- Мобильное меню ---------- */

.site-hxk6a0 {
  cursor: pointer;
  border-radius: 8px;
}
.site-hxk6a0:focus {
  outline: none;
}
.site-hxk6a0:focus-visible {
  outline: 2px solid rgb(195, 131, 243);
  outline-offset: 4px;
}
.site-qW00S {
  aspect-ratio: 1 / 1;
  display: block;
  width: 16px;
}
.site-1szppxb {
  transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}
.site-v-ng3oqs .site-y4q7z5 {
  animation: menu-in 0.3s ease-out both;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Лайтбокс ---------- */

a[data-lightbox] {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: pan-y;
}
.lightbox.is-open {
  opacity: 1;
}
/* Закрытый лайтбокс не должен перекрывать страницу и ловить клики */
.lightbox[hidden] {
  display: none;
}
.lightbox:not(.is-open) {
  pointer-events: none;
}
.lightbox__img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}
.lightbox.is-open .lightbox__img {
  transform: none;
}
.lightbox__counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font: 400 14px/1 "Roboto", sans-serif;
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  background: none;
}
.lightbox__btn svg {
  display: block;
}
.lightbox__close {
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
}
.lightbox__prev,
.lightbox__next {
  top: 50%;
  width: 60px;
  height: 60px;
  margin-top: -30px;
  border-radius: 50%;
  background: rgb(11, 11, 11);
  transition: transform 0.2s ease;
}
.lightbox__prev {
  left: 10px;
}
.lightbox__next {
  right: 14px;
}
.lightbox__prev:hover,
.lightbox__next:hover {
  transform: scale(1.06);
}
.lightbox__btn:focus-visible {
  outline: 2px solid rgb(195, 131, 243);
  outline-offset: 2px;
}
@media (max-width: 809.98px) {
  .lightbox__prev,
  .lightbox__next {
    width: 44px;
    height: 44px;
    margin-top: -22px;
  }
}
