/* Home mobile-app carousel; scoped so the rest of the Home design is untouched. */
.phone-slider {
  position: relative;
  isolation: isolate;
  width: min(270px, 78vw);
  margin: 0 auto;
}

.phone-slider__device {
  position: relative;
  width: 100%;
  aspect-ratio: .515;
  overflow: hidden;
  border: 1px solid rgba(11, 25, 39, .8);
  border-radius: 41px;
  background: linear-gradient(145deg, #3b4858 0%, #25313f 55%, #111923 100%);
  box-shadow: 0 24px 44px rgba(19, 40, 59, .30), 0 5px 12px rgba(19, 40, 59, .16);
}

.phone-slider__screen {
  position: absolute;
  inset: 8px 8px 51px;
  overflow: hidden;
  border-radius: 32px 32px 2px 2px;
  background: #f2f2f2;
}

.phone-slider__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .3s ease;
}

.phone-slider__image.is-active { opacity: 1; }

.phone-slider__notch {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 50%;
  width: min(132px, 56%);
  height: 23px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background: #050609;
  pointer-events: none;
}

.phone-slider__bottom-bezel {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: 42px;
  border-radius: 0 0 31px 31px;
  background: #020305;
  pointer-events: none;
}

.phone-slider__control {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(75, 120, 219, .12);
  border-radius: 50%;
  color: #4b78db;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 16px rgba(42, 79, 129, .12);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.phone-slider__control--previous { left: -18px; }
.phone-slider__control--next { right: -18px; }
.phone-slider__control svg { width: 17px; height: 17px; }
.phone-slider__control svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.phone-slider__control:hover {
  transform: translateY(-50%) scale(1.06);
  background: #fff;
  box-shadow: 0 8px 19px rgba(42, 79, 129, .20);
}
.phone-slider__control:focus-visible {
  outline: 3px solid rgba(66, 188, 226, .7);
  outline-offset: 3px;
}

.phone-slider__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 420px) {
  .phone-slider { width: min(270px, 76vw); }
  .phone-slider__control { width: 35px; height: 35px; }
  .phone-slider__control--previous { left: -15px; }
  .phone-slider__control--next { right: -15px; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-slider__image,
  .phone-slider__control { transition: none; }
}
