/* The case mockups (cases-art lane, 11/29; Anthony #939, #941, #942, #943): the work a case made, shown on the site's
   night stage the way the service pages show their objects. Real captures of the work, in devices drawn here: a laptop,
   a phone, a browser; a brand sheet that floats with its palette; a stylesheet taken apart into its pieces; a CRM board;
   an ad set; a site map. Motion comes from case-mocks.js and only runs while a stage is on screen. Reduced motion and
   automated QC (navigator.webdriver) get the finished frame, still.

   One stage, many scenes:  <figure class="cm-stage cm-<scene>" data-cm="<scene>"> ... </figure>
   The stage is night by day and by night (the deep band keeps its colors in the dark theme), so it carries its own. */

.cm-stage {
  --cm-ink: #f3f0ff; --cm-mute: rgba(233, 228, 255, .66); --cm-line: rgba(233, 228, 255, .18); --cm-orb: #a68cff;
  --cm-glass: rgba(255, 255, 255, .06); --p: 1; --ar: 16 / 10;
  position: relative; margin: 0; width: 100%; aspect-ratio: var(--ar); min-width: 0;
  background: radial-gradient(120% 95% at 70% 18%, #2a1f60 0%, #150f33 52%, #0a0718 100%);
  color: var(--cm-ink); border-radius: var(--r, 2px); overflow: hidden; isolation: isolate;
  box-shadow: 0 34px 70px -36px rgba(29, 22, 64, .6);
  font-family: var(--body);
}
.cm-stage *, .cm-stage *::before, .cm-stage *::after { box-sizing: border-box; }
.cm-stage::before, .cm-stage::after { content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid rgba(233, 228, 255, .42); pointer-events: none; z-index: 6; }
.cm-stage::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.cm-stage::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.cm-hud { position: absolute; z-index: 6; top: 17px; left: 40px; right: 40px; display: flex; justify-content: space-between; gap: 12px; font: 600 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-mute); pointer-events: none; }
.cm-hud i { font-style: normal; }
.cm-hud .cm-dot { display: inline-flex; align-items: center; gap: 7px; }
.cm-hud .cm-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cm-orb); box-shadow: 0 0 10px var(--cm-orb); }

/* the room: a soft violet light behind the work, a stipple field, a floor that holds a reflection */
.cm-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cm-glow::before { content: ""; position: absolute; left: 50%; top: 46%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(calc(.86 + var(--p) * .14)); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(138, 109, 255, .42), rgba(91, 47, 230, .16) 52%, transparent 100%); filter: blur(6px); }
.cm-glow::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(233, 228, 255, .2) .9px, transparent 1.3px); background-size: 13px 13px;
  -webkit-mask-image: radial-gradient(70% 62% at 50% 46%, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 80%); mask-image: radial-gradient(70% 62% at 50% 46%, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 80%); opacity: .55; }
.cm-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 0; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(166, 140, 255, .07) 40%, rgba(10, 7, 24, .55)); }
.cm-devices .cm-floor::before { content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 228, 255, .22), transparent); }

.cm-set { position: absolute; inset: 0; z-index: 2; perspective: 1700px; perspective-origin: 50% 30%; }
.cm-set img { display: block; }

/* ---------------------------------------------------------------- devices: a laptop, a phone */
.cm-laptop { --lw: 64%; position: absolute; left: 50%; bottom: 13%; width: var(--lw); transform-style: preserve-3d;
  transform: translateX(-50%) translateY(calc((1 - var(--p)) * 10%)); }
