/* ───────────────────────────────────────────────────────────────────────────
   site-texture — static background texture for full-width bands.
   A faint assembly-line photo + worn grain + a dissolved, zoomed-out screenplay,
   the same on every band. All baked images, no animation. Tokens resolve per page.

   A band opts in with  <section data-tex>. texture.js injects the .tex-bg stack.
   Per-band overrides (for later, when textures differ per band):
   data-tex-photo (off), data-tex-angle, data-tex-scale, data-tex-strength, data-tex-grain.
   ─────────────────────────────────────────────────────────────────────────── */

/* isolate makes a stacking context so the z-index:-1 texture stays *inside* the
   band, behind its content, without forcing position on any child (which would
   break absolutely-positioned children like the hero glow). */
[data-tex]{position:relative;isolation:isolate}

.tex-bg{
  position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;
  /* ── per-band knobs (override via data-tex-* attributes) ── */
  --tex-angle:60deg;      /* script rotation                     */
  --tex-scale:1;          /* extra zoom of the whole field        */
  --tex-tile:30%;         /* script tile size — SMALLER = more zoomed out / smaller text */
  --tex-plate:0.42;       /* visible static script opacity       */
  --tex-grain:0.5;        /* worn-grain strength                 */
  --tex-img:url(assets/ford-assembly-line-textured.webp); /* per-band image (override with data-tex-img) */
  --tex-photo-dim:0.9;    /* image brightness                    */
  --tex-scrim:0.5;        /* flat black legibility scrim (baseline so text reads over any photo; override per band) */
}

/* 0 — assembly-line image, already grained + cut out on transparent. It sits
   behind everything raw (no white-key / grayscale / contrast), just a brightness
   dial. The texture effects live on the script, not on this image. */
.tex-photo{position:absolute;inset:0;
  background:var(--tex-img) center/cover no-repeat;
  filter:brightness(var(--tex-photo-dim))}

/* 1 — worn grain dust (grayscale on black, so screen blend drops the black) */
.tex-grain{position:absolute;inset:0;background:url(assets/grain-tile.jpg) center/cover;
  mix-blend-mode:screen;opacity:var(--tex-grain)}

/* 2 — dissolved, zoomed-out screenplay, rotated and tiled */
.tex-art{position:absolute;inset:-40%;transform-origin:center;
  transform:rotate(var(--tex-angle)) scale(var(--tex-scale))}
.tex-plate{position:absolute;inset:0;opacity:var(--tex-plate);
  background:url(assets/script-plate.webp) center/var(--tex-tile) repeat}

/* 3 — vignette for foreground legibility */
.tex-vignette{position:absolute;inset:0;
  background:radial-gradient(130% 100% at 28% 24%,rgba(8,9,10,0.05),rgba(8,9,10,0.55) 82%)}

/* 4 — flat black scrim (topmost): uniform darkening so foreground text reads
   over a busy photo. Off by default (--tex-scrim:0); a band dials it up with
   data-tex-scrim. */
.tex-scrim{position:absolute;inset:0;background:rgba(8,9,10,var(--tex-scrim))}
