/* Suracsh site-wide scroll animation layer (pairs with assets/js/site-motion.js).
   Everything is gated behind .sm-ready, which JS only sets when motion is allowed. */
:root { --sm-ease: cubic-bezier(.2, .75, .25, 1); --sm-gold: #B8913A; }

/* Hidden until the block approaches the viewport */
.sm-ready [data-sm]:not(.sm-in) { opacity: 0; }

.sm-ready [data-sm].sm-in {
  animation: sm-up .9s var(--sm-ease) var(--sm-d, 0s) backwards;
}
.sm-ready [data-sm="zoom"].sm-in  { animation-name: sm-zoom; animation-duration: 1.1s; }
.sm-ready [data-sm="left"].sm-in  { animation-name: sm-left; animation-duration: 1s; }
.sm-ready [data-sm="right"].sm-in { animation-name: sm-right; animation-duration: 1s; }
.sm-ready [data-sm].sm-skip { animation: none !important; }

/* Individual transform properties so existing transform / hover rules keep working */
@keyframes sm-up    { from { opacity: 0; translate: 0 34px; } }
@keyframes sm-zoom  { from { opacity: 0; scale: .94; translate: 0 18px; } }
@keyframes sm-left  { from { opacity: 0; translate: -44px 0; } }
@keyframes sm-right { from { opacity: 0; translate: 44px 0; } }

@media (max-width: 899px) {
  .sm-ready [data-sm].sm-in { animation-duration: .75s; }
  @keyframes sm-up { from { opacity: 0; translate: 0 22px; } }
}

/* Hero entrance for pages without GSAP */
.sm-ready .sm-hero { animation: sm-hero 1s var(--sm-ease) var(--sm-d, .1s) backwards; }
@keyframes sm-hero { from { opacity: 0; translate: 0 30px; } }

/* Reading progress bar */
.sm-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1200;
  background: linear-gradient(90deg, var(--sm-gold), #e0b95e);
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
  will-change: transform;
}

@media print {
  [data-sm] { opacity: 1 !important; animation: none !important; }
  .sm-progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-sm] { opacity: 1 !important; animation: none !important; }
  .sm-progress { display: none; }
}
