/* ============================================================
   AlHaramRentCar — animations.css
   Sets the "before" state for scroll-revealed elements.
   JS (GSAP) adds .ss-anim-ready once initialised; if JS fails,
   a no-JS fallback reveals everything so nothing stays hidden.
   ============================================================ */

/* Only hide elements when GSAP is ready to animate them in. */
.ss-anim-ready [data-anim="fade-up"]   { opacity: 0; transform: translateY(40px); }
.ss-anim-ready [data-anim="slide-left"]{ opacity: 0; transform: translateX(-50px); }
.ss-anim-ready [data-anim="fade-right"]{ opacity: 0; transform: translateX(40px); }
.ss-anim-ready [data-anim="scale-in"]  { opacity: 0; transform: scale(0.94); }
.ss-anim-ready [data-anim="hero"]      { opacity: 0; transform: translateY(40px); }
/* Safety: active hero slide stays readable if GSAP init is delayed */
.ss-hero__swiper .swiper-slide-active [data-anim="hero"] {
  opacity: 1;
  transform: none;
}
.ss-anim-ready.ss-hero-animating .swiper-slide-active [data-anim="hero"] {
  opacity: 0;
  transform: translateY(40px);
}
.ss-anim-ready [data-anim="reveal"]    { clip-path: inset(0 0 100% 0 round 24px); }

/* Stagger groups — children animated by GSAP as a batch */
.ss-anim-ready [data-ah-stagger] > * {
	opacity: 0;
	transform: translateY(28px);
}
.ss-anim-ready [data-ah-stagger="scale"] > * {
	opacity: 0;
	transform: scale(0.92) translateY(12px);
}

/* Hero editorial content (first paint handled in JS) */
.ss-anim-ready .ah-editorial-hero [data-hero-anim] {
	opacity: 0;
	transform: translateY(24px);
}

/* No-JS / reduced-motion safety: never leave content hidden. */
.no-js [data-anim],
.no-js [data-ah-stagger] > *,
.no-js [data-hero-anim] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
@media (prefers-reduced-motion: reduce) {
  [data-anim],
  [data-ah-stagger] > *,
  [data-hero-anim] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* Hover micro-interactions handled in main.css via transitions. */

/* Counter pop when active */
.ss-stat__num { transition: color 0.3s ease; }

/* Gallery track — transform driven by GSAP ScrollTrigger (no CSS transition) */
.ss-gallery__track { touch-action: pan-y; }
