/* The device frames every app page draws its screenshots in: iPhone, iPad, Apple Watch and a Mac window.
   Shared, so the apps' pages look like one family. Each page sets the colours: --frame (the bezel) and --screen
   (behind a screenshot while it loads). Where a frame sits and how big it is stays with the page. */

.phone {
  position: relative;
  width: 100%;
  max-width: 280px;
  padding: 8px;
  background: var(--frame);
  border-radius: 17.1% / 8.1%;
  box-shadow: 0 30px 60px -28px rgba(11, 11, 12, 0.5);
}

.phone img {
  border-radius: 15.2% / 7%;
  background: var(--screen);
}

/* The Dynamic Island, which the screenshots leave out. */
.phone::after {
  content: "";
  position: absolute;
  top: 2.6%;
  left: 50%;
  width: 29.5%;
  aspect-ratio: 126 / 37;
  transform: translateX(-50%);
  background: #000000;
  border-radius: 999px;
}

.tablet {
  padding: 12px;
  background: var(--frame);
  border-radius: 30px;
  box-shadow: 0 40px 80px -36px rgba(11, 11, 12, 0.55);
}

.tablet img {
  border-radius: 19px;
  background: var(--screen);
}

.watch {
  padding: 0.8%;
  background: var(--frame);
  border-radius: 26% / 22.5%;
  box-shadow: 0 30px 60px -24px rgba(11, 11, 12, 0.6);
}

/* The black around a watch's display: watch apps draw right up to the screen's edge, and without it the content
   would touch the case. */
.watch img {
  box-sizing: border-box;
  padding: 7%;
  border-radius: 22% / 18.5%;
  background: #000000;
}

/* A window screenshot keeps its own rounded corners. A hairline outlines it, so a dark window stands out on a
   dark page. */
.mac {
  overflow: hidden;
  border-radius: 1.6% / 2.6%;
  box-shadow:
    0 0 0 1px rgba(11, 11, 12, 0.12),
    0 30px 60px -24px rgba(11, 11, 12, 0.5);
}

.mac img {
  width: 100%;
  height: auto;
}

@media (prefers-color-scheme: dark) {
  .mac {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.16),
      0 30px 60px -24px rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 700px) {
  .tablet {
    padding: 6px;
    border-radius: 16px;
  }

  .tablet img {
    border-radius: 10px;
  }
}
