/* Ambient background, after the film's (film/kit.tsx Background): three slow lights
   that wander, a sweep crossing the frame, a faint dot grid and dust drifting up.
   Fixed behind the page, transform-only motion, quieter than in the film. */
/* The body's own fill would paint over a negative z-index layer; the root keeps the dark base. */
body:has(.ambient),body:has(.ambient) .site-footer{background:transparent}
.ambient{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#050506}
/* The lights are one small image scaled up: the browser composites an image as is, where a
   1300px gradient element would hold a full-size texture per light (about 37 MB at 2x). */
.ambient img{position:absolute;left:50%;top:50%;max-width:none;opacity:var(--a)}
.ambient img:nth-child(1){--a:.11;width:1300px;height:1300px;margin:-650px;animation:ambient-light-1 46s ease-in-out infinite alternate}
.ambient img:nth-child(2){--a:.09;width:1000px;height:1000px;margin:-500px;animation:ambient-light-2 58s ease-in-out infinite alternate}
.ambient img:nth-child(3){--a:.07;width:800px;height:800px;margin:-400px;animation:ambient-light-3 38s ease-in-out infinite alternate}
@keyframes ambient-light-1{from{transform:translate(-38vw,-22vh)}to{transform:translate(32vw,18vh)}}
@keyframes ambient-light-2{from{transform:translate(36vw,-26vh)}to{transform:translate(-30vw,24vh)}}
@keyframes ambient-light-3{from{transform:translate(-12vw,30vh)}to{transform:translate(20vw,-28vh)}}
.ambient b{position:absolute;top:-20%;left:0;width:520px;height:140%;rotate:18deg;background:linear-gradient(90deg,transparent,rgb(255 255 255/1.5%) 22%,rgb(255 255 255/4%) 50%,rgb(255 255 255/1.5%) 78%,transparent);animation:ambient-sweep 14s linear infinite}
/* `translate` moves the band in screen space. A translateX inside `transform` runs
   along the rotated axis, so the band also drifted ~1000px vertically and its cut
   short end crossed the screen as a hard diagonal edge. */
@keyframes ambient-sweep{from{translate:-900px 0}to{translate:calc(100vw + 900px) 0}}
.ambient u{position:absolute;inset:-36px;background-image:radial-gradient(rgb(255 255 255/14%) 1px,transparent 1.6px);background-size:18px 18px;mask-image:radial-gradient(70% 70% at 50% 45%,#000,transparent);opacity:.5;animation:ambient-grid 9s linear infinite}
@keyframes ambient-grid{to{transform:translate(18px,-18px)}}
.ambient s{position:absolute;left:var(--x);bottom:-10px;width:calc(2px + var(--z)*3px);height:calc(2px + var(--z)*3px);border-radius:50%;background:#fff;opacity:calc(.08 + var(--z)*.22);animation:ambient-dust calc(60s - var(--z)*34s) linear var(--p) infinite}
@keyframes ambient-dust{to{transform:translateY(-110vh)}}
@media(prefers-reduced-motion:reduce){.ambient *{animation:none}.ambient s{display:none}}
/* On the home page the layer sits under long copy and product demos, so it is quieter:
   dimmer lights, a fainter grid, no sweep. */
.ambient.is-quiet img:nth-child(1){--a:.07}.ambient.is-quiet img:nth-child(2){--a:.055}.ambient.is-quiet img:nth-child(3){--a:.045}
.ambient.is-quiet b{display:none}
.ambient.is-quiet u{opacity:.28}
.ambient.is-quiet s{opacity:calc(.05 + var(--z)*.14)}
/* Over the ambient background, demo panels fade to transparent instead of to a
   solid colour: the same bottom fade as before, as a mask rather than a black overlay. */
body:has(.ambient) .design-demo:after{content:none}
body:has(.ambient) .design-demo{mask-image:linear-gradient(to top,transparent 3.65%,#000 48%)}
/* The gradient starts at the padding box and would repeat into the 1px transparent
   border, painting the bright corner along the opposite edge; draw it once, edge to edge. */
body:has(.ambient) .design-demo{background-origin:border-box;background-repeat:no-repeat}
/* Panels were filled from grey to solid #0a0a0a, which read as a black block over the
   moving background. Over it they go from a faint grey in the corner nearest the copy
   to fully transparent in the opposite one, the same direction as their border light. */
body:has(.ambient) .design-demo{background:linear-gradient(var(--panel-gradient-direction,to bottom left),rgb(250 250 250/6%),transparent 60%)}
body:has(.ambient) .design-demo{background-origin:border-box;background-repeat:no-repeat}
/* Comparison blocks use the Smart Views card surface (.feature-scene): grey at the
   top fading to transparent, with a border that fades the same way. */
body:has(.ambient) :is(.compare-table,.cv-rows,.cv-picks){border-color:transparent;background:linear-gradient(180deg,#151515 0%,rgba(21,21,21,0) 100%) padding-box,linear-gradient(180deg,rgba(250,250,250,.1) 0%,rgba(250,250,250,.045) 44%,rgba(250,250,250,0) 100%) border-box}
body:has(.ambient) .cv-pick.is-ours{box-shadow:none;border:1px solid transparent;background:linear-gradient(180deg,rgba(250,250,250,.05) 0%,rgba(250,250,250,0) 100%) padding-box,linear-gradient(180deg,rgba(250,250,250,.12) 0%,rgba(250,250,250,.05) 44%,rgba(250,250,250,0) 100%) border-box}
/* The Fragment column becomes one surface of the same kind, drawn under its cells,
   instead of per-cell fills with a constant outline. The travelling light stays. */
body:has(.ambient) .compare-table :is(thead,tbody) tr:is(*,:last-child) .is-ours{background:none;box-shadow:none}
body:has(.ambient) .compare-table table{position:relative;z-index:1}
body:has(.ambient) .compare-table:before{content:"";position:absolute;top:8px;bottom:8px;right:var(--compare-pad);width:var(--compare-col);box-sizing:border-box;border:1px solid transparent;border-radius:10px;background:linear-gradient(180deg,rgba(250,250,250,.06) 0%,rgba(250,250,250,0) 100%) padding-box,linear-gradient(180deg,rgba(250,250,250,.14) 0%,rgba(250,250,250,.05) 44%,rgba(250,250,250,0) 100%) border-box;pointer-events:none}
