/* ===============================================================
   CINEMATIC MOTION SYSTEM / Al-Nayzak & Noorseen  ·  v1.0
   Progressive enhancement. 100% CSS/JS, no video or dependencies.
   Reduced-motion, touch and data-saver friendly.
   =============================================================== */
:root{--cinema-ease:cubic-bezier(.16,1,.3,1);--cinema-duration:950ms}

/* Subtle horizontal scroll progress / progress bar added in JS */
.cinema-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:9999;pointer-events:none;overflow:hidden;background:transparent}
.cinema-progress__bar{height:100%;width:100%;transform:scaleX(var(--cinema-progress,0));transform-origin:left center;background:linear-gradient(90deg,var(--accent),var(--accent2));will-change:transform;box-shadow:0 0 12px color-mix(in srgb,var(--accent) 50%,transparent)}
html[dir=rtl] .cinema-progress__bar{transform-origin:right center}

/* Entrance: deliberately bounded; normal document remains readable without JS */
.cinema-enabled .site-header{animation:cinema-header-in 850ms var(--cinema-ease) both}
.cinema-enabled .hero-copy>.eyebrow{animation:cinema-fade-rise 720ms .08s var(--cinema-ease) both}
.cinema-enabled .hero-copy>h1{animation:cinema-fade-rise 1150ms .18s var(--cinema-ease) both}
.cinema-enabled .hero-copy>.hero-lead{animation:cinema-fade-rise 1000ms .38s var(--cinema-ease) both}
.cinema-enabled .hero-copy>.hero-actions{animation:cinema-fade-rise 920ms .55s var(--cinema-ease) both}
.cinema-enabled .hero-copy>.hero-trust{animation:cinema-fade-rise 850ms .72s var(--cinema-ease) both}
.cinema-enabled .hero--fresh .hero-stage{animation:cinema-stage-appear 1300ms .24s var(--cinema-ease) both}
.cinema-enabled .page-hero .container>*{animation:cinema-fade-rise 900ms .1s var(--cinema-ease) both}
.cinema-enabled .page-hero .container>*:nth-child(2){animation-delay:.24s}
.cinema-enabled .page-hero .container>*:nth-child(3){animation-delay:.38s}

/* Slow, atmospheric pan of main poster. Logo, copy and layout stay untouched. */
.cinema-enabled .hero--fresh:before{will-change:transform;animation:cinema-hero-drift 22s ease-in-out infinite alternate}
html[dir=rtl].cinema-enabled .hero--fresh:before{animation-name:cinema-hero-drift-rtl}
.cinema-enabled .hero--fresh .hero-inner:before{content:'';position:absolute;inset:-15% -10%;z-index:0;pointer-events:none;background:radial-gradient(ellipse at 30% 38%,color-mix(in srgb,var(--accent) 15%,transparent),transparent 42%);opacity:.35;animation:cinema-ambient 14s ease-in-out infinite alternate}
.cinema-enabled .hero--fresh .hero-photo{backface-visibility:hidden;transform:perspective(1250px) rotateZ(-3deg) rotateX(var(--cinema-tilt-x,0deg)) rotateY(var(--cinema-tilt-y,0deg));transition:transform 650ms var(--cinema-ease);}
html[dir=rtl].cinema-enabled .hero--fresh .hero-photo{transform:perspective(1250px) rotateZ(3deg) rotateX(var(--cinema-tilt-x,0deg)) rotateY(var(--cinema-tilt-y,0deg))}
.cinema-enabled .hero-photo .frame-lines{pointer-events:none}
.cinema-enabled .hero-photo .frame-lines path{animation:cinema-route-flow 12s linear infinite}
.cinema-enabled .hero-photo .frame-lines circle{transform-box:fill-box;transform-origin:center;animation:cinema-pulse 4s ease-in-out infinite}
.cinema-enabled .hero-photo .frame-lines:after{content:'';position:absolute;inset:-70% auto -70% -50%;width:34%;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.10),transparent);transform:rotate(18deg);animation:cinema-sheen 12s ease-in-out infinite}
.site-nayzak.cinema-enabled .hero-photo .frame-lines:after{background:linear-gradient(90deg,transparent,rgba(255,216,146,.13),transparent)}
.site-noorseen.cinema-enabled .hero-photo .frame-lines:after{background:linear-gradient(90deg,transparent,rgba(104,226,255,.16),transparent)}

