/* Split-text rise. Measured from Heron AI's SplitTextReveal + RevealGroup (teardown 09-30), rewritten with our
   names and no GSAP. Every word sits in its own clipped box and rises one full line height while fading in;
   words follow each other by 20ms, and the blocks of one group (label, title, sub) follow each other by 100ms.
   Knobs live on :root so any ancestor (a group, a section) can override them. */
:root {
  --rise-duration: .8s;                                /* per word */
  --rise-stagger: .02s;                                /* between words (or lines) inside one block */
  --rise-ease: cubic-bezier(.215, .61, .355, 1);       /* GSAP power2.out (cubic out) */
  --rise-y: 100%;                                      /* travel, in % of the word's own line box */
  --rise-bleed: .1em;                                  /* ours: widens the clip so descenders and tight
                                                          headings are not cut; set 0 for the raw source mask */
  --rise-group-stagger: .1;                            /* seconds between blocks of a group (read by part.js) */
  --rise-start: .55;                                   /* play when this fraction of the group is above the
                                                          viewport's bottom edge (read by part.js) */
}

/* Hide only what part.js is about to split, so there is no flash of unsplit text. No JS = plain text. */
.rise-js [data-rise]:not([data-rise-state]) { visibility: hidden; }

.rise-mask {
  display: inline-block;
  vertical-align: top;
  overflow: clip;
  padding-block: var(--rise-bleed);
  margin-block: calc(-1 * var(--rise-bleed));        /* layout neutral: the bleed only widens the clip */
}
.rise-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(calc(var(--rise-y) + 2 * var(--rise-bleed)));
  transition: transform var(--rise-duration) var(--rise-ease), opacity var(--rise-duration) var(--rise-ease);
  transition-delay: calc(var(--rise-at, 0s) + var(--i, 0) * var(--rise-stagger));
}
[data-rise-state="on"] .rise-word { opacity: 1; transform: none; }
