/* iPhone frame drawn in CSS: titanium bezel, side buttons, Dynamic Island and a pointer glare.
   .phone carries float and parallax, .phone__body carries the pointer tilt, so the transforms compose. */
.phone { position: relative; z-index: 1; width: var(--phone-w); flex: none; }
.phone__body {
  position: relative; padding: 7px; border-radius: calc(var(--phone-w) * 0.19);
  background: linear-gradient(145deg, #4a4d55, #17181c 30%, #2c2e34 70%, #0e0f12);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.16), 0 30px 60px -18px rgb(11 17 34 / 0.55),
    0 12px 24px -12px rgb(11 17 34 / 0.45);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out);
}
.phone__body::before, .phone__body::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a2c31;
}
.phone__body::before { left: -3px; top: 21%; height: 9%; box-shadow: 0 calc(var(--phone-w) * 0.22) 0 #2a2c31; }
.phone__body::after { right: -3px; top: 27%; height: 13%; }

.phone__screen {
  position: relative; overflow: hidden; aspect-ratio: 1179 / 2556;
  border-radius: calc(var(--phone-w) * 0.165); background: #000;
}
.phone__screen > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.phone__island {
  position: absolute; left: 50%; top: calc(7px + var(--phone-w) * 0.035);
  width: 31%; height: calc(var(--phone-w) * 0.085); border-radius: 999px;
  background: #000; transform: translateX(-50%);
}
.phone__glare {
  position: absolute; inset: 7px; overflow: hidden; pointer-events: none;
  border-radius: calc(var(--phone-w) * 0.165);
  opacity: var(--glare, 0); transition: opacity 0.4s;
}
.phone__glare::before {
  content: ""; position: absolute; left: -50%; top: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.12) 24%, transparent 42%);
  transform: translate(var(--gx, 0%), var(--gy, 0%));
}

/* Lock Screen: wallpaper, date and the large thin clock as live text, Live Activity near the bottom. */
.lock { color: #fff; text-align: center; }
.lock__date, .lock__time, .lock__activity { position: absolute; left: 0; right: 0; }
.lock__date {
  top: 13%; font: 600 calc(var(--phone-w) * 0.062) / 1 var(--font-clock);
  text-shadow: 0 1px 6px rgb(28 36 51 / 0.25);
}
.lock__time {
  top: 16.5%; font: 200 calc(var(--phone-w) * 0.31) / 1 var(--font-clock);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 14px rgb(28 36 51 / 0.2);
}
.lock__activity {
  top: 60%; width: 94%; margin-inline: auto; border-radius: calc(var(--phone-w) * 0.075);
  box-shadow: 0 10px 24px rgb(11 17 34 / 0.25);
}

/* Night: a soft mint halo behind the dark phone. */
.phone--halo::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 230%; height: 130%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(61 187 176 / 0.7), rgb(61 187 176 / 0.18) 55%, transparent);
  transform: translate(-50%, -50%);
}
