/* Repeating background texture — matches Figma page texture layer.
   Light: white-abstract-texture-background.jpg · 16% tile · 24% opacity
   Dark:  dark-abstract-texture-background 1.jpg · 16% tile · 64% opacity
   Source JPGs are 3000×3000, so a 16% tile = 480px. Files in /images are
   960×960 (2× for retina) copies of the originals to keep pages fast.

   Painted as part of the body's own background (never an overlay), so it
   can't sit above text or images. Opacity is done by laying a veil of the
   page colour over the tile: veil = (1 − opacity) of --bg. */
:root {
  --texture-image:   url("../images/texture-light.jpg");
  --texture-tile:    480px;
  --texture-opacity: 0.24;
}
@media (prefers-color-scheme: dark) {
  :root {
    --texture-image:   url("../images/texture-dark.jpg");
    --texture-opacity: 0.64;
  }
}

/* "html body" outranks the plain `body { background }` in page.css / case-study.css */
html body {
  --texture-veil: color-mix(in srgb, var(--bg) calc((1 - var(--texture-opacity)) * 100%), transparent);
  background-color: var(--bg);
  background-image: linear-gradient(var(--texture-veil), var(--texture-veil)), var(--texture-image);
  background-size: auto, var(--texture-tile) var(--texture-tile);
  background-repeat: no-repeat, repeat;
}
