*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #101010;
}

.wipe-slider {
  --wipe-slider-bg: #101010;
  --wipe-slider-fg: rgba(255, 250, 242, 0.92);
  --wipe-slider-fg-soft: rgba(255, 255, 255, 0.85);
  --wipe-slider-fg-dim: rgba(255, 255, 255, 0.75);
  --wipe-slider-line: rgba(255, 255, 255, 0.25);
  --wipe-slider-line-on: rgba(255, 255, 255, 0.9);
  --wipe-slider-pill-fill: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.04) 100%
  );
  --wipe-slider-pill-border: rgba(255, 255, 255, 0.28);
  --wipe-slider-pill-shine: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.12) 38%,
    transparent 68%
  );
  --wipe-slider-circle: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.08) 55%,
    rgba(255, 255, 255, 0.04) 100%
  );
  --wipe-slider-circle-hover: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.16) 55%,
    rgba(255, 255, 255, 0.08) 100%
  );
  --wipe-slider-margin: 40px;
  --wipe-slider-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--wipe-slider-bg);
  font-family: var(--wipe-slider-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: pan-y;
  outline: none;
}

.wipe-slider__data {
  display: none;
}

.wipe-slider__stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.wipe-slider__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.wipe-slider__layer {
  position: absolute;
  inset: 0;
  will-change: clip-path;
}

.wipe-slider__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transform-origin: 50% 50%;
  filter: brightness(0.9);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.wipe-slider__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.05) 45%,
    rgba(10, 10, 10, 0.25) 100%
  );
}

.wipe-slider__title {
  position: absolute;
  left: var(--wipe-slider-margin);
  top: var(--wipe-slider-margin);
  z-index: 4;
  margin: 0;
  font-size: clamp(64px, 11vw, 176px);
  font-weight: 320;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--wipe-slider-fg);
  width: max-content;
  pointer-events: auto;
  user-select: text;
}

.wipe-slider__title-line {
  position: relative;
  display: block;
  white-space: nowrap;
  width: max-content;
  overflow-y: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  padding-inline: 0.06em;
  margin-inline: -0.06em;
}

.wipe-slider__title-char {
  position: relative;
  display: inline-block;
  will-change: transform;
}

.wipe-slider__info {
  position: absolute;
  left: var(--wipe-slider-margin);
  right: var(--wipe-slider-margin);
  top: 47%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  z-index: 4;
  pointer-events: auto;
  user-select: text;
}

.wipe-slider__label {
  position: relative;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--wipe-slider-fg-soft);
}

.wipe-slider__label-line {
  position: relative;
  display: block;
  white-space: nowrap;
  width: max-content;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.wipe-slider__desc-slot {
  position: relative;
  flex: 0 0 340px;
  width: 340px;
  max-width: 40vw;
  margin-left: 18vw;
}

.wipe-slider__desc {
  width: 100%;
  margin: 0;
  font-size: 15px;
  font-weight: 380;
  line-height: 1.55;
  color: var(--wipe-slider-fg-soft);
}

.wipe-slider__desc-clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
}

.wipe-slider__desc-line {
  position: relative;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.wipe-slider__percent {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--wipe-slider-fg-dim);
}

.wipe-slider__digit {
  position: relative;
  display: inline-block;
  overflow-x: visible;
  overflow-y: hidden;
  height: 1em;
  width: 0.6em;
  vertical-align: top;
}

.wipe-slider__digit-roller {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.wipe-slider__digit-roller span {
  display: block;
  height: 1em;
  line-height: 1;
}

.wipe-slider__percent-sign {
  display: block;
  height: 1em;
  line-height: 1;
  margin-left: 0.05em;
}

.wipe-slider__pill {
  position: absolute;
  left: 50%;
  bottom: 68px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px;
  border-radius: 999px;
  isolation: isolate;
  overflow: hidden;
  transform: translateX(-50%);
  background: var(--wipe-slider-pill-fill);
  border: 1px solid var(--wipe-slider-pill-border);
  -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(1.08);
  backdrop-filter: blur(28px) saturate(180%) brightness(1.08);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.wipe-slider__pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--wipe-slider-pill-shine);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.wipe-slider__pill::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 8%;
  width: 55%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 40% 30%,
    rgba(255, 255, 255, 0.38) 0%,
    rgba(255, 255, 255, 0.1) 42%,
    transparent 72%
  );
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
  animation: wipe-slider-liquid-drift 7s ease-in-out infinite alternate;
}

@keyframes wipe-slider-liquid-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.75;
  }
  100% {
    transform: translate3d(18%, 8%, 0) scale(1.08);
    opacity: 1;
  }
}

.wipe-slider__pill > * {
  position: relative;
  z-index: 1;
}

.wipe-slider__arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--wipe-slider-circle);
  color: var(--wipe-slider-fg);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.wipe-slider__arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

.wipe-slider__arrow:hover {
  background: var(--wipe-slider-circle-hover);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.wipe-slider__arrow:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.wipe-slider__arrow-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 16px;
  height: 16px;
  will-change: transform;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.wipe-slider__pill-label {
  position: relative;
  box-sizing: content-box;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--wipe-slider-fg);
  text-align: center;
  overflow: hidden;
}

.wipe-slider__pill-label-line {
  position: relative;
  display: block;
  white-space: nowrap;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.wipe-slider__pill-char {
  position: relative;
  display: inline-block;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.wipe-slider__line-out {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  min-width: 100%;
}

.wipe-slider__pill-label .wipe-slider__line-out {
  left: 50%;
  transform: translateX(-50%);
  min-width: 0;
}

.wipe-slider__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25%;
  z-index: 3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wipe-slider__zone--prev {
  left: 0;
}

.wipe-slider__zone--next {
  right: 0;
}

.wipe-slider__bars {
  position: absolute;
  left: var(--wipe-slider-margin);
  right: var(--wipe-slider-margin);
  bottom: 24px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(var(--wipe-slider-count, 4), 1fr);
  gap: 24px;
}

.wipe-slider__bar {
  position: relative;
  height: 2px;
  background: var(--wipe-slider-line);
  overflow: hidden;
}

.wipe-slider__bar-fill {
  position: absolute;
  inset: 0;
  background: var(--wipe-slider-line-on);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

@media (max-width: 767px) {
  .wipe-slider {
    --wipe-slider-margin: 20px;
  }

  .wipe-slider__title {
    font-size: clamp(44px, 15vw, 72px);
  }

  .wipe-slider__info {
    top: auto;
    bottom: 128px;
    flex-direction: column;
    gap: 12px;
  }

  .wipe-slider__desc-slot {
    margin-left: 0;
    max-width: 100%;
    flex-basis: auto;
    width: 100%;
  }

  .wipe-slider__percent {
    display: none;
  }

  .wipe-slider__pill {
    bottom: 58px;
  }

  .wipe-slider__bars {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wipe-slider__pill::after {
    animation: none;
  }
}
