/* rd-kbg.css — "Launch Stage": the kinetic hero's background (redesign item 14, owner's pick: idea 7).
   A dark showroom floor, a faint glow on the back wall, one spotlight beam and its pool of light on the floor.
   Decoration only: everything lives in .rdk-bg (aria-hidden, pointer-events: none) — no text, no photo, no request.

   THE STILL STAGE IS ALL HERE. Wall, floor, floor seams, beam at its rest angle and the light pool are painted by
   this file alone (two pseudo-elements), so the first paint is the finished picture and nothing waits for a script.
   rd-kbg.r700.js only moves the beam and the pool: it adds two empty layers of its own (.kbg-b, .kbg-p) that take
   the very same rules, and while it runs (class kbg-on) they stand in for the two pseudo-elements, in the same
   pose, so nothing jumps when it starts. If it never runs (JS off, an error, reduced motion) this picture stays.

   Legibility: the beam is brightest above the title and fades down through it; the pool lies on the floor under
   the title, in the foot of the hero (centred on the paragraph / buttons), not behind the title rows.

   Owner 2026-11-11 ("the background light … should be more visible as in the prototype … the main spotlight is
   still the information and text"): the light is brought up toward the approved prototype — a brighter, longer
   beam (a slightly wider cone and the prototype's slower fade down the shaft), a brighter pool and floor sheen
   (larger on phones), clearer floor seams and a stronger glow on the back wall. Light only: the motion — sweep
   angles, timing, sway, lean, dust — is exactly as before (owner 2026-11-12: animation changes are his to
   approve). Still CSS only and the same two moving layers: no extra per-frame work. Contrast is measured on the rendered background over the whole sweep: subtitle
   ≥ 4.5:1, white title rows ≥ 7:1, blue row ≥ 3:1 (see the build notes). */
