/* SathiDeals Scroll FX — companion styles */

/* 1. Reveal — only hide when JS is active (sfx-js added by scroll-fx.js boot) */
.sfx-js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.sfx-js [data-reveal="down"]  { transform: translate3d(0, -40px, 0); }
.sfx-js [data-reveal="left"]  { transform: translate3d(-40px, 0, 0); }
.sfx-js [data-reveal="right"] { transform: translate3d(40px, 0, 0); }
.sfx-js [data-reveal="zoom"]  { transform: scale(0.92); }
.sfx-js [data-reveal-child] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.sfx-revealed { opacity: 1 !important; transform: none !important; }

/* 2. Parallax — transform controlled by JS */
[data-parallax] { will-change: transform; }

/* 3. Tilt cards */
[data-tilt] {
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
  transform-style: preserve-3d;
}

/* 4. Sticky scroll section */
[data-sticky-scroll] {
  position: relative;
  min-height: 300vh; /* pin length — customize per section */
}
[data-sticky-scroll] > .sfx-sticky-wrap {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
[data-sticky-slide] {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}
[data-sticky-slide].sfx-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* 5. Magnetic */
[data-magnetic] {
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* 6. Scroll scale */
[data-scroll-scale] {
  transition: transform 0.2s linear;
  will-change: transform;
}

/* 7. Marquee */
[data-marquee] {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
[data-marquee] > * {
  display: inline-flex;
  gap: 3rem;
  animation: sfx-marquee 40s linear infinite;
}
@keyframes sfx-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 8. Text reveal */
[data-text-reveal] .sfx-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
[data-text-reveal] .sfx-word-inner {
  display: inline-block;
  transform: translate3d(0, 110%, 0) rotate(6deg);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(.22,.61,.36,1), opacity 0.7s ease;
  will-change: transform, opacity;
}
[data-text-reveal].sfx-text-revealed .sfx-word-inner {
  transform: translate3d(0, 0, 0) rotate(0);
  opacity: 1;
}

/* 9. Scroll progress bar */
#sfx-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #d4af37, #f4d47c);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(212,175,55,0.6);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-child] { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-parallax], [data-tilt], [data-magnetic], [data-scroll-scale] { transform: none !important; transition: none !important; }
  [data-text-reveal] .sfx-word-inner { transform: none !important; opacity: 1 !important; transition: none !important; }
}
