"use client";
import { useRef } from "react";
// import Link from "next/link"; // navigation temporarily disabled
import { motion } from "framer-motion";
import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { useGSAP } from "@gsap/react";
import { Sparkles, ArrowRight } from "@/components/ui/icons";
import AnimatedButton from "@/components/ui/AnimatedButton";
// Non-navigating stub — links still render but go nowhere. Restore the
// commented import above to re-enable navigation.
const Link = ({ href, onClick, children, ...props }) => (
{ e.preventDefault(); onClick?.(e); }} {...props}>
{children}
);
gsap.registerPlugin(ScrollTrigger);
/**
* "Cerkel AI" home section — product spotlight on brand tokens. Editorial
* split header, a cinematic video panel in a gradient frame with floating
* glass stat cards, and a capability chip strip. Framer Motion reveals.
*
* Video: /public/videos/cerkel-ai.mp4 (poster shows until it exists).
*/
const CAPABILITIES = [
"Generative AI",
"AI Chatbots & Agents",
"Machine Learning",
"Computer Vision",
"Predictive Analytics",
"Intelligent Automation",
];
const container = { hidden: {}, show: { transition: { staggerChildren: 0.12 } } };
const fade = {
hidden: { opacity: 0, y: 30 },
show: { opacity: 1, y: 0, transition: { duration: 0.6, ease: [0.21, 0.47, 0.32, 0.98] } },
};
export default function CerkelAI() {
const root = useRef(null);
// Scroll-zoom takeover: the media panel pins at the center of the screen,
// then scales up until it covers the whole viewport (corners squaring off,
// floating UI fading out) — all scrubbed to scroll, reversible.
useGSAP(
() => {
const panel = document.querySelector(".ai-media");
if (!panel) return;
// offsetWidth/Height ignore transforms, so this stays correct on refresh.
const coverScale = () =>
Math.max(
window.innerWidth / panel.offsetWidth,
window.innerHeight / panel.offsetHeight
) * 1.02;
const tl = gsap.timeline({
scrollTrigger: {
trigger: ".ai-media",
start: "center center",
end: "+=130%",
pin: true,
scrub: true,
invalidateOnRefresh: true,
},
});
tl.fromTo(".ai-media", { scale: 0.92 }, { scale: 1, duration: 0.2, ease: "none" })
.to(".ai-ui", { opacity: 0, duration: 0.15, ease: "none" }, 0.22)
.to(
[".ai-frame", ".ai-clip"],
{ borderRadius: 0, duration: 0.2, ease: "none" },
0.25
)
.to(".ai-media", { scale: coverScale, duration: 0.75, ease: "none" }, 0.25)
.fromTo(".ai-video", { scale: 1.18 }, { scale: 1, duration: 0.95, ease: "none" }, 0);
},
{ scope: root }
);
return (
{/* ambient brand glows */}
{/* Header — editorial split */}
Cerkel AI
Put AI to work across{" "}
every layer of your business.
From generative AI and intelligent agents to machine learning and automation,
Cerkel AI helps you ship smarter products and streamline operations — safely,
and at scale.
Explore Cerkel AI
Talk to our AI team
{/* Media panel — gradient frame + floating stat cards + scroll zoom */}
{/* legibility wash */}
{/* badge — top left */}
Powered by Cerkel AI
{/* stat card — bottom left (floats) */}
80%
of routine work automated
{/* stat card — top right (floats, offset rhythm) */}