/*
 * Sangue e neve: cold white paper, blood crimson and the deep petrol of a
 * church's night, over falling snow. Made for a Vileborn campaign, from the
 * colours of the Apocrypha manual; fits any dark, wintry, gothic one.
 *
 * Suggested with heading_font: Cinzel, text font EB Garamond, and
 * title: centered.
 */

/* ---------- Light scheme ---------- */
[data-md-color-scheme="default"] {
  --ttrpg-paper: #f5f5f4;
  --ttrpg-ink: #1e1b1c;
  --ttrpg-ink-rgb: 30, 27, 28;
  --ttrpg-muted: #6b6468;
  --ttrpg-head: #8a1a20;
  --ttrpg-strong: #8a1a20;
  --ttrpg-brass: #9c1912;
  --ttrpg-box: #e7eef1;
  --ttrpg-rule: #9c1912;
  --ttrpg-bar: #012736;
  --ttrpg-bar-ink: #eef3f5;
  --ttrpg-backdrop-1: #dfe9ed;
  --ttrpg-backdrop-2: #8fa6b0;
  --ttrpg-grain: 0.35;
  --ttrpg-grain-blend: multiply;
  --ttrpg-vignette: rgba(90, 120, 135, 0.22);
  /* Snow over a pale sky: white flakes with a faint grey edge. */
  --ttrpg-backdrop-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.11' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='16' intercept='-12.6'/%3E%3C/feComponentTransfer%3E%3CfeGaussianBlur stdDeviation='.5'/%3E%3C/filter%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='.8' flood-color='%2358727e' flood-opacity='.9'/%3E%3C/filter%3E%3Cg filter='url(%23s)'%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Dark scheme ---------- */
[data-md-color-scheme="slate"] {
  --ttrpg-paper: #14181b;
  --ttrpg-ink: #e9e4e1;
  --ttrpg-ink-rgb: 233, 228, 225;
  --ttrpg-muted: #9ca4a8;
  --ttrpg-head: #e0707a;
  --ttrpg-strong: #e0707a;
  --ttrpg-brass: #b0323a;
  --ttrpg-box: #1c2429;
  --ttrpg-rule: #b0323a;
  --ttrpg-bar: #01141c;
  --ttrpg-bar-ink: #e6ecee;
  --ttrpg-backdrop-1: #0b2a36;
  --ttrpg-backdrop-2: #02090d;
  --ttrpg-grain: 0.16;
  --ttrpg-grain-blend: overlay;
  --ttrpg-vignette: rgba(0, 0, 0, 0.45);
  /* Snow falling through the night: small and larger soft flakes. */
  --ttrpg-backdrop-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.11' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='16' intercept='-12.6'/%3E%3C/feComponentTransfer%3E%3CfeGaussianBlur stdDeviation='.5'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.7'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='1' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='18' intercept='-14.4'/%3E%3C/feComponentTransfer%3E%3CfeGaussianBlur stdDeviation='1.2'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.45'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
}

/* ---------- Both schemes ---------- */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  /* Scene breaks: a crescent moon, then the cross of the Order. */
  --ttrpg-ornament-1: "\263E\FE0E";
  --ttrpg-ornament-2: "\2720";

  /* A cold, neutral paper grain instead of the warm default. */
  --ttrpg-paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .42 0 0 0 0 .45 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ttrpg-backdrop-size: 420px;

  /* EB Garamond reads small: a step up from the default size. */
  --ttrpg-text-size: clamp(18px, 0.95rem, 20px);
}
