.cz-hero-showcase {
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: clip;
  container-type: size;
  background: #fb4d8d;
}

.cz-hero-showcase__artwork {
  position: absolute;
  inset: 0;
  width: min(100%, 163cqh);
  margin-inline: auto;
  --phone-width: 48cqh;
  --phone-offset: 51cqh;
  --phone-left-x: calc(-50% - var(--phone-offset));
  --phone-right-x: calc(-50% + var(--phone-offset));
  --phone-center: translate3d(-50%, 0, 0) scale(1);
  --phone-left: translate3d(var(--phone-left-x), var(--side-drop), 0) scale(.86);
  --phone-right: translate3d(var(--phone-right-x), var(--side-drop), 0) scale(.86);
  --phone-top: 6cqh;
  --side-drop: 15cqh;
}

.cz-hero-showcase__plate {
  position: absolute;
  border-radius: clamp(12px, 3cqh, 22px);
  height: 94%;
}

.cz-hero-showcase__plate--left {
  top: 33%;
  left: 8%;
  width: 36%;
  background: #ffacd7;
}

.cz-hero-showcase__plate--center {
  top: 10%;
  left: 35%;
  width: 35%;
  background: #ffe196;
}

.cz-hero-showcase__plate--right {
  top: 32%;
  right: 8%;
  width: 34%;
  background: #a9a3ff;
}

.cz-hero-showcase__phone {
  position: absolute;
  top: var(--phone-top);
  left: 50%;
  z-index: 2;
  width: var(--phone-width);
  box-sizing: border-box;
  padding: clamp(3px, 1.1cqh, 6px);
  border: 1px solid #454048;
  border-radius: calc(var(--phone-width) * .16);
  background: linear-gradient(140deg, #413b45, #161319 30%, #211d26);
  box-shadow: 0 14px 34px #46112755, inset 0 0 0 1px #ffffff20;
  transform-origin: center top;
  transform: var(--phone-center);
  --advance-from: var(--phone-left);
  --advance-to: var(--phone-center);
}

.cz-hero-showcase__phone[data-position="left"] {
  z-index: 1;
  transform: var(--phone-left);
}

.cz-hero-showcase__phone[data-position="right"] {
  z-index: 1;
  transform: var(--phone-right);
  --advance-from: var(--phone-center);
  --advance-to: var(--phone-right);
}

.cz-hero-showcase[data-ready] .cz-hero-showcase__phone[data-motion] {
  animation-duration: 820ms;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-play-state: paused;
}

/* Keep the two advancing phones parallel while the third travels below the crop. */
.cz-hero-showcase__phone[data-motion="advance"] {
  animation-name: cz-showcase-advance;
}

.cz-hero-showcase__phone[data-motion="wrap"] {
  animation-name: cz-showcase-wrap;
}

.cz-hero-showcase[data-running][data-ready] .cz-hero-showcase__phone[data-motion] {
  animation-play-state: running;
}

@keyframes cz-showcase-advance {
  0%, 20% {
    transform: var(--advance-from);
    animation-timing-function: cubic-bezier(.22, .75, .24, 1);
  }
  80%, 100% { transform: var(--advance-to); }
}

@keyframes cz-showcase-wrap {
  0% {
    transform: var(--phone-right);
    animation-timing-function: ease-in;
  }
  20% { transform: translate3d(var(--phone-right-x), 100cqh, 0) scale(.86); }
  80% {
    transform: translate3d(var(--phone-left-x), 100cqh, 0) scale(.86);
    animation-timing-function: ease-out;
  }
  100% { transform: var(--phone-left); }
}

.cz-hero-showcase .cz-hero-showcase__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--phone-width) * .135);
  transform: none;
}

.cz-hero-showcase__artwork::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 75% 0 0;
  background: linear-gradient(to bottom, #fb4d8d00, #fb4d8d 83%);
  pointer-events: none;
}

