/* The homepage's scroll (the founder, 2026-09-24: «از یه تکنولوژی جدید اسکرول استفاده کن که
 * ساده و جذاب باشه ولی اولد اسکول نباشه»).
 *
 * CSS scroll-driven animations: every motion here is tied to the scroll position itself
 * (animation-timeline: view() / scroll()), run by the browser off the main thread — no
 * scroll listeners, no timers, no "fade in once and done". It follows the finger: scroll
 * back and it runs backwards, stop and it stops.
 *
 *   - a section's words and instruments settle into place as they arrive (a short rise and
 *     a touch of scale), a row of cards one after another;
 *   - what is leaving at the top dims a little and lifts, so the eye stays on what is here;
 *   - the photographs drift a few percent against the scroll (depth, not a show);
 *   - a gold hairline under the header's bar fills with the page.
 *
 * Only transform and opacity, so no section changes its size and the screen fit holds.
 * Where the browser has no scroll timelines (@supports), and under reduced motion, nothing
 * moves and everything is simply there. Switch: SCROLL_FX in tools/build.mjs. */

@supports (animation-timeline: view()) {
@media (prefers-reduced-motion: no-preference) {

:root {
  --sx-rise: rgba(0, 0, 0, 0);   /* (a hook for tests: present only where this layer runs) */
}

/* ── what settles into place: our sections' blocks, then the theme's sections' ── */
#sinoraSiteContent .snx :is(.snx-eyebrow, .snx-h2, .snx-lead, .snx-meaning__body > p, .snx-quote, .snx-path, .snx-close,
  .snx-faq__label, .snx-faq__list > li, .snx-dx__cta, .snx-dx__feats > li, .snx-dx__inst, .snx-rl__btns, .snx-rl__console, .snx-ai__stage),
#sinoraSiteContent :is(#sektorler, #ornekler, #sss) > :is(.text-center, .mt-12),
#sinoraSiteContent :is(#sektorler, #ornekler, #sss, #donusum) > .grid > *,
#sinoraSiteContent #kurucu .sinora-founder-proof__inner > *,
#sinoraSiteContent :is(#sinorate > .sinorate-layout, #reel-style-finder > *) {
  animation: sx-settle linear backwards, sx-leave linear forwards;
  animation-timeline: view(), view();
  animation-range: entry 0% entry 80%, exit 15% exit 100%;
}
/* a row of cards arrives one after another */
#sinoraSiteContent :is(#sektorler, #ornekler, #sss, #donusum) > .grid > :nth-child(3n + 2),
#sinoraSiteContent .snx .snx-dx__feats > li:nth-child(2) { animation-range: entry 8% entry 88%, exit 15% exit 100%; }
#sinoraSiteContent :is(#sektorler, #ornekler, #sss, #donusum) > .grid > :nth-child(3n),
#sinoraSiteContent .snx .snx-dx__feats > li:nth-child(3) { animation-range: entry 16% entry 96%, exit 15% exit 100%; }
/* the assistant's card and the instruments arrive from a little further */
#sinoraSiteContent .snx :is(.snx-ai__stage, .snx-dx__inst, .snx-rl__console, .snx-path) { animation-name: sx-settle-far, sx-leave; }

@keyframes sx-settle { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sx-settle-far { from { opacity: 0; transform: translateY(48px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sx-leave { from { opacity: 1; transform: none; } to { opacity: .42; transform: translateY(-14px) scale(.985); } }

/* ── the photographs: a slow drift against the scroll ── */
#sinoraSiteContent :is(.snx-meaning__photo, .snx-rl__photo) img {
  animation: sx-drift linear both;
  animation-timeline: view();
  animation-range: cover;
}
@keyframes sx-drift { from { transform: translateY(-3.5%) scale(1.07); } to { transform: translateY(3.5%) scale(1.07); } }

/* ── the header's bar fills with the page: one gold hairline ── */
body.snav-on .snav-bar::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 1px; border-radius: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(247, 215, 133, 0), #f7d785 30%, #e6b454 70%, rgba(195, 141, 53, 0));
  transform-origin: left center; transform: scaleX(0);
  animation: sx-fill linear both;
  animation-timeline: scroll(root block);
}
.snav[dir="rtl"] .snav-bar::after { transform-origin: right center; }
@keyframes sx-fill { to { transform: scaleX(1); } }

}
}
