/* paper.css - the scanned-paper background.
   textures/paper.webp is Millie's scanned paper, made seamless so it repeats down a long page with no visible join.
   It is nearly white, so it is multiplied over a warm tint (--paper-tint): change that one colour to warm it up,
   cool it down, or go pure white (#ffffff) and see only the speckles. */
:root {
  --paper-tint: #f3eee3;
  --paper-size: 900px; /* how large one tile of paper appears; smaller = finer-looking specks */
}
.paper {
  background-color: var(--paper-tint);
  background-image: url('/textures/paper.webp');
  background-size: var(--paper-size) auto;
  background-repeat: repeat;
  background-blend-mode: multiply;
}

/* Pages whose paper can be restyled (the home page, edit mode, the viewer): the paper is a fixed layer behind everything, so a
   colour filter (hue, brightness, tone curves; see paperlook.js) can be put on it without touching the pictures and writing. */
:root { --paper-filter: none; }
html { background-color: var(--paper-tint); }
.paper-live { background: none; }
.paper-live::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--paper-tint);
  background-image: url('/textures/paper.webp');
  background-size: var(--paper-size) auto;
  background-repeat: repeat;
  background-blend-mode: multiply;
  filter: var(--paper-filter);
}

/* The light overlay "grid paper": thin lines like school graph paper, over the paper but behind the pictures and writing. It covers the
   whole page and scrolls with it. Size, colour and strength come from the paper look (see paperlook.js); off until it is switched on. */
:root { --grid-display: none; --grid-size: 28px; --grid-color: #5bc8ee; --grid-opacity: 0.4; }
.paper-live { position: relative; }
.paper-live::after {
  content: '';
  display: var(--grid-display);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grid-opacity);
  background-image: linear-gradient(to right, var(--grid-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}