.cz-hero-showcase__bubble {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: .65em;
  box-sizing: border-box;
  padding: .75em .85em;
  border: 1px solid #ffffff24;
  border-radius: 13px;
  background: #231925;
  color: #fff;
  box-shadow: 0 7px 18px #4711274d;
  font-size: clamp(11px, 2.6cqh, 14px);
  line-height: 1.28;
  animation: cz-showcase-float 4.8s ease-in-out infinite paused, var(--slide-context-animation, none);
  animation-delay: var(--float-delay, 0s), 0s;
}

.cz-hero-showcase[data-running] .cz-hero-showcase__bubble {
  animation-play-state: running;
}

.cz-hero-showcase__bubble--offer {
  top: 14%;
  left: 5%;
}

.cz-hero-showcase__bubble--payout {
  top: 44%;
  right: 5%;
  --float-delay: -1.6s;
}

.cz-hero-showcase__bubble--review {
  display: block;
  top: 68%;
  left: 10%;
  width: 17em;
  --float-delay: -3.2s;
}

.cz-hero-showcase__icon {
  display: grid;
  flex: 0 0 2.05em;
  height: 2.05em;
  place-items: center;
  border-radius: .65em;
  background: #f280ad26;
  color: #ffa1c6;
}

.cz-hero-showcase__bubble--payout .cz-hero-showcase__icon {
  flex-basis: 2.55em;
  height: 2.55em;
  background: #ffffff12;
  color: #fff;
}

.cz-hero-showcase__icon svg {
  display: block;
  width: 1.3em;
  height: 1.3em;
}

.cz-hero-showcase__bubble--payout .cz-hero-showcase__icon svg {
  width: 1.9em;
  height: 1.9em;
}

.cz-hero-showcase__badge {
  display: inline-block;
  margin-top: .35em;
  padding: .2em .45em;
  border-radius: 4px;
  background: #176245;
  color: #fff;
  font-size: .86em;
  font-weight: 600;
  white-space: nowrap;
}

.cz-hero-showcase__label {
  margin-bottom: .14em;
  color: #ffc2da;
  font-size: .94em;
  font-weight: 650;
}

.cz-hero-showcase__details {
  color: #ded1df;
}

.cz-hero-showcase__bubble--offer strong,
.cz-hero-showcase__schedule {
  white-space: nowrap;
}

.cz-hero-showcase__amount {
  display: block;
  font-size: 1.2em;
  letter-spacing: -.025em;
}

.cz-hero-showcase__bubble--offer .cz-hero-showcase__bubble--offer strong,
.cz-hero-showcase__schedule {
  white-space: nowrap;
}

.cz-hero-showcase__amount {
  margin-top: .24em;
}

.cz-hero-showcase__review-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .45em;
}

.cz-hero-showcase__stars {
  color: #ffcf55;
  font-size: 1em;
  letter-spacing: .055em;
}

.cz-hero-showcase__quote {
  margin: .3em 0 0;
}

.cz-hero-showcase__quote-mark {
  color: #ffa1c6;
  font-weight: 750;
}

.cz-hero-showcase__quote-mark:first-child {
  margin-inline-end: .15em;
}

.cz-hero-showcase__quote-mark:last-child {
  margin-inline-start: .15em;
}

@keyframes cz-showcase-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.cz-hero-showcase__controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 2%;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translateX(-50%);
}

.cz-hero-showcase__controls[hidden] {
  display: none;
}

.cz-hero-showcase__toggle {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #371124;
  cursor: pointer;
}

.cz-hero-showcase__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -5px;
}

.cz-hero-showcase__toggle::before {
  content: "";
  box-sizing: border-box;
  width: 8px;
  height: 10px;
  border-inline: 2px solid currentColor;
}

.cz-hero-showcase__toggle[data-paused="true"]::before {
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-right: 0;
  border-left: 8px solid currentColor;
}

.cz-hero-showcase__indicator {
  position: relative;
}

.cz-hero-showcase__captions {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  display: grid;
  transform: translateX(-50%);
}

