!function(){'use strict';var e=window.STORM||{},t=document.getElementById('storm-host'),n=t&&t.shadowRoot||document,r=function(e,t){return(t||n).querySelector(e)},a=function(e,t){return Array.prototype.slice.call((t||n).querySelectorAll(e))};e.svg&&Array.prototype.forEach.call(n.querySelectorAll('img[data-svg]'),(function(t){var n=e.svg[t.getAttribute('data-svg')];n&&(t.src=n)}));var i=window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches,o='M443 245 L742 245 L618 472 L834 472 L636 834 L337 834 L436 655 L541 606 L245 606 Z';function s(e){return'/'!==(e=(e||'/').replace(/index\.php$/,'')).slice(-1)&&(e+='/'),e}var c=s(location.pathname),l=0;function d(e){var t=document.scrollingElement||document.documentElement,n=t.scrollTop,r=Math.max(0,e.getBoundingClientRect().top+n-16),a=r-n;if(!(Math.abs(a)<2))if(i)t.scrollTop=r;else{var o=Math.min(1400,Math.max(650,.35*Math.abs(a))),s=performance.now();cancelAnimationFrame(l);var c=function(e){var r=Math.min(1,(e-s)/o);t.scrollTop=n+a*function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}(r),r<1&&(l=requestAnimationFrame(c))};l=requestAnimationFrame(c)}}function p(e){e.animate&&e.animate([{transform:'translateX(0)'},{transform:'translateX(-7px)'},{transform:'translateX(7px)'},{transform:'translateX(-5px)'},{transform:'translateX(5px)'},{transform:'translateX(-2px)'},{transform:'translateX(0)'}],{duration:480,easing:'ease-in-out'})}window.addEventListener('pageshow',(function(e){e.persisted&&a('.lx').forEach((function(e){e.remove()}))}));var u={};function f(e){try{var t=new URL(e.href,location.href)}catch(e){return}if(!(t.origin!==location.origin||t.hash&&s(t.pathname)===c)){var n=s(t.pathname);if(!u[n]&&n!==c){u[n]=1;var r=document.createElement('link');r.rel='prefetch',r.href=t.pathname,document.head.appendChild(r)}}}n.addEventListener('pointerover',(function(e){var t=e.target.closest&&e.target.closest('a[href]');t&&f(t)}),{passive:!0}),n.addEventListener('touchstart',(function(e){var t=e.target.closest&&e.target.closest('a[href]');t&&f(t)}),{passive:!0}),n.addEventListener('click',(function(e){var t=e.target.closest&&e.target.closest('a[href]');if(!(!t||e.defaultPrevented||e.button>0||e.metaKey||e.ctrlKey||e.shiftKey||'_blank'===t.target)){var r,l=t.getAttribute('href'),u=!!t.closest('nav');if('#'===l.charAt(0)){var f=l.length>1?n.getElementById(l.slice(1)):null;return u&&'#top'===l&&p(t),void(f&&(e.preventDefault(),d(f)))}try{r=new URL(t.href,location.href)}catch(e){return}if(r.origin===location.origin){if(s(r.pathname)===c)return e.preventDefault(),u&&p(t),void(r.hash&&n.getElementById(r.hash.slice(1))?d(n.getElementById(r.hash.slice(1))):d(document.documentElement));e.preventDefault();var h=e.clientX?(e.clientX/innerWidth*100).toFixed(1)+'%':'50%',v=e.clientY?(e.clientY/innerHeight*100).toFixed(1)+'%':'50%';a('details.nav-m[open]').forEach((function(e){e.open=!1})),function(e,t,r){if(i)r();else{var a=document.createElement('div');a.className='lx',a.setAttribute('aria-hidden','true'),a.style.setProperty('--x',e),a.style.setProperty('--y',t),a.innerHTML='',(n.firstElementChild||n).appendChild(a),setTimeout(r,620)}}(h,v,(function(){location.href=r.href}))}}}));var h=r('.stage');if(h&&a('[data-par]').length&&matchMedia('(hover: hover)').matches){var v=a('[data-par]'),m=function(e,t){v.forEach((function(n){var r=+n.getAttribute('data-par');n.style.transform='translate3d('+(e*r).toFixed(1)+'px,'+(t*r).toFixed(1)+'px,0)'}))};h.addEventListener('mousemove',(function(e){var t=h.getBoundingClientRect();m((e.clientX-t.left)/t.width-.5,(e.clientY-t.top)/t.height-.5)})),h.addEventListener('mouseleave',(function(){m(0,0)}))}a('.wroll').forEach((function(e){if('IntersectionObserver'in window){var t=new IntersectionObserver((function(n){n.forEach((function(n){n.isIntersecting&&(e.classList.add('go'),t.disconnect())}))}),{threshold:.6});t.observe(e)}else e.classList.add('go')}));var g=r('.wtrack');if(g){var b=0,x=r('button[aria-label="Previous case study"]'),y=r('button[aria-label="Next case study"]'),E=function(){var e=g.children.length;b=Math.max(0,Math.min(b,e-2)),g.style.transform='translateX(calc('+50*-b+'% - '+10*b+'px))'};x&&x.addEventListener('click',(function(){b--,E()})),y&&y.addEventListener('click',(function(){b++,E()}))}function F(e,t,n){var r={};a('[data-chip]',e).forEach((function(e){r[e.getAttribute('data-chip')]=e.getBoundingClientRect()})),n(),a('[data-chip]',e).forEach((function(e){var n=e.getAttribute('data-chip'),a=r[n];if(a&&e.animate&&!i){var o=e.getBoundingClientRect(),s=a.left-o.left,c=a.top-o.top,l=n===t;(s||c||l)&&e.animate(l?[{transform:'translate('+s+'px,'+c+'px) scale(1)'},{transform:'translate('+.35*s+'px,'+.35*c+'px) scale(1.12)',offset:.45},{transform:'translate(0,0) scale(1)'}]:[{transform:'translate('+s+'px,'+c+'px)'},{transform:'translate(0,0)'}],{duration:l?560:440,easing:'cubic-bezier(.2,.8,.2,1)'})}}))}a('[data-cflow]').forEach((function(t){var n=e.reels||[],r=n.length;if(r){var a=t.nextElementSibling;t.style.cssText='position: relative; height: 620px; margin-top: 56px; touch-action: pan-y; cursor: grab; user-select: none';var i=0,o=0,s=!1,c=!1,l=!1,d=0,p=250,u=n.map((function(e,n){var r=document.createElement('button');return r.type='button',r.setAttribute('aria-label','Show '+e.kind+' clip '+(n+1)),r.style.cssText='position: absolute; left: 50%; top: 20px; width: 300px; height: 533px; margin-left: -150px; padding: 0; border: none; border-radius: 26px; overflow: hidden; background: #16161F; cursor: inherit',r.innerHTML='
'+(e.handle?''+e.handle+'':'')+''+e.kind+'',r.addEventListener('click',(function(){l||(i=n,m())})),t.appendChild(r),r})),f=n.map((function(e,t){var n=document.createElement('button');return n.type='button',n.setAttribute('aria-label','Go to clip '+(t+1)),n.style.cssText='height: 8px; border-radius: 99px; border: none; padding: 0; cursor: pointer; transition: width 0.3s ease, background 0.3s ease',n.addEventListener('click',(function(){i=t,m()})),a.appendChild(n),n})),h=!0;'IntersectionObserver'in window&&new IntersectionObserver((function(e){h=e[0].isIntersecting,m()})).observe(t),t.addEventListener('mouseenter',(function(){c=!0})),t.addEventListener('mouseleave',(function(){c=!1})),t.addEventListener('pointerdown',(function(e){d=e.clientX,l=!1,s=!0,o=0,m()})),t.addEventListener('pointermove',(function(e){s&&(o=e.clientX-d,Math.abs(o)>6&&(l=!0),m())}));var v=function(){if(s){var e=Math.round(o/p);s=!1,o=0,i=((i-e)%r+r)%r,m(),setTimeout((function(){l=!1}),0)}};t.addEventListener('pointerup',v),t.addEventListener('pointerleave',v),t.addEventListener('pointercancel',v),setInterval((function(){s||c||!h||document.hidden||(i=(i-1+r)%r,m())}),3200),m()}function m(){var e=o/p;u.forEach((function(t,a){var o=a-i;o>r/2&&(o-=r),o<-r/2&&(o+=r);var c=o+e,l=Math.min(Math.abs(c),2.6),d=1-.16*Math.min(l,1)-.12*Math.max(0,Math.min(l-1,1)),u=Math.sign(c)*(l<=1?l*p:p+195*(l-1));t.style.transition=s?'none':'transform 0.6s cubic-bezier(.2,.8,.2,1), filter 0.6s ease, opacity 0.4s ease, box-shadow 0.6s ease',t.style.transform='translateX('+u.toFixed(1)+'px) scale('+d.toFixed(3)+')',t.style.zIndex=String(100-Math.round(10*l)),t.style.opacity=l>2.3?'0':'1',t.style.filter=l<.5?'none':'brightness('+(1-.22*Math.min(l,2)).toFixed(2)+')',t.style.boxShadow=l<.5?'0 40px 80px rgba(18,87,230,0.45)':'0 24px 50px rgba(0,0,0,0.5)';var f=t.querySelector('video');if(l<2.4&&h){if(f.src||(f.src=n[a].src),f.paused){var v=f.play();v&&v.catch&&v.catch((function(){}))}}else f.paused||f.pause()})),f.forEach((function(e,t){e.style.width=t===i?'28px':'8px',e.style.background=t===i?'#3B8BFF':'#3A3A48'})),t.style.cursor=s?'grabbing':'grab'}}));var w=['Just starting','$500–$1K','ASAP'],A=[];a('[data-chip]').forEach((function(e){if(!e.closest('[data-svc]')){var t=e.parentElement;A.indexOf(t)<0&&A.push(t)}})),A.forEach((function(e){var t=a('[data-chip]',e);t.forEach((function(e,t){e.setAttribute('data-i',t)}));var n=t.some((function(e){return w.indexOf(e.getAttribute('data-chip'))>=0}));e._chips=t;var r=function(e,t){e.setAttribute('aria-pressed',t?'true':'false'),e.style.background=t?'#1257E6':'#101019',e.style.borderColor=t?'#3B8BFF':'#2A2A38'};e._set=function(a,i){F(e,a,(function(){var o,s;t.forEach((function(e){e.getAttribute('data-chip')===a?r(e,i):n&&i&&r(e,!1)})),o=t.filter((function(e){return'true'===e.getAttribute('aria-pressed')})),s=t.filter((function(e){return'true'!==e.getAttribute('aria-pressed')})),o.concat(s).forEach((function(t){e.appendChild(t)}))}))},t.forEach((function(t){r(t,!1),t.addEventListener('click',(function(){e._set(t.getAttribute('data-chip'),'true'!==t.getAttribute('aria-pressed'))}))}))}));var k=r('[data-svc]');if(k){var L=a('[data-chip]',k),M=k.getAttribute('style'),C=document.createElement('div'),_=document.createElement('div');[C,_].forEach((function(e){e.style.cssText='display: flex; flex-direction: column; gap: 12px'})),C.innerHTML='Selected',_.innerHTML='Add more';var B=function(e,t){e.setAttribute('aria-pressed',t?'true':'false'),e.style.background=t?'#0F1E4A':'#101019',e.style.borderColor=t?'#3B8BFF':'#2A2A38';var n=e.querySelector('span'),r=e.querySelector('svg');n&&(n.style.background=t?'#1257E6':'transparent',n.style.borderColor=t?'#3B8BFF':'#2A2A38'),r&&r.setAttribute('stroke',t?'#FFFFFF':'transparent')};L.forEach((function(e){B(e,!1),e.addEventListener('click',(function(){var t=e.getAttribute('data-chip');F(k,t,(function(){B(e,'true'!==e.getAttribute('aria-pressed')),function(){if(!L.filter((function(e){return'true'===e.getAttribute('aria-pressed')})).length)return k.setAttribute('style',M),L.forEach((function(e){k.appendChild(e)})),C.remove(),void _.remove();k.style.alignItems='start',k.appendChild(C),k.appendChild(_),L.forEach((function(e){('true'===e.getAttribute('aria-pressed')?C:_).appendChild(e)}))}()}))}))}))}var S=r('#roles');S&&a('a[href="#apply"]',S).forEach((function(e){e.addEventListener('click',(function(){var t=e.querySelector('div > div'),n=t?t.textContent.trim():'',r=function(e){for(var t=0;t'+e.q+'+'+e.a+'
';var r=n.querySelector('button'),a=n.querySelector('div'),i=r.querySelector('span');r.addEventListener('click',(function(){var e='true'!==r.getAttribute('aria-expanded');r.setAttribute('aria-expanded',e),a.hidden=!e,i.textContent=e?'−':'+'})),T.appendChild(n),0===t&&r.click()}));var q=r('[data-wgrid]'),z=r('[data-wfilters]');if(q&&e.work){var I='All',j=['All','Brands','AI Visuals','Food'],X=function(t){q.innerHTML='',e.work.filter((function(e){return'All'===I||e.kind===I})).forEach((function(e,n){var r=document.createElement('div');r.className='vc',r.style.cssText='position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #16161F; cursor: pointer',r.innerHTML='
'+(e.handle?''+e.handle+'':'')+''+e.kind+'';var o=function(){if(!r._v){var t=document.createElement('video');t.src=e.src,t.muted=!0,t.loop=!0,t.playsInline=!0,t.setAttribute('playsinline',''),t.style.cssText='position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover',r.insertBefore(t,r.children[1]);var n=t.play();n&&n.catch&&n.catch((function(){})),r._v=t,r.querySelector('.vc-play').style.display='none',r.style.zIndex='5'}},s=function(){r._v&&(r._v.pause(),r._v.remove(),r._v=null,r.querySelector('.vc-play').style.display='flex',r.style.zIndex='1')};r.addEventListener('mouseenter',(function(){matchMedia('(hover: hover)').matches&&o()})),r.addEventListener('mouseleave',(function(){matchMedia('(hover: hover)').matches&&s()})),r.addEventListener('click',(function(){matchMedia('(hover: hover)').matches||(r._v?s():(a('.vc',q).forEach((function(e){e!==r&&e._stop&&e._stop()})),o()))})),r._stop=s,q.appendChild(r),t&&r.animate&&!i&&r.animate([{opacity:0,transform:'translateY(26px) scale(0.92)'},{opacity:1,transform:'translateY(0) scale(1)'}],{duration:520,delay:55*n,easing:'cubic-bezier(.2,.8,.2,1)',fill:'backwards'})})),H()},H=function(){z.innerHTML='',j.forEach((function(t){var n=t===I,r='All'===t?e.work.length:e.work.filter((function(e){return e.kind===t})).length,a=document.createElement('button');a.type='button',a.setAttribute('aria-pressed',n),a.style.cssText='font: inherit; font-size: 15px; font-weight: 700; padding: 12px 20px; border-radius: 999px; cursor: pointer; color: #FFFFFF; border: 1px solid '+(n?'#3B8BFF':'#2A2A38')+'; background: '+(n?'#1257E6':'#101019'),a.innerHTML=t+' '+r+'',a.addEventListener('click',(function(){I!==t&&(I=t,X(!0))})),z.appendChild(a)}))};X(!1)}var O=r('[data-calendly]');O&&e.calendly&&(O.style.padding='0',O.style.overflow='hidden',O.style.minHeight='700px',O.style.background='#0C0C14',O.innerHTML=''),a('form').forEach((function(t){var n=e.form;if(n){var r=t.querySelector('button[type="submit"]'),i=document.createElement('span');i.setAttribute('role','status'),i.style.cssText='font-size: 15px; font-weight: 700',r&&r.parentElement.appendChild(i),t.addEventListener('submit',(function(e){e.preventDefault();var o=function(e){var n=t.querySelector('[name="'+e+'"]');return n?n.value.trim():''},s=o('name'),c=o('email')||o('phone')||o('ig');if(!s||!c)return i.style.color='#FF8A8A',void(i.textContent='Please add your name and a way to reach you.');var l=[];a('input, textarea',t).forEach((function(e){if(e.name&&e.value.trim()){var t=e.closest('label'),n=t?t.childNodes[0].textContent.trim():e.name;l.push(n+': '+e.value.trim())}}));var d={};a('[data-chip][aria-pressed="true"]',t).forEach((function(e){var t=e.closest('[data-svc]')?'Services':function(){for(var t=e.parentElement.previousElementSibling;t&&!t.textContent.trim();)t=t.previousElementSibling;return t?t.textContent.trim().replace(/^\d+\s*·\s*/,''):'Options'}();(d[t]=d[t]||[]).push(e.getAttribute('data-chip'))})),Object.keys(d).forEach((function(e){l.push(e+': '+d[e].join(', '))}));var p=new FormData;p.append('action','elementor_pro_forms_send_form'),p.append('post_id',n.post_id),p.append('form_id',n.form_id),p.append('queried_id',n.post_id),p.append('referer_title',document.title),p.append('form_fields[name]',s),p.append('form_fields[email]',o('email')),p.append('form_fields[details]',l.join('\n')),r&&(r.disabled=!0,r.style.opacity='0.7'),i.style.color='#A6A6B5',i.textContent='Sending...',fetch(n.ajax||'/wp-admin/admin-ajax.php',{method:'POST',body:p,credentials:'same-origin'}).then((function(e){return e.json()})).then((function(e){if(!e||!e.success)throw new Error('fail');i.style.color='#7FD6A0',i.textContent=n.ok||'Got it. We will be in touch.',t.reset()})).catch((function(){i.style.color='#FF8A8A',i.textContent='Something went wrong. Email us at hi@stormdigital.studio.'})).then((function(){r&&(r.disabled=!1,r.style.opacity='')}))}))}}))}();