/*
 * Experiencia propia de Axiom (`html.motion-xp`, `?xp=next`; scripts/xp/app.js): el canvas a pantalla completa,
 * el HUD HTML encima (xp-hud.css) y la capa HTML de XpShell (xp-html.css).
 * Todo el DOM anterior sigue en el árbol para buscadores y lectores de pantalla, pero fuera de la
 * vista con un recorte accesible (no display:none). El consentimiento espera al final de la intro.
 */

html.motion-xp,
html.motion-xp body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
}

/* Recorte accesible: legible por lectores y buscadores, invisible a la vista. `contain: paint`
   hace de bloque contenedor de los descendientes fijos, así tampoco se escapan del recorte. */
html.motion-xp .skip-link,
html.motion-xp .experience > :not(.scene-layer) {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  contain: paint !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

html.motion-xp .experience {
  min-height: 0;
}

/* El lienzo a pantalla completa; las capas decorativas del sitio anterior (aria-hidden) fuera. */
html.motion-xp .scene-layer {
  z-index: 0;
  background: var(--ink);
}

html.motion-xp .scene-layer > :not(#webgl-canvas) {
  display: none !important;
}

html.motion-xp #webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1 !important;
  transition: none;
}

/* Loader propio (spec propia §5.1): tinta, la A del favicon, `000 %` en Michroma y una hairline de 120 px que se
   llena. Al terminar, la hairline se estira hasta ser la de la barra del HUD (ui/loader.js). Sin barra ASCII.
   El de index.html (`--boot`) solo existe con la experiencia nueva activa. */
.xp-loader--boot {
  display: none !important;
}

html.motion-xp .xp-loader--boot {
  display: flex !important;
}

.xp-loader {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  color: var(--bone, #f4f5f6);
}

.xp-loader__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink, #040506);
}

.xp-loader__mark {
  display: block;
  line-height: 0;
}

.xp-loader__a {
  display: block;
  width: 24px;
  height: 19.7px;
  fill: var(--bone, #f4f5f6);
}

.xp-loader__value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-tech, "Michroma", sans-serif);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.13em;
  font-variant-numeric: tabular-nums;
}

.xp-loader__unit {
  color: var(--steel, #9da4aa);
}

.xp-loader__line {
  position: relative;
  display: block;
  width: 120px;
  height: 1px;
  background: var(--hairline, rgba(244, 245, 246, 0.12));
  overflow: hidden;
}

.xp-loader__line--free {
  position: fixed;
  margin: 0;
}

.xp-loader__fill {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--hairline-strong, rgba(244, 245, 246, 0.34));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* [LEGADO] La barra ASCII del loader anterior no se muestra (S-02), aunque el arranque
   antiguo siga adoptando este marcado hasta la integración. */
.xp-loader__bar {
  display: none !important;
}
