/* Save Point: the icon's red leading the rule, and a sprite grid for a hero.

   The palette is the app's, as iOS resolves it. The first bar is the icon's
   own red rather than gray 3, which is what makes the rule Save Point's. */
:root {
  --bar-silver: #ff6b74;
  --bar-yellow: #ffcc00;
  --bar-cyan:   #00c3d0;
  --bar-green:  #34c759;
  --bar-magenta:#ff383c;
  --bar-red:    #ff383c;
  --bar-blue:   #6155f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bar-silver: #ff6b74;
    --bar-yellow: #ffcc00;
    --bar-cyan:   #00c3d0;
    --bar-green:  #34c759;
    --bar-magenta:#ff383c;
    --bar-red:    #ff383c;
    --bar-blue:   #6155f5;
  }
}

/* A sprite grid: the pixel lattice a 2D game is drawn on, lit from behind in
   the app icon's red. Match Cut's hero is a tile of television static because
   Match Cut is about television; borrowing that here said nothing about games,
   which is the whole point of a hero. Drawn in gradients rather than an image
   so it stays sharp at any size and costs no request.

   Four layers, back to front: the red bloom the icon sits in; a vignette so
   the words keep the middle; then the 8px cell grid, drawn as two sets of
   hairlines crossing. `--cell` is the pixel size: change it in one place. */
.hero {
  --cell: 8px;
  background:
    radial-gradient(42% 38% at 50% 38%, rgba(255, 56, 60, 0.30) 0%, transparent 70%),
    radial-gradient(85% 70% at 50% 45%, transparent 25%, rgba(0, 0, 0, 0.72) 100%),
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px var(--cell)),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px var(--cell)),
    var(--static);
}

/* A scatter of lit cells over the grid, as a handful of pixels in a sprite
   catch the light. Fixed positions rather than random: a hero that reshuffles
   on every load is a distraction, and these were placed to stay clear of the
   wordmark and the tagline. Each is one `--cell` square, so they line up. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 56, 60, 0.55) 0 0),
    linear-gradient(rgba(255, 204, 0, 0.45) 0 0),
    linear-gradient(rgba(97, 85, 245, 0.45) 0 0),
    linear-gradient(rgba(0, 195, 208, 0.40) 0 0),
    linear-gradient(rgba(255, 255, 255, 0.28) 0 0),
    linear-gradient(rgba(255, 56, 60, 0.35) 0 0);
  background-size: var(--cell) var(--cell);
  background-repeat: no-repeat;
  background-position:
    12% 22%, 86% 30%, 22% 74%, 78% 68%, 60% 16%, 36% 86%;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 600px) {
  /* The lit cells cluster towards the edges on a narrow screen, where the
     column is tighter and they would otherwise sit under the words. */
  .hero::after { background-position: 8% 18%, 92% 26%, 14% 80%, 88% 72%, 50% 10%, 28% 90%; }
}
