/* LUMI CASE STUDY, "Where it lives" (his review picks, 25 Nov 2026, late): the title and lead centred on top, nothing
   under them; below, the real home page playing full screen on a MacBook Pro that arrives big and turned, and
   turns face on and settles as it scrolls up; four Lumis float at its sides, watching; the whole page takes a
   colour as the section arrives, a new one every few seconds. Every rule sits inside #onsite, as each section on
   this page keeps its own; the page colour is one layer fixed behind the page (onsite.js adds it to the body).
   Motion: onsite.js. Tokens only. */
#onsite {
  .os2 {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-400);
    margin: 0 auto; padding-inline: clamp(var(--space-400), 4cqw, var(--space-900));
  }
  .os-type { inline-size: min(100%, 46rem); margin-inline: auto; text-align: center; }   /* lint-ok: the words' measure, as the approved review page set it */
  .os-title {
    margin: 0; font-family: var(--font-display); font-weight: var(--display-weight);
    font-size: var(--display-section); line-height: var(--line-display); letter-spacing: var(--display-tight); text-wrap: balance;
  }
  .os-lead { margin: var(--space-400) 0 0; font-size: var(--size-lg); font-weight: var(--weight-medium); line-height: var(--line-snug); color: var(--color-text-tertiary); text-wrap: pretty; }

  /* the stage leaves room at its sides for the floating Lumis; a far camera so the turned laptop reads as a real screen */
  .os-stage { position: relative; box-sizing: border-box; inline-size: min(76%, var(--container-base)); margin-inline: auto; perspective: 140rem; }   /* lint-ok: the sides the Lumis float in; the camera distance of the device kit's angled lab */

  /* the laptop: the MacBook Pro 14 of the site's device kit (sections.css .device--mbp14, the measured Apple bezel
     the About showreel stands in). This page does not load sections.css, so its few rules are here, with the same
     measures and the same frame pictures: dark frame on light, silver on dark */
  .os-dev {
    --os-q: calc(1 - var(--os-zp, 1));
    position: relative; z-index: 1; container-type: inline-size; isolation: isolate; aspect-ratio: 3860 / 2540;
    --dev-sx: 0.10829; --dev-sy: 0.11339; --dev-sw: 0.78342; --dev-sh: 0.77323; --dev-sr: 0.011;   /* lint-ok: the bezel's measured screen, as sections.css .device--mbp14 */
    transform: rotateX(calc(var(--os-q) * 12deg)) rotateY(calc(var(--os-q) * -18deg)) scale(calc(1 + var(--os-q) * 0.35));   /* lint-ok: his pick, big and turned as the section arrives, face on once it is up the screen */
    transform-origin: 50% 30%; will-change: transform;
  }
  .os-dev::before {   /* glass a hair larger than the screen, under the frame */
    --dev-bp: 0.5cqi; content: ""; position: absolute; z-index: 0;
    left: calc(var(--dev-sx) * 100% - var(--dev-bp)); top: calc(var(--dev-sy) * 100% - var(--dev-bp));
    width: calc(var(--dev-sw) * 100% + var(--dev-bp) * 2); height: calc(var(--dev-sh) * 100% + var(--dev-bp) * 2);
    border-radius: calc(var(--dev-sr) * 100cqi + var(--dev-bp)) calc(var(--dev-sr) * 100cqi + var(--dev-bp)) 0 0; background: var(--neutral-950);   /* lint-ok: the approved look's neutral ramp, which follows the theme */
  }
  .os-dev::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url("../../../assets/devices/mbp14-spaceblack.webp") center / 100% 100% no-repeat; }
  .os-screen {
    position: absolute; z-index: 1; left: calc(var(--dev-sx) * 100%); top: calc(var(--dev-sy) * 100%);
    width: calc(var(--dev-sw) * 100%); height: calc(var(--dev-sh) * 100%);
    border-radius: calc(var(--dev-sr) * 100cqi) calc(var(--dev-sr) * 100cqi) 0 0; overflow: hidden; background: var(--neutral-950);   /* lint-ok: the approved look's neutral ramp, which follows the theme */
  }
  /* the live home page, laid out at 1280 x 800 and scaled to the screen (onsite.js sets --os-k); the film's camera
     moves ease in and out */
  .os-view { position: absolute; inset: 0; overflow: hidden; background: var(--color-surface); }
  .os-view iframe {
    position: absolute; left: 0; top: 0; width: 1280px; height: 800px; border: 0;   /* lint-ok: the framed page is laid out at a fixed 1280 x 800 desktop size, then scaled */
    transform-origin: 0 0; transform: scale(var(--os-k, 0.5)); pointer-events: none;
    transition: transform var(--duration-expressive) var(--ease-default);
  }
  /* the pointer that comes on to tap: the site's own kite (onsite.js copies it from the framed page), else a fingertip */
  .os-ptr {
    position: absolute; left: 0; top: 0; z-index: 2; inline-size: var(--space-700); block-size: var(--space-700);
    margin: calc(var(--space-700) * -0.11) 0 0 calc(var(--space-700) * -0.11);   /* the kite's tip, not its box corner, sits on the point */
    background: center / contain no-repeat; pointer-events: none; opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-default), scale var(--duration-fast) var(--ease-default);
  }
  .os-ptr[data-on] { opacity: 1; }
  .os-ptr[data-press] { scale: 0.85; }
  .os-ptr[data-touch] {
    margin: calc(var(--space-700) * -0.5) 0 0 calc(var(--space-700) * -0.5);
    border-radius: 50%; background: var(--color-text-primary); outline: var(--border-hairline); opacity: 0;
  }
  .os-ptr[data-touch][data-on] { opacity: 0.35; }

  /* the Lumis at the sides: real Lumis from critter.js (onsite.js), each drifting slowly on its own beat */
  .os-crowd { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
  .os-mate { position: absolute; inline-size: var(--s); aspect-ratio: 1; left: var(--x); top: var(--y); translate: -50% -50%; animation: os-float 9s ease-in-out infinite alternate; }   /* lint-ok: a slow drift */
  .os-mate:nth-child(2) { animation-duration: 11s; animation-delay: -3s; }   /* lint-ok: each its own beat */
  .os-mate:nth-child(3) { animation-duration: 10s; animation-delay: -6s; }   /* lint-ok: each its own beat */
  .os-mate:nth-child(4) { animation-duration: 12s; animation-delay: -2s; }   /* lint-ok: each its own beat */
  .os2[data-motion-paused] .os-mate { animation-play-state: paused; }

  /* the pause control: the stage itself, see-through (the site's one pattern; nothing is ever shown) */
  .os-pause {
    position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
    background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .os-pause:focus-visible { outline: var(--space-50) solid var(--color-focus-ring); outline-offset: calc(var(--space-50) * -1); }
  .os2:not([data-js]) .os-pause { display: none; }

  /* a phone: no room at the sides, so the laptop takes the width and the Lumis sit just off its corners, smaller */
  @media (max-width: 47.99em) {
    .os-stage { inline-size: 100%; }
    .os-mate { inline-size: calc(var(--s) * 0.6); }
  }
  @media (prefers-reduced-motion: reduce), (scripting: none) {
    .os-dev { transform: none; will-change: auto; }
    .os-view iframe, .os-mate { transition: none; animation: none; }
    .os-pause { display: none; }   /* nothing loops, so there is nothing to pause */
  }
}
html[data-theme="dark"] #onsite .os-dev::after { background-image: url("../../../assets/devices/mbp14-silver.webp"); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) #onsite .os-dev::after { background-image: url("../../../assets/devices/mbp14-silver.webp"); } }
@keyframes os-float { 0% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(2%, -9%) rotate(2deg); } 100% { transform: translate(-3%, 5%) rotate(-1deg); } }   /* lint-ok: the drift's path */