.cz-hero-showcase__caption {
  grid-area: 1 / 1;
  color: #fff;
  font-size: clamp(9px, 2.1cqh, 11px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: .1em;
  text-align: center;
  text-shadow: 0 1px 4px #371124a8;
  white-space: nowrap;
  animation: var(--slide-context-animation, none);
}

.cz-hero-showcase__caption:not([data-position="center"]) {
  visibility: hidden;
}

.cz-hero-showcase[data-running] .cz-hero-showcase__caption {
  animation-play-state: running;
}

.cz-hero-showcase__progress {
  display: flex;
  gap: 4px;
}

.cz-hero-showcase__track {
  display: block;
  overflow: hidden;
  width: clamp(20px, 6cqw, 37px);
  height: 3px;
  border-radius: 3px;
  background: #37112459;
}

.cz-hero-showcase__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #371124;
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
}

@media (max-width: 768px) {
  .cz-hero-showcase__artwork {
    --phone-width: min(74cqw, 425px);
    --phone-offset: 65cqw;
    --phone-top: 5.5cqh;
    --side-drop: 19cqh;
  }

  .cz-hero-showcase__phone:not([data-position="center"]) {
    visibility: hidden;
  }

  .cz-hero-showcase__phone[data-motion="advance"][data-position="center"] {
    animation-name: cz-showcase-mobile-enter;
  }

  .cz-hero-showcase__phone[data-motion="advance"][data-position="right"] {
    animation-name: cz-showcase-mobile-exit;
  }

  .cz-hero-showcase__plate--left {
    top: 24%;
    left: -6%;
    width: 49%;
  }

  .cz-hero-showcase__plate--center {
    top: 12%;
    left: 36%;
    width: 61%;
  }

  .cz-hero-showcase__plate--right {
    top: 20%;
    right: -5%;
    width: 49%;
  }

  .cz-hero-showcase__bubble {
    gap: .55em;
    padding: .63em .7em;
    border-radius: 10px;
    font-size: clamp(11px, 3.1cqw, 14px);
  }

  .cz-hero-showcase__bubble:not([data-position="center"]) {
    visibility: hidden;
  }

  /* Match the handset's existing handoff at 44% of the 820ms motion. */
  .cz-hero-showcase [data-slide-for][data-motion="advance"][data-position="center"] {
    --slide-context-animation: cz-showcase-context-enter 820ms linear both paused;
  }

  .cz-hero-showcase [data-slide-for][data-motion="advance"][data-position="right"] {
    --slide-context-animation: cz-showcase-context-exit 820ms linear both paused;
  }

  .cz-hero-showcase__bubble--offer {
    top: 14%;
    left: 4%;
    width: max-content;
  }

  .cz-hero-showcase__bubble--payout {
    top: 47%;
    right: 4%;
    width: max-content;
  }

  .cz-hero-showcase__bubble--review {
    width: 15.4em;
    top: 70%;
    left: 4%;
  }

  .cz-hero-showcase__controls {
    bottom: 0;
  }
}

/* Mobile uses the center slot only. The phones take turns in the same frame. */
@keyframes cz-showcase-mobile-exit {
  0%, 22% { transform: var(--phone-center); opacity: 1; visibility: visible; }
  44%, 100% { transform: translate3d(-50%, -12px, 0); opacity: 0; visibility: hidden; }
}

@keyframes cz-showcase-mobile-enter {
  0%, 44% { transform: translate3d(-50%, 16px, 0); opacity: 0; visibility: hidden; }
  74%, 100% { transform: var(--phone-center); opacity: 1; visibility: visible; }
}

@keyframes cz-showcase-context-exit {
  0%, 22% { opacity: 1; visibility: visible; }
  44%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes cz-showcase-context-enter {
  0%, 44% { opacity: 0; visibility: hidden; }
  74%, 100% { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-hero-showcase[data-ready] .cz-hero-showcase__phone[data-motion] {
    animation: none;
  }

  .cz-hero-showcase__bubble {
    animation: none;
  }
}
