.before-after-block{
  --ba-bg:#f5efe8;
  --ba-surface:#ffffff;
  --ba-ink:#1d1715;
  --ba-muted:#7a6d66;
  --ba-handle:#ff5a47;
  --ba-height-desktop:560px;
  --ba-height-mobile:360px;
  --ba-start:48%;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.75), transparent 34%),
    linear-gradient(180deg, #fcf8f4 0%, var(--ba-bg) 100%);
  color:var(--ba-ink);
  padding:clamp(36px, 6vw, 72px) 20px;
}

.before-after-block .ba-shell{
  max-width:1120px;
  margin:0 auto;
}

.before-after-block .ba-card{
  background:rgba(255,255,255,.64);
  border:1px solid rgba(29,23,21,.08);
  box-shadow:0 24px 64px rgba(60,35,25,.08);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-radius:30px;
  padding:clamp(20px, 4vw, 36px);
}

.before-after-block .ba-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.before-after-block .ba-eyebrow{
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ba-muted);
}

.before-after-block .ba-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:40px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(29,23,21,.08);
  background:rgba(255,255,255,.92);
  font-weight:800;
  letter-spacing:.08em;
}

.before-after-block .ba-copy{
  max-width:680px;
  margin-bottom:24px;
}

.before-after-block .ba-title{
  margin:0;
  font-size:clamp(28px, 4vw, 52px);
  line-height:1.02;
  letter-spacing:-.04em;
  font-weight:700;
}

.before-after-block .ba-description{
  margin:12px 0 0;
  font-size:15px;
  line-height:1.7;
  color:var(--ba-muted);
}

.before-after-block .ba-compare{
  position:relative;
  width:100%;
  height:var(--ba-height-desktop);
  border-radius:24px;
  overflow:hidden;
  background:var(--ba-surface);
  box-shadow:inset 0 0 0 1px rgba(29,23,21,.07);
  --ba-position:var(--ba-start);
}

.before-after-block .ba-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  user-select:none;
  -webkit-user-drag:none;
}

.before-after-block .ba-image--base{
  position:absolute;
  inset:0;
}

.before-after-block .ba-overlay{
  position:absolute;
  inset:0;
  width:100%;
  overflow:hidden;
  clip-path:inset(0 calc(100% - var(--ba-position)) 0 0);
  -webkit-clip-path:inset(0 calc(100% - var(--ba-position)) 0 0);
  will-change:clip-path;
}

.before-after-block .ba-image--overlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.before-after-block .ba-label{
  position:absolute;
  bottom:16px;
  z-index:3;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--ba-ink);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.before-after-block .ba-label--left{ left:16px; }
.before-after-block .ba-label--right{ right:16px; }

.before-after-block .ba-handle{
  position:absolute;
  inset:0 auto 0 var(--ba-position);
  transform:translateX(-50%);
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}

.before-after-block .ba-handle-line{
  width:2px;
  height:100%;
  background:rgba(255,255,255,.95);
  box-shadow:0 0 0 1px rgba(0,0,0,.04);
}

.before-after-block .ba-handle-knob{
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:54px;
  height:54px;
  border-radius:999px;
  background:var(--ba-handle);
  color:#fff;
  box-shadow:0 14px 28px rgba(255,90,71,.28);
  font-size:18px;
  font-weight:700;
}

.before-after-block .ba-range{
  position:absolute;
  inset:0;
  z-index:5;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:ew-resize;
  touch-action:none;
}

.before-after-block .ba-range::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:56px;
  height:56px;
}

.before-after-block .ba-range::-moz-range-thumb{
  width:56px;
  height:56px;
  border:0;
  background:transparent;
}

@media (max-width: 767px){
  .before-after-block{
    padding:28px 14px 40px;
  }

  .before-after-block .ba-card{
    border-radius:24px;
    padding:16px;
  }

  .before-after-block .ba-topline{
    margin-bottom:14px;
  }

  .before-after-block .ba-copy{
    margin-bottom:18px;
  }

  .before-after-block .ba-title{
    font-size:clamp(22px, 9vw, 34px);
  }

  .before-after-block .ba-description{
    font-size:14px;
  }

  .before-after-block .ba-compare{
    height:var(--ba-height-mobile);
    border-radius:18px;
  }

  .before-after-block .ba-label{
    bottom:12px;
    padding:7px 10px;
    font-size:11px;
  }

  .before-after-block .ba-handle-knob{
    width:46px;
    height:46px;
    gap:6px;
    font-size:16px;
  }
}
