/* Blissful Escapes - entrance animations, hand-authored.
   Progressive enhancement:
     - With NO JavaScript, every .be-fx element is fully visible (the base rule
       below is the no-JS fallback) - the page never depends on JS to show content.
     - With JS, an inline <head> script adds the `js` class BEFORE first paint, so
       the hidden initial state applies with no flash of unstyled/visible content.
   animations.js then reveals each element (adding .be-in) as it scrolls into view. */

html {
  scroll-behavior: smooth; /* lightweight smooth-scroll fallback */
}

/* No-JS fallback: show everything, no motion. */
.be-fx {
  opacity: 1;
}

/* JS on: hide in the initial (pre-reveal) state, ready to animate in. */
html.js .be-fx {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Hero cover image scales in instead of sliding up. */
html.js .be-fx[data-fx="zoom"] {
  transform: scale(1.08);
}

/* Revealed (final) state. */
html.js .be-fx.be-in {
  opacity: 1;
  transform: none;
}

/* Once revealed, drop will-change so we don't pin layers forever. */
html.js .be-fx.be-in {
  will-change: auto;
}

/* Accessibility: honour reduced-motion - show everything instantly, no transitions. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .be-fx {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}
