/* ─── Motion on the public pages ──────────────────────────────────────────
   Asked for on 21 November 2026, first for the home page and then the same
   day for the whole website: gentle animation that is friendly on a phone.
   Loaded by both public bases, so the marketing pages, the course pages, the
   subject pages and the blog all move the same way.

   Three things move, each once and then never again, so nothing here joins
   the closed list of what may move forever.

   1. The first screen arrives: the page heading and the line under it rise a
      few pixels into place, and on a page with a hero photograph the photo
      settles from a slight zoom.
   2. Further down, cards, headings, questions and pictures rise into place as
      they scroll into view (static/js/site-motion.js, which hides nothing until
      it has run, and leaves forms and reading text alone).
   3. On a device with a mouse, a course card lifts under the pointer. A phone
      has no hover, so it is left alone there.

   Only opacity and transform are animated, which the browser does without
   relaying out the page, and nothing moves sideways, so the page cannot be
   pushed wider than a phone. Nothing starts from fully transparent: an element
   at opacity 0 is not counted as painted, which would delay the page's
   measured load time. All of it waits for no reduced-motion preference, and
   this sheet carries that rule itself because the course pages do not load
   site.css. */
.hero-photo { overflow: hidden; border-radius: var(--radius-lg, 16px); }

@media (prefers-reduced-motion: no-preference) {
  /* :where() keeps these at no weight, so any page's own rule wins. */
  :where(main h1, main h1 + p, .page-eyebrow, .page-intro, .course-hero-title) {
    animation: home-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  :where(main h1 + p, .page-intro) { animation-delay: 0.1s; }

  .hero-copy > * {
    animation: home-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
  .hero-photo img {
    animation: home-settle 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-stats-row {
    animation: home-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
  }

  .motion-ready .reveal {
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .motion-ready .reveal:not(.is-revealed) {
    opacity: 0.01;
    transform: translateY(18px);
  }

  @media (hover: hover) {
    .enrol-card, .subject-links a, .dais-course-grid > a, .team-card {
      transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }
    .enrol-card:hover, .enrol-card:focus-visible,
    .dais-course-grid > a:hover, .dais-course-grid > a:focus-visible,
    .team-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 24px rgba(10, 34, 64, 0.12);
    }
    .subject-links a:hover, .subject-links a:focus-visible {
      transform: translateY(-2px);
    }
  }
}
/* A phone travels a shorter distance, so the movement reads the same. */
@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
  .motion-ready .reveal:not(.is-revealed) { transform: translateY(12px); }
}
/* Printed, everything is simply there. */
@media print {
  .motion-ready .reveal { opacity: 1 !important; transform: none !important; }
}
@keyframes home-rise {
  from { opacity: 0.01; transform: translateY(14px); }
  to   { opacity: 1;    transform: none; }
}
@keyframes home-settle {
  from { transform: scale(1.06); }
  to   { transform: none; }
}
