/* Drag-to-compare before/after slider (js/compare.js). The after photo fills the box, the before photo is
   clipped at --pos; a white line and knob sit on the seam. */
.compare { --pos: 50%; position: relative; overflow: hidden; width: 100%; background: #1b1d1c; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.project .main .compare { max-height: 86vh; }  /* a portrait pair stays on screen; both photos crop alike */
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; outline: none; }
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 14px rgba(0,0,0,.35); }
.compare-knob { position: absolute; top: 50%; left: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--pink-ink, #e0006f); box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: translate(-50%, -50%); transition: transform .2s ease, box-shadow .2s ease; }
.compare-knob svg { width: 22px; height: 22px; }
.compare:hover .compare-knob, .compare.dragging .compare-knob { transform: translate(-50%, -50%) scale(1.08); }
.compare-handle:focus-visible .compare-knob { box-shadow: 0 0 0 3px var(--pink, #ff3d8b), 0 8px 24px rgba(0,0,0,.35); }
.compare-tag { position: absolute; top: 14px; padding: 7px 11px 6px; border-radius: 3px; background: rgba(12,16,14,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font: 600 11px/1 var(--body, system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; transition: opacity .25s ease; }
.compare-tag.b { left: 14px; }
.compare-tag.a { right: 14px; }
.compare.hide-b .compare-tag.b, .compare.hide-a .compare-tag.a { opacity: 0; }
@media (max-width: 699px) {
  .compare-knob { width: 42px; height: 42px; }
  .compare-tag { top: 10px; padding: 6px 9px 5px; font-size: 10px; }
  .compare-tag.b { left: 10px; } .compare-tag.a { right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .compare-knob, .compare-tag { transition: none; } }
