/* Title Reveal (post-title, heading) — opt-in entrance animation.
   Inert until assets/js/title-reveal.js splits the words and adds
   .is-split, so no JS (or reduced motion) means a static title.
   Rise + scale share one keyframe: both animate transform, and two
   animations on one element would override each other. Per-word
   delays are set inline by the splitter. */
@media (prefers-reduced-motion: no-preference) {
  .is-style-valencia-title-reveal.is-split {
    transform-origin: 0 100%;
    animation: valencia-title-reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .is-style-valencia-title-reveal.is-split .word {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
    animation: valencia-word-in 0.5s cubic-bezier(0.11, 0, 0.5, 0) forwards;
  }
}

@keyframes valencia-title-reveal {
  from { transform: translateY(24px) scale(0.96); }
  to   { transform: translateY(0) scale(1); }
}

@keyframes valencia-word-in {
  to { opacity: 1; filter: blur(0); }
}

/* Safari renders the animated blur filter on inline-block words with
   stray smudging/ghosting on adjacent glyphs (WebKit compositing bug).
   `@supports (-webkit-hyphens: none)` is true only in Safari/WebKit,
   not Chrome/Edge (also WebKit-based) — drop the blur there, keep the
   opacity fade so Safari still gets a word-by-word entrance. */
@supports (-webkit-hyphens: none) {
  @media (prefers-reduced-motion: no-preference) {
    .is-style-valencia-title-reveal.is-split .word {
      filter: none;
    }

    @keyframes valencia-word-in {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
  }
}
