/* Before/after compare slider (project + homepage deck) */
.ba {
  user-select: none;
  touch-action: none;
  --x: 50%;
}

/* Boven home-sections .ch .plate > img (display:block) */
.ch .plate.ba > img,
figure[data-fit="compare"] .plate.ba > img,
.plate.ba > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}

.ba .aft {
  clip-path: inset(0 0 0 var(--x));
  z-index: 2;
}

.ba .dv,
.ba .gr,
.ba .lb {
  z-index: 3;
}

.ba .dv {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: 2px;
  background: var(--brassL);
  transform: translateX(-1px);
  pointer-events: none;
}

.ba .gr {
  position: absolute;
  top: 50%;
  left: var(--x);
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--brassL);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brassL);
  font-size: 14px;
  line-height: 1;
  cursor: ew-resize;
  padding: 0;
}

.ba .gr:focus-visible {
  outline: 2px solid var(--brassL);
  outline-offset: 3px;
}

.ba .lb {
  position: absolute;
  top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(7, 13, 24, 0.72);
  color: var(--paper);
  padding: 5px 9px;
  border-radius: 6px;
  pointer-events: none;
}

.ba .lb.l {
  left: 10px;
}

.ba .lb.r {
  right: 10px;
  color: var(--brassL);
}

.ch[data-fit="compare"] .plate,
figure[data-fit="compare"] .plate {
  background: #efece4;
  padding: clamp(10px, 1.4vw, 20px);
}

@media (max-width: 980px) {
  .ba .gr {
    width: 44px;
    height: 44px;
  }
}
