.values__stage {
  position: relative;
  user-select: none;
  --track-h: 390px;
  --slide-ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

.values__track {
  position: relative;
  height: var(--track-h);
  overflow: hidden;
  touch-action: pan-y;
}

.values__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 420px;
  height: 390px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transform-origin: center center;
  cursor: pointer;
  will-change: transform, opacity;
  transition:
    transform 1.1s var(--slide-ease),
    opacity   .7s  var(--slide-ease);
}

.values__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 32px;
  gap: 36px;
  text-align: center;
  background: #fff;
  color: var(--color-dark-darkest);
  border-radius: 16px;
  box-shadow: 0 11px 22px rgba(43, 43, 43, .04);
  transition:
    background .55s var(--slide-ease),
    color      .55s var(--slide-ease),
    box-shadow .55s var(--slide-ease);
}

.values__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  background-color: var(--color-brand-dark);
  background-image: var(--gradient-linear);
  color: var(--color-white-pure);
  transition: background .55s var(--slide-ease);
}

.values__icon-svg {
  width: 40px;
  height: 40px;
}

.values__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.values__title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 24px;
  line-height: 36px;
  color: currentColor;
}

.values__desc {
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-grey-mid);
  transition: color .55s var(--slide-ease);
}

/* ±2 — outer */
.values__slide[data-pos="-2"],
.values__slide[data-pos="2"] {
  opacity: .3;
  pointer-events: auto;
  z-index: 1;
}
.values__slide[data-pos="-2"] { transform: translate(calc(-50% - 685px), -50%) scale(0.595); }
.values__slide[data-pos="2"]  { transform: translate(calc(-50% + 685px), -50%) scale(0.595); }

/* ±1 — prev / next */
.values__slide[data-pos="-1"],
.values__slide[data-pos="1"] {
  opacity: .55;
  pointer-events: auto;
  z-index: 2;
}
.values__slide[data-pos="-1"] { transform: translate(calc(-50% - 385px), -50%) scale(0.738); }
.values__slide[data-pos="1"]  { transform: translate(calc(-50% + 385px), -50%) scale(0.738); }

/* active */
.values__slide[data-pos="0"] {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
  cursor: default;
  transform: translate(-50%, -50%) scale(1);
}

.values__slide[data-pos="0"] .values__card {
  background-color: var(--color-brand-dark);
  background-image: var(--gradient-linear);
  color: var(--color-white-pure);
  box-shadow: 0 22px 44px rgba(15, 23, 56, .25);
}

.values__slide[data-pos="0"] .values__icon {
  background-color: var(--color-brand-dark);
  background-image: var(--gradient-icon-active);
}

.values__slide[data-pos="0"] .values__desc {
  color: rgba(255, 255, 255, .7);
}

/* Hidden / wrap-around: park off-stage on matching side so the
   slide never crosses the centre during a wrap. */
.values__slide[data-slider-hidden] {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + 1300px), -50%) scale(0.5);
}
.values__slide[data-slider-hidden][data-pos^="-"] {
  transform: translate(calc(-50% - 1300px), -50%) scale(0.5);
}

/* nav */
.values__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 48rem) {
  .values__nav { margin-top: 40px; }
}

/* ===== Tablet ===== */
@media (min-width: 48rem) and (max-width: 79.99rem) {
  .values__stage { --track-h: 360px; }
  .values__slide { width: 380px; height: 360px; }

  .values__slide[data-pos="-2"],
  .values__slide[data-pos="2"] { opacity: .25; }
  .values__slide[data-pos="-2"] { transform: translate(calc(-50% - 600px), -50%) scale(0.605); }
  .values__slide[data-pos="2"]  { transform: translate(calc(-50% + 600px), -50%) scale(0.605); }

  .values__slide[data-pos="-1"] { transform: translate(calc(-50% - 340px), -50%) scale(0.737); }
  .values__slide[data-pos="1"]  { transform: translate(calc(-50% + 340px), -50%) scale(0.737); }

  .values__slide[data-pos="0"]  { transform: translate(-50%, -50%) scale(1); }
}

/* ===== Mobile ===== */
@media (max-width: 47.99rem) {
  .values__stage { --track-h: 320px; }

  .values__slide {
    width: min(78vw, 320px);
    height: 320px;
  }

  .values__slide[data-pos="0"] {
    transform: translate(-50%, -50%) scale(1);
  }

  .values__slide[data-pos="-1"],
  .values__slide[data-pos="1"],
  .values__slide[data-pos="-2"],
  .values__slide[data-pos="2"] {
    opacity: 0;
    pointer-events: none;
  }
  .values__slide[data-pos="-1"] { transform: translate(calc(-50% - 95vw), -50%) scale(1); }
  .values__slide[data-pos="1"]  { transform: translate(calc(-50% + 95vw), -50%) scale(1); }
  .values__slide[data-pos="-2"] { transform: translate(calc(-50% - 190vw), -50%) scale(1); }
  .values__slide[data-pos="2"]  { transform: translate(calc(-50% + 190vw), -50%) scale(1); }

  .values__card {
    padding: 24px;
    gap: 24px;
    border-radius: 14px;
  }

  .values__icon      { width: 64px; height: 64px; }
  .values__icon-svg  { width: 32px; height: 32px; }
  .values__title     { font-size: 20px; line-height: 28px; }
  .values__desc      { font-size: 14px; line-height: 22px; }

  .values__nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--track-h);
    margin-top: 0;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    z-index: 5;
  }
  .values__nav > * { pointer-events: auto; }
}
