/* ---------- Before & After ---------- */
.results {
  padding-block: var(--section-space);
  background: var(--black);
}

.results .section-title { color: #fff; }
.results .section-sub   { margin-inline: auto; color: rgba(255, 255, 255, .65); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 560px));
  justify-content: center;
  gap: 30px;
}

.ba { margin: 0; }

.ba__frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #222;
  user-select: none;
}

.ba__img,
.ba__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba__img--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba__tag {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(17, 17, 17, .75);
  font: 600 13px var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

.ba__tag--before { left: 16px; }
.ba__tag--after  { right: 16px; background: var(--orange); }

/* Invisible range input handles mouse, touch and keyboard */
.ba__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 100%; }
.ba__range::-moz-range-thumb     { width: 4px; height: 100%; border: 0; }

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 26px no-repeat;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ba__range:focus-visible + .ba__handle::after {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.ba figcaption {
  padding-top: 16px;
  color: #fff;
}

.ba figcaption strong {
  display: block;
  font: 22px var(--font-head);
  text-transform: uppercase;
}

.ba figcaption span {
  color: rgba(255, 255, 255, .6);
  font-size: 15px;
}