/* preset: device-stage — a capture on a rigid device prop in CSS 3D. Tokens only: a SOLID token body
   (ink or paper finish), solid token edges for depth, a solid ink floor tint — no gradient, no glare,
   no blur, no glow (the upstream material gradient and glare law are replaced by tokens).
   Portions adapted from HeyGen HyperFrames (Apache-2.0), registry/components/device-frame-stage; modified by Dudoxx
   © Dudoxx UG / Acceleate Consulting - Walid Boudabbous <walid@acceleate.com> */
.preset-device-stage .col-text { flex-basis: 28cqw; }
.preset-device-stage .body { max-width: 28cqw; }
.ds { position: relative; flex: 1 1 0; min-width: 0; height: var(--safe-h); }
.ds-stage { position: absolute; inset: 0; perspective: 140cqw; perspective-origin: 50% 40%; }
.ds-cam { position: absolute; inset: 0; transform-style: preserve-3d; transform: scale(var(--ds-push, 1)); transform-origin: 50% 55%; }
.ds-device { --ds-bezel: 1.1cqw; --ds-depth: 1.3cqw; --ds-r: 1.6cqw;
  --ds-shell: var(--ink); --ds-side: color-mix(in oklch, var(--ink) 78%, var(--card)); --ds-side-2: color-mix(in oklch, var(--ink) 88%, var(--card));
  position: absolute; left: 50%; top: 50%; height: 86%; aspect-ratio: calc(var(--ds-ratio) * 1.0);
  transform-style: preserve-3d; transform-origin: 50% 88%;
  transform: translate(-50%, calc(-50% + var(--ds-y, 0%))) scale(var(--ds-s, 1)) rotateX(var(--ds-pitch, 0deg)) rotateY(var(--ds-yaw, 0deg)); }
.ds-body-paper { --ds-shell: var(--card); --ds-side: color-mix(in oklch, var(--ink) 16%, var(--card)); --ds-side-2: color-mix(in oklch, var(--ink) 26%, var(--card)); }
.ds-tablet { height: 84%; }
.ds-phone { --ds-bezel: 0.6cqw; --ds-r: 2.4cqw; --ds-depth: 0.9cqw; height: 96%; }
.ds-display { --ds-bezel: 0.55cqw; --ds-r: 0.7cqw; --ds-depth: 0.8cqw; height: 72%; top: 42%; }
.ds-front { position: absolute; inset: 0; border-radius: var(--ds-r); background: var(--ds-shell); padding: var(--ds-bezel);
  box-shadow: 0 0 0 1px var(--rule); backface-visibility: hidden; transform: translateZ(0); }
.ds-screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--card);
  border-radius: calc(var(--ds-r) - var(--ds-bezel)); }
.ds-view { position: absolute; inset: 0; transform-origin: 50% 50%; }
.ds-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.ds-cam-dot { position: absolute; left: 50%; top: calc(var(--ds-bezel) * 0.5); width: 0.35cqw; height: 0.35cqw; margin: -0.175cqw 0 0 -0.175cqw;
  border-radius: 50%; background: var(--ds-side); }
.ds-display .ds-cam-dot { display: none; }
.ds-island { position: absolute; left: 50%; top: 2.2%; width: 26%; height: 2.6%; transform: translateX(-50%); border-radius: 99em; background: var(--ink); }
/* slab edges: the device thickness, behind the front; backface culling keeps the visible two */
.ds-edge { position: absolute; display: block; backface-visibility: hidden; background: var(--ds-side); }
.ds-edge--s { left: var(--ds-r); right: var(--ds-r); top: 100%; height: var(--ds-depth); transform-origin: 50% 0; transform: rotateX(-90deg); background: var(--ds-side-2); }
.ds-edge--n { left: var(--ds-r); right: var(--ds-r); bottom: 100%; height: var(--ds-depth); transform-origin: 50% 100%; transform: rotateX(90deg); }
.ds-edge--e { left: 100%; top: var(--ds-r); bottom: var(--ds-r); width: var(--ds-depth); transform-origin: 0 50%; transform: rotateY(90deg); }
.ds-edge--w { right: 100%; top: var(--ds-r); bottom: var(--ds-r); width: var(--ds-depth); transform-origin: 100% 50%; transform: rotateY(-90deg); background: var(--ds-side-2); }
/* the back plate closes the slab so the corners read solid at an angle */
.ds-device::after { content: ''; position: absolute; inset: 0; border-radius: var(--ds-r); background: var(--ds-side-2);
  transform: translateZ(calc(-1 * var(--ds-depth))); }
.ds-stand { position: absolute; left: 50%; top: 78%; width: 30%; height: 18%; transform: translateX(-50%); }
.ds-neck { position: absolute; left: 44%; width: 12%; top: 0; height: 80%; background: var(--ds-side); border-radius: 0.2cqw; }
.ds-foot { position: absolute; left: 10%; width: 80%; bottom: 0; height: 22%; background: var(--ds-side-2); border-radius: 99em; }
.ds-floor { position: absolute; left: 50%; bottom: 2%; width: 56%; height: 5%; border-radius: 50%; background: var(--ink); opacity: 0; }
@media (max-width: 600px) and (orientation: portrait) {
  .preset-device-stage .col-text { flex-basis: auto; }
  .ds { height: 66cqw; width: 100%; flex: 0 0 auto; }
  .ds-device { --ds-bezel: 1.6cqw; --ds-depth: 2cqw; --ds-r: 3cqw; }
  .ds-phone { height: 100%; }
}
