/*
 * One America Construction — Small custom stylesheet for things Tailwind
 * utilities don't cover cleanly (the before/after slider primitives and a
 * couple of fluid helpers). Kept tiny on purpose.
 */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 3px solid #F5A623; outline-offset: 2px; border-radius: 4px; }

/* ---------- Before / After slider ---------- */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  background: #0B2545;
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ba-img-before-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  will-change: width;
}
.ba-img-before-wrap .ba-img-before {
  /* Keep the before image the full width of the slider so it doesn't squash */
  width: 100vw;
  max-width: none;
}
@supports (width: 1cqw) {
  .ba-img-before-wrap .ba-img-before { width: 100cqw; }
}
.ba-slider { container-type: inline-size; }

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(11, 37, 69, 0.35);
  z-index: 2;
  pointer-events: none;
}
.ba-handle::after {
  content: "\2194"; /* ↔ */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: #F5A623;
  color: #0B2545;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 6px 16px -4px rgba(11, 37, 69, 0.5);
}
.ba-tag {
  position: absolute;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(11, 37, 69, 0.75);
  backdrop-filter: blur(2px);
}
.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