.rdk > .rdk-bg {
  --kbg-a: -8;                    /* beam rest angle in degrees; scroll sweeps it to the opposite angle */
  --kbg-t0: -.1405;               /* tan(rest angle) */
  --kbg-s0: 1.098;                /* pool stretch at rest = 1 + .7 * |tan| */
  --kbg-vh: 1vh;
  --kbg-hz: 60%;                  /* horizon: where the wall meets the floor */
  --kbg-pw: 95%;                  /* pool width, height */
  --kbg-ph: calc(7 * var(--kbg-vh));
  /* pool centre above the hero's bottom edge = the middle of the foot (rd-khero's own measures, with its defaults) */
  --kbg-fy: calc((var(--pb, 28px) + var(--fh, 72px) + var(--fg, 22px)) / 2);
  /* beam origin (14vh above the hero) down to the pool centre */
  --kbg-L: calc(114 * var(--kbg-vh) - var(--kbg-fy));
  overflow: hidden; contain: strict;
  background:
    linear-gradient(0deg, #050505, rgba(5,5,5,0) 7%),
    linear-gradient(90deg, rgba(200,215,255,0), rgba(200,215,255,.16), rgba(200,215,255,0)) 0 var(--kbg-hz) / 100% 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none' fill='none' stroke='%23c8d2eb'%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='.06' d='M41.6 0L-188 100M42.2 0L-171 100M42.8 0L-154 100M43.4 0L-137 100M44 0L-120 100M44.6 0L-103 100M45.2 0L-86 100M45.8 0L-69 100M46.4 0L-52 100M47 0L-35 100M47.6 0L-18 100M48.2 0L-1 100M48.8 0L16 100M49.4 0L33 100M50 0L50 100M50.6 0L67 100M51.2 0L84 100M51.8 0L101 100M52.4 0L118 100M53 0L135 100M53.6 0L152 100M54.2 0L169 100M54.8 0L186 100M55.4 0L203 100M56 0L220 100M56.6 0L237 100M57.2 0L254 100M57.8 0L271 100M58.4 0L288 100'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='.035' d='M0 1.9H100M0 6.7H100M0 13.8H100M0 23.2H100M0 34.7H100M0 48.2H100M0 63.6H100M0 80.9H100'/%3E%3C/svg%3E") 0 100% / 100% calc(100% - var(--kbg-hz)) no-repeat,
    linear-gradient(#10121a, #0a0b0f 30%, #050505) 0 100% / 100% calc(100% - var(--kbg-hz)) no-repeat,
    radial-gradient(70% 46% at 50% 0, rgba(52,80,140,.36), rgba(46,70,120,0) 72%),
    linear-gradient(#040405 45%, #0a0b0f)
    #050505;
}
@supports (height: 100svh) { .rdk > .rdk-bg { --kbg-vh: 1svh; } }
/* wider screens: a wider sweep (the pool stays on the floor in view), a lower horizon, a narrower pool */
@media (min-aspect-ratio: 3/4) { .rdk > .rdk-bg { --kbg-a: -15; --kbg-t0: -.2679; --kbg-s0: 1.188; } }
@media (min-aspect-ratio: 5/4) { .rdk > .rdk-bg { --kbg-a: -22; --kbg-t0: -.404; --kbg-s0: 1.283; } }
@media (min-aspect-ratio: 3/2) { .rdk > .rdk-bg { --kbg-a: -26; --kbg-t0: -.4877; --kbg-s0: 1.341; } }
@media (min-width: 700px) { .rdk > .rdk-bg { --kbg-hz: 70%; --kbg-pw: 46%; --kbg-ph: calc(11 * var(--kbg-vh)); } }

/* the beam: a soft cone hung 14vh above the hero, brightest at the top, gone before the foot */
.rdk > .rdk-bg::before, .rdk > .rdk-bg > .kbg-b {
  content: ""; position: absolute; left: calc(50% - 40 * var(--kbg-vh)); top: calc(-14 * var(--kbg-vh));
  width: calc(80 * var(--kbg-vh)); height: calc(134 * var(--kbg-vh));
  transform-origin: 50% 0;
  transform: rotate(calc(var(--kbg-a) * 1deg));
  background: conic-gradient(from 180deg at 50% 0, rgba(196,212,255,.33) 0deg, rgba(160,190,255,.2) 7deg, rgba(120,160,255,.065) 12.5deg, rgba(120,160,255,0) 18deg, rgba(120,160,255,0) 342deg, rgba(120,160,255,.065) 347.5deg, rgba(160,190,255,.2) 353deg, rgba(196,212,255,.33) 360deg);
  -webkit-mask-image: linear-gradient(#000 12%, rgba(0,0,0,.72) 34%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.24) 62%, rgba(0,0,0,.1) 76%, rgba(0,0,0,0) 90%);
          mask-image: linear-gradient(#000 12%, rgba(0,0,0,.72) 34%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.24) 62%, rgba(0,0,0,.1) 76%, rgba(0,0,0,0) 90%);
}
/* the pool where the beam lands, and its sheen running back up the glossy floor towards the horizon */
.rdk > .rdk-bg::after, .rdk > .rdk-bg > .kbg-p {
  content: ""; position: absolute; left: 50%; width: var(--kbg-pw); margin-left: calc(var(--kbg-pw) / -2);
  top: var(--kbg-hz); bottom: calc(var(--kbg-fy) - var(--kbg-ph) / 2);
  transform: translateX(calc(var(--kbg-t0) * var(--kbg-L) * -1)) scaleX(var(--kbg-s0));
  background:
    radial-gradient(closest-side, rgba(210,222,255,var(--kbg-pa, .3)), rgba(140,172,255,var(--kbg-pm, .11)) 50%, rgba(130,165,255,0)) 50% 100% / 100% var(--kbg-ph) no-repeat,
    radial-gradient(16% 100% at 50% 100%, rgba(170,195,255,var(--kbg-sa, .11)), rgba(170,195,255,0)) 50% 0 / 100% calc(100% - var(--kbg-ph) / 2) no-repeat;
}
/* phones: the pool lies between the paragraph and the buttons (the title rows stay above the horizon), so it can be
   larger and brighter there */
@media (max-aspect-ratio: 3/4) and (max-width: 699px) {
  .rdk > .rdk-bg { --kbg-ph: calc(9 * var(--kbg-vh)); }
  .rdk > .rdk-bg::after, .rdk > .rdk-bg > .kbg-p { --kbg-pa: .62; --kbg-pm: .24; --kbg-sa: .2; }
}
/* guide pages have no buttons: their foot is the paragraph alone, so the middle of the foot is the middle of the
   paragraph. On phones the pool goes under it instead (final audit 2026-11-12: the subtitle fell to 2:1 where the pool
   lay behind its last lines); the beam still lands on it, the brightness is unchanged. */
@media (max-aspect-ratio: 3/4) and (max-width: 699px) {
  .rdk.rdk-guide > .rdk-bg { --kbg-fy: calc(var(--pb, 28px) * .5); }
}
/* the script's two layers: hidden until it animates (class kbg-on), then shown in place of the two pseudo-elements;
   from there the script changes nothing but their transform. The dust gets a canvas. */
.rdk > .rdk-bg > div { visibility: hidden; }
.rdk > .rdk-bg.kbg-on > div { visibility: visible; will-change: transform; }
.rdk > .rdk-bg.kbg-on::before, .rdk > .rdk-bg.kbg-on::after { content: none; }
.rdk > .rdk-bg > canvas { position: absolute; left: 0; top: 0; width: 100%; height: var(--kbg-hz); }
/* proto.css gives every property a .01ms transition under reduced motion; nothing here ever transitions */
.rdk > .rdk-bg, .rdk > .rdk-bg::before, .rdk > .rdk-bg::after, .rdk > .rdk-bg > div { transition: none !important; }
