/* Site-wide motion. One source, loaded on every static page.

   THE SAFETY RULE THIS FILE IS BUILT AROUND: nothing here hides content on
   its own. There is no rule that sets opacity:0 on page markup. The hidden
   state lives ONLY under .fz-reveal, a class that is added by JavaScript at
   runtime and only when an IntersectionObserver exists and the visitor has
   not asked for reduced motion. So with JS broken, blocked, or still
   loading, every element renders exactly as it did before this file
   existed. A reveal-on-scroll effect that fails closed takes the page's
   content with it, and on a site whose traffic comes from search that is a
   far worse outcome than having no animation.

   The .fz- prefix is for the same reason as site-nav.css: 160 pages carry
   their own inline CSS and none of them has ever used it. */

.fz-reveal {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}
.fz-reveal.fz-in {
  opacity: 1;
  transform: none;
  transition: opacity .55s cubic-bezier(.22,.61,.36,1),
              transform .55s cubic-bezier(.22,.61,.36,1);
  will-change: auto;
}

/* Cards in a row arrive in sequence rather than together. Capped at 6 so a
   grid of 40 product cards never makes anyone wait for a stagger to finish. */
.fz-reveal.fz-d1.fz-in { transition-delay: .05s }
.fz-reveal.fz-d2.fz-in { transition-delay: .10s }
.fz-reveal.fz-d3.fz-in { transition-delay: .15s }
.fz-reveal.fz-d4.fz-in { transition-delay: .20s }
.fz-reveal.fz-d5.fz-in { transition-delay: .25s }

/* The shared top bar gains a shadow once the page has scrolled, so it reads
   as lifted off the content rather than painted onto it. */
.fz-nav { transition: box-shadow .25s ease }
.fz-nav.fz-stuck { box-shadow: 0 6px 24px rgba(0,0,0,.4) }

/* Anything already interactive gets a consistent, quiet hover. Scoped to
   elements this project owns so it cannot restyle a page's own buttons. */
.fz-nav__cta { transform: translateZ(0) }
.fz-nav__cta:hover { transform: translateY(-1px) }

@media (prefers-reduced-motion: reduce) {
  /* Belt and braces: the script already refuses to mark anything, but if a
     .fz-reveal ever reaches the DOM some other way it must still be visible
     and still, not merely still. */
  .fz-reveal, .fz-reveal.fz-in {
    opacity: 1; transform: none; transition: none; will-change: auto;
  }
  .fz-nav, .fz-nav__cta, .fz-nav__cta:hover { transition: none; transform: none }
}

/* Magnetic buttons. The transform is written per frame by site-motion.js;
   this only supplies the easing for the snap BACK, and a shadow that makes
   the lift read as physical rather than as a jump. */
.fz-magnetic {
  transition: box-shadow .2s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.fz-nav__cta.fz-magnetic { box-shadow: 0 10px 24px rgba(74,124,89,.45) }
/* The snap back when the cursor leaves: site-motion.js clears the inline
   transform, and this is what makes that return a glide instead of a jump. */
/* `background` is listed here on purpose. This file loads AFTER
   site-nav.css, so this rule replaces that file's
   `.fz-nav__cta{transition:background .18s}` outright - omit background
   and the quote button's hover colour would start snapping instead of
   fading, a regression caused by the fix rather than by the bug. */
/* `.fz-nav__menu a.fz-nav__cta` is repeated from site-nav.css deliberately.
   That file sets the CTA's transition through a selector LIST whose other
   member is `.fz-nav__menu a.fz-nav__cta` - specificity (0,2,1) - and the
   quote button matches it, so a plain `.fz-nav__cta` here at (0,1,0) loses
   even though this file loads later. Measured: the button kept reporting
   `transition: background 0.18s` and no magnetic glide, on a page that had
   already loaded the new stylesheet. */
.fz-nav__menu a.fz-nav__cta,
.fz-nav__cta,.btn-primary,.btn-secondary,.btn,.lq-btn,.cta-btn,.header-cta {
  transition: transform .35s cubic-bezier(.22,.61,.36,1),
              box-shadow .2s ease,
              background .18s ease;
}
@media (prefers-reduced-motion: reduce) {
  .fz-magnetic { box-shadow: none }
  .fz-nav__cta,.btn-primary,.btn-secondary,.btn,.lq-btn,.cta-btn,.header-cta {
    transition: none;
  }
}
