.section-stack {
  grid-auto-columns: minmax(0, 1fr);
  display: grid;
}
.section-stack--horizontal {
  padding: 0 5.3333vw;
  align-items: start;
}
.section-stack__intro {
  width: 100%;
}
.section-stack__main {
  width: 100%;
}
.before-after__before-image {
  width: 100%;
  height: 100%;
}

.before-after {
  --before-after-label-spacing: 20px;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  width: 100%;
  height: 59.7333vw;
}

.before-after__label {
  position: absolute;
  width: 37.3333vw;
  font-weight: 700;
  font-style: italic;
  font-size: 3.4667vw;
  line-height: 6.24vw;
  color: #fff;
}

.before-after__label--top {
  top: var(--before-after-label-spacing);
}

.before-after__label--bottom {
  bottom: var(--before-after-label-spacing);
}

.before-after__after-image {
  clip-path: inset(0 0 0 calc(var(--before-after-initial-drag-position, 50%)  + var(--clip-path-offset, 0px)));
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

[dir="rtl"] .before-after__after-image {
  clip-path: inset(0 calc(var(--before-after-initial-drag-position, 50%)  - var(--clip-path-offset, 0px)) 0 0);
}

.before-after__cursor-wrapper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.before-after__cursor {
  --transform-logical-flip: 1;
  touch-action: none;
  width: max-content;
  height: 100%;
  transform: translate(calc(var(--transform-logical-flip) * -50% + var(--clip-path-offset, 0px)), -50%);
  cursor: grab;
  filter: drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);
  will-change: transform;
  place-items: center;
  display: grid;
  position: relative;
}

.before-after__cursor:before {
  content: "";
  height: 100%;
  width: 2px;
  background: rgb(var(--background));
  z-index: -1;
  position: absolute;
}

.before-after__cursor {
  top: 50%;
}

.before-after__cursor:not(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
  left: var(--before-after-initial-drag-position, 0px);
}

.before-after__cursor:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
  right: var(--before-after-initial-drag-position, 0px);
}

.before-after__cursor:active {
  cursor: grabbing;
}
@media screen and (min-width: 1024px) {
  .section-stack--horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    padding: 0;
  }

  .section-stack__intro {
    width: 95.3125vw;
  }

  .section-stack__main {
    width: 95.3125vw;
  }

  .before-after {
    --before-after-label-spacing: 20px;
    width: 95.3125vw;
    height: 53.5938vw;
  }
  
  .before-after__label {
    width: 19.5313vw;
    font-size: 1.5625vw;
    line-height: 2.8125vw;
  }
}
@media screen and (min-width: 1280px) {
  .section-stack__intro {
    width: 1080px;
  }

  .section-stack__main {
    width: 1080px;
  }

  .before-after {
    --before-after-label-spacing: 20px;
    width: 1080px;
    height: 608px;
  }
  
  .before-after__label {
    width: 250px;
    font-size: 20px;
    line-height: 36px;
  }  
}

@media screen and (min-width: 700px) {
  .before-after {
    --before-after-label-spacing: var(--spacing-8);
  }

  .before-after__cursor svg {
    width: var(--spacing-10);
    height: var(--spacing-10);
  }
}