/* Elegant scroll-in for service blocks, sections, projects and CTAs */
.cinema-enabled .reveal{transition:opacity var(--cinema-duration) var(--cinema-ease),transform var(--cinema-duration) var(--cinema-ease),filter var(--cinema-duration) var(--cinema-ease);transition-delay:var(--cinema-stagger,0ms);transform:translate3d(0,35px,0) scale(.982);filter:blur(5px)}
.cinema-enabled .reveal.is-visible{transform:translate3d(0,0,0) scale(1);filter:blur(0);opacity:1}
.cinema-enabled .section-header.reveal{transform:translate3d(0,23px,0)}
.cinema-enabled .section-header.reveal.is-visible{transform:translate3d(0,0,0)}
.cinema-enabled .story-visual.reveal{transform:translate3d(-23px,22px,0) scale(.985)}
html[dir=rtl].cinema-enabled .story-visual.reveal{transform:translate3d(23px,22px,0) scale(.985)}
.cinema-enabled .story-visual.reveal.is-visible{transform:translate3d(0,0,0) scale(1)}

/* Responsive micro-interactions on links, buttons and tiles */
.cinema-enabled .button{position:relative;overflow:hidden;isolation:isolate}
.cinema-enabled .button:after{content:'';position:absolute;top:-50%;bottom:-50%;width:32%;left:-50%;transform:skewX(-24deg);pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.27),transparent);transition:left 750ms var(--cinema-ease)}
@media(hover:hover) and (pointer:fine){
  .cinema-enabled .button:hover:after{left:130%}
  .cinema-enabled .service-card:hover .service-icon,.cinema-enabled .sector-card:hover .sector-icon{transform:translateY(-3px) scale(1.08)}
  .cinema-enabled .service-icon,.cinema-enabled .sector-icon{transition:transform 420ms var(--cinema-ease)}
  .cinema-enabled .desktop-nav a{position:relative}
  .cinema-enabled .desktop-nav a:after{content:'';position:absolute;bottom:-9px;inset-inline:0;height:2px;border-radius:2px;transform:scaleX(0);transform-origin:center;background:var(--accent);transition:transform 300ms var(--cinema-ease)}
  .cinema-enabled .desktop-nav a:hover:after,.cinema-enabled .desktop-nav a[aria-current=page]:after{transform:scaleX(1)}
}
.cinema-enabled .service-card:active,.cinema-enabled .sector-card:active{transform:scale(.993)}
.cinema-enabled .cta-panel{position:relative;isolation:isolate;overflow:hidden}
.cinema-enabled .cta-panel:after{content:'';position:absolute;inset:-85% auto -85% -45%;width:45%;pointer-events:none;z-index:-1;transform:rotate(13deg);background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 18%,transparent),transparent);animation:cinema-cta-glow 18s ease-in-out infinite}