/* the page colour: one layer fixed behind the whole page, shown as this section arrives and gone as Under the glass
   arrives (onsite.js sets --os-q). Its colour is the opposite of an iMac finish in turn (blue and orange, green and
   pink, purple and yellow, silver), each holding a few seconds and fading into the next */
#os-wash {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--os-q, 0);
  background-color: var(--os-c, var(--color-surface)); transition: background-color var(--duration-expressive) var(--ease-default);
}
#os-wash[data-c="blue"]   { --os-c: color-mix(in oklab, var(--fx-spectrum-5) 30%, var(--color-surface)); }
#os-wash[data-c="green"]  { --os-c: color-mix(in oklab, var(--fx-spectrum-4) 30%, var(--color-surface)); }
#os-wash[data-c="pink"]   { --os-c: color-mix(in oklab, color-mix(in oklab, var(--fx-spectrum-1) 55%, var(--fx-spectrum-6)) 28%, var(--color-surface)); }
#os-wash[data-c="silver"] { --os-c: var(--color-surface-sunken); }   /* neutral-200 in light, as he saw it; dark in dark */
#os-wash[data-c="yellow"] { --os-c: color-mix(in oklab, var(--fx-spectrum-3) 35%, var(--color-surface)); }
#os-wash[data-c="orange"] { --os-c: color-mix(in oklab, var(--fx-spectrum-2) 32%, var(--color-surface)); }
#os-wash[data-c="purple"] { --os-c: color-mix(in oklab, var(--fx-spectrum-6) 30%, var(--color-surface)); }
@media (prefers-reduced-motion: reduce) { #os-wash { transition: none; } }
