/* APED — the landing loader's new exit.
 *
 * The loader itself is UNTOUCHED: its intro, its ring, its percentage and
 * "Loading a vault of APES" are the mirror's own component and play exactly as
 * they did. Only the way it LEAVES changes, and only these two classes do it.
 *
 * How it used to leave (measured in site/assets/index.dc7c478f.css): the section
 * is a Vue `<Transition name="loader" :duration="{enter:1000,leave:1100}">` over
 * a v-show, so when `maestro.showLoader` goes false Vue puts `loader-leave-active`
 * on `section.site-loader` and two keyframe animations run for 1.1 s — one on the
 * section, one on `.site-loader__inner` — and then the node is display:none.
 *
 * Now: the instant that class appears, `html.aped-loader-outro` cancels BOTH
 * animations and pins the loader at full opacity, the outro canvas is mounted
 * over it, and only when the canvas has painted one opaque frame does
 * `html.aped-loader-gone` take the loader off the screen. Neither class outlives
 * the outro — both are removed in onDone, by which time Vue's own 1.1 s leave is
 * long finished and its v-show holds display:none on its own. Nothing here is a
 * node, nothing is measured, and the bundle is not patched.
 *
 * Loaded only when content/fx.json has `transition.enabled` and
 * `transition.loaderOutro`; with either off the build writes neither this file's
 * <link> nor loader-outro.js's <script>, and the loader fades out as it always did.
 */

html.aped-loader-outro section.site-loader,
html.aped-loader-outro section.site-loader .site-loader__inner {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

html.aped-loader-gone section.site-loader {
  display: none !important;
}

/* ---------------------------------------------------------------------------
 * ONE plane instead of two — content/fx.json -> transition.loaderGradient:false
 * ---------------------------------------------------------------------------
 * The loading screen painted a radial (`--loader-background-image`, per theme:
 * red is `radial-gradient(circle at 50% 0%, #b70505 40%, #770000 140%)` over a
 * darkening ring) plus a tiled film grain on `.site-loader__inner:before`, and
 * the outro canvas reproduced both in the shader. Two imitations of the same
 * picture never line up exactly, and the eye read them as two planes sliding
 * past each other at the hand over.
 *
 * The owner's call: drop the LOADER's layer, keep the ink outro. So the loading
 * screen is the flat `--loader-background-color` (#6a0000 in red, which is the
 * shader's own `base`) from its FIRST frame — `html.aped-loader-flat` is written
 * inline in the <head> by the build, not by loader-outro.js, so there is no frame
 * of radial before the swap — and loader-outro.js hands `gradient:false` and
 * `noise:false` to cloudOutro, which then paints flat `uBase` and no grain.
 * Canvas frame 0 is the pixel the loader was already showing.
 *
 * `!important` on the custom property because the mirror's own stylesheet
 * (/assets/index.*.css) is linked AFTER this file and its `[data-theme=…]
 * .site-loader` wins on specificity otherwise. Nothing here is a node and no box
 * changes size: the loader keeps its ring, its percentage and its copy exactly
 * as they were, only flatter.
 */
html.aped-loader-flat section.site-loader {
  --loader-background-image: none !important;
}

html.aped-loader-flat section.site-loader .site-loader__inner::before {
  display: none !important;
}
