/* =========================================================
   Performance layer — same look, far less work per frame.
   Loaded last so it wins over earlier styles.
   ========================================================= */

/* 1) Live background blur (backdrop-filter) re-renders everything behind an element whenever
      anything underneath moves. Surfaces are now near-opaque, so keep it only on the nav + chat. */
body *:not(.nav):not(.chat):not(.menu) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* 2) Huge blurred, animated layers → plain radial gradients (no filter, GPU-cheap). */
@property --c { syntax: "<color>"; initial-value: #2a2d7c; inherits: false; }
.ambient i { filter: none !important; opacity: .55; background: radial-gradient(circle at 50% 50%, var(--c) 0%, transparent 62%) !important; animation-duration: 40s; }
.ambient__a { --c: #2a2d7c; } .ambient__b { --c: #1475bc; }
.hero__aurora i { filter: none !important; opacity: 1 !important; }
.hero__aurora i:nth-child(1) { background: radial-gradient(circle, rgba(42,45,124,.75) 0%, transparent 65%) !important; }
.hero__aurora i:nth-child(2) { background: radial-gradient(circle, rgba(31,107,224,.45) 0%, transparent 65%) !important; }
.hero__aurora i:nth-child(3) { background: radial-gradient(circle, rgba(25,181,240,.25) 0%, transparent 65%) !important; }
.contact__glow { filter: none !important; }

/* 3) Film grain: static texture (the animated one repainted the whole screen 6×/second). */
.grain { animation: none !important; inset: 0 !important; opacity: .05; }

/* 4) Hero lens: transform-only orb + cross-faded flood layer (replaces the per-frame CSS mask). */
.hero__lens { -webkit-mask-image: none !important; mask-image: none !important; overflow: hidden; contain: strict; }
.hero__flood { position: absolute; inset: 0; background: #1475bc center / cover no-repeat; opacity: 0; --dark: 0; }
.hero__flood::after { content: ""; position: absolute; inset: 0; background: #05061a; opacity: var(--dark); }
.lens-orb { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; overflow: hidden;
  -webkit-mask-image: radial-gradient(circle, #000 52%, rgba(0,0,0,.5) 64%, transparent 71%); mask-image: radial-gradient(circle, #000 52%, rgba(0,0,0,.5) 64%, transparent 71%);
  will-change: transform; transform: translate3d(-999px, -999px, 0) scale(.3); }
.lens-orb__img { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #1475bc center / cover no-repeat; filter: saturate(1.25); will-change: transform; }
.lens-ring { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 0 60px rgba(25,181,240,.3) inset; will-change: transform, opacity; transform: translate3d(-999px, -999px, 0); pointer-events: none; }
.hero__lens-img, .hero__lens-ring { display: none !important; }

/* 5) Work gallery leans as one layer. */
#workGrid { will-change: transform; transform-origin: 50% 50%; }
.work__item { will-change: auto !important; }

/* 6) Keep off-screen infinite decorations from costing paint time. */
.depts, .why, .process, .faq { contain: paint; }

/* 7) Custom cursor without blend mode (mix-blend-mode forced the whole page to re-composite each frame). */
.cursor, .cursor-dot { mix-blend-mode: normal !important; }
.cursor { border-color: rgba(143,211,255,.75); }
.cursor.is-hover { background: rgba(25,181,240,.16); border-color: #19b5f0; }
.cursor-dot { background: #8fd3ff; }

/* 8) Client logos: greyscale filter is pre-applied per image (cached), rows promoted once. */
.clients__row { will-change: transform; }
.client--logo { transition: transform .5s var(--ease), box-shadow .5s; }
/* 9) About word-reveal: no per-word layers; spotlight photos crossfade on the compositor */
.reveal-words .w { will-change: auto; }
.sb-img img { will-change: transform; }

/* 10) Robot: animations inside an SVG repaint the whole SVG every frame (it's always on screen).
       Float the robot as one composited element; keep only short, occasional motions (blink, wave, eyes). */
.bot .r-float, .bot .r-shadow, .bot .r-arm-rest, .bot .r-drape, .bot .r-ear, .bot .r-glow { animation: none !important; }
.bot .r-eyes, .bot .r-ear { filter: none !important; }
.bot__robot > svg { animation: botFloat 3.6s ease-in-out infinite; will-change: transform; }
@keyframes botFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.chat__ava svg, .bot__mini svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .bot__robot > svg { animation: none; } }

/* =========================================================
   Perf pass 2 — 118 running animations, 103 off-screen.
   ========================================================= */
/* 11) Freeze every animation inside sections that are off-screen (JS toggles .is-off) */
.is-off, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }
/* 12) Story art: rotation only (composited). No border-radius morph / filter animations (those repaint every frame). */
.story__blob--1 { animation: blobSpin 30s linear infinite !important; box-shadow: none !important; }
.story__blob--2 { animation: blobSpin 20s linear infinite reverse !important; }
.story__blob--3 { animation: blobSpin 14s linear infinite !important; }
/* 13) Neon mockups: progress bar via transform, static glow */
.nm__bar i { width: 100% !important; transform-origin: left; animation: nmProg2 6s linear infinite !important; }
@keyframes nmProg2 { from { transform: scaleX(.08); } to { transform: scaleX(.96); } }
.nm__glow { animation: none !important; opacity: .7; }
/* 14) Firefly: no CSS filter on a moving element; slower wing beat */
.ffly { filter: none !important; }
.ffly__wing { animation-duration: .16s !important; }
/* 15) The robot copy inside the closed chat window must not animate */
.chat .r-float, .chat .r-shadow, .chat .r-arm-rest, .chat .r-arm-wave, .chat .r-drape, .chat .r-ear, .chat .r-glow, .chat .r-steam path,
.bot__mini .r-float, .bot__mini .r-shadow, .bot__mini .r-ear, .bot__mini .r-glow, .bot__mini .r-steam path { animation: none !important; }
