/* Dog Ear: the icon's yellow leading the rule, and a ruled page under comic
   halftone for a hero. */
:root {
  --bar-silver: #ffcb45;
  --bar-yellow: #ffcb45;
  --bar-cyan:   #00c3d0;
  --bar-green:  #34c759;
  --bar-magenta:#cb30e0;
  --bar-red:    #ff383c;
  --bar-blue:   #4a7dff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bar-silver: #ffcb45;
    --bar-yellow: #ffcb45;
    --bar-cyan:   #00c3d0;
    --bar-green:  #34c759;
    --bar-magenta:#cb30e0;
    --bar-red:    #ff383c;
    --bar-blue:   #4a7dff;
  }
}

/* A ruled page under comic halftone: the two things the app is for, in one
   ground. Match Cut's hero is television static because Match Cut is about
   television; borrowing it here said nothing about books. Drawn in gradients
   rather than an image so it stays sharp at any size and costs no request.

   Back to front: the yellow bloom the icon sits in; a vignette so the words
   keep the middle; the halftone, two offset dot grids so the dots fall on a
   staggered lattice rather than a square one, as a printed screen does; then
   the ruled lines of a page. `--rule` is the line spacing, `--dot` the
   halftone pitch. */
.hero {
  --rule: 28px;
  --dot: 14px;
  background:
    radial-gradient(42% 38% at 50% 38%, rgba(255, 204, 0, 0.26) 0%, transparent 70%),
    radial-gradient(85% 70% at 50% 45%, transparent 25%, rgba(0, 0, 0, 0.74) 100%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1.1px, transparent 1.2px),
    radial-gradient(rgba(255, 255, 255, 0.05) 1.1px, transparent 1.2px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px var(--rule)),
    var(--static);
  background-size: auto, auto, var(--dot) var(--dot), var(--dot) var(--dot), auto, auto;
  background-position:
    center, center,
    0 0, calc(var(--dot) / 2) calc(var(--dot) / 2),
    center, center;
}

/* The margin rule down the left, and the dog-eared corner. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, transparent 0 calc(8% - 1px), rgba(255, 56, 60, 0.30) calc(8% - 1px) 8%, transparent 8%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.16) 0 42px, transparent 42px),
    linear-gradient(315deg, transparent 0 20px, rgba(0, 0, 0, 0.35) 20px 42px, transparent 42px);
  background-repeat: no-repeat;
  background-size: 100% 100%, 42px 42px, 42px 42px;
  background-position: 0 0, 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 600px) {
  /* The margin rule crowds the text on a narrow screen; the fold stays. */
  .hero::after { background-image: linear-gradient(315deg, rgba(255, 255, 255, 0.16) 0 32px, transparent 32px),
                                   linear-gradient(315deg, transparent 0 15px, rgba(0, 0, 0, 0.35) 15px 32px, transparent 32px);
                 background-size: 32px 32px, 32px 32px;
                 background-position: 100% 100%, 100% 100%; }
}
