/* ===== زمرد کناف | Premium scroll interaction ===== */
:root{--scroll-progress:0%;--scroll-brightness:1;}
body{--page-light:0;}
#scroll-progress{position:fixed;top:0;right:0;width:var(--scroll-progress);height:3px;background:linear-gradient(90deg,var(--gold-500),var(--gold-300));z-index:100000;box-shadow:0 0 16px rgba(var(--accent-rgb),.75);transform-origin:right center;pointer-events:none}
body::after{transition:opacity .7s ease,background-size .7s ease;}
body.scroll-focus::before{filter:brightness(1.10);}
body.scroll-focus::after{opacity:.9;background-size:72px 72px;}

/* sections/cards reveal only when they enter the viewport */
.scroll-reveal{opacity:0;transform:translateY(28px) scale(.985);transition:opacity .8s cubic-bezier(.2,.7,.2,1),transform .8s cubic-bezier(.2,.7,.2,1),filter .8s ease;filter:saturate(.82)}
.scroll-reveal.is-visible{opacity:1;transform:none;filter:saturate(1)}

/* The section currently under the user's eye gets a subtle premium lift. */
.scroll-focus-section > .container > h2,
.scroll-focus-section > .container > .eyebrow,
.scroll-focus-section > .container > .lead{transition:color .55s ease,text-shadow .55s ease,transform .55s ease;font-weight:700}
.scroll-focus-section > .container > h2{transform:translateY(-2px);text-shadow:0 0 28px rgba(var(--accent-light-rgb),.18)}
.scroll-focus-section > .container > .lead{color:var(--ivory);}
.scroll-focus-section .product-card,
.scroll-focus-section .pf-card,
.scroll-focus-section .process-step,
.scroll-focus-section .stat-card,
.scroll-focus-section .t-card,
.scroll-focus-section .faq-item{box-shadow:0 18px 50px rgba(0,0,0,.18),0 0 0 1px rgba(var(--accent-light-rgb),.04);}

/* key words get a restrained glow instead of an aggressive color flash */
.scroll-keyword{font-weight:800;color:var(--gold-300);text-shadow:0 0 18px rgba(var(--accent-light-rgb),.20);transition:all .45s ease}

/* ambient light follows scroll position */
#scroll-ambient{position:fixed;inset:auto auto 18% 50%;width:42vw;height:42vw;max-width:560px;max-height:560px;border-radius:50%;background:radial-gradient(circle,rgba(var(--accent-light-rgb),.085),transparent 68%);filter:blur(18px);pointer-events:none;z-index:1;opacity:.55;transform:translate(-50%,0) translateY(calc((var(--scroll-progress-num,0) - 50) * .25px));transition:opacity .5s ease}

@media(max-width:700px){
 #scroll-progress{height:2px}
 .scroll-reveal{transform:translateY(20px) scale(.99)}
 #scroll-ambient{width:90vw;height:90vw;opacity:.38}
}
@media(prefers-reduced-motion:reduce){
 #scroll-progress,#scroll-ambient{display:none}
 .scroll-reveal{opacity:1;transform:none;filter:none}
 .scroll-focus-section > .container > h2{transform:none;text-shadow:none}
}
