/* nv-backdrop.css — the blueprint ground the brand sits on.
   Two fixed layers behind all content. Self-contained: the sheet variables are
   declared here with light and dark values, so no page depends on another
   page's definitions. */

:root {
  --sheet-0: #0B1220;
  --sheet-1: #070C16;
  --sheet-2: #04070D;
  --sheet-shade: rgba(148, 176, 255, .045);
}
:root[data-theme="light"] {
  --sheet-0: #FFFFFF;
  --sheet-1: #F4F7FB;
  --sheet-2: #E9EFF7;
  --sheet-shade: rgba(16, 40, 90, .055);
}

.nv-sheet {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  contain: strict;
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, var(--sheet-shade) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, var(--sheet-shade) 47px 48px),
    radial-gradient(120% 90% at 28% 22%,
      var(--sheet-0) 0%, var(--sheet-1) 48%, var(--sheet-2) 100%);
}

/* Fine tooth so the grid reads as paper rather than as a screen overlay. */
.nv-tooth {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .26;
  transform: translateZ(0);
  contain: strict;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7 0.75' numOctaves='3' seed='3'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.60 0 0 0 0 0.66 0 0 0 0 0.74 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23t)'/%3E%3C/svg%3E");
}

/* Everything real sits above the backdrop.
   ONLY the flow elements. The floating widgets are position:fixed by design,
   and forcing them to relative dropped them into normal flow below the footer,
   adding their own height to every page. That was the 114px band measured
   above the footer. A fixed element already makes its own stacking context, so
   it needs the z-index and nothing else. */
body > nav.site,
body > main,
body > footer.site { position: relative; z-index: 2; }

body > .llm-tag { z-index: 79; }
body > #atlas-launcher { z-index: 80; }

/* Texture is decoration. Drop it when the reader has asked for less. */
@media (prefers-reduced-motion: reduce) { .nv-tooth { display: none; } }
@media (prefers-contrast: more) {
  .nv-tooth { display: none; }
  .nv-sheet { background: var(--sheet-1); }
}
