/* Layered WebLab desk slider */
.desk { position: relative; outline: none; border-radius: 34px; container-type: inline-size; }
.desk:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 60%, transparent); }
.desk-stage { position: relative; aspect-ratio: 1024 / 640; border-radius: 34px; overflow: hidden; isolation: isolate; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: radial-gradient(70% 60% at 50% 45%, #ffffff, #eef2f8 75%); border: 1px solid var(--line); }
html[data-theme="dark"] .desk-stage { background: radial-gradient(70% 60% at 50% 42%, #101a2e, #060a14 72%); border-color: color-mix(in srgb, var(--cyan) 22%, transparent); box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 80px -40px rgba(64,185,234,.5); }
.desk-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(34% 30% at 50% 58%, rgba(64,185,234,.18), transparent 70%); }
html[data-theme="dark"] .desk-glow { background: radial-gradient(34% 30% at 50% 58%, rgba(64,185,234,.32), transparent 70%), radial-gradient(30% 30% at 82% 20%, rgba(154,123,255,.18), transparent 70%); }
.dl { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) rotate(calc(var(--r) + var(--sr, 0deg))); transition: transform 1.1s var(--spring-soft); pointer-events: none; }
.dl-in { opacity: 0; transform: translate3d(var(--ix), var(--iy), 0) scale(.92); transition: opacity .7s var(--ease-out), transform 1.25s var(--spring-soft); transition-delay: calc(var(--i) * 70ms + 80ms); }
.desk.in .dl-in { opacity: 1; transform: none; }
.dl-p { position: relative; will-change: transform; }
.dl img { display: block; width: 100%; height: auto; -webkit-user-drag: none; }
html[data-theme="dark"] .dl img { filter: drop-shadow(0 0 1px rgba(120,220,255,.55)) drop-shadow(0 14px 22px rgba(0,0,0,.55)); }
html[data-theme="dark"] .dl-imac img, html[data-theme="dark"] .dl-tablet img { filter: drop-shadow(0 0 1.5px rgba(120,220,255,.7)) drop-shadow(0 0 18px rgba(64,185,234,.25)) drop-shadow(0 18px 26px rgba(0,0,0,.6)); }
@container (max-width: 640px) { .dl { left: var(--mx); top: var(--my); width: var(--mw); transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) rotate(calc(var(--mr) + var(--sr, 0deg))); } }
@container (max-width: 640px) { .desk-stage { aspect-ratio: 400 / 660; border-radius: 28px; } }
/* live screens */
.scr { position: absolute; overflow: hidden; }
.scr-imac { left: 0; top: 0; width: 100%; height: 100%; clip-path: polygon(4.5% 8.3%, 95.64% 8.3%, 85.14% 56.8%, 15% 56.8%); }
.scr-tab { left: 8.36%; top: 5.74%; width: 83.6%; height: 86.6%; border-radius: 2px; }
.scr-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; }
html[data-theme="dark"] .scr-in { background: #070b16; }
.sc { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease-out); display: grid; place-items: center; }
.sc.on { opacity: 1; }
.sc-brand img { width: 44%; height: auto; }
.sc-brand .only-dark { filter: drop-shadow(0 0 18px rgba(64,185,234,.55)); }
.sc-app { background: radial-gradient(80% 70% at 20% 10%, #12306a, #050914 70%); place-items: start; padding: 34px 40px; }
.sc-app .sa-nav { position: absolute; top: 18px; left: 40px; right: 40px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.sc-app .sa-h { margin-top: 60px; font: 400 52px/1 var(--font-brand); color: #fff; max-width: 9ch; background: linear-gradient(90deg, #45e6ff, #9a7bff, #ff4fd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-app .sa-btn { display: block; margin-top: 22px; width: 150px; height: 40px; border-radius: 99px; background: linear-gradient(90deg, #45e6ff, #3aa8ff); box-shadow: 0 0 24px rgba(69,230,255,.7); }
.sc-app .sa-cards { position: absolute; right: 40px; bottom: 40px; display: flex; gap: 12px; }
.sc-app .sa-cards i { width: 86px; height: 110px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); animation: saFloat 3.2s var(--ease-io, ease-in-out) infinite alternate; }
.sc-app .sa-cards i:nth-child(2) { animation-delay: -1s; } .sc-app .sa-cards i:nth-child(3) { animation-delay: -2s; }
.sc-app .sa-pill { position: absolute; bottom: 16px; left: 50%; width: 220px; height: 30px; margin-left: -110px; border-radius: 99px; background: rgba(255,255,255,.12); }
.sc-app .sa-pill i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 60px; border-radius: 99px; background: rgba(69,230,255,.5); animation: saLens 4s var(--ease-io, ease-in-out) infinite alternate; }
@keyframes saFloat { to { transform: translateY(-14px); } }
@keyframes saLens { to { transform: translateX(148px); } }
.sc-wp { background: #f4f5f7; place-items: stretch; align-content: start; gap: 12px; padding: 0 0 20px; }
.sc-wp i { font-style: normal; }
.sc-wp .sw-bar { height: 34px; background: #1d2327; }
.sc-wp .sw-hero { margin: 0 30px; height: 120px; border-radius: 6px; background: linear-gradient(120deg, #c9ccd3, #e3e5e9); display: grid; align-content: center; gap: 10px; padding: 0 30px; }
.sc-wp .sw-hero i { display: block; height: 16px; width: 60%; background: #9aa0ab; border-radius: 4px; } .sc-wp .sw-hero i + i { width: 36%; height: 12px; }
.sc-wp .sw-row { margin: 0 30px; display: flex; gap: 10px; }
.sc-wp .sw-row i { flex: 1; height: 64px; border-radius: 6px; background: #fff; border: 1px dashed #b3b8c2; display: grid; place-items: center; font: 600 15px var(--font); color: #8a6df0; }
.sc-code { background: #060a14; place-items: center; align-content: center; gap: 4px; font: 500 26px/1.35 var(--mono); color: #b9c6e4; justify-items: start; padding-left: 90px; }
.sc-code p { margin: 0; } .sc-code b { color: #45e6ff; font-weight: 600; } .sc-code i { color: #ff8fe0; font-style: normal; }
/* centre copy */
.desk-copy { position: absolute; z-index: 6; left: 29%; right: 29%; top: 41%; display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; transition: opacity .25s var(--ease-out), transform .45s var(--spring); }
.desk-mark { width: clamp(46px, 8cqw, 92px); height: auto; margin-bottom: 1.2cqw; }
html[data-theme="dark"] .desk-mark { filter: drop-shadow(0 0 16px rgba(64,185,234,.6)); }
.desk-title { margin: 0; font: 400 clamp(1.6rem, 6.4cqw, 4.2rem)/1 var(--font-brand); color: #231f20; letter-spacing: .005em; white-space: nowrap; }
html[data-theme="dark"] .desk-title { color: #40b9ea; text-shadow: 0 0 22px rgba(64,185,234,.55); }
.desk-sub { margin: .8cqw 0 0; font: 600 clamp(.82rem, 1.9cqw, 1.25rem)/1.3 var(--font); color: var(--ink-2); }
.desk.copy-out .desk-copy { opacity: 0; transform: translateY(8px) scale(.97); }
.desk-copy { opacity: 0; } .desk.in .desk-copy { opacity: 1; transition-delay: .5s; } .desk.in.copy-out .desk-copy { opacity: 0; transition-delay: 0s; }
@container (max-width: 640px) { .desk-copy { left: 6%; right: 6%; top: 25.5%; } .desk-mark { width: 13cqw; margin-bottom: 2cqw; } .desk-title { font-size: 10.4cqw; } .desk-sub { font-size: 3.9cqw; margin-top: 2cqw; } }
/* controls */
.desk-ui { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.desk-arrow, .desk-play, .desk-explode { height: 44px; min-width: 44px; display: inline-grid; place-items: center; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; touch-action: manipulation; transition: transform var(--d-3) var(--spring), border-color var(--d-2); }
.desk-arrow:active, .desk-play:active, .desk-explode:active { transform: scale(.88); transition-duration: var(--d-1); }
.desk-arrow svg, .desk-play svg, .desk-explode svg { width: 20px; height: 20px; }
.desk-explode { display: inline-flex; gap: 8px; padding: 0 16px; font-weight: 650; font-size: .9rem; }
.desk-explode[aria-pressed="true"] { border-color: color-mix(in srgb, var(--cyan) 60%, transparent); color: var(--cyan); }
.desk-play .i-play { display: none; } .desk.paused .desk-play .i-play { display: block; } .desk.paused .desk-play .i-pause { display: none; }
.desk-dots { display: flex; gap: 8px; padding: 0 4px; }
.desk-dots button { position: relative; width: 34px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; touch-action: manipulation; }
.desk-dots button i { position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.desk-dots button.on i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.desk.paused .desk-dots button.on i::after { transform: none; }
html[data-theme="dark"] .desk-dots button.on i { box-shadow: 0 0 12px -2px rgba(69,230,255,.8); }
/* exploded layers: spread out and label every cut-out */
.desk.exploded .dl-p { outline: 1px dashed color-mix(in srgb, var(--cyan) 70%, transparent); outline-offset: 4px; border-radius: 6px; }
.desk.exploded .dl { transform: translate3d(calc(var(--sx, 0px) + (var(--d) - .6) * 6cqw), calc(var(--sy, 0px) - var(--d) * 4cqw), 0) rotate(calc(var(--r) + var(--sr, 0deg))) scale(.94); }
.desk.exploded .dl::after { content: attr(data-k); position: absolute; left: 50%; top: -1.6em; transform: translateX(-50%) rotate(calc(-1 * var(--r))); font: 600 clamp(9px, 1.3cqw, 12px)/1 var(--mono); color: var(--cyan); background: var(--bg); padding: 3px 6px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); white-space: nowrap; }
.desk.exploded .desk-copy { opacity: .25; }
@media (prefers-reduced-motion: reduce) { .dl, .dl-in, .desk-copy { transition: none !important; } .sc-app * { animation: none !important; } }
/* keyboard: show the keyboard body only, so the cord never crosses the copy */
.dl-keyboard .dl-p { clip-path: inset(79% -20% -20% -20%); }
.desk.exploded .dl-keyboard .dl-p { clip-path: none; }
@container (max-width: 640px) { .desk-title { font-size: min(10.4cqw, calc(150cqw / var(--len, 7))); } .desk-sub { max-width: 30ch; margin-inline: auto; } }
@container (max-width: 640px) { .desk-sub { font-size: 3.6cqw; } }
