/* THE PAGE LIGHT THROUGH A GREEN FILTER, WHILE A "coming soon" IS SHOWN.

   THE OWNER'S WORDS are quoted at the head of assets/js/light-filter.js, which decides
   when the filter is drawn and how strongly: "a green filter instead using one of the
   greens on the palette", on after a click and normal again after the second.

   WHAT IT IS. One fixed layer, .light-filter, which light-filter.js appends to the body
   and shows only while --filter is above 0. It sits above the page column (.page, z-index
   1), filled with --leaf-lit -- the palette's own green, the wordmark's "only" -- and
   blended by `color`: what lies beneath keeps its own lightness and takes the green's hue
   and chroma, as if seen through a green gel. The ground, the artwork, the light and the
   header text under the spotlight all go green; nothing is brightened or darkened.

   GRADED AROUND THE LIGHT. The layer is masked over the page light's own box -- 28rem at
   var(--px) var(--py), the two numbers the light is drawn at, so the filter travels with
   the light's own lag -- and across the light's visible radius, out to 68 percent where
   the light ends. The filter's strength is seven tenths of (1 - t) squared, t the
   distance from the centre as a share of that radius: strongest at the centre, a quarter
   of that at half way, nothing at the rim, laid as eleven stops so there is no visible
   step. Nothing clips it.

   HOW STRONG OVERALL: --filter, 0 to 1, the layer's opacity, eased over the light's fade.

   THE GATE. The page light's own -- a pointer that hovers finely, no request for less
   movement -- plus the dark appearance, mix-blend-mode and mask-image, and no forced
   colours. The script refuses the same readers and never makes the layer there.

   EVERY COLOUR IS A TOKEN: --leaf-lit for the green, and --blend-filter-ink (tokens.css,
   BANNER-SITE BLENDS), read for its alpha only, for the mask. */

.light-filter{display:none}

@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) and (forced-colors:none) {
  @supports (mix-blend-mode:color) and ((mask-image:none) or (-webkit-mask-image:none)) {
    :root:not([data-appearance="light"]) .light-filter:not([hidden]){
      --lf-mask:radial-gradient(28rem 28rem at var(--px,50%) var(--py,50%),
        color-mix(in oklab,var(--blend-filter-ink) 70%,transparent) 0%,
        color-mix(in oklab,var(--blend-filter-ink) 56.7%,transparent) 6.8%,
        color-mix(in oklab,var(--blend-filter-ink) 44.8%,transparent) 13.6%,
        color-mix(in oklab,var(--blend-filter-ink) 34.3%,transparent) 20.4%,
        color-mix(in oklab,var(--blend-filter-ink) 25.2%,transparent) 27.2%,
        color-mix(in oklab,var(--blend-filter-ink) 17.5%,transparent) 34%,
        color-mix(in oklab,var(--blend-filter-ink) 11.2%,transparent) 40.8%,
        color-mix(in oklab,var(--blend-filter-ink) 6.3%,transparent) 47.6%,
        color-mix(in oklab,var(--blend-filter-ink) 2.8%,transparent) 54.4%,
        color-mix(in oklab,var(--blend-filter-ink) 0.7%,transparent) 61.2%,
        color-mix(in oklab,var(--blend-filter-ink) 0%,transparent) 68%);
      display:block;position:fixed;inset:0;z-index:4;pointer-events:none;
      background:var(--leaf-lit);mix-blend-mode:color;
      -webkit-mask-image:var(--lf-mask);mask-image:var(--lf-mask);
      opacity:var(--filter,0)}
  }
}
