/* The first screen's pictures (js/demo.js): the app's own window, photographed, on a stage of the
   brand's blue, with the phone app beside it. The window was photographed 1280 px wide and is
   shown at that width wherever the screen has room for it, so the app's 13 px labels read as
   13 px; the stage is wider than the page's column to make that room. */
.dm { width: 100%; max-width: calc(1440px + 2 * var(--dm-gut)); margin: clamp(18px, 2vw, 26px) auto 0; padding: 0 var(--dm-gut); --dm-gut: clamp(8px, .6vw, 24px); }

/* The stage. A wall in daylight: the brand's blue thinned to a wash, crossed by the light of a
   window that is out of the picture: two panes of it, slanted, with the shadow of the bar between
   them. Paint only: two gradients and a fine grain (img/grain.svg, a file and not a data: address,
   so a page that lets images come only from its own site still shows it), nothing that moves.
   home.css uses the same stage for the phones (.hm-stage). */
.dm-scene, .hm-stage { position: relative; isolation: isolate; border-radius: clamp(14px, 1.8vw, 24px); overflow: hidden;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0) 13%, rgba(255, 255, 255, .6) 13.4% 31%, rgba(255, 255, 255, 0) 31.4% 34%, rgba(255, 255, 255, .46) 34.4% 49%, rgba(255, 255, 255, 0) 49.4%),
    linear-gradient(180deg, #c9d6f8 0%, #d6e0f9 48%, #e4eaf8 100%);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14); }
.dm-scene::before, .hm-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("../img/grain.svg"); }
/* the room at the right is the phone's: it stands there, with a finger's width of it over the window */
.dm-scene { margin: 0; padding: 14px clamp(12px, 8.8vw, 116px) clamp(20px, 3.2vw, 44px) 12px; }

/* the parts, on the stage: one is chosen, and while they play by themselves its line fills */
.dm-tabs-out { display: flex; justify-content: center; margin-right: calc(12px - clamp(12px, 8.8vw, 116px)); }
.dm-tabs { display: flex; gap: 2px; max-width: 100%; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .86); box-shadow: 0 0 0 1px rgba(21, 25, 35, .08), 0 8px 20px -12px rgba(29, 78, 216, .45); overflow-x: auto; scrollbar-width: none; }
.dm-tabs::-webkit-scrollbar { display: none; }
.dm-tab { position: relative; flex: none; padding: 8px 14px 9px; border-radius: 8px; font-size: 14.5px; line-height: 1.3; letter-spacing: -.01em; color: var(--soft); white-space: nowrap; transition: color .2s, background-color .2s; }
.dm-tab:hover { color: var(--ink); }
.dm-tab.on { color: var(--ink); background: var(--wash); }
.dm-tab i { position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; }
.dm-tab.on i { transform: scaleX(1); }
.dm-tab.run i { animation: dm-run 7.6s linear both; }
@keyframes dm-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* the window: the capture holds the app's own title bar and buttons, so the frame is only an edge */
.dm-win { position: relative; max-width: 1280px; margin-top: 14px; aspect-ratio: 1280 / 800; border-radius: 10px; overflow: hidden; background: #dfe4ed;
  box-shadow: 0 0 0 1px rgba(21, 25, 35, .2), 0 1px 2px rgba(16, 24, 40, .12), 0 22px 44px -18px rgba(16, 24, 40, .34), 0 64px 120px -44px rgba(29, 78, 216, .55); }
.dm-shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.dm-shot.on { opacity: 1; }

/* the pointer that rests on one control of each window */
/* it is never seen on its way: it appears on its control, rests there, and presses once */
.dm-ptr { position: absolute; z-index: 3; width: 20px; height: 20px; margin: -1px 0 0 -3px; opacity: 0; transition: opacity .35s; pointer-events: none; }
.dm-ptr svg { width: 100%; height: 100%; fill: #151923; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(16, 24, 40, .4)); }
.dm-ptr.on { opacity: 1; }
.dm-ptr::after { content: ""; position: absolute; left: 3px; top: 1px; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; }
.dm-ptr.tap::after { animation: dm-tap .8s ease-out; }
@keyframes dm-tap { 0% { opacity: .95; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.35); } }

/* The phone (js/art.js, phone): this site's own drawing of a current phone. Every measure is a
   share of the phone's width (cqw), so the same frame is right at 148 px beside the window and at
   300 px on a phone. From outside in: a titanium edge with a highlight, a thin black bezel, the
   screen with its status bar and island; four side buttons. */
