/* Device true demo frames and the home page scroll tilt.
   The frame takes the shape of the viewer's own device class:
   over 1024px a laptop (16:10 screen), 769 to 1024px a tablet (4:3, 3:4 in portrait), 768px and under a phone.
   The screen is sized from the viewport (dvh) so the whole device fits on screen; content scrolls inside it.
   Demo layouts inside respond to the screen width through the "pgs" container (see playground.css). */

.dvf{--bezel:#0b0f2e;--rim:#2a2f66;position:relative;left:50%;translate:-50% 0;margin:0;
 width:min(calc(100vw - 64px),max(640px,calc((100dvh - 190px) * 1.6 + 32px)),1480px)}
.dvf-body{position:relative;background:var(--bezel);border:1px solid var(--rim);border-radius:22px 22px 12px 12px;padding:20px 14px 14px;
 box-shadow:0 0 0 1px rgba(199,182,255,.14),0 30px 60px -28px rgba(11,15,46,.55),0 70px 120px -60px rgba(108,92,231,.45),inset 0 1px 0 rgba(255,255,255,.08)}
.dvf-cam{position:absolute;top:7px;left:50%;width:7px;height:7px;margin-left:-3.5px;border-radius:50%;background:#1d2250;box-shadow:0 0 0 2px #141842,inset 0 0 0 2px #2c3373;z-index:3}
.dvf-screen{position:relative;background:#fff;border-radius:6px;overflow:hidden;display:flex;flex-direction:column;aspect-ratio:16/10}
.dvf-status{display:none}
.dvf-scroll{flex:1;min-height:0;overflow:auto;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#c9c4e6 transparent;-webkit-overflow-scrolling:touch}
.dvf-scroll:focus-visible{outline:2px solid var(--violet,#5a3fc4);outline-offset:-3px}
.dvf-base{position:relative;height:16px;margin:0 -3.5%;border-radius:2px 2px 16px 16px;background:linear-gradient(#d9d7e8,#a9a6c2 70%,#8f8ca9);box-shadow:0 18px 30px -18px rgba(11,15,46,.55)}
.dvf-base::before{content:"";position:absolute;left:50%;top:0;width:16%;height:6px;translate:-50% 0;border-radius:0 0 8px 8px;background:#8f8ca8}

/* scroll hint: shows while there is more below, fades at the end */
.dvf-hint{position:absolute;left:0;right:0;bottom:0;height:72px;display:flex;align-items:flex-end;justify-content:center;padding-bottom:12px;pointer-events:none;
 background:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,.96));opacity:0;transition:opacity .3s;z-index:6}
.dvf-hint span{display:inline-flex;align-items:center;gap:6px;background:#0b0f2e;color:#fff;font:600 12px/1 Inter,system-ui,sans-serif;border-radius:99px;padding:8px 12px;box-shadow:0 8px 18px -8px rgba(11,15,46,.6)}
.dvf-hint svg{animation:dvfnudge 1.6s ease-in-out infinite}
.dvf.more .dvf-hint{opacity:1}
@keyframes dvfnudge{0%,100%{transform:translateY(-1px)}50%{transform:translateY(3px)}}

/* what sits inside the screen */
.dvf .pgtabs{position:sticky;top:0;z-index:5;margin:0!important;padding:10px!important;gap:8px!important;background:rgba(255,255,255,.94)!important;
 -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)!important;border-radius:0!important}
.dvf .pgtabs{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.dvf .pgtabs button:last-child{grid-column:auto!important}
.dvf .pgtabs button{padding:10px 14px!important;border-radius:12px!important;gap:2px!important}
.dvf .pgtabs button span{display:none}
.dvf .pgtabs button b{font-size:16px}
.dvf .pgwin{border:0;border-radius:0;box-shadow:none}
.dvf .pgchrome{padding:9px 16px}
.dvf .pgstage{border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;padding:18px!important}

/* tablet */
@media (min-width:769px) and (max-width:1024px){
 .dvf{width:min(100%,max(520px,calc((100dvh - 190px) * 4 / 3 + 40px)))}
 .dvf-body{border-radius:30px;padding:20px}
 .dvf-screen{aspect-ratio:4/3;border-radius:10px}
 .dvf-base{display:none}
 .dvf .pgtabs button em{display:none}
}
@media (min-width:769px) and (max-width:1024px) and (orientation:portrait){
 .dvf{width:min(100%,max(460px,calc((100dvh - 200px) * 3 / 4 + 40px)))}
 .dvf-screen{aspect-ratio:3/4}
}

/* landscape phones and other short screens over 768px wide: use the height that is there */
@media (min-width:769px) and (max-height:520px){
 .dvf{left:auto;translate:none;margin:0 auto;width:min(100%,960px)}
 .dvf-screen{aspect-ratio:auto;height:calc(100dvh - 120px);min-height:240px}
 .dvf-body{padding:12px}
 .dvf-base{display:none}
 .dvf .pgtabs{padding:6px 8px!important;gap:6px!important}
 .dvf .pgtabs button{padding:6px 10px!important;min-height:44px!important}
 .dvf .pgtabs button em{display:none}
 .dvf .pgtabs button b{font-size:13.5px}
}
/* phone: close to the phone's own width and height, with an island and a status bar */
@media (max-width:768px){
 .dvf{left:auto;translate:none;margin:0 auto;width:min(100%,440px)}
 .dvf-body{border-radius:46px;padding:9px;border-color:#262b5e}
 .dvf-screen{aspect-ratio:auto;height:max(520px,calc(100svh - 128px));border-radius:38px}
 .dvf-cam{top:17px;width:86px;height:25px;margin-left:-43px;border-radius:99px;background:#03041a;box-shadow:none}
 .dvf-status{display:flex;flex:none;justify-content:space-between;align-items:center;height:42px;padding:6px 26px 0;font:600 12.5px Inter,system-ui,sans-serif;color:#0b0f2e;background:#fff}
 .dvf-base{display:none}
 .dvf .pgtabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;padding:8px 10px!important;gap:6px!important;scroll-snap-type:x proximity}
 .dvf .pgtabs::-webkit-scrollbar{display:none}
 .dvf .pgtabs button{flex:none;min-height:44px!important;padding:8px 14px!important;border-radius:99px!important;justify-content:center!important;scroll-snap-align:start}
 .dvf .pgtabs button em{display:none}
 .dvf .pgtabs button b{font-size:14px;white-space:nowrap}
 .dvf .pgtabs button:last-child{grid-column:auto}
 .dvf .pgchrome{display:none}
 .dvf .pgstage{padding:10px!important}
 /* the chat and auto demos draw their own phone; inside a phone frame they become plain screens */
 .dvf .phone{padding:0;background:none;border-radius:22px;box-shadow:0 0 0 1px var(--line)}
 .dvf .ph-screen{border-radius:22px}
 .dvf .ph-status{display:none}
 .dvf .sv-dev.phone{border-width:4px;border-radius:24px}
}

/* home page: the five demos in a dark card that stays still (no tilt since Ruslan, Nov 25) */
.cs{position:relative}
.cs-title{display:block!important;text-align:center;max-width:900px;margin:0 auto var(--s4,32px)}
.cs-title h2{margin:12px auto 0}
.cs-title p{margin:14px auto 0;max-width:560px}
.cs-stage{position:relative;padding-bottom:8px}
/* Home page: the five demos in one dark card (Ruslan preferred this to a laptop, Nov 25; he asked for no scroll movement).
   The device frames (.dvf) stay on the Playground and service pages. */
.cs-card{max-width:1280px;margin:0 auto;background:#0b0f2e;border:3px solid #2a2f66;border-radius:30px;padding:14px;transform-origin:50% 0;
 box-shadow:0 0 0 1px rgba(199,182,255,.18),0 9px 20px rgba(11,15,46,.28),0 37px 37px rgba(11,15,46,.22),0 84px 50px rgba(11,15,46,.12),0 0 90px -30px rgba(108,92,231,.55)}
.cs-screen{background:#fff;border-radius:20px;padding:18px;overflow:hidden}
.cs-screen .pgtabs{margin-bottom:16px}
.cs-screen .pgwin{box-shadow:none;border-radius:16px}
@media (max-width:768px){
 .cs-card{border-radius:22px;padding:6px;border-width:2px}
 .cs-screen{border-radius:16px;padding:8px}
 .cs-screen .pgtabs{margin-bottom:10px}
}
@media (prefers-reduced-motion:reduce){.cs-card,.cs-title{transform:none!important}.dvf-hint svg{animation:none}.dvf-scroll{scroll-behavior:auto}}
