/* Our Work: before-and-after sliders (homepage only) */
.roofie-work { padding: 96px 0 24px; }

.roofie-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.roofie-work__figure { margin: 0; }

.roofie-work__slider {
  --pos: 50%;
  position: relative;
  aspect-ratio: 640 / 471;
  overflow: hidden;
  border-radius: 7px;
  background: #171717;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
  touch-action: pan-y;
}

.roofie-work__slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roofie-work__after,
.roofie-work__before {
  position: absolute;
  inset: 0;
}

.roofie-work__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.roofie-work__tag {
  position: absolute;
  top: 12px;
  padding: 5px 11px;
  border-radius: 3px;
  background: rgba(23, 23, 23, .78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.roofie-work__tag--before { left: 12px; }
.roofie-work__tag--after { right: 12px; }

.roofie-work__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, .4);
  pointer-events: none;
}

.roofie-work__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: #ff4138;
  color: #fff;
  font-size: 20px;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.roofie-work__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.roofie-work__slider:focus-within {
  outline: 3px solid #ff4138;
  outline-offset: 2px;
}

.roofie-work__caption {
  margin-top: 14px;
  color: #444;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .roofie-work { padding: 54px 0 12px; }
  .roofie-work__grid { grid-template-columns: 1fr; gap: 28px; }
}