.iph { container-type: inline-size; position: relative; }
.iph-b { position: relative; padding: 1.15cqw; border-radius: 16.6cqw;
  background: linear-gradient(135deg, #f1efeb 0%, #a9a59d 16%, #d9d6d0 34%, #8b877f 58%, #c9c5be 80%, #6f6b64 100%);
  box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .5), inset 0 0 .5cqw rgba(0, 0, 0, .35), 0 .4cqw 1cqw rgba(16, 24, 40, .16), 0 5cqw 9cqw -3cqw rgba(16, 24, 40, .36), 0 14cqw 22cqw -9cqw rgba(16, 24, 40, .34); }
.iph-k { padding: 2.3cqw; border-radius: 15.5cqw; background: #05070b; box-shadow: inset 0 0 0 .3cqw #1b1e25; }
.iph-s { position: relative; overflow: hidden; border-radius: 13.2cqw; background: #f0f2f7; }
.iph-s img { display: block; width: 100%; height: auto; }
.iph-bar { display: flex; align-items: flex-end; justify-content: space-between; height: 11.6cqw; padding: 0 7.6cqw 2.1cqw 9.6cqw; color: #0b0d12; }
.iph-bar b { font: 600 4.1cqw/1 var(--font); letter-spacing: -.01em; }
.iph-ic { width: 17.6cqw; height: auto; fill: currentColor; }
.iph-isle { position: absolute; left: 50%; top: 2.5cqw; width: 29.5cqw; height: 8.4cqw; margin-left: -14.75cqw; border-radius: 4.2cqw; background: #05070b; }
.iph-btn { position: absolute; width: .9cqw; border-radius: .4cqw; background: linear-gradient(90deg, #77736c, #c2beb7 55%, #8d8982); }
.iph-btn.a { left: -.62cqw; top: 26cqw; height: 7cqw; }
.iph-btn.b { left: -.62cqw; top: 38cqw; height: 13cqw; }
.iph-btn.c { left: -.62cqw; top: 54cqw; height: 13cqw; }
.iph-btn.d { right: -.62cqw; top: 45cqw; height: 21cqw; transform: scaleX(-1); }
/* beside the window: on the stage's own margin, about twenty pixels of it over the window's edge,
   clear of every control the windows show there */
.dm-phone { position: absolute; z-index: 2; right: clamp(3px, .42vw, 6px); bottom: clamp(8px, 1.1vw, 14px); width: clamp(92px, 10.3%, 148px); }
.dm-phone-in { position: relative; aspect-ratio: 390 / 844; }
.dm-pshot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: 0; transition: opacity .5s ease; }
.iph-s .dm-pshot { height: 100%; }
.dm-pshot.on { opacity: 1; }
.iph-bar { transition: background-color .5s ease; }

/* the sentence for the part on screen, and what the pictures are */
.dm-caps { max-width: 760px; min-height: 3.1em; margin: clamp(18px, 2vw, 26px) auto 0; text-align: center; font-size: clamp(15.5px, 1.25vw, 17.5px); line-height: 1.5; letter-spacing: -.008em; text-wrap: balance; }
.dm-note { margin-top: 8px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--dim); }

.no-motion .dm-shot, .no-motion .dm-pshot, .no-motion .dm-ptr { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .dm-shot, .dm-pshot, .dm-ptr { transition: none; }
  .dm-tab.run i { animation: none; transform: scaleX(1); }
}

@media (max-width: 760px) {
  .dm { --dm-gut: 12px; }
  .dm-tabs-out { justify-content: flex-start; margin: 0 -12px; padding: 0 12px 2px; overflow-x: auto; scrollbar-width: none; }
  .dm-tabs-out::-webkit-scrollbar { display: none; }
  .dm-tabs { overflow: visible; max-width: none; }
  .dm-tab { padding: 10px 13px 11px; }
  /* the window first, whole; the phone app under it, at a size that reads */
  .dm-scene { padding: 12px 12px 22px; }
  .dm-win { border-radius: 6px; margin-top: 12px; }
  .dm-ptr { display: none; }
  .dm-phone { position: relative; right: auto; bottom: auto; width: min(72%, 290px); margin: 18px auto 0; }
  .dm-caps { min-height: 4.6em; font-size: 15.5px; }
}
