/* Keep the supplied mobile screen intact inside a responsive device frame. */
.phone-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  isolation: isolate;
  background: #0d1d33;
}
.phone-device {
  position: absolute;
  height: 94%;
  aspect-ratio: .465;
  left: 50%;
  top: 3%;
  transform: translateX(-50%);
  border: 1px solid #657082;
  border-radius: 12% / 5.58%;
  background: #111720;
  box-shadow: 0 12px 26px #0005, 0 1px 3px #0008;
  container-type: inline-size;
}
.phone-glass {
  position: absolute;
  inset: 1.2% 2.4%;
  border-radius: 11% / 5.1%;
  background: #f6f2e9;
}
.phone-preview .phone-device img {
  position: absolute;
  inset: 11% 3% 9%;
  width: 94%;
  height: 80%;
  max-width: none;
  aspect-ratio: auto;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #f6f2e9;
  box-shadow: none;
  transform: none;
}
.phone-device::before {
  content: '';
  position: absolute;
  z-index: 1;
  width: 25%;
  height: 2.4%;
  top: 2.6%;
  left: 37.5%;
  border-radius: 10px;
  background: #111720;
}
.phone-device::after {
  content: '';
  position: absolute;
  z-index: 1;
  width: 29%;
  height: .5%;
  bottom: 2.2%;
  left: 35.5%;
  border-radius: 10px;
  background: #242a30;
}
.phone-status {
  position: absolute;
  top: 2.6%;
  inset-inline: 9%;
  height: 3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #262d33;
  font: 600 3cqw/1 system-ui, sans-serif;
}
.phone-status-icons { width: 16%; }
.phone-status-icons svg { display: block; width: 100%; height: auto; }
.phone-browser-bar {
  position: absolute;
  top: 7%;
  inset-inline: 5.5%;
  height: 3.6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 4%;
  border-radius: 1.4cqw;
  background: #e8e4dc;
  color: #505b65;
  font: 500 2.6cqw/1 system-ui, sans-serif;
}
.phone-page-title { color: #353f46; font-size: 2.4cqw; }
.phone-browser-toolbar {
  position: absolute;
  bottom: 4.4%;
  inset-inline: 8%;
  height: 3.7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #56677a;
  font: 300 6cqw/1 system-ui, sans-serif;
}
.phone-browser-toolbar svg { width: 4cqw; height: 4cqw; fill: none; stroke: currentColor; stroke-width: 1.4; }
.portfolio-card:hover .phone-device img { transform: none; }
.hero-collage > .phone-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 4px solid #294957;
  border-radius: 5px;
}
