/* Лупа по кадру. Геометрия и движение — js/fx/lens.js. */

.lens {
  position: absolute;
  width: 224px;
  height: 224px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  will-change: transform, left, top, opacity;
  /* Круг не плашка: тонкая кромка и тень от края, как у оптики.
     Белой рамки нет — она читалась бы как наклейка поверх кадра. */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 6px rgba(0, 0, 0, 0.22),
    0 26px 60px rgba(0, 0, 0, 0.6);
}

/* Блик по стеклу и притемнение к краю — иначе круг выглядит дырой. */
.lens::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 34% 28%,
      rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 50% 50%,
      rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.42) 100%);
}

.lens__inner {
  position: absolute;
  will-change: transform;
}

.lens__inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 50%);
}

/* На тач-устройстве курсора нет, лупе не за чем следовать. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .lens { display: none; }
}
