/* Device frames from the Wren site (assistant-build/site/drafts/devices). Their drop shadow is part of the artwork. taste-skill-ignore */
/* Wren device frames. No dependencies, no requests to other sites.
   <figure class="dv dv-iphone">
     <img class="dv-screen" src="../shots/ios-today-light.jpg" width="460" height="1000" alt="...">
     <img class="dv-frame" src="../devices/iphone.svg" alt="" aria-hidden="true">
   </figure>
   The figure fills its container's width (set a width on it, or on its parent); the device scales with it and the
   figure reserves its height from the frame's aspect ratio, so nothing shifts while images load.
   Devices: dv-iphone, dv-galaxy, dv-duo, dv-fold. Numbers are explained in README.md. */

.dv {
  --dv-shadow: 0 .35cqw .9cqw rgba(15, 16, 22, .20), 0 3.5cqw 7cqw -2.5cqw rgba(15, 16, 22, .30), 0 9cqw 16cqw -7cqw rgba(15, 16, 22, .34);
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  aspect-ratio: var(--dv-ar);
  container-type: inline-size;
}
/* the soft drop shadow sits under the device body; .dv-flat turns it off */
.dv::before {
  content: "";
  position: absolute;
  inset: var(--dv-bt) var(--dv-bl);
  border-radius: var(--dv-br);
  box-shadow: var(--dv-shadow);
  pointer-events: none;
}
.dv.dv-flat::before { display: none; }

.dv > .dv-screen {
  position: absolute;
  left: var(--dv-l);
  top: var(--dv-t);
  width: var(--dv-w);
  height: var(--dv-h);
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: var(--dv-r);
  background: #000;
}
.dv > .dv-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  pointer-events: none;
  user-select: none;
}

/* Light/dark screenshot pairs: put both screens in the figure, tagged dv-light and dv-dark.
   The dark one shows when an ancestor has data-theme="dark", or the system is dark and no ancestor says light.
   Pages with their own swap classes (e.g. only-light / only-dark) can use those instead: stacked screens are fine. */
.dv > .dv-dark { display: none; }
[data-theme="dark"] .dv > .dv-dark, [data-theme="light"] [data-theme="dark"] .dv > .dv-dark { display: block; }
[data-theme="dark"] .dv > .dv-light, [data-theme="light"] [data-theme="dark"] .dv > .dv-light { display: none; }
[data-theme="dark"] [data-theme="light"] .dv > .dv-dark { display: none; }
[data-theme="dark"] [data-theme="light"] .dv > .dv-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dv > .dv-dark { display: block; }
  :root:not([data-theme="light"]) .dv > .dv-light { display: none; }
  :root:not([data-theme="light"]) [data-theme="light"] .dv > .dv-dark { display: none; }
  :root:not([data-theme="light"]) [data-theme="light"] .dv > .dv-light { display: block; }
  :root:not([data-theme="light"]) [data-theme="light"] [data-theme="dark"] .dv > .dv-dark { display: block; }
  :root:not([data-theme="light"]) [data-theme="light"] [data-theme="dark"] .dv > .dv-light { display: none; }
}

/* Per-device geometry: aspect ratio, screen insets and corner radius, device body inset and radius (for the shadow). */
.dv-iphone { --dv-ar: 506 / 1046; --dv-l: 4.5455%; --dv-t: 2.1989%; --dv-w: 90.9091%; --dv-h: 95.6023%; --dv-r: 13.6957% / 6.3000%; --dv-bl: 0.7905%; --dv-bt: 0.3824%; --dv-br: 16.4659% / 7.8998%; }
.dv-galaxy { --dv-ar: 492 / 1042; --dv-l: 4.2683%; --dv-t: 2.0154%; --dv-w: 91.4634%; --dv-h: 95.9693%; --dv-r: 10.2222% / 4.6000%; --dv-bl: 0.8130%; --dv-bt: 0.3839%; --dv-br: 13.0165% / 6.0928%; }
.dv-duo    { --dv-ar: 1256 / 900; --dv-l: 2.2293%; --dv-t: 3.1111%; --dv-w: 95.5414%; --dv-h: 93.7778%; --dv-r: 3.3333% / 4.7393%; --dv-bl: 0.3185%; --dv-bt: 0.4444%; --dv-br: 5.1282% / 7.1749%; }
.dv-fold   { --dv-ar: 1015 / 1254; --dv-l: 2.6601%; --dv-t: 2.1531%; --dv-w: 94.6798%; --dv-h: 95.6938%; --dv-r: 2.9136% / 2.3333%; --dv-bl: 0.3941%; --dv-bt: 0.3190%; --dv-br: 5.0645% / 4.0931%; }