.cm-lid { position: relative; padding: 2.1% 2.1% 2.6%; border-radius: 2.6% / 4%; background: linear-gradient(160deg, #26252b, #0b0b0e 46%, #151419); box-shadow: 0 0 0 1px rgba(233, 228, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform-origin: 50% 100%; transform: rotateX(calc((1 - var(--p)) * -24deg)); }
.cm-lid::before { content: ""; position: absolute; top: .9%; left: 50%; width: .9%; aspect-ratio: 1; border-radius: 50%; background: #2b2a33; transform: translateX(-50%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.cm-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: .6%; background: #0d0c12; }
.cm-screen::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .02) 32%, transparent 33%, transparent 100%); mix-blend-mode: screen; }
.cm-base { position: relative; left: -8.5%; width: 117%; height: 0; padding-bottom: 3.4%; border-radius: 0 0 14% 14% / 0 0 90% 90%;
  background: linear-gradient(to bottom, #d9dae0 0%, #b9bbc3 26%, #8b8d96 74%, #5b5d66 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 26px 40px -14px rgba(0, 0, 0, .7); }
.cm-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 38%; transform: translateX(-50%); border-radius: 0 0 40% 40% / 0 0 100% 100%; background: linear-gradient(#9fa1aa, #c9cad1); }
.cm-shadow { position: absolute; left: 50%; bottom: 8.5%; width: 74%; height: 7%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .62), transparent); filter: blur(4px); z-index: 1; pointer-events: none; }

.cm-phone { --pw: 17%; position: absolute; right: 9%; bottom: 9%; width: var(--pw); z-index: 3;
  transform: translateY(calc((1 - var(--p)) * 26%)) rotate(calc((1 - var(--p)) * 4deg)); }
.cm-phone-body { position: relative; padding: 4.2%; aspect-ratio: 9 / 19.4; border-radius: 15% / 7%; background: linear-gradient(150deg, #34323b, #0c0c10 40%, #1a1920); box-shadow: 0 0 0 1.5px rgba(233, 228, 255, .22), 0 30px 50px -20px rgba(0, 0, 0, .75); }
.cm-phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 12% / 5.6%; background: #0d0c12; }
.cm-phone-screen::before { content: ""; position: absolute; z-index: 3; top: 2.2%; left: 50%; width: 30%; height: 3.4%; transform: translateX(-50%); border-radius: 999px; background: #050507; }
.cm-phone-screen > img { width: 100%; height: auto; transform: translateY(calc(var(--scroll, 0) * -1%)); transition: transform 2.6s cubic-bezier(.45, 0, .2, 1); }

/* a screen that scrolls one long capture of a page, as a visitor would (data-scroll: how far, in percent of the capture) */
.cm-screen.is-scroll > .cm-page { display: block; width: 100%; height: auto; transform: translateY(calc(var(--scroll, 0) * -1%)); transition: transform 2.8s cubic-bezier(.45, 0, .2, 1); }

/* a slide show inside a screen: each image is one page of the site, the cursor travels to what it clicks */
.cm-slides { position: absolute; inset: 0; }
.cm-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: 0; transform: translateY(3%) scale(1.01); transition: opacity .7s var(--ease, ease), transform .9s var(--ease, ease); }
.cm-slide.is-on { opacity: 1; transform: none; }
.cm-cursor { position: absolute; z-index: 5; left: var(--cx, 60%); top: var(--cy, 60%); width: clamp(13px, 2.2%, 22px); aspect-ratio: 11 / 16; pointer-events: none; opacity: 0;
  transition: left .95s cubic-bezier(.5, 0, .2, 1), top .95s cubic-bezier(.5, 0, .2, 1), opacity .3s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.cm-cursor svg { display: block; width: 100%; height: 100%; }
.cm-cursor::after { content: ""; position: absolute; left: -90%; top: -60%; width: 180%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--cm-orb); opacity: 0; transform: scale(.3); }
.cm-cursor.is-click::after { animation: cm-click .55s ease-out; }
@keyframes cm-click { 0% { opacity: .95; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
.cm-stage.is-live .cm-cursor { opacity: 1; }
.cm-ring { position: absolute; z-index: 4; left: var(--rx); top: var(--ry); width: var(--rw); height: var(--rh); border-radius: 6px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px var(--cm-orb), 0 0 22px 2px rgba(166, 140, 255, .55); transition: opacity .35s, left .6s var(--ease, ease), top .6s var(--ease, ease), width .6s var(--ease, ease), height .6s var(--ease, ease); }
.cm-ring.is-on { opacity: 1; }

/* a browser on the stage: one capture of the work, floating */
.cm-browser { position: absolute; z-index: 2; border-radius: 10px; overflow: hidden; background: #0d0c12; box-shadow: 0 0 0 1px rgba(233, 228, 255, .2), 0 40px 70px -30px rgba(0, 0, 0, .8); }
.cm-bar { display: flex; align-items: center; gap: 5px; height: clamp(18px, 2.6vw, 28px); padding: 0 12px; background: linear-gradient(#26232f, #1c1a24); border-bottom: 1px solid rgba(233, 228, 255, .1); }
.cm-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(233, 228, 255, .28); flex: none; }
.cm-bar b { margin-left: 10px; height: 9px; width: 38%; border-radius: 999px; background: rgba(233, 228, 255, .12); }
.cm-view { position: relative; overflow: hidden; }
.cm-view > img { width: 100%; height: auto; }

/* glass chips that float beside the work */
.cm-chip { position: absolute; z-index: 4; padding: 10px 12px; border-radius: 10px; background: var(--cm-glass); border: 1px solid var(--cm-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--cm-ink); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .7); }
.cm-k { display: block; font: 600 10px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-mute); }

/* ---------------------------------------------------------------- reveal: what arrives when a stage comes into view */
.cm-in { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease, ease), transform .8s var(--ease, ease); transition-delay: calc(var(--i, 0) * 90ms + 120ms); }
.cm-stage.is-in .cm-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- the brand sheet: the work's own sheet, floating, its palette dealt beside it */
.cm-brand { --ar: 16 / 10; }
.cm-sheet { position: absolute; left: 1.5%; top: 10%; width: 67%; z-index: 2; transform: translateY(calc((1 - var(--p)) * 7%)) rotate(calc((1 - var(--p)) * -2deg)); }
.cm-sheet-in { position: relative; animation: cm-float 9s ease-in-out infinite alternate; animation-play-state: paused; }
.cm-stage.is-live .cm-sheet-in { animation-play-state: running; }
.cm-sheet-in > img { width: 100%; height: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .5)); }
.cm-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat; animation: cm-sheen 7s ease-in-out infinite; animation-play-state: paused; opacity: .8; }
.cm-stage.is-live .cm-sheen { animation-play-state: running; }
@keyframes cm-float { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-1.6%) rotate(.4deg); } 100% { transform: translateY(.8%) rotate(-.3deg); } }
@keyframes cm-sheen { 0%, 30% { background-position: 160% 0; } 70%, 100% { background-position: -60% 0; } }
.cm-pal { position: absolute; z-index: 4; right: 4%; top: 52%; width: 23%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transform: translateY(calc(-50% + (1 - var(--p)) * 12%)); }
.cm-sw { display: grid; gap: 7px; padding: 8px; border-radius: 9px; background: var(--cm-glass); border: 1px solid var(--cm-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cm-sw i { display: block; aspect-ratio: 5 / 3; border-radius: 5px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.cm-sw b { font: 600 10px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cm-ink); font-variant-numeric: tabular-nums; }

/* the same stage for a sheet of the work on its own (a design case's work band): centered, larger; is-blend lets a sheet
   drawn on black sit in the night */
.cm-brand.is-solo .cm-sheet { left: 9%; width: 82%; top: 9%; }
.cm-brand.is-blend .cm-sheet-in > img { mix-blend-mode: lighten; filter: none; }

/* ---------------------------------------------------------------- the stylesheet, taken apart: the capture, then its pieces laid out */
.cm-style { --ar: 16 / 10; }
.cm-style .cm-browser { left: 4%; top: 13%; width: 50%; transform: translateY(calc((1 - var(--p)) * 6%)); }
.cm-spec { position: absolute; z-index: 4; right: 4%; top: 12%; bottom: 9%; width: 38%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto; gap: 10px; align-content: center; }
.cm-pc { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 14px 12px; border-radius: 10px; background: #22211d; border: 1px solid rgba(233, 228, 255, .16); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8); transform-origin: 0 0; }
.cm-pc > img { flex: none; max-width: 100%; height: auto; }
.cm-pc.wide { grid-column: 1 / -1; }
.cm-pc[data-src] > img { border-radius: 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(transparent, #000 14%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-composite: intersect; }
.cm-pc .cm-k { position: absolute; left: 10px; top: 8px; font-size: 9px; }
.cm-pc.pc-mark > img { width: 78%; }
.cm-pc.pc-voice { padding: 26px 14px 16px; }
.cm-pc.pc-voice > img { width: 92%; }
.cm-pc.pc-sign > img { width: 86%; }
.cm-pc.pc-btns > img { width: 92%; }
.cm-pc.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 22px 10px 10px; background: rgba(255, 255, 255, .04); }
.cm-pc.swatches .cm-sw { padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; gap: 6px; }
.cm-pc.swatches .cm-sw b { font-size: 9px; }
.cm-tick { position: absolute; z-index: 3; height: 1px; background: rgba(166, 140, 255, .6); transform-origin: 0 50%; pointer-events: none; opacity: 0; }
.cm-stage.is-in .cm-tick { opacity: 1; transition: opacity .6s 1.2s; }
.cm-pc.is-fly { transition: none !important; }
.cm-pc.is-land { transition: transform 1.05s cubic-bezier(.6, 0, .15, 1), opacity .4s; }

/* ---------------------------------------------------------------- a CRM board: leads moving through the stages */
.cm-crm { --ar: 16 / 11; }
.cm-crm .cm-app { top: 52%; bottom: auto; transform: translateY(calc(-50% + (1 - var(--p)) * 8%)) rotateX(calc((1 - var(--p)) * 10deg)); }
.cm-app { position: absolute; left: 6%; right: 6%; top: 15%; bottom: 12%; z-index: 2; display: grid; grid-template-rows: auto 1fr; border-radius: 12px; overflow: hidden; background: #f7f5f0; color: #121212; box-shadow: 0 0 0 1px rgba(233, 228, 255, .2), 0 40px 70px -30px rgba(0, 0, 0, .85);
  transform: translateY(calc((1 - var(--p)) * 8%)) rotateX(calc((1 - var(--p)) * 10deg)); transform-origin: 50% 100%; }
.cm-app .cm-bar { background: linear-gradient(#ece8df, #e3ded3); border-bottom-color: rgba(18, 18, 18, .08); }
.cm-app .cm-bar i { background: rgba(18, 18, 18, .2); }
.cm-app .cm-bar b { background: rgba(18, 18, 18, .08); }
.cm-cols { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; min-height: 0; }
.cm-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 8px; background: rgba(18, 18, 18, .045); }
.cm-col > b { display: flex; align-items: flex-start; gap: 6px; min-height: 2.5em; font: 600 9.5px/1.25 var(--body); letter-spacing: .08em; text-transform: uppercase; color: #5c5a55; }
.cm-col > b::before { content: ""; width: 7px; height: 7px; margin-top: 2px; border-radius: 50%; background: var(--c, #b9b2a3); flex: none; }
.cm-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; padding: 10px 9px; border-radius: 7px; background: #fff; box-shadow: 0 1px 0 rgba(18, 18, 18, .06), 0 6px 14px -10px rgba(18, 18, 18, .4); }
.cm-card > i { width: 18px; height: 18px; border-radius: 50%; background: var(--a, #d9d3c7); grid-row: span 2; }
.cm-card > u { display: block; height: 6px; border-radius: 3px; background: rgba(18, 18, 18, .16); text-decoration: none; }
.cm-card > u + u { width: 62%; background: rgba(18, 18, 18, .09); }
.cm-card > s { grid-column: 1 / -1; justify-self: start; height: 12px; width: 40%; border-radius: 999px; background: var(--t, rgba(91, 47, 230, .14)); text-decoration: none; }
.cm-card.is-move { position: absolute; z-index: 3; margin: 0; box-shadow: 0 0 0 2px var(--orb, #5b2fe6), 0 18px 30px -12px rgba(29, 22, 64, .55); transition: left .9s cubic-bezier(.6, 0, .2, 1), top .9s cubic-bezier(.6, 0, .2, 1), transform .3s; transform: rotate(-2deg) scale(1.03); }

/* ---------------------------------------------------------------- an ad set: the feed ad on a phone, the search ad beside it */
.cm-ads { --ar: 16 / 11; }
.cm-ads .cm-phone { left: 12%; right: auto; bottom: 7%; --pw: 28%; }
.cm-feed { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; color: #121212; padding-top: 12%; }
.cm-post-h { display: flex; align-items: center; gap: 10px; background: #fff; padding: 5% 5% 3%; }
.cm-post-h > i { width: 13%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(18, 18, 18, .15); flex: none; overflow: hidden; }
.cm-post-h > i > img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.25); }
.cm-post-h > span { display: grid; gap: 3px; flex: 1; }
.cm-post-h > span u { display: block; height: 5px; width: 60%; border-radius: 3px; background: rgba(18, 18, 18, .22); text-decoration: none; }
.cm-post-h > span em { font: 500 7px/1 var(--body); font-style: normal; color: #6b6963; }
.cm-post-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.cm-post-img > img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.06 - var(--p) * .06)); }
.cm-post-cta { display: flex; justify-content: space-between; align-items: center; margin: 3% 4%; padding: 3.5% 4%; border-radius: 5px; background: var(--brand, #5b6e9c); color: #fff; font: 600 8px/1 var(--body); }
.cm-post-row { display: flex; gap: 6px; padding: 1% 4%; }
.cm-post-row i { width: 8px; height: 8px; border-radius: 2px; border: 1.2px solid #121212; }
.cm-post-cap { display: grid; gap: 4px; padding: 3% 4%; }
.cm-post-cap u { display: block; height: 4px; border-radius: 2px; background: rgba(18, 18, 18, .13); text-decoration: none; }
.cm-post-cap u + u { width: 70%; }
.cm-serp { position: absolute; z-index: 3; right: 7%; top: 18%; width: 48%; padding: 16px 18px 18px; border-radius: 12px; background: #fff; color: #121212; box-shadow: 0 0 0 1px rgba(233, 228, 255, .2), 0 36px 60px -26px rgba(0, 0, 0, .8);
  transform: translateY(calc((1 - var(--p)) * 14%)); }
.cm-q { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(18, 18, 18, .14); margin-bottom: 14px; }
.cm-q::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid #6b6963; flex: none; }
.cm-q u { display: block; height: 6px; width: 46%; border-radius: 3px; background: rgba(18, 18, 18, .18); text-decoration: none; }
.cm-res { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid rgba(18, 18, 18, .08); }
.cm-res > em { font: 700 9px/1 var(--body); font-style: normal; color: #121212; }
.cm-res > span { display: flex; align-items: center; gap: 6px; }
.cm-res > span > i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(18, 18, 18, .15); overflow: hidden; flex: none; }
.cm-res > span > i > img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.3); }
.cm-res > span > u { display: block; height: 5px; width: 34%; border-radius: 3px; background: rgba(18, 18, 18, .18); text-decoration: none; }
.cm-res > b { font: 400 clamp(13px, 1.45vw, 19px)/1.2 var(--display); color: #1a0dab; }
.cm-res > u { display: block; height: 5px; border-radius: 3px; background: rgba(18, 18, 18, .1); text-decoration: none; }
.cm-res > u.s { width: 72%; }
.cm-res.ghost { opacity: .55; }
.cm-res.ghost > b { height: 9px; width: 64%; border-radius: 4px; background: rgba(26, 13, 171, .2); }
.cm-res.is-ad { position: relative; }
.cm-res.is-ad::before { content: ""; position: absolute; left: -10px; right: -10px; top: 2px; bottom: 2px; border-radius: 8px; box-shadow: 0 0 0 2px var(--orb, #5b2fe6); opacity: 0; transition: opacity .5s .9s; }
.cm-stage.is-in .cm-res.is-ad::before { opacity: 1; }

/* ---------------------------------------------------------------- a site map: the site, rebuilt around what is sold */
.cm-map { --ar: 16 / 10; }
.cm-tree { position: absolute; z-index: 2; left: 8%; right: 8%; top: 15%; bottom: 10%; }
.cm-tree svg.cm-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cm-wires path { fill: none; stroke: rgba(166, 140, 255, .7); stroke-width: 1.4; stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.1s var(--ease, ease); transition-delay: calc(var(--i, 0) * 110ms + 300ms); }
.cm-stage.is-in .cm-wires path { stroke-dashoffset: 0; }
.cm-node { position: absolute; z-index: 2; translate: -50% -50%; display: grid; place-items: center; text-align: center; min-width: 0; }
.cm-node.root { width: 15%; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 2px var(--cm-orb), 0 0 40px rgba(166, 140, 255, .45); }
.cm-node.root > img { width: 100%; height: auto; }
.cm-node.root.txt { width: auto; padding: 10px 16px; font: 600 clamp(11px, 1.1vw, 14px)/1.2 var(--body); color: #121212; white-space: nowrap; }
.cm-node.branch { width: 21%; padding: 9px 10px; border-radius: 9px; background: var(--cm-glass); border: 1px solid rgba(233, 228, 255, .26); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 600 clamp(10px, 1vw, 13px)/1.25 var(--body); color: var(--cm-ink); }
.cm-node.leaf { width: 9%; aspect-ratio: 4 / 3; border-radius: 5px; background: linear-gradient(#f7f5f0 0 22%, #e3ded3 22% 24%, #f7f5f0 24%); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .8); padding: 0; }
.cm-node.leaf::before { content: ""; position: absolute; left: 12%; right: 30%; top: 40%; height: 9%; border-radius: 3px; background: rgba(18, 18, 18, .22); }
.cm-node.leaf::after { content: ""; position: absolute; left: 12%; right: 46%; top: 60%; height: 7%; border-radius: 3px; background: rgba(18, 18, 18, .12); }

/* ---------------------------------------------------------------- a framed capture on the stage (the steps with one picture of their own) */
.cm-shot { --ar: 16 / 10; }
.cm-shot .cm-browser { left: 7%; right: 7%; top: 53%; transform: translateY(calc(-50% + (1 - var(--p)) * 7%)) rotateX(calc((1 - var(--p)) * 8deg)); transform-origin: 50% 100%; }
.cm-shot.is-pan .cm-view > img { transform: scale(1.06) translateX(calc((var(--p) - .5) * -3%)); }
.cm-wipe { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cm-wipe::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--wx, 50%); width: 2px; background: var(--cm-orb); box-shadow: 0 0 18px 3px rgba(166, 140, 255, .7); }
.cm-shot .cm-sweep { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent 0, rgba(166, 140, 255, .28) 6%, transparent 12%) -20% 0 / 100% 100% no-repeat; mix-blend-mode: screen; animation: cm-sweep 5.5s ease-in-out infinite; animation-play-state: paused; }
.cm-stage.is-live .cm-sweep { animation-play-state: running; }
@keyframes cm-sweep { 0% { background-position: -30% 0; } 60%, 100% { background-position: 130% 0; } }

/* ---------------------------------------------------------------- a step whose picture is a stage takes the whole row under its words */
.ws.has-stage { grid-template-areas: "head body" "vis vis"; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto; align-items: end; row-gap: clamp(22px, 2.6vw, 34px); }
.ws.has-stage .ws-head { grid-area: head; }
.ws.has-stage .ws-body { grid-area: body; align-self: end; }
.ws.has-stage > .ws-vis { grid-area: vis; }
.ws.has-vis > .ws-vis > .cm-stage { --ar: 4 / 3.4; }
.ws.has-vis > .ws-vis > .cm-shot { --ar: 16 / 11; }

/* ---------------------------------------------------------------- the site, measured: each score in a gauge, as Lighthouse draws it */
.ch-perf .cm-g { position: relative; display: grid; justify-items: start; }
.cm-gauge { position: relative; display: grid; place-items: center; width: clamp(92px, 8.4vw, 124px); aspect-ratio: 1; }
.cm-gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cm-gauge circle { fill: none; stroke-width: 6; }
.cm-gauge .cm-track { stroke: color-mix(in srgb, var(--ink) 12%, transparent); }
.cm-gauge .cm-fill { stroke: var(--gc, var(--gain, #1f7a4d)); stroke-linecap: round; stroke-dasharray: var(--circ) var(--circ); stroke-dashoffset: calc(var(--circ) * (1 - var(--s) / 100)); transition: stroke-dashoffset 1.6s cubic-bezier(.3, 0, .2, 1); }
.cm-gauge .cm-face { fill: var(--gf, color-mix(in srgb, var(--gain, #1f7a4d) 9%, transparent)); stroke: none; }
.cm-gauge.is-wait .cm-fill { stroke-dashoffset: var(--circ); }
.cm-gauge.mid { --gc: #c26a00; --gf: color-mix(in srgb, #c26a00 10%, transparent); }
.ch-perf .cm-g .ch-n { position: absolute; top: clamp(18px, 2vw, 24px); left: 0; width: clamp(92px, 8.4vw, 124px); aspect-ratio: 1; display: grid; place-items: center; margin: 0; z-index: 1; }
.ch-perf .cm-g .ch-n .num { font-size: clamp(30px, 2.9vw, 42px); color: var(--gt, var(--ink)); }
.ch-perf .cm-g.mid .ch-n .num { --gt: #9a5300; }
:root[data-theme="dark"] .cm-gauge.mid { --gc: #ffa53a; }
:root[data-theme="dark"] .ch-perf .cm-g.mid .ch-n .num { --gt: #ffb85c; }

/* ---------------------------------------------------------------- phones and tablets */
@media (max-width: 900px) {
  .ws.has-stage { grid-template-areas: "head" "vis" "body"; grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: 18px; }
  .ws.has-stage .ws-body { align-self: start; }
  .ws.has-vis > .ws-vis > .cm-stage { --ar: 4 / 3.6; }
}
@media (max-width: 700px) {
  .cm-hud { left: 34px; right: 34px; top: 15px; font-size: 10px; }
  .cm-brand { --ar: 4 / 4.6; }
  .cm-brand .cm-sheet { left: 2%; top: 9%; width: 96%; }
  .cm-brand.is-solo { --ar: 4 / 3.2; }
  .cm-brand.is-solo .cm-sheet { left: 5%; width: 90%; top: 13%; }
  .cm-brand .cm-pal { left: 13.5%; right: 13.5%; top: auto; bottom: 6%; width: auto; grid-template-columns: repeat(4, 1fr); transform: translateY(calc((1 - var(--p)) * 14%)); gap: 6px; }
  .cm-brand .cm-sw { padding: 6px; gap: 5px; }
  .cm-brand .cm-sw b { font-size: 8.5px; letter-spacing: .06em; }
  .cm-devices { --ar: 4 / 3.7; }
  .cm-devices .cm-laptop { --lw: 82%; left: 46%; bottom: 15%; }
  .cm-devices .cm-phone { --pw: 25%; right: 4%; bottom: 8%; }
  .cm-devices .cm-chip { display: none; }
  .cm-style { --ar: auto; aspect-ratio: auto; padding: 46px 14px 40px; }
  .cm-style .cm-browser { position: relative; left: auto; top: auto; width: 100%; }
  .cm-style .cm-spec { position: relative; right: auto; top: auto; bottom: auto; width: 100%; margin-top: 12px; padding: 0 34px; }
  .cm-style .cm-set { position: relative; inset: auto; }
  .cm-style .cm-tick { display: none; }
  .cm-crm { --ar: 4 / 4.4; }
  .cm-crm .cm-app { left: 13%; right: 13%; }
  .cm-crm .cm-cols { gap: 5px; padding: 7px; }
  .cm-crm .cm-col { padding: 5px; gap: 5px; }
  .cm-crm .cm-col > b { font-size: 7.5px; letter-spacing: .04em; gap: 4px; }
  .cm-crm .cm-col > b::before { width: 5px; height: 5px; margin-top: 1px; }
  .cm-crm .cm-card { padding: 6px 5px; gap: 4px; }
  .cm-crm .cm-card > i { width: 11px; height: 11px; }
  .cm-ads { --ar: 4 / 5.4; }
  .cm-ads .cm-phone { left: auto; right: 13%; --pw: 34%; bottom: 5%; z-index: 5; }
  .cm-ads .cm-serp { left: 13%; right: 13%; top: 11%; width: auto; padding: 12px; }
  .cm-map { --ar: 4 / 4.2; }
  .cm-map .cm-tree { left: 13%; right: 13%; }
  .cm-node.branch { width: 22%; font-size: 9px; padding: 6px 3px; border-radius: 7px; }
  .cm-node.root { width: 26%; }
  .cm-node.leaf { width: 8%; }
  .cm-shot { --ar: 4 / 3.3; }
  .cm-shot .cm-browser { left: 4%; right: 4%; top: 15%; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-stage { --p: 1 !important; }
  .cm-in, .cm-slide, .cm-cursor, .cm-ring, .cm-wires path, .cm-gauge .cm-fill, .cm-pc.is-land { transition: none !important; }
  .cm-sheet-in, .cm-sheen, .cm-sweep { animation: none !important; }
}

/* #1045 (Anthony 12/01 on a case page, on a phone: "on mobile they're horrible all floating up top"): on a phone the
   framed capture moved its frame to 15% from the top but kept the desktop's -50% lift, so it sat up under the HUD with
   an empty stage below it (8 case pages, every 728x319 capture). On a phone the stage now wraps its capture: the frame
   sits in the flow, centered, with the HUD's room above and the corner mark's room below, and the stage is only as tall
   as the work. It still rises a little as it comes on screen. */
@media (max-width: 700px) {
  .cm-shot, .ws.has-vis > .ws-vis > .cm-shot { --ar: auto; aspect-ratio: auto; padding: 46px 5% 40px; }
  .cm-shot .cm-set { position: relative; inset: auto; }
  .cm-shot .cm-browser { position: relative; left: auto; right: auto; top: auto; transform: translateY(calc((1 - var(--p)) * 14px)); }
}

/* ---------------------------------------------------------------- a map-pack geogrid: where the listing ranks across a grid of
   search points (case QC 12/03: a real scan, drawn as it came back; one pin per point, its number the rank there) */
.cm-geo { --ar: 16 / 11; }
.cm-geo-map { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 1; z-index: 2; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3%; padding: 5%;
  border-radius: 14px; box-shadow: 0 0 0 1px var(--cm-line), 0 40px 70px -30px rgba(0, 0, 0, .85);
  background: repeating-linear-gradient(28deg, transparent 0 22px, rgba(233, 228, 255, .07) 22px 23px), repeating-linear-gradient(-62deg, transparent 0 34px, rgba(233, 228, 255, .06) 34px 35px), rgba(255, 255, 255, .035);
  transform: translate(-50%, -50%) perspective(1200px) rotateX(calc((1 - var(--p)) * 22deg)); transform-origin: 50% 100%; }
.cm-pin { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font: 700 clamp(8px, 1.05vw, 13px)/1 var(--body); color: #150f33; background: var(--cm-orb); box-shadow: 0 0 12px rgba(166, 140, 255, .45); }
.cm-pin.is-1 { background: #f3f0ff; box-shadow: 0 0 0 2px var(--cm-orb), 0 0 20px rgba(166, 140, 255, .8); }
.cm-pin.is-lo { background: transparent; color: var(--cm-ink); box-shadow: inset 0 0 0 1.5px rgba(233, 228, 255, .45); }
.cm-geo-key { position: absolute; z-index: 6; left: 40px; right: 40px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 600 10px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--cm-mute); }
.cm-geo-key i { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.cm-geo-key i::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cm-orb); }
.cm-geo-key i.lo::before { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(233, 228, 255, .6); }
.cm-geo-key i.plain::before { display: none; }

/* ---------------------------------------------------------------- a logo that draws itself (case QC 12/03: the brand's own mark,
   traced from the client's files): each path's outline is drawn along its length, then the ink fills in */
.cm-logo { position: absolute; z-index: 2; left: 5%; top: 50%; width: 60%; transform: translateY(calc(-50% + (1 - var(--p)) * 6%)); }
.cm-logo svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 18px rgba(166, 140, 255, .25)); }
.cm-draw { fill: var(--cm-ink); fill-opacity: 0; stroke: var(--cm-ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.6s cubic-bezier(.55, 0, .2, 1) calc(var(--i, 0) * 110ms + 150ms), fill-opacity 1s ease calc(var(--i, 0) * 110ms + 2s); }
.cm-stage.is-in .cm-draw { stroke-dashoffset: 0; fill-opacity: 1; }
.cm-stage[data-cm-still] .cm-draw { transition: none; }
@media (prefers-reduced-motion: reduce) { .cm-draw { transition: none !important; } }
@media (max-width: 700px) { .cm-brand .cm-logo { left: 9%; width: 82%; top: 34%; } }
@media (max-width: 700px) { .cm-geo, .ws.has-vis > .ws-vis > .cm-geo { --ar: 4 / 5; } .cm-geo-map { width: 78%; top: 48%; } .cm-geo-key { left: 20px; right: 20px; } }
