/* A real iPhone around a screen. Usage: <span class="iphone"><img src="..."></span>, sized by its width.
   The image is a 393 x 852 screen that already carries its status bar and home indicator,
   with the app's content below the Dynamic Island. Everything scales with the phone's width. */
.iphone {
  container-type: inline-size;
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: 100 / 208.6;
  border-radius: 16.8% / 8.05%;
  background: linear-gradient(135deg, #a3a19b, #4b4945 16%, #2d2c29 50%, #4f4d48 84%, #aaa8a2);
  box-shadow: 0 1.4rem 2.8rem -1.3rem rgba(0, 0, 0, .55);
}
/* side buttons: action, volume up, volume down, power */
.iphone::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * max(1px, .6cqw));
  --b: linear-gradient(#5d5b56, #3d3b38);
  --w: max(1.5px, .8cqw);
  background:
    var(--b) 0 17.5% / var(--w) 3.1% no-repeat,
    var(--b) 0 24.8% / var(--w) 6.1% no-repeat,
    var(--b) 0 33% / var(--w) 6.1% no-repeat,
    var(--b) 100% 27.5% / var(--w) 9.6% no-repeat;
}
/* the screen, with its black glass border */
.iphone.iphone.iphone > img {
  position: absolute;
  left: 3.5cqw;
  top: 3.5cqw;
  width: 93cqw;
  height: 201.6cqw;
  max-width: none;
  object-fit: cover;
  object-position: top;
  border-radius: 13.3cqw;
  background: #000;
  box-shadow: 0 0 0 2.75cqw #060607;
}
/* Dynamic Island with its camera */
.iphone::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 6.1cqw;
  left: 50%;
  width: 29.8cqw;
  height: 8.7cqw;
  transform: translateX(-50%);
  border-radius: 99px;
  background: radial-gradient(circle 1.7cqw at 86% 50%, #1d2838, #0b0e14 58%, #000) #000;
}
