{"version":3,"file":"details-DFoILTrS.js","sources":["../../src/javascripts/details.js"],"sourcesContent":["gsap.registerPlugin(ScrollToPlugin);\ngsap.registerPlugin(TextPlugin);\n\n// Initialize Lenis\nfunction smoothScroll() {\n\n const lenis = new Lenis({\n duration: 2,\n smooth: true,\n autoRaf: true,\n easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))\n });\n window.scrollTo(0, 0);\n lenis.scrollTo(0);\n\n function raf(time) {\n lenis.raf(time);\n requestAnimationFrame(raf);\n }\n\n requestAnimationFrame(raf);\n}\nsmoothScroll()\n\n\n\nfunction detailLoader() {\n var loader = gsap.timeline()\n loader\n .from(\"#page1 h2,#page1 h3\", {\n y: \"160%\",\n duration: .8\n }, \"a\")\n .from(\"nav\", {\n y: \"-100%\",\n opacity: 0,\n duration: .8,\n }, \"a\")\n .from(\"#page2\", {\n y: \"50%\",\n duration: .8,\n delay: -.2\n })\n}\ndetailLoader()\n\nfunction textEffectAnimation() {\n document.querySelectorAll(\".text-effect .effect\").forEach(function (element) {\n var clutter2 = \"\"\n element.textContent.split(\"\").forEach(function (letter) {\n if (letter === \" \") {\n clutter2 += \" \"\n } else {\n clutter2 += `${letter}`\n }\n })\n element.innerHTML = clutter2\n })\n\n document.querySelectorAll(\".text-effect\").forEach(function (elem) {\n elem.addEventListener(\"mouseenter\", function (e) {\n gsap.fromTo(e.currentTarget.children[0].querySelectorAll(\"span\"), {\n y: \"0%\",\n }, {\n y: \"-100%\",\n // duration: .8,\n stagger: {\n amount: .2\n },\n })\n gsap.fromTo(e.currentTarget.children[1].querySelectorAll(\"span\"), {\n y: \"0%\",\n }, {\n y: \"-100%\",\n // duration: .8,\n stagger: {\n amount: .2\n },\n })\n })\n })\n}\ntextEffectAnimation()\n\nfunction serviceListingAnimation(){\n const serviceDets = [\n \"Digging deep to define your audience, vision, and what sets you apart.\",\n \"Positioning your brand with a clear mission and a bold identity.\",\n \"Crafting a voice and visual language that actually speaks to people.\",\n \"Designing logos, color palettes, and typography that make you instantly recognizable.\",\n \"Creating high-impact visuals that bring your brand to life.\",\n \"Writing words that don’t just fill space but make people feel something.\",\n \"Designing everything from business cards to billboards—cohesive, striking, and unforgettable.\",\n \"Designing experiences that feel intuitive, effortless, and built for engagement.\",\n \"Crafting sleek, high-end visuals that make your brand look like a million bucks.\",\n \"Fast, fluid, and pixel-perfect—our websites don’t just work; they impress.\",\n \"This is our playground. We craft mind-blowing GSAP animations that make websites feel alive.\",\n \"Powering your site with solid, scalable, and headache-free architecture.\",\n \"From technical SEO to on-page magic, we help you rank higher and get seen by the right people.\",\n \"Rock-solid hosting that keeps your website lightning-fast and always online.\",\n \"No compromises—enterprise-grade security to keep your data locked down.\",\n \"Because the internet never sleeps, and neither do we when it comes to keeping your site running.\",\n \"Powering high-performance Shopify stores with custom design, seamless UX, and rock-solid scalability.\",\n \"Ditch the templates—our tailor-made GSAP-enhanced stores deliver next-level design, freedom, and immersive shopping experiences.\",\n \"Building dynamic platforms where multiple vendors, customers, and cutting-edge features come together for a seamless ecosystem.\",\n \"Fine-tuning online stores with intuitive UX, frictionless checkouts, and data-driven strategies to boost conversions.\",\n \"Designing and developing sleek, high-performance apps that people actually love using.\",\n \"We don’t do cookie-cutter solutions—we build CMS platforms tailored to your needs.\",\n \"Whether it's niche or mass-market, we build digital marketplaces that stand out and scale up.\",\n \"High-traffic, high-functionality platforms designed for brands that want to be heard.\",\n \"Analyzing speed, security, and infrastructure to keep your platform fast, safe, and ahead of the game.\",\n \"Expert guidance on bespoke digital solutions, from choosing the right tech stack to building scalable, future-ready systems.\",\n \"A squad of elite developers, designers, and strategists working as an extension of your in-house team.\"\n ]\n \n document.querySelectorAll(\".service-wrap .text-effect\").forEach(function(textEffect) {\n textEffect.addEventListener(\"mouseenter\",function(e){\n const text = serviceDets[e.target.dataset.index]\n \n gsap.to(document.querySelector(\"#about-service-text\"),{\n text:text,\n duration: 1,\n ease: \"power3.out\",\n overwrite: \"auto\"\n })\n })\n textEffect.addEventListener(\"mouseleave\",function(){\n gsap.to(document.querySelector(\"#about-service-text\"),{\n text:\"\",\n duration: 1,\n ease: \"power3.out\",\n overwrite: \"auto\"\n })\n })\n })\n}\nserviceListingAnimation()\nvar isMenuService = false;\nvar isService = false;\nfunction serviceAnimation() {\n var previousLink = \"\"\n\n document.querySelectorAll(\".service-open-btn\").forEach(function(btn){\n btn.addEventListener(\"click\", function (e) {\n document.querySelector(\"#nav-service\").classList.add(\"active\");\n // document.querySelector(\"#studio-btn\").classList.remove(\"active\");\n isService = !isService;\n openService()\n })\n })\n document.querySelector(\"#closeService\").addEventListener(\"click\", function () {\n isService = !isService;\n openService()\n document.querySelector(\"#menu-button\").textContent = \"close\"\n isMenuService = false;\n this.classList.remove(\"active\");\n // document.querySelector(\"#studio-btn\").classList.add(\"active\");\n })\n\n \n}\nfunction openService() {\n if (isService) {\n gsap.set(\"nav\", { backgroundColor: \"#fff\" })\n gsap.to(\"#main\", {\n top: \"calc(100% - 40px)\",\n ease: \"power3.out\",\n duration: 1.2\n })\n gsap.to(\"#service-page\", {\n top: \"-40px\",\n ease: \"power3.out\",\n duration: 1.2,\n onComplete:()=>{\n gsap.set(\"body\",{overflow: \"hidden\"})\n }\n })\n } else {\n document.querySelector(\"#nav-service\").classList.remove(\"active\")\n gsap.set(\"nav\", { backgroundColor: \"transparent\" })\n gsap.to(\"#main\", {\n top: \"0%\",\n ease: \"power3.out\",\n duration: 1.2\n })\n gsap.to(\"#service-page\", {\n top: \"-100%\",\n ease: \"power3.out\",\n duration: 1.2,\n onComplete:()=>{\n gsap.set(\"body\",{overflow: \"auto\"})\n setTimeout(() => {\n ScrollTrigger.refresh();\n }, 200);\n }\n })\n }\n}\nserviceAnimation()\n\ndocument.querySelectorAll(\".banner-poster\").forEach(function (poster) {\n gsap.to(poster, {\n clipPath: \"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)\",\n duration: .8,\n scrollTrigger: {\n trigger: poster,\n scroller: \"body\",\n start: \"top 90%\",\n end: \"top 70%\",\n }\n })\n})\n\n\nfunction projectAnimation() {\n document.querySelectorAll(\".project\").forEach(function (project) {\n project.addEventListener(\"mouseover\", function () {\n project.classList.add(\"active\");\n let video = project.querySelector(\"video\");\n if (video) { // Ensure video exists before accessing properties\n video.currentTime = 0;\n video.play();\n }\n })\n project.addEventListener(\"mouseleave\", function () {\n project.classList.remove(\"active\");\n })\n })\n}\nprojectAnimation()\n\nfunction footerAnimation() {\n const updateTime = () => {\n const date = new Date();\n let hours = date.getHours();\n let minutes = date.getMinutes();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n\n hours = hours % 12 || 12; // Convert 24-hour to 12-hour format\n minutes = minutes.toString().padStart(2, '0'); // Ensure two-digit minutes\n\n const timeString = `${hours}:${minutes} ${ampm}`;\n\n document.querySelector(\"#time\").textContent = timeString; // Update the DOM\n\n return timeString; // Return the formatted time string\n };\n updateTime();\n setInterval(updateTime, 60000);\n\n\n}\nfooterAnimation()\n\n\n\nvar isMenu = false;\ndocument.querySelector(\"#menu-button\").addEventListener(\"click\", function () {\n if (isMenuService) {\n isService = false;\n openService()\n document.querySelector(\"#menu-button\").textContent = \"close\"\n isMenuService = false;\n return;\n }\n if (!isMenu) {\n gsap.set(\"#menu-container\", { display: \"flex\" })\n document.querySelector(\"#menu-button\").textContent = \"close\"\n var tl = gsap.timeline()\n tl\n .to(\"#menu-container\", {\n opacity: 1,\n duration: 0.5\n })\n .from(\".menu-top, .menu-btm\", {\n y: \"30\",\n opacity: 0,\n duration: 0.3,\n stagger: 0.1\n })\n isMenu = true;\n }\n else {\n gsap.to(\"#menu-container\", {\n opacity: 0,\n duration: 0.5,\n onComplete: function () {\n gsap.set(\"#menu-container\", { display: \"none\" })\n document.querySelector(\"#menu-button\").textContent = \"menu\"\n }\n })\n isMenu = false;\n }\n})\n\n\n\ndocument.querySelector(\"#menu-service\").addEventListener(\"click\", function () {\n if (!isMenuService) {\n document.querySelector(\"#menu-button\").textContent = \"menu\"\n isMenuService = true;\n }\n})"],"names":["smoothScroll","lenis","t","raf","time","detailLoader","loader","textEffectAnimation","element","clutter2","letter","elem","e","serviceListingAnimation","serviceDets","textEffect","text","isMenuService","isService","serviceAnimation","btn","openService","poster","projectAnimation","project","video","footerAnimation","updateTime","date","hours","minutes","ampm","timeString","isMenu","tl"],"mappings":"6CAAA,KAAK,eAAe,cAAc,EAClC,KAAK,eAAe,UAAU,EAG9B,SAASA,GAAe,CAEpB,MAAMC,EAAQ,IAAI,MAAM,CACpB,SAAU,EACV,OAAQ,GACR,QAAS,GACT,OAASC,GAAM,KAAK,IAAI,EAAG,MAAQ,KAAK,IAAI,EAAG,IAAMA,CAAC,CAAC,CAC/D,CAAK,EACD,OAAO,SAAS,EAAG,CAAC,EACpBD,EAAM,SAAS,CAAC,EAEhB,SAASE,EAAIC,EAAM,CACfH,EAAM,IAAIG,CAAI,EACd,sBAAsBD,CAAG,CACjC,CAEI,sBAAsBA,CAAG,CAC7B,CACAH,EAAY,EAIZ,SAASK,GAAe,CACpB,IAAIC,EAAS,KAAK,SAAQ,EAC1BA,EACK,KAAK,sBAAuB,CACzB,EAAG,OACH,SAAU,EACtB,EAAW,GAAG,EACL,KAAK,MAAO,CACT,EAAG,QACH,QAAS,EACT,SAAU,EACtB,EAAW,GAAG,EACL,KAAK,SAAU,CACZ,EAAG,MACH,SAAU,GACV,MAAO,GACV,CAAA,CACT,CACAD,EAAY,EAEZ,SAASE,GAAsB,CAC3B,SAAS,iBAAiB,sBAAsB,EAAE,QAAQ,SAAUC,EAAS,CACzE,IAAIC,EAAW,GACfD,EAAQ,YAAY,MAAM,EAAE,EAAE,QAAQ,SAAUE,EAAQ,CAChDA,IAAW,IACXD,GAAY,sBAEZA,GAAY,SAASC,CAAM,SAElC,CAAA,EACDF,EAAQ,UAAYC,CACvB,CAAA,EAED,SAAS,iBAAiB,cAAc,EAAE,QAAQ,SAAUE,EAAM,CAC9DA,EAAK,iBAAiB,aAAc,SAAUC,EAAG,CAC7C,KAAK,OAAOA,EAAE,cAAc,SAA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