/* iPhone- and iPad-style device frames for the marketing pages, built in CSS (no artwork). They are
   look-alikes for showing the real app on a phone and a tablet, not Apple's official bezels, and not a
   statement that the app is certified for any particular device or browser.
   Load after home.css (uses its --f-body and --f-mono).

   <div class="iphone" style="--strip:#091320;--ink:#fff">
     <div class="scr"><div class="bar"><span class="t">9:41</span><span class="ic"></span></div><img ...></div>
   </div>
   <div class="ipad"><div class="scr"><img ...></div></div>

   Size with --w (a length) from a context rule, not inline, so media queries can resize it.
   --strip is the screenshot's top-edge colour (it fills the status bar); --ink is the time and battery colour. */

:root {
  --status-icons: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 12'%3E%3Crect x='0' y='8' width='3' height='4' rx='1'/%3E%3Crect x='5' y='5.5' width='3' height='6.5' rx='1'/%3E%3Crect x='10' y='3' width='3' height='9' rx='1'/%3E%3Crect x='15' y='0' width='3' height='12' rx='1'/%3E%3Cpath d='M26 2.6c2.8 0 5.3 1.1 7.2 2.9l-1.4 1.4C30.2 5.4 28.2 4.6 26 4.6s-4.2.8-5.8 2.3l-1.4-1.4C20.7 3.7 23.2 2.6 26 2.6zm0 3.7c1.7 0 3.2.6 4.4 1.7l-1.4 1.4c-.8-.7-1.8-1.1-3-1.1s-2.2.4-3 1.1L21.6 8c1.2-1.1 2.7-1.7 4.4-1.7zm0 3.6l2 2.1h-4z'/%3E%3Crect x='38' y='0.5' width='22' height='11' rx='3.2' fill='none' stroke='%23000' stroke-opacity='.45'/%3E%3Crect x='40' y='2.5' width='18' height='7' rx='1.8'/%3E%3Crect x='61.5' y='4' width='2' height='4' rx='1' fill-opacity='.45'/%3E%3C/svg%3E");
}

