/* =====================================================================
   Shraddha Garden — GSAP motion layer styles
   Static-site adaptation of the "Botanical Editorial Luxury" motion system.
   Works alongside the existing CSS/IntersectionObserver reveals (not a rewrite).
   ===================================================================== */

/* ---- Preloader ---- */
#preloader{position:fixed;inset:0;z-index:200;display:grid;place-items:center;
  background:var(--ivory,#F5F0E9);text-align:center}
#preloader .pl-inner{display:flex;flex-direction:column;align-items:center;gap:22px;padding:0 24px}
#preloader .pl-emblem{width:clamp(96px,11vw,150px);height:auto}
#preloader .pl-brand{font-family:'Cormorant Garamond',serif;text-transform:uppercase;
  letter-spacing:.34em;font-size:clamp(20px,2.4vw,34px);color:var(--green,#355B45)}
#preloader .pl-line{height:1px;width:0;background:var(--gold,#C9A66B);max-width:280px}
/* the overlay is removed from the DOM by JS when done; this class hides it if JS yields early */
#preloader.pl-done{opacity:0;visibility:hidden;transition:opacity .8s ease,visibility .8s ease}
/* Fallback so the preloader can NEVER get stuck even if GSAP fails to load/run */
@keyframes pl-failsafe{to{opacity:0;visibility:hidden}}
#preloader{animation:pl-failsafe .6s ease forwards 6s}

/* ---- Hero initial states (only applied while the motion layer is active) ----
   Hidden behind the preloader, so no flash; revealed by the GSAP hero timeline. */
html.motion-on .hero-inner > *{will-change:transform,opacity}

/* ---- Parallax helpers ---- */
.js-parallax{will-change:transform}

/* ---- Botanical mask-reveal wrapper (divider draw-in without touching artwork) ---- */
.js-mask{clip-path:inset(0 100% 0 0)}

/* ---- Micro-interaction: nav link underline ---- */
.menu-col a{position:relative}
.menu-col a::after{content:"";position:absolute;left:0;bottom:-4px;height:1px;width:100%;
  background:var(--gold,#C9A66B);transform:scaleX(0);transform-origin:left;
  transition:transform .4s cubic-bezier(.22,1,.36,1)}
.menu-col a:hover::after{transform:scaleX(1)}

/* ---- Reduced motion: everything visible, no preloader, no parallax ---- */
@media (prefers-reduced-motion: reduce){
  #preloader{display:none!important}
  .js-parallax{will-change:auto;transform:none!important}
  .js-mask{clip-path:none!important}
  html.motion-on .hero-inner > *{will-change:auto;opacity:1!important;transform:none!important}
}