/* Accessible motion pause control */
.cinema-motion-toggle{position:fixed;inset-inline-end:16px;bottom:16px;z-index:999;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 32%,#fff);background:color-mix(in srgb,var(--deep) 89%,transparent);color:#fff;box-shadow:0 6px 25px #0004;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);cursor:pointer;transition:transform 250ms,background 250ms}
.cinema-motion-toggle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cinema-motion-toggle:hover,.cinema-motion-toggle:focus-visible{transform:translateY(-2px);background:var(--dark);outline:2px solid var(--accent);outline-offset:3px}
.cinema-motion-toggle .cinema-icon-play{display:none}
.cinema-paused .cinema-motion-toggle .cinema-icon-pause{display:none}
.cinema-paused .cinema-motion-toggle .cinema-icon-play{display:block}
.cinema-paused *,.cinema-paused *:before,.cinema-paused *:after{animation-play-state:paused!important}
.cinema-paused .reveal{opacity:1!important;filter:none!important;transform:none!important;transition:none!important}
.cinema-paused .hero-copy>*{opacity:1!important;filter:none!important;transform:none!important}
.cinema-paused .hero-stage{opacity:1!important;transform:none!important}
.cinema-paused .hero--fresh:before{animation:none!important}
.cinema-paused .hero--fresh .hero-photo{transform:none!important;transition:none!important}
.cinema-background-pause *,.cinema-background-pause *:before,.cinema-background-pause *:after{animation-play-state:paused!important}

/* Lower-cost motion and touch-friendly geometry on phones */
@media(max-width:900px){
 .cinema-enabled .hero--fresh .hero-photo,.cinema-enabled html[dir=rtl] .hero--fresh .hero-photo{transform:none;transition:none}
 html[dir=rtl].cinema-enabled .hero--fresh .hero-photo{transform:none}
 .cinema-enabled .hero--fresh:before{animation-duration:30s}
 .cinema-enabled .hero--fresh .hero-inner:before{animation-duration:20s;opacity:.22}
 .cinema-enabled .reveal{filter:none;transform:translate3d(0,18px,0);transition-duration:750ms}
 .cinema-enabled .story-visual.reveal,html[dir=rtl].cinema-enabled .story-visual.reveal{transform:translate3d(0,18px,0)}
 .cinema-enabled .story-visual.reveal.is-visible{transform:none}
 .cinema-enabled .hero-photo .frame-lines:after{animation-duration:18s;opacity:.5}
 .cinema-motion-toggle{width:38px;height:38px;bottom:12px;inset-inline-end:12px}
}
@media(max-width:540px){
 .cinema-enabled .hero-copy>h1{animation-duration:930ms}
 .cinema-enabled .hero-copy>.hero-lead{animation-delay:.28s}
 .cinema-enabled .hero-copy>.hero-actions{animation-delay:.42s}
 .cinema-enabled .hero-copy>.hero-trust{animation-delay:.55s}
 .cinema-enabled .hero--fresh .hero-stage{animation-delay:.38s;animation-duration:950ms}
 .cinema-enabled .hero--fresh:before{animation:none!important}
 .cinema-enabled .hero--fresh .hero-inner:before{animation:none!important;opacity:.17}
 .cinema-enabled .hero-photo .frame-lines:after{animation:none}
 .cinema-enabled .reveal{transition-delay:0ms!important}
}

@keyframes cinema-header-in{from{opacity:0;transform:translateY(-13px)}to{opacity:1;transform:none}}
@keyframes cinema-fade-rise{from{opacity:0;transform:translate3d(0,24px,0);filter:blur(4px)}to{opacity:1;transform:translate3d(0,0,0);filter:blur(0)}}
@keyframes cinema-stage-appear{from{opacity:0;transform:translate3d(0,38px,0) scale(.965)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
@keyframes cinema-hero-drift{from{transform:translate3d(-1%,0,0) scale(1.06)}to{transform:translate3d(1%,-1%,0) scale(1.12)}}
@keyframes cinema-hero-drift-rtl{from{transform:translate3d(1%,0,0) scale(-1.06,1.06)}to{transform:translate3d(-1%,-1%,0) scale(-1.12,1.12)}}
@keyframes cinema-ambient{from{transform:translate3d(-4%,0,0)}to{transform:translate3d(4%,2%,0)}}
@keyframes cinema-route-flow{from{stroke-dashoffset:210}to{stroke-dashoffset:0}}
@keyframes cinema-pulse{0%,100%{opacity:.65;transform:scale(1)}50%{opacity:1;transform:scale(1.16)}}
@keyframes cinema-sheen{0%,18%{left:-55%;opacity:0}38%{left:130%;opacity:.75}46%,100%{left:140%;opacity:0}}
@keyframes cinema-cta-glow{0%,35%{left:-70%;opacity:0}52%{left:145%;opacity:1}65%,100%{left:155%;opacity:0}}

/* A11y, low-data and lower-end device safeguards */
@media(prefers-reduced-motion:reduce){
 .cinema-progress,.cinema-motion-toggle{display:none!important}
 .cinema-enabled *, .cinema-enabled *:before,.cinema-enabled *:after{animation:none!important;transition:none!important;filter:none!important;scroll-behavior:auto!important}
 .cinema-enabled .reveal{opacity:1!important;transform:none!important;filter:none!important}
 .cinema-enabled .hero-copy>*,.cinema-enabled .hero-stage{opacity:1!important;transform:none!important;filter:none!important}
 .cinema-enabled .hero--fresh:before{animation:none!important}
 .cinema-enabled .hero--fresh .hero-photo,html[dir=rtl].cinema-enabled .hero--fresh .hero-photo{transform:none!important}
}
