/* Static Solution presentation; keep the hero and other sections unchanged. */
.case-study-page .solution-showcase {
  --phone-width: 27.5%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  isolation: isolate;
  width: 100%;
  margin-top: 32px;
}

.case-study-page .solution-phone {
  position: relative;
  flex: 0 0 var(--phone-width);
  width: var(--phone-width);
  aspect-ratio: 483 / 974;
  margin: 0;
  filter: drop-shadow(0 12px 12px rgba(16, 43, 99, .1));
}

.case-study-page .solution-phone:nth-child(1) { z-index: 1; }
.case-study-page .solution-phone:nth-child(2) { z-index: 2; }
.case-study-page .solution-phone:nth-child(3) { z-index: 3; }
.case-study-page .solution-phone:nth-child(4) { z-index: 4; }

.case-study-page .solution-phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Crop to the existing 428 × 927 display area, without changing the image files.
 * The narrower width preserves its proportions at the framed phone's height. */
.case-study-page .solution-phone--screen {
  flex-basis: calc(var(--phone-width) * 428 / 927 * 974 / 483);
  width: calc(var(--phone-width) * 428 / 927 * 974 / 483);
  aspect-ratio: 428 / 927;
  margin-left: -3%;
  border-radius: calc(100% * 55.35 / 428) / calc(100% * 55.35 / 927);
  background: transparent;
  filter: none;
  box-shadow: -8px 10px 22px rgba(16, 43, 99, .18), 0 2px 5px rgba(16, 43, 99, .08);
}

/* Keep clipping inside the shadow-bearing shell so every screen casts its own
 * shadow. The inset radius excludes the original hardware's corner pixels. */
.case-study-page .solution-display {
  /* Even-odd geometry cuts a genuine transparent capsule out of the entire
   * display, including the white hardware cleanup layer. No external file URL. */
  --display-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 428 927'%3E%3Cpath fill='white' fill-rule='evenodd' d='M55.35 0H372.65A55.35 55.35 0 0 1 428 55.35V871.65A55.35 55.35 0 0 1 372.65 927H55.35A55.35 55.35 0 0 1 0 871.65V55.35A55.35 55.35 0 0 1 55.35 0Z M171 14H257A13 13 0 0 1 257 40H171A13 13 0 0 1 171 14Z'/%3E%3C/svg%3E");
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: white;
  -webkit-mask-image: var(--display-mask);
  mask-image: var(--display-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Remove the hardware-only status strip, including the camera cutout and any
 * cropped corner fragments, while leaving all application content untouched. */
.case-study-page .solution-display::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 6.5%;
  background: white;
  pointer-events: none;
}

.case-study-page .solution-phone--screen img {
  position: absolute;
  top: calc(-100% * 24 / 925);
  left: calc(-100% * 28 / 426);
  width: calc(100% * 483 / 426);
  height: calc(100% * 974 / 925);
  max-width: none;
}

/* The edited image has slightly different source bounds. Crop inside its white
 * display, excluding the thin black hardware edge instead of covering it. */
.case-study-page .solution-phone--application img {
  top: calc(-100% * 43 / 1694);
  left: calc(-100% * 52 / 772);
  width: calc(100% * 883 / 772);
  height: calc(100% * 1781 / 1694);
}

.case-study-page .solution-steps {
  display: grid;
  gap: 32px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.case-study-page .solution-steps > li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
}

.case-study-page .solution-step-number {
  color: var(--navy);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}

.case-study-page .solution-steps h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

.case-study-page .solution-steps p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .case-study-page .solution-showcase {
    --phone-width: 48%;
    flex-wrap: wrap;
    gap: 24px 3%;
    margin-top: 24px;
  }

  .case-study-page .solution-showcase .solution-phone {
    filter: none;
  }

  .case-study-page .solution-phone--screen {
    margin-left: 0;
  }

  .case-study-page .solution-steps {
    gap: 24px;
    margin-top: 32px;
  }

  .case-study-page .solution-steps > li {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 16px;
  }

  .case-study-page .solution-step-number {
    font-size: 48px;
  }
}
