.comparison-shell {
  margin-top: 52px;
}

.comparison-frame {
  --split: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: #0b111b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  touch-action: pan-y;
}

.comparison-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.comparison-after {
  z-index: 1;
}

.comparison-before {
  position: absolute;
  z-index: 2;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  will-change: clip-path;
}

.comparison-divider {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 3px;
  transform: translateX(-1.5px);
  background: linear-gradient(#fff, #66c5ff, #fff);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: #0b1520;
  color: #fff;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42), 0 0 0 5px rgba(30, 157, 255, 0.18);
  font: 800 17px/1 Sora, sans-serif;
}

.comparison-handle span:first-child {
  justify-self: end;
}

.comparison-handle span:last-child {
  justify-self: start;
}

.comparison-range {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.comparison-range:focus-visible + .comparison-focus-ring {
  position: absolute;
  z-index: 5;
  inset: 6px;
  border: 3px solid #66c5ff;
  border-radius: 18px;
  pointer-events: none;
}

.comparison-label {
  position: absolute;
  z-index: 5;
  top: 22px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(5, 9, 15, 0.78);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

.comparison-label.before {
  left: 22px;
}

.comparison-label.after {
  right: 22px;
}

.comparison-note {
  margin-top: 16px;
  color: #8e9baa;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 600px) {
  .comparison-frame {
    aspect-ratio: 4 / 3;
    border-radius: 17px;
  }

  .comparison-handle {
    width: 48px;
    height: 48px;
  }

  .comparison-label {
    top: 14px;
  }

  .comparison-label.before {
    left: 14px;
  }

  .comparison-label.after {
    right: 14px;
  }
}
