/* frame.css · an iPhone 15 Pro and a macOS browser window, drawn in CSS, around a demo made by hand (demos/<slug>.js).
   Tommi, 2026-11-14 (LINKS.md site-iphones-handmade-motion): «i telefoni devi farli effettivamente come gli iphones, le
   motion per far vedere come funzionano le app ... falle te a mano». Everything is drawn at the device's own size in design
   pixels (the iPhone 417 × 876 with a 393 × 852 screen, the window 1280 wide with a 1280 × 760 page) and scaled by --s,
   which frame.js keeps equal to the frame's width over its design width. */

/* ---------- iPhone 15 Pro, natural titanium ---------- */
.iphone, .iphone *, .iphone *::before, .iphone *::after, .bw, .bw *, .bw *::before, .bw *::after { box-sizing: border-box; }
.iphone { --s: 1; position: relative; flex: none; height: 100%; aspect-ratio: 417 / 876; border-radius: calc(var(--s) * 68px);
  padding: calc(var(--s) * 3px);
  background: linear-gradient(150deg, #e4e0d9 0%, #9a958e 14%, #d8d4cd 26%, #7d7973 44%, #b9b5ae 62%, #6c6862 80%, #cfcbc4 100%);
  box-shadow: 0 calc(var(--s) * 40px) calc(var(--s) * 90px) rgba(0, 0, 0, .55), 0 calc(var(--s) * 6px) calc(var(--s) * 16px) rgba(0, 0, 0, .35),
    inset 0 0 0 calc(var(--s) * 1px) rgba(255, 255, 255, .35); }
.iphone .ip-body { position: relative; width: 100%; height: 100%; border-radius: calc(var(--s) * 65px); padding: calc(var(--s) * 9px);
  background: #050506; box-shadow: inset 0 0 0 calc(var(--s) * 1.5px) #1b1b1d; }
.iphone .ip-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--s) * 56px); overflow: hidden; background: #000; isolation: isolate; }
.iphone .ip-canvas { position: absolute; left: 0; top: 0; width: 393px; height: 852px; transform-origin: 0 0; transform: scale(var(--s)); overflow: hidden; }
.iphone .ip-app { position: absolute; inset: 0; overflow: hidden; z-index: 0; isolation: isolate; }   /* its own stacking context: nothing in a demo covers the island or the status bar */
/* the status bar, the Dynamic Island and the home bar sit over the app, in its coordinates */
.iphone .ip-status { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 4px 32px 0 52px; font: 600 17px/1 -apple-system, "SF Pro Text", "Geist", system-ui, sans-serif; letter-spacing: -.01em; color: #fff; pointer-events: none; }
.iphone[data-status="dark"] .ip-status { color: #000; }
.iphone .ip-status svg { display: block; height: 12px; fill: currentColor; }
.iphone .ip-icons { display: flex; align-items: center; gap: 6px; }
.iphone .ip-island { position: absolute; left: 50%; top: 11px; width: 126px; height: 37px; margin-left: -63px; border-radius: 20px; background: #000; z-index: 60; }
.iphone .ip-home { position: absolute; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: #fff; z-index: 60; opacity: .9; }
.iphone[data-status="dark"] .ip-home { background: #000; opacity: .85; }
.iphone .ip-glare { position: absolute; inset: 0; z-index: 70; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 26%, transparent 42%); }
/* the buttons: action and volume on the left, side button on the right */
.iphone .ip-btn { position: absolute; width: calc(var(--s) * 4px); border-radius: calc(var(--s) * 2px);
  background: linear-gradient(90deg, #6f6b65, #c9c5be 45%, #8b8780); }
.iphone .ip-act { left: calc(var(--s) * -3px); top: 18.4%; height: 3.5%; }
.iphone .ip-vu { left: calc(var(--s) * -3px); top: 24.6%; height: 6.9%; }
.iphone .ip-vd { left: calc(var(--s) * -3px); top: 33.2%; height: 6.9%; }
.iphone .ip-pw { right: calc(var(--s) * -3px); top: 28.5%; height: 10.8%; }

/* ---------- a macOS browser window ---------- */
.bw { --s: 1; position: relative; flex: none; width: 100%; aspect-ratio: 1280 / 812; border-radius: calc(var(--s) * 14px); overflow: hidden;
  background: #fff; box-shadow: 0 calc(var(--s) * 40px) calc(var(--s) * 90px) rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .14); isolation: isolate; }
.bw .bw-bar { position: absolute; left: 0; top: 0; width: 1280px; height: 52px; transform-origin: 0 0; transform: scale(var(--s)); display: flex; align-items: center;
  padding: 0 18px; gap: 8px; background: linear-gradient(#f3f2f1, #e9e8e6); border-bottom: 1px solid #d3d2d0; z-index: 2; }
.bw .bw-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.bw .bw-bar i:nth-child(2) { background: #febc2e; } .bw .bw-bar i:nth-child(3) { background: #28c840; }
.bw .bw-url { position: absolute; left: 50%; top: 11px; width: 420px; height: 30px; margin-left: -210px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #dad9d7; font: 500 13px/1 -apple-system, "SF Pro Text", "Geist", system-ui, sans-serif; color: #3a3a3c; }
.bw .bw-title { position: absolute; left: 0; right: 0; text-align: center; font: 600 14px/1 -apple-system, "SF Pro Text", "Geist", system-ui, sans-serif; color: #4a4a4d; pointer-events: none; }
.bw[data-dark] .bw-bar { background: linear-gradient(#2c2c2e, #262628); border-bottom-color: #1a1a1c; }
.bw[data-dark] .bw-title { color: #c7c7cc; }
.bw .bw-url svg { width: 11px; height: 11px; fill: #6e6e73; }
.bw .bw-canvas { position: absolute; left: 0; top: calc(var(--s) * 52px); width: 1280px; height: 760px; transform-origin: 0 0; transform: scale(var(--s)); overflow: hidden; }
.bw .ip-app { position: absolute; inset: 0; overflow: hidden; z-index: 0; isolation: isolate; }
