/* Still film texture, independent of the motion layer. */
.chapter { isolation: isolate; }
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("grain.svg") repeat;
  background-size: 176px 176px;
  opacity: .135;
  mix-blend-mode: screen;
}
.chapter.light::before { opacity: .092; filter: invert(1); mix-blend-mode: multiply; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("grain.svg") repeat;
  background-size: 176px 176px;
  mix-blend-mode: screen;
  opacity: .125;
  pointer-events: none;
}
.hero::before { content: none; }

#grain-motion {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  display: block;
  pointer-events: none;
}
@media (max-width: 740px) {
  .chapter::before { opacity: .115; }
  .hero-art::after { opacity: .11; }
}
@media (prefers-reduced-motion: reduce) {
  #grain-motion { display: none; }
}
@media (forced-colors: active), print {
  #grain-motion, .chapter::before, .hero-art::after { display: none; }
}

/* The main scroll scene is drawn on canvas; keep the paper texture quiet. */
.chapter::before { opacity: .052; }
.chapter.light::before { opacity: .037; }
.hero-art::after { opacity: .045; }
.portrait { opacity: var(--portrait-solid, 1); }
.hero-copy, .locale { opacity: var(--copy-solid, 1); }
.chapter.about { padding-top: clamp(9rem, 23svh, 14rem); }
@media (max-width: 740px) {
  .chapter.about { padding-top: clamp(6rem, 14svh, 9rem); }
}
@media (prefers-reduced-motion: reduce) {
  .portrait, .hero-copy, .locale { opacity: 1 !important; }
  .chapter.about { padding-top: clamp(3rem,8vw,7rem); }
}
html.still .chapter.about { padding-top: clamp(3rem,8vw,7rem); }
html.still .portrait, html.still .hero-copy, html.still .locale { opacity: 1 !important; }
.hero-copy > * { opacity: var(--copy-solid, 1); }
html.still .hero-copy > * { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { opacity: 1; }
}

/* The full-page renderer takes over the signature when its particles arrive. */
html.journey-end:not(.still) .signature canvas {visibility:hidden}
