/*
 * Cross-document view transitions - the ONE stylesheet in this repo that is
 * not carved out of the export kit.
 *
 * It carries no design data and could not: there is nothing in the kit to
 * carve. Live is a single-page Framer app, so a link click swaps the document
 * in place and the visitor never sees a navigation at all; our ten pages are
 * ten real documents, and without this the browser paints white between them.
 *
 * What live actually does, measured (1512x900, sampled per animation frame
 * through a click on "Portfólio"): the url changes ~25 ms after the click, the
 * old page's DOM is torn down and the new page's first elements are painted
 * ~140 ms after it, and NO root element ever changes opacity or transform.
 * The motion a visitor sees on arrival is the new page's own appear animations
 * (`framer-mzmh3l-container` 0 -> 1 over ~1 s), which this build already
 * reproduces from the kit's own JSON. So there is no live cross-fade to copy -
 * there is a live ABSENCE of a flash, and that is what this restores.
 *
 * 250 ms is the User-Agent's own default for this transition, kept and stated
 * rather than replaced: it lands inside live's ~140 ms swap-to-paint window
 * plus the incoming page's appear stagger, and a longer fade would hold the
 * new page's own animations back to no purpose.
 *
 * Progressive enhancement, and nothing depends on it: Chrome and Safari
 * cross-fade, Firefox (no cross-document support as of 2026-08) navigates
 * instantly exactly as this build did before. Every page is a full document
 * load either way, so all script semantics are unchanged.
 */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
  animation-timing-function: ease;
}

/*
 * The visitor-side half of the animation gate that src/scripts/main.js applies
 * to everything else: reduce motion means no cross-fade, and the navigation
 * stays instant.
 */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
