/* OnQue site background: drifting glows (CSS), fine grain, and the lava lamp canvas (onque-bg.js),
   plus the site's shared accessibility helpers (skip link, pause button, reduced motion; see the end).
   Used by /home/, /home/showrun/, /home/pricing/ and /home/accessibility/ with this markup right after <body>:
   <div class="bg-glows" aria-hidden="true"><canvas class="lava"></canvas><span class="g-yellow"></span><span class="g-cyan"></span><span class="g-purple"></span></div> */
:root { --purple: #9d5cff; }

/* ── GLOWS (drift slowly; still for reduced-motion visitors) ── */
.bg-glows {
  position: fixed; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;   /* behind everything, even sections without their own stacking order */
  background: var(--bg); /* backdrop for the overlay grain below */
}
/* Soft edge comes from an eased (roughly Gaussian) gradient, not filter: blur, which draws tile seams
   and is costly to animate. */
.bg-glows span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.105;
  will-change: transform;
  background: radial-gradient(circle closest-side,
    var(--c) 0%,
    color-mix(in srgb, var(--c) 94%, transparent) 12.5%,
    color-mix(in srgb, var(--c) 79%, transparent) 25%,
    color-mix(in srgb, var(--c) 60%, transparent) 37.5%,
    color-mix(in srgb, var(--c) 41%, transparent) 50%,
    color-mix(in srgb, var(--c) 25%, transparent) 62.5%,
    color-mix(in srgb, var(--c) 13%, transparent) 75%,
    color-mix(in srgb, var(--c) 5%, transparent) 87.5%,
    color-mix(in srgb, var(--c) 0%, transparent) 100%);
}
.bg-glows .g-yellow {
  --c: var(--yellow);
  width: 1000px; height: 1000px;
  top: -350px; left: -350px;
  animation: drift-yellow 30s ease-in-out infinite alternate;
}
.bg-glows .g-cyan {
  --c: var(--cyan);
  width: 860px; height: 860px;
  bottom: -230px; right: -280px;
  animation: drift-cyan 36s ease-in-out infinite alternate;
}
.bg-glows .g-purple {
  --c: var(--purple);
  width: 930px; height: 930px;
  top: calc(30% - 140px); left: calc(35% - 140px);
  animation: drift-purple 42s ease-in-out infinite alternate;
}
/* Fine static grain: dithers the few brightness levels a faint glow has on a near-black page (no banding).
   Overlay brightens and darkens evenly, so the black stays black; contrast-stretched grey noise, opaque. */
.bg-glows::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='3 0 0 0 -1 3 0 0 0 -1 3 0 0 0 -1 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  opacity: 0.12;
}
@keyframes drift-yellow {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(40vw, 25vh); }
  66%  { transform: translate(15vw, 60vh); }
  100% { transform: translate(55vw, 40vh); }
}
@keyframes drift-cyan {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-45vw, -20vh); }
  66%  { transform: translate(-20vw, -55vh); }
  100% { transform: translate(-60vw, -35vh); }
}
@keyframes drift-purple {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-30vw, 25vh); }
  66%  { transform: translate(25vw, -20vh); }
  100% { transform: translate(-10vw, -35vh); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-glows .g-yellow, .bg-glows .g-cyan, .bg-glows .g-purple { animation: none; }
}
/* Lava lamp (WebGL, see the LAVA script): when it runs, the CSS glows above step aside. */
.bg-glows .lava { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg-glows.lava-on span { display: none; }
.bg-glows:not(.lava-on) .lava { display: none; }   /* fallbacks never show a blank (black) canvas */
@media (forced-colors: active) { .bg-glows { display: none; } }   /* contrast themes keep their own colours */
/* Pause button (WCAG 2.2.2): wired by onque-bg.js, which shows it only while something moves. */
.bg-glows.bg-paused span { animation-play-state: paused; }
.bg-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: rgba(232,232,240,0.62);
  border: 1px solid rgba(232,232,240,0.32); border-radius: 8px;
  padding: 8px 12px; min-height: 36px;
  font: 500 13px "DM Sans", sans-serif; cursor: pointer;
}
.bg-toggle:hover { color: #e8e8f0; border-color: rgba(232,232,240,0.5); }
.bg-toggle svg { width: 12px; height: 12px; flex-shrink: 0; fill: currentColor; }
.bg-toggle > span { display: inline-flex; align-items: center; gap: 8px; }

/* ── SITE ACCESSIBILITY HELPERS (all pages that load this file) ── */
[hidden] { display: none !important; }
.skip-link {
  position: absolute; z-index: 100; top: -100px; left: 16px;
  background: #e8ff47; color: #0a0a0f;
  font: 600 14px "DM Sans", sans-serif; text-decoration: none;
  padding: 12px 18px; border-radius: 10px;
}
.skip-link:focus { top: 16px; outline: 2px solid #47ffe0; outline-offset: 2px; }
[dir="rtl"] .skip-link { left: auto; right: 16px; }
#main:focus, #main:focus-visible { outline: none; }   /* skip-link target: no ring around the whole page */
summary:focus-visible { outline: 2px solid #47ffe0; outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Cards fade in as they scroll into view. Without JavaScript they would stay invisible, and
   reduced-motion visitors get them at once with no lift on hover. */
html:not(.js) :is(.app-card, .tool-card, .feature-card, .plan-card, .role-card, .callout) { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card, .tool-card, .feature-card, .plan-card, .role-card, .callout {
    opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important;
  }
}
