/* ==========================================================================
   HOMEPAGE · page-specific
   Everything else comes from site.css.
   ========================================================================== */
/* Life in the hero without cutting the painting into layers.

   Candoor and ARM feel alive because five pieces move against each other.
   That is the honest way to do it and it is also a day of work per image, so
   this does the cheap version: the whole picture drifts and swells as one, and
   nothing moves relative to anything else. The boat does not sail. What you get
   is a camera that never quite settles, which is enough to stop the page
   reading as a screenshot.

   The reason a single slow animation was not already doing that: ease-in-out
   spends most of its time near the ends, so a lone keyframe is stationary for
   the bulk of its cycle and dead still at every turn. Two of them on coprime
   periods, 31s and 43s, put the two turning points out of phase with each
   other, so the composite is never fully at rest and does not visibly repeat
   for about three quarters of an hour.

   Both periods must stay coprime when either is retuned. Land them on a common
   factor and the turning points start coinciding, at which point the whole
   picture stops dead on a beat and the effect collapses.

   The pan is deliberately the faster of the two. It is the motion you are meant
   to feel, and it stays believable at speed because a drifting camera is a real
   thing. The swell is not: nothing in life zooms, so the moment it is quick
   enough to notice on its own it reads as a slideshow effect. It runs slower
   than the pan and its only job is to keep the loop from closing.

   Amplitude is bounded by the overscan. .art keeps transform-origin at 40% 55%,
   so the left edge only overhangs by 0.40 x (scale - 1): 3.2% at the 1.08 floor.
   Drifting 1.9% leaves 1.3% in hand. Raise the drift and you must raise the
   scale floor with it or the paper shows at the edge. */
@keyframes art-drift { from { translate: -1.9% -0.55%; } to { translate: 1.9% 0.55%; } }
@keyframes art-swell { from { scale: 1.08; } to { scale: 1.13; } }

@media (prefers-reduced-motion: no-preference) {
  /* Two classes deep so it beats site.css's .art rule on specificity rather
     than on link order. */
  .art.art--alive {
    animation:
      art-drift 31s ease-in-out infinite alternate,
      art-swell 43s ease-in-out infinite alternate;
    /* Both start mid flight, so a fresh load never lands on a still frame. */
    animation-delay: -19s, -8s;
  }
}
