/* The devices on the front page: Settled itself, recorded on a simulator with our own books, inside an
   iPad and an iPhone drawn here. Every measure is a share of the device's own width (container units), so
   a frame is the same shape at any size. Proportions from the devices: iPad Pro 11-inch (M4), screen
   834 by 1210 points; iPhone 17 Pro, screen 402 by 874. */

.films { position: relative; width: 100%; display: grid; justify-items: center; }
.device { position: relative; margin: 0; container-type: inline-size; isolation: isolate; }
.device .glass { position: absolute; overflow: hidden; background: #07080b; }
.device video, .device img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.device img { z-index: 0; } .device video { z-index: 1; }

/* The body: a dark aluminium edge catching light along its rim, the black glass of the front, a soft shadow on the table. */
.device .body { position: absolute; inset: 0; border-radius: var(--outer);
  background: linear-gradient(145deg, #4a4d53 0%, #23252a 18%, #16171b 50%, #2a2c31 82%, #55585e 100%);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.08), 0 2.4cqw 6cqw rgba(0,0,0,.55), 0 .6cqw 1.4cqw rgba(0,0,0,.4); }
.device .body::before { content: ""; position: absolute; inset: var(--rim); border-radius: calc(var(--outer) - var(--rim)); background: #050506;
  box-shadow: inset 0 0 0 .3cqw rgba(255,255,255,.035); }
.device .glass { inset: var(--bezel); border-radius: var(--inner); }
/* A faint sheen across the glass, the way a screen reads under a lamp. */
.device .glass::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,0) 34%); }

/* iPad Pro 11-inch, upright. The front camera sits in the right-hand bezel, halfway down. */
.device.ipad { width: 100%; --rim: .55cqw; --bezel: 3.3cqw; --inner: 2cqw; --outer: 5.3cqw;
  aspect-ratio: 892.9 / 1268.9; }   /* the screen (834 by 1210) inside a bezel of 3.3% of the whole width, each side */
.device.ipad .cam { position: absolute; z-index: 3; right: 1.35cqw; top: 50%; width: .9cqw; height: .9cqw; margin-top: -.45cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3140 0%, #0b0d12 60%); box-shadow: 0 0 0 .15cqw rgba(255,255,255,.05); }

/* iPhone 17 Pro. Buttons on the sides; the Dynamic Island is in the recording itself. */
.device.iphone { --rim: 1.1cqw; --bezel: 4.6cqw; --inner: 12.4cqw; --outer: 17cqw;
  aspect-ratio: 442.7 / 914.7; }   /* the screen (402 by 874, corners of 55) inside a bezel of 4.6% of the whole width */
.device.iphone .btn { position: absolute; z-index: -1; width: 1.4cqw; border-radius: .7cqw; background: linear-gradient(90deg, #3b3e44, #1a1b1f); }
.device.iphone .btn.action { left: -1cqw; top: 20%; height: 7cqw; }
.device.iphone .btn.up { left: -1cqw; top: 27.5%; height: 13cqw; }
.device.iphone .btn.down { left: -1cqw; top: 35.5%; height: 13cqw; }
.device.iphone .btn.side { right: -1cqw; top: 29%; height: 20cqw; background: linear-gradient(270deg, #3b3e44, #1a1b1f); }
.device.iphone .btn.control { right: -.8cqw; top: 51%; height: 9cqw; background: linear-gradient(270deg, #2c2e33, #16171a); }

/* The During scene: the iPad stands on the table, the phone in front of it at its right. */
/* The iPad on the table and, in front of it at its right, the phone: it stands a little lower, overlapping the
   iPad's corner, and the stage keeps room under the iPad for it, so the line below is never covered. */
.films.table .stage { position: relative; width: min(84%, 410px); margin-right: 8%; padding-bottom: 14%; }
.films.table .ipad { width: 100%; }
.films.table .iphone { position: absolute; right: -16%; bottom: 0; width: 38%; }
.films .said { margin: 26px 0 0; max-width: 30em; font-size: 14px; line-height: 1.5; color: var(--bone-55); text-align: center; text-wrap: balance; }

/* Before and After: the phone alone, upright, the size it is held at. */
.films.single .iphone { width: min(62%, 268px); }