.iphone { --w: 240px; --strip: #FFFFFF; --ink: #0B1118; position: relative; flex: 0 0 auto; width: var(--w); padding: calc(var(--w) * 0.036); border-radius: calc(var(--w) * 0.175); background: linear-gradient(145deg, #565b64 0%, #1b1e23 30%, #0c0e11 62%, #3d4149 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.65), 0 50px 90px -22px rgba(0, 0, 0, 0.7); }
.iphone::before { content: ""; position: absolute; left: -2.5px; top: 0; bottom: 0; width: 3px; pointer-events: none; border-radius: 2px 0 0 2px;
  background: linear-gradient(#23262c, #23262c) 0 22% / 100% 7% no-repeat, linear-gradient(#23262c, #23262c) 0 33% / 100% 12% no-repeat, linear-gradient(#23262c, #23262c) 0 48% / 100% 12% no-repeat; }
.iphone::after { content: ""; position: absolute; right: -2.5px; top: 38%; width: 3px; height: 18%; pointer-events: none; border-radius: 0 2px 2px 0; background: #23262c; }
.iphone .scr { position: relative; overflow: hidden; border-radius: calc(var(--w) * 0.139); background: var(--strip); }
.iphone .scr::after { content: ""; position: absolute; left: 50%; bottom: calc(var(--w) * 0.022); width: calc(var(--w) * 0.36); height: max(3px, calc(var(--w) * 0.018)); transform: translateX(-50%); border-radius: 99px; background: var(--ink); opacity: 0.6; }
.iphone .bar { position: relative; height: calc(var(--w) * 0.125); background: var(--strip); color: var(--ink); }
.iphone .bar::before { content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--w) * 0.29); height: calc(var(--w) * 0.082); transform: translate(-50%, -50%); border-radius: 999px; background: #000; }
.iphone .bar .t { position: absolute; left: calc(var(--w) * 0.1); top: 50%; transform: translateY(-50%); font: 600 calc(var(--w) * 0.056) / 1 var(--f-body); }
.iphone .bar .ic { position: absolute; right: calc(var(--w) * 0.085); top: 50%; width: calc(var(--w) * 0.2); height: calc(var(--w) * 0.037); transform: translateY(-50%); background: currentColor; -webkit-mask: var(--status-icons) center / contain no-repeat; mask: var(--status-icons) center / contain no-repeat; }
.iphone .scr img, .iphone .scr video { display: block; width: 100%; height: auto; }
.iphone .scr video { aspect-ratio: 624 / 1350; background: #091320; }
.iphone.dark { --strip: #091320; --ink: #FFFFFF; }
/* A page inside the app: the pale blue its header shows at the top edge, left to right. */
.iphone.app { --strip: linear-gradient(90deg, #DEEEFE, #F1F7FE 50%, #EDF8FE); }
.iphone.app .scr video { background: #EAF3FE; }

.ipad { --w: 480px; position: relative; flex: 0 0 auto; width: var(--w); padding: calc(var(--w) * 0.026); border-radius: calc(var(--w) * 0.052); background: linear-gradient(145deg, #565b64 0%, #1a1d22 32%, #0b0c0f 64%, #3b3f47 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.65), 0 50px 100px -26px rgba(0, 0, 0, 0.75); }
.ipad::before { content: ""; position: absolute; left: 50%; top: calc(var(--w) * 0.013); width: max(4px, calc(var(--w) * 0.009)); height: max(4px, calc(var(--w) * 0.009)); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #2d3d5c 0%, #07090d 62%); box-shadow: 0 0 0 1px #1d2026; }
.ipad::after { content: ""; position: absolute; top: -2.5px; right: calc(var(--w) * 0.12); width: calc(var(--w) * 0.05); height: 3px; border-radius: 2px 2px 0 0; background: #23262c; }
.ipad .scr { overflow: hidden; border-radius: calc(var(--w) * 0.026); background: #000; }
.ipad .scr img { display: block; width: 100%; height: auto; }

/* an iPad with an iPhone in front of it (hero) */
.devs { position: relative; width: 540px; height: 480px; max-width: 100%; justify-self: center; }
.devs .ipad { position: absolute; left: 0; top: 34px; --w: 480px; }
.devs .iphone { position: absolute; right: -6px; top: 40px; --w: 196px; }
.devs .note { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #7D8DA3; }
.devs .ring { position: absolute; left: 50%; top: 50%; width: 490px; height: 490px; margin: -245px 0 0 -245px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.08); }

@media (max-width: 720px) {
  .devs { width: 350px; height: 372px; }
  .devs .ipad { top: 20px; --w: 300px; }
  .devs .iphone { right: 0; top: 44px; --w: 138px; }
  .devs .note { bottom: -18px; }
  .devs .ring { width: 330px; height: 330px; margin: -165px 0 0 -165px; }
}

/* a MacBook-style laptop, an iPad and an iPhone showing the real app (homepage hero). Sizes follow the container
   width (container query units). CSS look-alikes, not Apple's artwork and not a statement of device certification. */
.devwrap { display: grid; gap: 14px; justify-items: center; justify-self: center; width: 100%; max-width: 540px; }
.devs3 { position: relative; container-type: inline-size; width: 100%; aspect-ratio: 560 / 470; }
.devs3 .laptop { position: absolute; left: 19cqw; top: 0; width: 76cqw; }
.devs3 .lid, .duo .lid { position: relative; background: #0a0c10; border-radius: 1.7cqw 1.7cqw .5cqw .5cqw; padding: .8cqw .8cqw 1.4cqw; box-shadow: 0 0 0 1px #2d333d inset, 0 40px 60px -30px rgba(0, 0, 0, .7); }
.devs3 .lid img, .duo .lid img { display: block; width: 100%; height: auto; border-radius: .6cqw; }
.devs3 .notch, .duo .notch { position: absolute; left: 50%; top: .8cqw; width: 9cqw; height: 1.5cqw; transform: translateX(-50%); background: #0a0c10; border-radius: 0 0 .9cqw .9cqw; z-index: 1; }
.devs3 .base, .duo .base { position: relative; height: 1.6cqw; width: 110%; margin-left: -5%; background: linear-gradient(#e6eaf0, #b4bcc8); border-radius: 0 0 2.2cqw 2.2cqw; box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .6); }
.devs3 .base::before, .duo .base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14cqw; height: .6cqw; transform: translateX(-50%); background: #9aa3b0; border-radius: 0 0 1cqw 1cqw; }
.devs3 .ipad { position: absolute; left: 0; bottom: 0; --w: 41cqw; z-index: 2; }
.devs3 .iphone { position: absolute; right: 2cqw; bottom: 0; --w: 22cqw; z-index: 3; }
/* A tablet (the one to look at) in front of a computer, for the "A day at the counter" chapters. */
.duo { position: relative; container-type: inline-size; width: 100%; aspect-ratio: 100 / 68; }
.duo .laptop { position: absolute; right: 0; top: 0; width: 52cqw; }
.duo .ipad { position: absolute; left: 0; bottom: 0; --w: 78cqw; z-index: 2; box-shadow: 0 30px 50px -24px rgba(6, 20, 50, .55); }
.devwrap .note { text-align: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7D8DA3; }
