function e(){let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,t=Array.from(document.querySelectorAll(`[data-reveal]`));if(!t.length)return;if(e||!(`IntersectionObserver`in window)){t.forEach(e=>e.classList.add(`is-visible`));return}let n=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add(`is-visible`),t.unobserve(e.target))})},{rootMargin:`0px 0px -10% 0px`,threshold:.1});t.forEach(e=>n.observe(e))}function t(e){let t=e.textContent.trim(),n=t.match(/^(\d[\d,]*(?:\.\d+)?)(.*)$/);if(!n)return;let r=n[1].replace(/,/g,``),i=parseFloat(r),a=n[2]||``,o=(r.split(`.`)[1]||``).length,s=null;e.textContent=`0`+a;function c(n){s===null&&(s=n);let r=Math.min(1,(n-s)/1100),l=1-(1-r)**3;r<1?(e.textContent=(i*l).toFixed(o)+a,requestAnimationFrame(c)):e.textContent=t}requestAnimationFrame(c)}function n(){let e=Array.from(document.querySelectorAll(`[data-countup]`));if(!e.length||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||!(`IntersectionObserver`in window))return;let n=new IntersectionObserver((e,n)=>{e.forEach(e=>{e.isIntersecting&&(t(e.target),n.unobserve(e.target))})},{threshold:.6});e.forEach(e=>n.observe(e))}function r(e){let t=e.querySelector(`[data-slider-track]`);if(!t)return;let n=()=>{let e=t.querySelector(`.landing-slide`);if(!e)return t.clientWidth;let n=window.getComputedStyle(t),r=parseFloat(n.columnGap||n.gap||`0`)||0;return e.getBoundingClientRect().width+r},r=()=>{let e=t.scrollWidth-t.clientWidth;t.classList.toggle(`at-start`,t.scrollLeft<=2),t.classList.toggle(`at-end`,t.scrollLeft>=e-2)};r(),t.addEventListener(`scroll`,r,{passive:!0}),window.addEventListener(`resize`,r);let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,a=null,o=()=>{let e=t.scrollWidth-t.clientWidth-4;t.scrollLeft>=e?t.scrollTo({left:0,behavior:`smooth`}):t.scrollBy({left:n(),behavior:`smooth`})},s=()=>{!i&&!a&&(a=window.setInterval(o,4500))},c=()=>{window.clearInterval(a),a=null},l=e.querySelector(`[data-slider-prev]`),u=e.querySelector(`[data-slider-next]`);l&&l.addEventListener(`click`,()=>t.scrollBy({left:-n(),behavior:`smooth`})),u&&u.addEventListener(`click`,()=>t.scrollBy({left:n(),behavior:`smooth`}));let d=!1,f=0,p=0,m=0;t.addEventListener(`pointerdown`,e=>{e.pointerType===`mouse`&&(d=!0,m=0,f=e.clientX,p=t.scrollLeft,t.classList.add(`is-dragging`),c())}),t.addEventListener(`pointermove`,e=>{if(!d)return;let n=e.clientX-f;m=Math.max(m,Math.abs(n)),t.scrollLeft=p-n});let h=()=>{d&&(d=!1,t.classList.remove(`is-dragging`),s())};t.addEventListener(`pointerup`,h),t.addEventListener(`pointercancel`,h),t.addEventListener(`pointerleave`,h),t.addEventListener(`click`,e=>{m>6&&(e.preventDefault(),e.stopPropagation(),m=0)},!0),s(),e.addEventListener(`mouseenter`,c),e.addEventListener(`mouseleave`,s),e.addEventListener(`focusin`,c),e.addEventListener(`focusout`,s)}function i(){document.querySelectorAll(`[data-slider]`).forEach(r)}function a(){let e=document.querySelector(`[data-lightbox]`),t=Array.from(document.querySelectorAll(`.landing-slide`));if(!e||!t.length)return;let n=t.map(e=>({src:e.querySelector(`.landing-slide-img`)?.src||``,cap:e.querySelector(`.landing-slide-cap`)?.textContent.trim()||``})),r=e.querySelector(`[data-lb-img]`),i=e.querySelector(`[data-lb-cap]`),a=0,o=()=>{r.src=n[a].src,r.alt=n[a].cap,i&&(i.textContent=n[a].cap)},s=t=>{a=t,o(),e.hidden=!1,requestAnimationFrame(()=>e.classList.add(`is-open`)),document.body.style.overflow=`hidden`},c=()=>{e.classList.remove(`is-open`),document.body.style.overflow=``,window.setTimeout(()=>{e.hidden=!0},200)},l=e=>{a=(a+e+n.length)%n.length,o()};t.forEach((e,t)=>e.addEventListener(`click`,()=>s(t))),e.querySelector(`[data-lb-close]`)?.addEventListener(`click`,c),e.querySelector(`[data-lb-prev]`)?.addEventListener(`click`,e=>{e.stopPropagation(),l(-1)}),e.querySelector(`[data-lb-next]`)?.addEventListener(`click`,e=>{e.stopPropagation(),l(1)}),e.addEventListener(`click`,e=>{e.target.closest(`.landing-lightbox-stage, .landing-lightbox-nav`)||c()}),document.addEventListener(`keydown`,t=>{e.hidden||(t.key===`Escape`?c():t.key===`ArrowLeft`?l(-1):t.key===`ArrowRight`&&l(1))})}function o(){let e=document.querySelector(`[data-totop]`);if(!e)return;let t=()=>e.classList.toggle(`is-visible`,window.scrollY>600);t(),window.addEventListener(`scroll`,t,{passive:!0}),e.addEventListener(`click`,()=>window.scrollTo({top:0,behavior:`smooth`}))}function s(){e(),n(),i(),a(),o()}document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,s):s();