.paint-story {
  --split: 50%;
  --ceramic-opacity: 0;
  --control-opacity: 1;
  margin-block: clamp(1.5rem, 4vw, 4rem) clamp(1rem, 2.5vw, 2rem);
}

.paint-story.is-motion::after {
  content: "";
  display: block;
  height: clamp(420px, 62vh, 620px);
  height: clamp(420px, 62svh, 620px);
}

.paint-stage {
  max-width: 1000px;
  margin-inline: auto;
}

.is-motion .paint-stage {
  position: sticky;
  top: clamp(.75rem, 5vh, 3rem);
}

.paint-stage h2 {
  font-size: clamp(1.3rem, 3vw, 2.15rem);
  line-height: 1.2;
  margin: 0 0 .8rem;
}

.paint-view figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: #080e11;
  isolation: isolate;
}

.is-motion .paint-view {
  position: relative;
  isolation: isolate;
}

.paint-view img,
.ceramic-scroll-frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.paint-after {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.paint-compare .paint-label {
  opacity: var(--control-opacity);
}

.paint-label {
  position: absolute;
  top: .6rem;
  padding: .22rem .55rem;
  border-radius: .35rem;
  background: #070d11e8;
  color: #fff;
  font-size: .875rem;
  pointer-events: none;
}

.paint-label-before { right: .65rem; }
.paint-label-after, .paint-ceramic .paint-label { left: .65rem; }

.paint-line {
  position: absolute;
  inset-block: 0;
  left: clamp(2px, var(--split), calc(100% - 2px));
  width: 2px;
  background: var(--accent);
  opacity: var(--control-opacity);
  transform: translateX(-50%);
  pointer-events: none;
}

.paint-line > span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #091317;
  color: #fff;
  font-size: 1.35rem;
  transform: translate(-50%, -50%);
}

.paint-compare:focus-within .paint-line > span {
  outline: 3px solid white;
  outline-offset: 3px;
}

#paint-reveal {
  position: absolute;
  inset: calc(50% - 28px) 0 auto;
  width: 100%;
  height: 56px;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.paint-view .paint-ceramic {
  margin-top: .8rem;
}

.is-motion .paint-view .paint-ceramic {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: var(--ceramic-opacity);
  pointer-events: none;
}

.ceramic-scroll-frames {
  display: none;
}

.is-motion .ceramic-scroll-frames {
  display: block;
}

.paint-stage p {
  margin: .7rem 0 0;
}

.paint-stage small {
  color: var(--silver);
}

.paint-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@media (min-width: 700px) and (max-height: 680px) {
  .paint-stage {
    max-width: min(1000px, calc((100svh - 155px) * 16 / 9));
  }
}
