/* Alix — "Alix Lens" (v2): framed cross-fading image + chip mark + circuit dots.
   The frame's edges dissolve into the page background (transparent frame). */

.lens {
  position: relative;
  isolation: isolate;
}

.lens-viewport {
  position: absolute;
  inset: 6%;
  border-radius: var(--radius-lg, 28px);
  overflow: hidden;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 50%, #000 56%, transparent 92%);
  mask-image: radial-gradient(120% 120% at 50% 50%, #000 56%, transparent 92%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.lens-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition:
    opacity 1.1s var(--ease),
    transform 0.4s var(--ease);
  will-change: opacity, transform;
}
.lens-img.is-active {
  opacity: 1;
}
.lens-img.is-logo {
  background-size: 58% auto;
  background-repeat: no-repeat;
  background-color: color-mix(in srgb, var(--alix-blue-bright) 14%, var(--bg-1));
}
.lens-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(120% 90% at 50% 8%, rgba(43, 164, 255, 0.16), transparent 60%),
    linear-gradient(0deg, rgba(10, 53, 122, 0.22), transparent 46%);
}

/* circuit dots that twinkle (appear / disappear) in the brand blue */
.lens-twinkle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tw-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--alix-blue-bright);
  box-shadow: 0 0 8px 1px var(--alix-blue-bright);
  opacity: 0;
  animation-name: twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  50% {
    opacity: 0.95;
    transform: scale(1);
  }
}

/* the Alix chip mark over the image (replaces the old 3D object) */
.lens-mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34%;
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 6px 18px rgba(15, 98, 254, 0.45))
    drop-shadow(0 0 10px rgba(43, 164, 255, 0.55));
  animation: markFloat 6s var(--ease) infinite;
}
@keyframes markFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.lens-mark.beat {
  animation: markBeat 0.6s var(--ease);
}
@keyframes markBeat {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
    filter: drop-shadow(0 6px 22px rgba(43, 164, 255, 0.8));
  }
  100% {
    transform: scale(1);
  }
}

.lens-label {
  position: absolute;
  inset-block-end: 7%;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 80%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
}
.lens-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alix-blue-bright);
  box-shadow: 0 0 10px var(--alix-blue-bright);
}

@media (prefers-reduced-motion: reduce) {
  .lens-img,
  .lens-mark {
    transition: none;
    animation: none;
  }
  .tw-dot {
    animation: none;
    opacity: 0.5;
  }
}
