#phone-showcase {
  --fan-open: 1;
  color: #10283e;
  background: #a5b8c9;
}

.phone-fan__stage {
  --fan-photo-width: clamp(8rem, 43vw, 21rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.5rem, 1.65vw, 1.35rem);
  padding: clamp(2.25rem, 5vw, 4rem) 1rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 21% 0%, #fff 0%, #f4f8fb 35%, transparent 70%),
    linear-gradient(154deg, #dfe8ef 15%, #c0d1de 55%, #819cb4 100%);
}

.phone-fan__stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 53%, #f4fbff 0%, #e6f4ff70 28%, transparent 66%);
  opacity: calc(.34 + .44 * var(--fan-open));
  transform: translateX(calc(-9% + 14% * var(--fan-open)));
}

.phone-fan__stage h2 {
  z-index: 1;
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  letter-spacing: -.065em;
  line-height: 1;
  text-wrap: balance;
}

.phone-fan__phones {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 100%;
  block-size: calc(var(--fan-photo-width) * 1.43);
  pointer-events: none;
}

.phone-fan__phones::before {
  content: "";
  position: absolute;
  inset-block-end: -2%;
  inline-size: calc(var(--fan-photo-width) * 2.2);
  block-size: 18%;
  background: radial-gradient(ellipse, #28486254, transparent 70%);
  transform: scaleX(calc(.56 + .44 * var(--fan-open)));
}

.phone-fan__photo {
  grid-area: 1 / 1;
  inline-size: var(--fan-photo-width);
  transform-origin: 50% 76%;
  filter: drop-shadow(0 .65rem .8rem #172f5050);
}

.phone-fan__photo img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

.phone-fan__photo--left {
  transform:
    translate(calc(-5% - 31% * var(--fan-open)), calc(2% + 4% * var(--fan-open)))
    rotate(calc(-4deg - 17deg * var(--fan-open))) scale(.94);
}

.phone-fan__photo--right {
  transform:
    translate(calc(5% + 32% * var(--fan-open)), calc(3% + 5% * var(--fan-open)))
    rotate(calc(4deg + 15deg * var(--fan-open))) scale(.9);
}

.phone-fan__photo--center {
  transform: translateY(calc(1% - 4% * var(--fan-open))) rotate(calc(2deg - 4deg * var(--fan-open)));
}

.phone-fan__link {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .75em;
  margin-block-start: .95rem;
  min-block-size: 44px;
  padding: .57em 1em;
  border: 1px solid #132f49;
  border-radius: 999px;
  background: #132f49;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.phone-fan__link:hover { background: #224c70; }
.phone-fan__link:focus-visible { outline: 3px solid #174f9a; outline-offset: 4px; }

@media (min-height: 650px) and (prefers-reduced-motion: no-preference) {
  :root:not([data-ym-motion="off"]) #phone-showcase[data-fan-active] {
    --fan-open: var(--fan-scroll, 0);
  }

  :root:not([data-ym-motion="off"]) #phone-showcase[data-fan-active]::after {
    content: "";
    display: block;
    block-size: 54svh;
  }

  :root:not([data-ym-motion="off"]) #phone-showcase[data-fan-active] .phone-fan__stage {
    --fan-photo-width: clamp(8rem, min(43vw, 37svh), 21rem);
    position: sticky;
    inset-block-start: var(--fan-header, 0px);
    min-block-size: calc(100svh - var(--fan-header, 0px));
    padding-block: clamp(1.5rem, 3svh, 3rem);
  }
}

@media (forced-colors: active) {
  .phone-fan__link { border-color: LinkText; color: LinkText; }
}
