/*
 * "Soft" site look (includes/aa-site-style.php, option aa_pages_texture): film grain over the
 * black, softer text, lighter cards. Everything is under body.aa-soft, so it applies only where the
 * option is on, and the pages look exactly as before when it is off.
 *
 * Chosen 2026-11-17 in the background demo: film grain 1.25x / 10% sparse / 10% strength, black 0%,
 * cards +10%, text 84%.
 *   grain   a fixed full-screen layer of SVG fractal noise (no image file) BEHIND the content,
 *           so cards (anything with its own background) stay clean; our page wrapper and the footer
 *           are transparent so it shows through, the sticky header paints the same grain itself.
 *           The colour matrix (alpha = 2.5 x noise - 0.75) keeps only the brighter part of the noise,
 *           so it reads as distinct specks rather than a grey haze; the tile is drawn at 1.25x so
 *           each speck is a little larger than a pixel. Elementor sections with their own solid
 *           black background cover it, like cards.
 *   text    #d6d6d6 (84%) instead of pure white; secondary greys stepped down to match
 *   cards   #1a1a1a (10%) with #303030 borders, on our repo pages, the header panel and the footer
 */

body.aa-soft {
  --aa-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2.5 -0.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
  isolation: isolate;   /* the grain layer below sits under the content, above the page black */
  background-color: #000;   /* the theme's body is white; the black used to come from the content wrappers */
}
/* the grain: a fixed full-screen layer BEHIND the content, so cards and anything else with its own
   background cover it; it shows wherever the page is open black */
body.aa-soft::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--aa-grain) 0 0 / 250px 250px;   /* 1.25x the 200px tile, so a speck is a little bigger than a pixel */
}
@media print { body.aa-soft::after { display: none; } }

/* let the grain show through the plain black wrappers (our pages, the footer) */
body.aa-soft .aa-page { background: transparent; }
body.aa-soft #aa-footer { --ft-bg: transparent; }
/* the sticky header has to stay opaque (content scrolls under it): it gets the same grain,
   pinned to the window like the layer behind, so the two line up */
body.aa-soft #aa-header { background: var(--aa-grain) 0 0 / 250px 250px fixed, #000; }

/* ---- repo pages: tokens ---- */
body.aa-soft .aa-page {
  --aa-card: #1a1a1a;
  --aa-card-2: #1f1f1f;
  --aa-field: #1f1f1f;
  --aa-border: #2b2b2b;
  --aa-border-2: #353535;
  --aa-text: #d6d6d6;
  --aa-text-2: #c2c2c2;
  --aa-text-3: #a8a8a8;
}

/* ---- repo pages: the cards that hard-code #161616 ---- */
body.aa-soft :is(
  .aa-page-credits .aa-cr-bundle,
  .aa-page-subscriptions .aa-sb-group, .aa-page-subscriptions .aa-sb-summary, .aa-page-subscriptions .aa-sb-how-card,
  .aa-page-subscriptions .aa-sb-other, .aa-page-subscriptions .aa-sb-dlg,
  .aa-page-gift-cards .aa-gc-form, .aa-page-gift-cards .aa-gc-how-card,
  .aa-page-downloads .aa-dl-card, .aa-page-downloads .aa-dl-notes, .aa-page-downloads .aa-dl-what-card,
  .aa-page .aa-rs-card, .aa-page .aa-rs-img
) { background: #1a1a1a; border-color: #303030; }
body.aa-soft .aa-page .aa-rs-img { border: 0; }

/* device page: booking card, tab box (its scroll shadows must match the panel colour) */
body.aa-soft .aa-page-device .aa-dv-book { background: rgba(26, 26, 26, .94); }
body.aa-soft .aa-page-device .aa-dv-tabs { background: #1a1a1a; }
body.aa-soft .aa-page-device .aa-dv-panel {
  background:
    linear-gradient(#1a1a1a 30%, rgba(26,26,26,0)) center top / 100% 40px no-repeat local,
    linear-gradient(rgba(26,26,26,0), #1a1a1a 70%) center bottom / 100% 40px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.9), transparent) center top / 100% 14px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(255,255,255,.10), transparent) center bottom / 100% 14px no-repeat scroll;
}
body.aa-soft .aa-page-device .aa-dv-facts div { background: rgba(26, 26, 26, .6); }

/* ---- header + footer ---- */
body.aa-soft #aa-header { --hd-text: #d6d6d6; --hd-panel: #1a1a1a; --hd-line: #2b2b2b; }
body.aa-soft #aa-footer { --ft-card: #1a1a1a; --ft-line: #2b2b2b; --ft-line-2: #353535; --ft-text: #d6d6d6; --ft-text-2: #a8a8a8; }
