/* The motion layer, lifted off the homepage so the other pages can have it.
 *
 * The homepage has 54 revealing elements, 8 split headings and 13 keyframe
 * animations. The course pages, the page where somebody decides to spend
 * $225, had none: no reveals, no split headings, one keyframe, and that one
 * belongs to the nav. This file is that machinery as a shared stylesheet.
 *
 * It is a copy of the homepage's rules, not a refactor of them. The homepage
 * keeps its own inline copy, because the one thing worse than duplicated CSS
 * is breaking the page that works while tidying it.
 *
 * EVERY HIDING RULE IS GATED BEHIND .js, which the bootstrap in <head> sets
 * and removes again if the observer never wires up. Without that gate a
 * blocked or throwing script leaves the whole page at opacity:0, which is how
 * a reveal animation turns into a blank page.
 */

/* ---------------------------------------------------------- scroll reveal */
.rv{transition:opacity .8s cubic-bezier(.22,.61,.36,1),
               transform .8s cubic-bezier(.22,.61,.36,1)}
.js .rv{opacity:0; transform:translateY(22px)}
.js .rv.is-in{opacity:1; transform:none}
.rv-1{transition-delay:.08s}
.rv-2{transition-delay:.16s}
.rv-3{transition-delay:.24s}
.rv-4{transition-delay:.32s}
.rv-5{transition-delay:.40s}
.rv-6{transition-delay:.48s}

/* ------------------------------------------------- per-word heading reveal
   The wrapper spans are built by reveal.js from [data-split], so the markup
   stays a plain heading and a reader with no JavaScript gets a plain
   heading back. */
.w{display:inline-block}
.w>i{display:inline-block; font-style:inherit;
  transition:opacity .7s cubic-bezier(.22,.61,.36,1),
             transform .85s cubic-bezier(.22,.61,.36,1),
             filter .7s cubic-bezier(.22,.61,.36,1)}
.js .w>i{opacity:0; transform:translateY(.45em); filter:blur(9px)}
.js .is-in .w>i{opacity:1; transform:none; filter:blur(0)}

/* --------------------------------------------------------- the dark hero
   The stat chips arrive one after another rather than all at once, which is
   the difference between a panel appearing and a panel being dealt. */
.js .dh .dh__chip{opacity:0; transform:translateY(14px) scale(.985);
  transition:opacity .62s cubic-bezier(.22,.61,.36,1),
             transform .62s cubic-bezier(.22,.61,.36,1)}
.js .dh.is-in .dh__chip{opacity:1; transform:none}
.js .dh.is-in .dh__chip:nth-child(1){transition-delay:.26s}
.js .dh.is-in .dh__chip:nth-child(2){transition-delay:.36s}
.js .dh.is-in .dh__chip:nth-child(3){transition-delay:.46s}
.js .dh.is-in .dh__chip:nth-child(4){transition-delay:.56s}

/* A slow sheen across the dark card, once, as it arrives. Pure decoration,
   so it is a pseudo-element on a card that already has overflow hidden and
   it never intercepts a pointer. */
.dh{position:relative; overflow:hidden}
.dh::after{content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(105deg,
    transparent 38%, rgba(255,255,255,.07) 48%, transparent 58%);
  transform:translateX(-120%)}
.js .dh.is-in::after{animation:dhSheen 1.5s cubic-bezier(.22,.61,.36,1) .35s 1}
@keyframes dhSheen{to{transform:translateX(120%)}}

/* ---------------------------------------------------------- the big number
   Counters are written by reveal.js into a span it creates, so the final
   value is in the HTML and survives with JavaScript off. */
.ctr{font-variant-numeric:tabular-nums}

/* ------------------------------------------------------- reduced motion
   .js-scoped, so these outrank the hiding rules above on specificity rather
   than on order. Without the prefix a reader who asks for less motion gets
   the animated start state frozen in place, which is the worst of both. */
@media (prefers-reduced-motion:reduce){
  .js .rv{opacity:1; transform:none}
  .js .w>i{opacity:1; transform:none; filter:none}
  .js .dh .dh__chip{opacity:1; transform:none}
  .js .dh.is-in::after{animation:none}
  .rv,.w>i,.dh__chip{transition-duration:.001ms !important}
}
