/* Artwork behind the dark hero card.
 *
 * The card was a flat navy rectangle. It is now the same navy rectangle
 * with a piece of generated artwork behind it, held under a gradient that
 * is almost opaque over the words and lets go towards the right, where
 * the artwork has its empty space and the card has none of its text.
 *
 * The image is named by the page through a custom property, so this file
 * never has to know which page it is on:
 *
 *   <div class="dh rv" data-art
 *        style="--art:url('/assets/hero/hero-ielts-course-1600.webp');
 *               --art-s:url('/assets/hero/hero-ielts-course-900.webp')">
 *
 * CONTRAST IS THE WHOLE JOB HERE. The lightest point of either artwork
 * sits under the gradient at 0.94 or more, so the white display type and
 * the #A9C4DC body text keep the same contrast ratio they had against
 * flat #062543. Artwork that costs the page its legibility is not worth
 * having, however good it looks in isolation.
 */

.dh[data-art]{
  background-image:
    linear-gradient(100deg,
      rgba(6,37,67,.985) 0%,
      rgba(6,37,67,.955) 34%,
      rgba(6,37,67,.80) 68%,
      rgba(4,28,50,.58) 100%),
    var(--art);
  background-repeat:no-repeat, no-repeat;
  background-size:cover, cover;
  background-position:center, center right;
}

/* On a phone the card is tall and narrow and the text runs the full width,
   so the gradient turns to run down the card instead of across it and the
   artwork is left to the bottom corner. */
@media (max-width:700px){
  .dh[data-art]{
    background-image:
      linear-gradient(168deg,
        rgba(6,37,67,.985) 0%,
        rgba(6,37,67,.965) 46%,
        rgba(6,37,67,.86) 78%,
        rgba(4,28,50,.66) 100%),
      var(--art-s, var(--art));
  }
}

/* A reader who has asked for less motion still gets the artwork; it is a
   still image. Only the sheen in reveal.css is motion, and that is already
   switched off there. */
