/* Siemra: slow drift-up.
   Headlines, paragraphs, numbers, panels and rows rise and fade in as they scroll into view.
   Scroll-linked (no script). Uses the `translate` property, so button press and hover effects still work.
   Browsers without scroll-linked animation show the page unchanged.
   Visitors who turn on reduced motion get no movement. */

@keyframes drift-up {
  from { opacity: 0; translate: 0 var(--drift, 56px); }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    /* Everything that drifts: a long, slow range so each piece settles over most of a screen */
    .say, .paren, .accent-h, .chapter-h, .big, .lede,
    .stat-n, .stat-l, .specimen, .pair-msg > .kbtn,
    .head-row, .xp, .rl > li, .cal, .stage-h, .engine,
    .sig > li, .quad > div, .disc, .moves, .tlinks,
    .seat-list > li, .req, .faq details, .dot,
    .close blockquote, .close .by, .close-row,
    .foot-grid > div {
      animation: drift-up linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }

    /* The biggest words travel furthest */
    .chapter-h, .stat-n, .close blockquote { --drift: 80px; animation-range: entry 0% cover 55%; }

    /* Side-by-side items arrive one after another */
    .sig > li:nth-child(2), .quad > div:nth-child(2), .foot-grid > div:nth-child(2) { animation-range: entry 8% cover 50%; }
    .sig > li:nth-child(3), .quad > div:nth-child(3), .foot-grid > div:nth-child(3) { animation-range: entry 16% cover 55%; }
    .sig > li:nth-child(4), .quad > div:nth-child(4), .foot-grid > div:nth-child(4) { animation-range: entry 24% cover 60%; }

    /* Opening screen: rises once on load, slowly, a beat apart */
    .hero h1      { animation: drift-up 2.4s cubic-bezier(.16,1,.3,1) .2s both; --drift: 72px; }
    .hero-say     { animation: drift-up 2.4s cubic-bezier(.16,1,.3,1) .7s both; }
    .hero-list    { animation: drift-up 2.4s cubic-bezier(.16,1,.3,1) 1.1s both; }
  }
}
