/* ==========================================================================
   M28-02: Home Hero Fast, Crisp, ZERO Text-Ghosting Transition
   --------------------------------------------------------------------------
   Adapted to the LIVE DOM of demos/a/index.html (browser-probed 2026-11-30):
     slides  = .fy3-hero__slide[data-hero-slide]  (3 articles in .fy3-hero__stage)
     active  = .is-active  (01-hero.js also mirrors aria-hidden="false")
   The package's .hero-slide / .fy-hero-slide names DO NOT exist on the live
   page and are deliberately not used. The live stage already stacks all three
   slides in one grid cell (grid-area:1/1), so no position:absolute override is
   needed — forcing it would only add a needless reflow on every switch.

   Timing contract (both directions are declared on the DESTINATION state):
     outgoing -> opacity 1->0 in 0.10s, pointer-events off at once,
                 visibility hidden when the 0.10s exit completes;
     incoming -> stays hidden for 0.10s, then opacity 0->1 over 0.20s.
   At the crossover frame the outgoing slide is already at opacity 0 while the
   incoming one is still at 0, so at most ONE slide has visible text on screen.

   Lead: inject at the END of <head> (after home-v3/01-hero.css):
     <link rel="stylesheet" href="./02-hero-fast-clean-transition/hero-zero-ghosting.css">
   ========================================================================== */

.fy3-hero__slide[data-hero-slide],
[data-hero-slide] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
  transition: opacity 0.10s ease-out !important,
              transform 0.10s ease-out !important,
              visibility 0s linear 0.10s !important;
}

.fy3-hero__slide[data-hero-slide].is-active,
.fy3-hero__slide[data-hero-slide][aria-hidden="false"],
[data-hero-slide].is-active,
[data-hero-slide][aria-hidden="false"] {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2 !important;
  transition: opacity 0.20s ease-out 0.10s !important,
              transform 0.20s ease-out 0.10s !important,
              visibility 0s linear 0.10s !important;
}

/* Reduced motion keeps the site's existing no-animation contract. */
@media (prefers-reduced-motion: reduce) {
  .fy3-hero__slide[data-hero-slide],
  .fy3-hero__slide[data-hero-slide].is-active,
  [data-hero-slide],
  [data-hero-slide].is-active {
    transform: none !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}

/* --------------------------------------------------------------------------
   Slide 2 "New shapes" — three metrics flush, SAMPLING never 3 lines.
   Real DOM: dl.fy3-hero__stages > div.fy3-hero__stage-cell > dt/dd
   (the package's .hero-metrics / .fy-hero-metrics do not exist).
   Compact single row on wide screens; two lines max in longer locales and on
   narrower desktops, with all three dd values starting at the same y.
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  .fy3-hero__stages {
    align-items: stretch !important;
    grid-template-columns: 76px minmax(0, 1fr) 140px !important;
  }
  .fy3-hero__stage-cell dd {
    font-size: 12px !important;
    letter-spacing: -0.02em !important;
  }
}
@media (min-width: 1301px) {
  .fy3-hero__stages {
    max-width: 560px !important;
    grid-template-columns: 96px minmax(0, 1fr) 176px !important;
  }
  .fy3-hero__stage-cell dd {
    font-size: 14px !important;
    letter-spacing: -0.045em !important;
  }
}
