/* Home hero: work trail + reactive type. Scoped to html[data-fx~="trail"]; works alongside hero-fly.css. */

/* Layering: red background, then the work cards, then the wordmark and the line of text on top.
   The cards are kept to the empty red above the name (they only tuck a little behind the top of the letters),
   so the type needs no outline or backing panel. */
html[data-fx~="trail"] .hero .word,
html[data-fx~="trail"] .hero .hero-foot{position:relative;z-index:2}
html[data-fx~="trail"] .da-trail{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}

/* If the script never starts, the standard rise still plays, a beat later */
html[data-fx~="trail"] .word .l{animation-delay:.9s!important}

/* Once the script is running it drives the entrance itself, letter by letter */
html[data-fx~="trail"].da-js .word .l{animation:none}
html[data-fx~="trail"] .da-ch{display:inline-flex;justify-content:center}
html[data-fx~="trail"].da-js:not(.da-in) .word .l{opacity:0}
/* The name leads: the line of text and the scroll cue wait for it, and fade in as the last letters land.
   (Their children fade, not .hero-foot itself, whose opacity hero-fly.js drives while scrolling.) */
html[data-fx~="trail"].da-js:not(.da-in) .hero-foot > *{opacity:0}
@media (prefers-reduced-motion:no-preference){html[data-fx~="trail"].da-in .hero-foot > *{animation:da-foot .4s .7s ease-out backwards}}
@keyframes da-foot{from{opacity:0}}

/* Work cards: flat planes, like the type (no shadow, a hair of radius) */
html[data-fx~="trail"] .da-card{position:absolute;left:0;top:0;opacity:0;border-radius:2px;overflow:hidden;background:#9E0C24;
  will-change:transform,opacity;backface-visibility:hidden}
html[data-fx~="trail"] .da-card img{display:block;width:100%;height:100%;max-width:none;object-fit:cover}

/* Screen readers hear the name once, not letter by letter */
html[data-fx~="trail"] .da-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
