/* Before / After comparison sliders (homepage "Our Work" section).
   Uses the tokens from style.css, with fallbacks so it still renders alone. */
.ba-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
}
.ba-grid > .ba-card { flex: 0 1 100%; min-width: 0; }
@media (min-width: 640px) { .ba-grid > .ba-card { flex-basis: calc((100% - 20px) / 2); } }
@media (min-width: 1000px) { .ba-grid > .ba-card { flex-basis: calc((100% - 40px) / 3); } }

.ba-card {
  margin: 0; overflow: hidden;
  background: var(--surface, #16171b);
  border: 1px solid var(--border, rgba(255,255,255,0.09));
  border-radius: var(--radius, 12px);
}
.ba-cap { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ba-cap strong {
  font-family: var(--font-head, 'Barlow Condensed', system-ui, sans-serif);
  font-size: 24px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1;
  color: var(--white, #fff);
}
.ba-cap span { color: var(--muted, #9b9ea6); font-size: 14px; line-height: 1.4; }

.ba {
  --pos: 50%;
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #000;
  user-select: none; -webkit-user-select: none;
}
.ba img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none;
}
.ba .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.ba-tag {
  position: absolute; top: 12px; padding: 5px 10px; border-radius: 4px;
  background: rgba(10,10,12,.82); color: #fff;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; line-height: 1.2;
  transition: opacity .15s;
}
.ba-tag.is-before { left: 12px; }
.ba-tag.is-after { right: 12px; background: var(--orange, #ff5a1f); }
.ba-tag.is-hidden { opacity: 0; }

.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none;
}
.ba-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange, #ff5a1f); color: #fff;
  display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.ba-knob svg { width: 20px; height: 20px; }

.ba input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; background: transparent;
}
.ba:has(input:focus-visible) { outline: 3px solid var(--orange, #ff5a1f); outline-offset: -3px; }
