/* Front-facing laptop and phone for the real StruXure.co screens (art/sxdevice.py, device.js). 7 Nov, scheme 1 pass:
   the screen faces the reader, flat and readable; a still opens large on click; a video grows to fill the box. */
.dv { --dv-frame: #1b2230; --dv-al: #dfe4ec; --dv-al2: #c4ccd8; --dv-edge: #9aa5b5; position: relative; margin: 0; width: 100%; }
.dv-shadow { position: absolute; left: 6%; right: 6%; bottom: -10px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(16, 45, 123, .22), rgba(16, 45, 123, 0)); z-index: -1; }

/* laptop: lid with bezel and camera, then the keyboard deck (SVG) */
.dv-lid { position: relative; width: 88%; margin: 0 auto; background: var(--dv-frame); border-radius: 14px 14px 3px 3px; padding: 2.4% 2.2% 2.8%; box-shadow: inset 0 0 0 1.5px #3a4457, 0 1px 0 #0e131c; }
.dv-cam { position: absolute; top: .9%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #3b4558; box-shadow: inset 0 0 0 1.5px #0d1119; }
.dv-scr { position: relative; overflow: hidden; background: #fff; }
.dv-laptop .dv-scr { aspect-ratio: 16 / 10; border-radius: 3px; }
.dv-scr img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.dv-deck { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 136; margin-top: -1px; overflow: visible; }
.dv-deck-top { fill: var(--dv-al); stroke: var(--dv-edge); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dv-deck-lip { fill: var(--dv-al2); stroke: var(--dv-edge); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dv-hinge { fill: #4a5468; }
.dv-key { fill: #f5f7fa; stroke: #b6bfcc; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-pad { fill: #e9edf3; stroke: #aeb8c6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dv-notch { fill: #aab3c1; }

/* phone: rounded frame, island, side buttons */
.dv-phone { max-width: 300px; margin-inline: auto; }
.dv-ph { position: relative; background: var(--dv-frame); border-radius: 15% / 7%; padding: 4.2%; box-shadow: inset 0 0 0 2px #3a4457, 0 0 0 1.5px #0e131c; }
.dv-phone .dv-scr { aspect-ratio: 9 / 19.5; border-radius: 11% / 5%; padding-top: 9%; }
.dv-island { position: absolute; z-index: 2; top: 1.6%; left: 50%; width: 30%; height: 2.6%; transform: translateX(-50%); border-radius: 99px; background: var(--dv-frame); pointer-events: none; }
.dv-btn { position: absolute; width: 3px; border-radius: 2px; background: #2c3445; }
.dv-btn-a { left: -3px; top: 17%; height: 7%; }
.dv-btn-b { right: -3px; top: 22%; height: 11%; }

/* the screen is a button: still -> open large; video -> play */
.dv-scr .dv-zoom, .dv-scr .mp4 { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; font: inherit; color: inherit; }
.dv-scr .mp4 { cursor: pointer; }
.dv-scr .dv-zoom img, .dv-scr .mp4 img { transition: filter .25s ease-out; }
@media (hover: hover) and (pointer: fine) { .dv-scr .dv-zoom:hover img, .dv-scr .mp4:hover img { filter: brightness(.93); } }
.dv-zi { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(16, 45, 123, .88); box-shadow: 0 6px 16px -6px rgba(16, 45, 123, .6); }
.dv-zi::before { content: ''; position: absolute; left: 9px; top: 9px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; }
.dv-zi::after { content: ''; position: absolute; left: 20px; top: 21px; width: 7px; height: 2px; background: #fff; transform: rotate(45deg); transform-origin: left center; }
.dv-scr .mp4 .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--teal-deep, #0a6f8f); display: grid; place-items: center; box-shadow: 0 10px 28px -8px rgba(16, 45, 123, .55); transition: background-color .18s, transform .18s cubic-bezier(.23, 1, .32, 1); }
.dv-scr .mp4 .play::before { content: ''; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
@media (hover: hover) and (pointer: fine) { .dv-scr .mp4:hover .play { background: var(--navy, #102d7b); transform: scale(1.06); } }
.dv-cue { position: absolute; left: 50%; top: calc(50% + 44px); transform: translateX(-50%); padding: 4px 10px; border-radius: 99px; background: rgba(16, 45, 123, .88); color: #fff; font: 600 12px/1.2 var(--sans, sans-serif); white-space: nowrap; }
.dv-phone .dv-cue { display: none; }
.dv-scr .dv-zoom:focus-visible, .dv-scr .mp4:focus-visible { outline: 3px solid var(--blue, #3aa0dc); outline-offset: -3px; }

/* video playing: the player fills the device's box and covers the device; it goes back when it ends or scrolls away */
.dv-vid { display: none; }
.dv.dv-on { max-width: none; }
.dv.dv-on > :not(.dv-vid) { visibility: hidden; }
.dv.dv-on .dv-vid { display: block; position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: #0d1626; border-radius: 12px; box-shadow: 0 24px 60px -20px rgba(16, 45, 123, .55); animation: dv-in .26s cubic-bezier(.23, 1, .32, 1); }
.dv.dv-on .dv-vid video { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 12px; background: #0d1626; }
.dv-x { position: absolute; z-index: 2; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); cursor: pointer; }
.dv-x::before, .dv-x::after { content: ''; position: absolute; left: 11px; top: 17px; width: 14px; height: 2px; background: var(--navy, #102d7b); transform: rotate(45deg); }
.dv-x::after { transform: rotate(-45deg); }
.dv-x:focus-visible { outline: 3px solid var(--blue, #3aa0dc); outline-offset: 2px; }
/* a phone's video is landscape: give it the column's width while it plays */
.dv-phone.dv-on { aspect-ratio: 16 / 10; max-width: 100%; }
.dv-phone.dv-on .dv-ph { display: none; }
@keyframes dv-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dv.dv-on .dv-vid { animation: none; } }

/* the larger view of a still screenshot */
.dv-lb { width: min(1280px, 94vw); max-width: none; max-height: 92vh; padding: 0; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 30px 80px -20px rgba(9, 20, 50, .6); overflow: auto; }
.dv-lb::backdrop { background: rgba(9, 20, 50, .72); }
.dv-lb[open] { animation: dv-in .22s cubic-bezier(.23, 1, .32, 1); }
.dv-lb img { display: block; width: 100%; height: auto; }
.dv-lb.ph { width: min(440px, 94vw); }
.dv-lb p { margin: 0; padding: 12px 56px 14px 16px; font: 500 14px/1.45 var(--sans, sans-serif); color: var(--ink-soft, #44506a); }
.dv-lb .dv-x { position: sticky; float: right; top: 10px; margin: 10px 10px -46px 0; background: var(--navy, #102d7b); }
.dv-lb .dv-x::before, .dv-lb .dv-x::after { background: #fff; }
.dv-vid video::-webkit-media-controls-fullscreen-button { display: none; }
