.kyp-demo {
  display: grid;
  min-height: 100vh;
  margin: 0;
  padding: clamp(14px, 3vw, 44px);
  background: #f4f7f8;
  place-items: center;
}

.kyp-carousel {
  --kyp-ink: #16202a;
  --kyp-accent: #00a2a4;
  position: relative;
  width: min(100%, 1440px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.98) 0 42%, rgba(247, 250, 250, 0.98) 76%),
    #fff;
  border: 1px solid rgba(22, 32, 42, 0.07);
  border-radius: clamp(16px, 2.4vw, 30px);
  box-shadow: 0 24px 70px rgba(24, 47, 54, 0.12);
  outline: none;
}

.kyp-carousel,
.kyp-carousel * {
  box-sizing: border-box;
}

.kyp-carousel:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 162, 164, 0.26), 0 24px 70px rgba(24, 47, 54, 0.12);
}

.kyp-carousel__viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 320px;
}

.kyp-carousel__slide {
  position: absolute;
  inset: 0;
  display: grid;
  margin: 0;
  padding: clamp(26px, 5vw, 76px) clamp(42px, 8vw, 118px) clamp(54px, 7vw, 90px);
  opacity: 0;
  visibility: hidden;
  place-items: center;
  transition: opacity 900ms ease, visibility 900ms;
  pointer-events: none;
}

.kyp-carousel__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.kyp-carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 24px rgba(30, 50, 56, 0.12));
  transform: scale(0.985);
  transition: transform 5s cubic-bezier(.2, .7, .25, 1);
}

.kyp-carousel__slide.is-active img {
  transform: scale(1.015);
}

.kyp-carousel__arrow,
.kyp-carousel__toggle,
.kyp-carousel__dots button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.kyp-carousel__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: clamp(42px, 4.4vw, 56px);
  height: clamp(42px, 4.4vw, 56px);
  color: var(--kyp-ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(22, 32, 42, 0.09);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(20, 37, 44, 0.11);
  opacity: 0.82;
  place-items: center;
  transform: translateY(-50%);
  transition: background 180ms ease, opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(8px);
}

.kyp-carousel__arrow:hover {
  background: #fff;
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}

.kyp-carousel__arrow:focus-visible,
.kyp-carousel__toggle:focus-visible,
.kyp-carousel__dots button:focus-visible {
  outline: 3px solid rgba(0, 162, 164, 0.38);
  outline-offset: 3px;
}

.kyp-carousel__arrow svg {
  width: 52%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.kyp-carousel__arrow--prev {
  left: clamp(10px, 2vw, 28px);
}

.kyp-carousel__arrow--next {
  right: clamp(10px, 2vw, 28px);
}

.kyp-carousel__bottom {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(14px, 2.2vw, 28px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 32, 42, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(20, 37, 44, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(9px);
}

.kyp-carousel__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kyp-carousel__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  background: rgba(22, 32, 42, 0.23);
  border-radius: 999px;
  transition: width 220ms ease, background 220ms ease;
}

.kyp-carousel__dots button.is-active {
  width: 25px;
  background: var(--kyp-accent);
}

.kyp-carousel__toggle {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 7px;
  color: #314047;
  background: rgba(22, 32, 42, 0.06);
  border-radius: 50%;
  place-items: center;
}

.kyp-carousel__toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.kyp-carousel__toggle .kyp-icon-play,
.kyp-carousel__toggle.is-paused .kyp-icon-pause {
  display: none;
}

.kyp-carousel__toggle.is-paused .kyp-icon-play {
  display: block;
}

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

@media (max-width: 680px) {
  .kyp-demo {
    padding: 0;
  }

  .kyp-carousel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .kyp-carousel__viewport {
    aspect-ratio: 4 / 3;
    min-height: 290px;
  }

  .kyp-carousel__slide {
    padding: 26px 48px 58px;
  }

  .kyp-carousel__arrow {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kyp-carousel__slide {
    transition-duration: 160ms;
  }

  .kyp-carousel__slide img,
  .kyp-carousel__slide.is-active img {
    transform: none;
    transition: none;
  }
}
