/* Product shots: live version 2 screens, shown in a flat frame on the public pages.
   One file for every page, so a shot looks the same on the homepage, the sales page
   and checkout. build.mjs copies it into the brand folder beside site.css.

   <figure class="shot">
     <div class="dev" data-fit="1" style="--h:780; --y:0">
       <iframe data-shot src="app/app-home.html?shot=1&palette=plain" title="Kotona's Home screen on a phone" loading="lazy" tabindex="-1"></iframe>
     </div>
     <figcaption>What the caption says is also what a screen reader gets.</figcaption>
   </figure>

   .dev          a phone, 390 wide. --h is how much of the screen shows, in the screen's own px.
   .dev.tablet   the kitchen screen, 1180 by 820.
   .dev.desk     a laptop window, 1280 wide.
   --y           start the picture this many px down the screen (to show a lower block).
   --b           draw the screen this many px taller than the picture, so the bar fixed to the
                 foot of a phone screen (the add field and the tabs, 110px) falls outside it.
   .dev.cut      a part cut from a screen, not a whole phone: a thin frame, square corners.
                 Several cuts from one screen sit in a <div class="cuts"> inside the figure.
                 The public pages show only the parts of a screen the founding release has,
                 so most pictures are cuts.
   --s           scale. shots.js sets it from data-fit (the largest scale allowed, 1 = full size)
                 so the frame never overflows its column. Without scripts it stays at --s.
   --shot-frame  the frame's color. Defaults to the page's ink.

   The screens are pictures: they cannot be clicked, scrolled or tabbed into. */
.shot { margin: 0; min-width: 0; }
.shot .dev {
  --w: 390; --h: 780; --y: 0; --s: 1;
  box-sizing: content-box;
  position: relative;
  overflow: hidden;
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  max-width: 100%;
  border: 8px solid var(--shot-frame, #1D1D1F);
  border-radius: 18px;
  background: #FFFFFF;
}
.shot .dev.tablet { --w: 1180; --h: 820; --s: .5; border-width: 10px; border-radius: 12px; }
.shot .dev.desk { --w: 1280; --h: 800; --s: .5; border-width: 2px; border-radius: 4px; }
.shot .dev.cut { --b: 120; border-width: 2px; border-radius: 4px; }
.shot .cuts { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
.shot .dev iframe {
  display: block;
  border: 0;
  width: calc(var(--w) * 1px);
  height: calc((var(--h) + var(--y) + var(--b, 0)) * 1px);
  max-width: none;
  transform: translateY(calc(var(--y) * var(--s) * -1px)) scale(var(--s));
  transform-origin: 0 0;
  pointer-events: none;
}
.shot figcaption { margin-top: 10px; }
