/*!
 * LC Reveal Animations v1.1.1
 * Every hidden state is gated behind html.lcr-armed, which only the JS adds
 * (and only when IntersectionObserver exists and the visitor has not asked
 * for reduced motion). No JS = nothing is ever hidden.
 * The transition lives ONLY on the .lcr-in state, so tagging an element
 * hides it instantly (no fade-out at load); revealing animates.
 */

/* ---------------------------------------------------------------------------
 * 1 · Pre-hide the few ABOVE-THE-FOLD targets so they cannot flash before
 *     the DOMContentLoaded tagging pass. Everything else is below the fold.
 * ------------------------------------------------------------------------ */
html.lcr-armed .lc-about-hero > :not(.lcr-in),
html.lcr-armed .caviar-product__container > :not(.lcr-in),
html.lcr-armed .lc-404__inner > :not(.lcr-in) {
  opacity: 0;
}

/* ---------------------------------------------------------------------------
 * 2 · Reveal variants
 * ------------------------------------------------------------------------ */
html.lcr-armed .lcr {
  --lcr-dur: 900ms;
  --lcr-ease: cubic-bezier(0.19, 0.65, 0.22, 1);
  opacity: 0;
  will-change: opacity, transform;
}

html.lcr-armed .lcr--up   { transform: translateY(44px); }
html.lcr-armed .lcr--left { transform: translateX(-48px); }

/* Light touch for above-the-fold product columns */
html.lcr-armed .lcr--soft {
  transform: translateY(16px);
  --lcr-dur: 650ms;
}

html.lcr-armed .lcr--fade { transform: none; }

/* Background plates: stay visible, settle from a slight zoom (ken-burns) */
html.lcr-armed .lcr--zoom {
  opacity: 1;
  transform: scale(1.07);
  --lcr-dur: 2000ms;
  --lcr-ease: cubic-bezier(0.16, 0.6, 0.2, 1);
}

/* Full photo bands: fade in + settle */
html.lcr-armed .lcr--band {
  transform: scale(1.05);
  --lcr-dur: 1600ms;
}

html.lcr-armed .lcr.lcr-in {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--lcr-dur) var(--lcr-ease),
    transform var(--lcr-dur) var(--lcr-ease);
}

/* Containers whose image scales must clip the overflow while it settles */
html.lcr-armed .lc-tasting__bg,
html.lcr-armed main.lc-book > section:not([class]) {
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * 3 · Strengthen the site's EXISTING data-reveal animations
 *     (they were 24px / 700ms ease - too subtle). Scoped to armed roots so
 *     the no-JS / reduced-motion fallbacks stay untouched.
 * ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  html .is-armed [data-reveal] {
    transform: translateY(40px);
    transition:
      opacity 950ms cubic-bezier(0.19, 0.65, 0.22, 1),
      transform 950ms cubic-bezier(0.19, 0.65, 0.22, 1);
  }
  html .is-armed [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
 * 4 · Mobile: slightly shorter travel so the rise feels crisp, not floaty
 * ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) and (max-width: 768px) {
  html.lcr-armed .lcr--up   { transform: translateY(32px); }
  html.lcr-armed .lcr--left { transform: translateX(-32px); }
  html .is-armed [data-reveal] { transform: translateY(30px); }
  html .is-armed [data-reveal].is-in { transform: none; }
}

/* ---------------------------------------------------------------------------
 * 5 · Belt and braces: reduced motion always wins, even if armed
 * ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html.lcr-armed .lcr,
  html.lcr-armed .lc-about-hero > *,
  html.lcr-armed .caviar-product__container > *,
  html.lcr-armed .lc-404__inner > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
