/* Before/after compare slider, shared by the home feature and gallery cards.
   Position lives in --pos (set by js/compare.js); before photo is the same stock image with a filter. */
.ba { --pos: 50%; position: relative; overflow: hidden; cursor: ew-resize; user-select: none; -webkit-user-select: none; touch-action: pan-y; background: var(--stone); }
.ba:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__before { filter: sepia(.45) saturate(.6) brightness(.88) contrast(.92); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: var(--ivory); }
.ba__knob { position: absolute; top: 50%; left: -18px; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; background: var(--ivory); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: -.1em; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.ba__label { position: absolute; top: 12px; padding: 5px 9px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; }
.ba__label--before { left: 12px; background: rgba(20, 20, 20, .72); color: var(--ivory); }
.ba__label--after { right: 12px; background: var(--ivory); color: var(--ink); }

.ba--feature { aspect-ratio: 3 / 2; background: #2a2622; }
.ba--feature .ba__knob { left: -22px; width: 44px; height: 44px; margin-top: -22px; font-size: 14px; box-shadow: none; }
.ba--feature .ba__label { top: 16px; padding: 6px 10px; font-size: 11px; }
.ba--feature .ba__label--before { left: 16px; background: rgba(20, 20, 20, .7); }
.ba--feature .ba__label--after { right: 16px; }
.ba--card { aspect-ratio: 4 / 3; }

.pos-25 { object-position: 50% 25%; }
.pos-20 { object-position: 50% 20%; }
.pos-22 { object-position: 50% 22%; }
.pos-28 { object-position: 50% 28%; }
.pos-30 { object-position: 50% 30%; }
