/* Public before/after comparison slider (project detail page). */
.ba-showcase__list {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}
.ba-compare { margin: 0; }
.ba-compare__frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 3 / 2;
  background: #100f0d;
  user-select: none;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
}
.ba-compare__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-compare__after { position: absolute; inset: 0; }
.ba-compare__before {
  position: absolute;
  inset: 0;
  /* Clipped from the right; JS drives the inset as the handle moves. */
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}

/* Corner labels */
.ba-compare__tag {
  position: absolute;
  top: 16px;
  z-index: 2;
  padding: 6px 12px;
  font: 500 11px/1 "Jost", system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(20, 20, 15, .62);
  border-radius: 999px;
  pointer-events: none;
}
.ba-compare__tag--before { left: 16px; }
.ba-compare__tag--after { right: 16px; }

/* The range input is the (invisible) drag surface covering the frame. */
.ba-compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba-compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 100%;
  cursor: ew-resize;
}
.ba-compare__range::-moz-range-thumb {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.ba-compare__range:focus-visible { outline: none; }
.ba-compare__range:focus-visible ~ .ba-compare__handle { box-shadow: 0 0 0 3px rgba(184, 147, 90, .7); border-radius: 2px; }

/* The visible divider + grip, positioned by JS. */
.ba-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, .9);
  z-index: 3;
  pointer-events: none;
}
.ba-compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(20, 20, 15, .78);
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
  display: grid;
  place-items: center;
  font: 600 15px/1 "Jost", system-ui, sans-serif;
  letter-spacing: .05em;
}
.ba-compare__caption {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted, #6f6a60);
  font-style: italic;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
}
