import React, { useState, useEffect, useRef } from 'react'; import { assetUrl } from './lib/assetUrl'; import { motion, useScroll, useTransform, useMotionValueEvent, useReducedMotion } from 'framer-motion'; import { useContent } from './context/ContentContext'; import { usePreviewMode } from './context/PreviewContext'; import ServiceDial from './components/ServiceDial'; import FeaturedGallery from './components/FeaturedGallery'; import ProductCard from './components/ProductCard'; import ContactSection from './components/ContactSection'; import AboutUsPage from './components/AboutUsPage'; import TurnstileCaptcha from './components/TurnstileCaptcha'; import GlassmorphicSelect from './components/GlassmorphicSelect'; import GlassmorphicDatePicker from './components/GlassmorphicDatePicker'; import BlogDetailPage from './components/BlogDetailPage'; import CareersPage from './components/CareersPage'; import BlogsPage from './components/BlogsPage'; // Reusable Scroll Reveal Wrapper with Reduced Motion Support function Reveal({ children, delay = 0, style }) { const shouldReduceMotion = useReducedMotion(); const previewMode = usePreviewMode(); if (shouldReduceMotion && !previewMode) return
{children}
; return ( {children} ); } import { ArrowRight, Sparkles, Database, Cpu, LineChart, Layers, Activity, Settings, Shield, TrendingUp, Globe, ChevronRight, ChevronLeft, Mail, CheckCircle, Clock, Compass, Zap, Layout, ExternalLink, ChevronDown, BrainCircuit, Factory, Network, UsersRound, ShieldCheck, Code2, CloudCog, Glasses, Menu, X } from 'lucide-react'; const iconMap = { BrainCircuit, Factory, Network, UsersRound, ShieldCheck, Code2, CloudCog, Glasses, Sparkles }; // Reusable Orbital Logo Component for animated paths around header text const OrbitalLogo = ({ src, alt, radiusX, radiusY, startAngle, duration, clockwise = true, size = 120 }) => { const [position, setPosition] = useState({ x: 0, y: 0 }); useEffect(() => { const speed = (2 * Math.PI) / (duration * 1000); // radians per millisecond const direction = clockwise ? 1 : -1; const startRad = (startAngle * Math.PI) / 180; let animFrame; const update = () => { const elapsed = performance.now(); const angle = startRad + direction * speed * elapsed; const x = radiusX * Math.cos(angle); const y = radiusY * Math.sin(angle); setPosition({ x, y }); animFrame = requestAnimationFrame(update); }; animFrame = requestAnimationFrame(update); return () => cancelAnimationFrame(animFrame); }, [radiusX, radiusY, startAngle, duration, clockwise]); return ( {alt} ); }; function ServiceCard({ service, isMobile, index = 0 }) { const shouldReduceMotion = useReducedMotion(); const service3dImages = [ '/assets/image 179.png', '/assets/image 180.png', '/assets/image 181.png', '/assets/image 182.png', '/assets/image 184.png' ]; const cardBackgrounds = [ 'radial-gradient(circle at 85% 15%, rgba(150, 45, 30, 0.45) 0%, rgba(22, 10, 11, 0.98) 55%)', 'radial-gradient(circle at 85% 15%, rgba(20, 100, 140, 0.45) 0%, rgba(10, 18, 25, 0.98) 55%)', 'radial-gradient(circle at 85% 15%, rgba(140, 50, 30, 0.4) 0%, rgba(20, 12, 12, 0.98) 55%)', 'radial-gradient(circle at 85% 15%, rgba(15, 115, 140, 0.45) 0%, rgba(10, 19, 26, 0.98) 55%)', 'radial-gradient(circle at 85% 15%, rgba(30, 90, 140, 0.45) 0%, rgba(12, 18, 28, 0.98) 55%)' ]; const formatTitle = (title) => { if (title.includes('AI & Data')) return <>AI & Data
Services; if (title.includes('Enterprise')) return <>Enterprise
Software; if (title.includes('SAP')) return <>SAP Managed
Services; if (title.includes('Smart')) return <>Smart
Factory; if (title.includes('AR/VR')) return <>AR/VR &
Immersive
Technologies; return title; }; const revealProps = shouldReduceMotion ? {} : { initial: { opacity: 0, y: 40 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true, amount: 0.15 }, transition: { y: { type: 'tween', duration: 0.8, ease: [0.22, 1, 0.36, 1], delay: index * 0.1 }, opacity: { duration: 0.8, ease: 'easeOut', delay: index * 0.1 } } }; const current3dImg = service.image || service3dImages[index % service3dImages.length]; return ( {/* Background Watermark Number */}
{service.number}
{/* Top Header Row with Title and 3D Graphic */}

{formatTitle(service.title)}

{/* 3D Graphic Image */}
{`${service.title}
{/* Sub-text Section: Bold Statement + Description with Left Vertical Line */}

{service.boldStatement}

{service.description}

{/* Capabilities Bullet List */}
    {service.capabilities.map((capability, idx) => { const parts = capability.split(/\s[–-]\s/); const boldText = parts.length > 1 ? parts[0] : null; const restText = parts.length > 1 ? parts.slice(1).join(' - ') : capability; return (
  • »
    {boldText ? <>{boldText} – {restText} : restText}
  • ); })}
{/* Bottom Link CTA - commented out per user request
*/} ); } export default function App({ previewMode = false }) { const { content, loading } = useContent(); const services = content.services?.items ?? []; const insights = content.insights?.items ?? []; const metrics = content.metrics ?? []; const hero = content.hero ?? {}; const about = content.about ?? {}; const partners = content.partners ?? { logos: [] }; const certifications = content.certifications ?? { items: [] }; const whyUs = content.whyUs ?? { cards: [], images: [] }; const products = content.products ?? { items: [] }; const footer = content.footer ?? { cta: {}, quickLinks: [], productLinks: [], social: [], legal: [] }; // Tabs for Hero Section const [activeHeroTab, setActiveHeroTab] = useState('agile'); // Carousel slide for Products const [activeProductIndex, setActiveProductIndex] = useState(0); // Active detail index in Services Section const [activeServiceIndex, setActiveServiceIndex] = useState(0); const [isMobile, setIsMobile] = useState(false); const [isCareersOpen, setIsCareersOpen] = useState(false); const [activeSection, setActiveSection] = useState('home'); const [currentPage, setCurrentPage] = useState('home'); const [navbarVisible, setNavbarVisible] = useState(true); const lastScrollY = useRef(0); const smoothScrollTo = (top) => { document.body.style.pointerEvents = 'none'; window.scrollTo({ top, behavior: 'smooth' }); let scrollTimeout; const handleScrollEnd = () => { document.body.style.pointerEvents = ''; window.removeEventListener('scrollend', handleScrollEnd); window.removeEventListener('scroll', handleScrollDebounce); clearTimeout(scrollTimeout); }; const handleScrollDebounce = () => { clearTimeout(scrollTimeout); scrollTimeout = setTimeout(handleScrollEnd, 100); }; window.addEventListener('scrollend', handleScrollEnd); window.addEventListener('scroll', handleScrollDebounce); scrollTimeout = setTimeout(handleScrollEnd, 800); }; const [selectedBlog, setSelectedBlog] = useState(null); const handleSelectBlog = (blog) => { setNavbarVisible(true); setMobileMenuOpen(false); setSelectedBlog(blog); setCurrentPage('blog'); window.location.hash = blog?.slug ? `blog-${blog.slug}` : 'blog'; smoothScrollTo(0); }; useEffect(() => { const syncPageFromHash = (shouldScroll = false) => { const hash = window.location.hash.replace('#', ''); if (hash === 'contact' || hash === 'contactus') { setSelectedBlog(null); setCurrentPage('contact'); setActiveSection('contactus'); if (shouldScroll) smoothScrollTo(0); } else if (hash === 'about' || hash === 'aboutus') { setSelectedBlog(null); setCurrentPage('about'); setActiveSection('aboutus'); if (shouldScroll) smoothScrollTo(0); } else if (hash === 'careers') { setSelectedBlog(null); setCurrentPage('careers'); setActiveSection('careers'); if (shouldScroll) smoothScrollTo(0); } else if (hash === 'blogs') { setSelectedBlog(null); setCurrentPage('blogs'); setActiveSection('blogs'); if (shouldScroll) smoothScrollTo(0); } else if (hash.startsWith('blog-') || hash === 'blog') { const slug = hash.replace('blog-', ''); const found = insights.find(b => b.slug === slug || String(b.id) === slug); if (found) { setSelectedBlog(prev => (prev && (prev.id === found.id || (prev.slug && prev.slug === found.slug)) ? prev : found)); } else if (insights && insights.length > 0) { setSelectedBlog(prev => prev || insights[0]); } setCurrentPage('blog'); if (shouldScroll) smoothScrollTo(0); } else if (hash === 'home' || hash === '') { setSelectedBlog(null); setCurrentPage('home'); } }; syncPageFromHash(false); const handleHashChange = () => syncPageFromHash(true); window.addEventListener('hashchange', handleHashChange); return () => window.removeEventListener('hashchange', handleHashChange); }, [insights]); const [hoveredItem, setHoveredItem] = useState(null); const [showCareersAcknowledgement, setShowCareersAcknowledgement] = useState(false); const [isStrategyOpen, setIsStrategyOpen] = useState(false); const [showStrategyAcknowledgement, setShowStrategyAcknowledgement] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); // Careers Form Fields const [careersName, setCareersName] = useState(''); const [careersEmail, setCareersEmail] = useState(''); const [careersPhone, setCareersPhone] = useState(''); const [careersFile, setCareersFile] = useState(null); const [careersTurnstileToken, setCareersTurnstileToken] = useState(''); const [careersErrorMsg, setCareersErrorMsg] = useState(''); const [isCareersSubmitting, setIsCareersSubmitting] = useState(false); // Strategy Form Fields const [strategyName, setStrategyName] = useState(''); const [strategyEmail, setStrategyEmail] = useState(''); const [strategyMobile, setStrategyMobile] = useState(''); const [strategyDesignation, setStrategyDesignation] = useState(''); const [strategyDate, setStrategyDate] = useState(''); const [strategyTime, setStrategyTime] = useState(''); const [strategyInterests, setStrategyInterests] = useState({ 'AI & Analytics': false, 'SAP Services': false, 'XR Platforms': false, 'Smart Factory': false, 'Cloud Engineering': false, 'Enterprise Software': false, }); const [strategyTurnstileToken, setStrategyTurnstileToken] = useState(''); const [strategyErrorMsg, setStrategyErrorMsg] = useState(''); const [isStrategySubmitting, setIsStrategySubmitting] = useState(false); useEffect(() => { const checkMobile = () => { setIsMobile(window.innerWidth < 1024); }; checkMobile(); window.addEventListener('resize', checkMobile); return () => window.removeEventListener('resize', checkMobile); }, []); const [flippingLogo, setFlippingLogo] = useState(null); useEffect(() => { const triggerRandomFlip = () => { const logoNumbers = [27, 28, 30, 31, 32, 33, 34, 35, 36]; const randomNum = logoNumbers[Math.floor(Math.random() * logoNumbers.length)]; setFlippingLogo(randomNum); // Clear flip after animation completes setTimeout(() => { setFlippingLogo(null); }, 1000); }; // Trigger random flip every 3.5 seconds const interval = setInterval(triggerRandomFlip, 3500); return () => clearInterval(interval); }, []); useEffect(() => { if (previewMode) return; let lastScroll = window.scrollY; const handleScroll = () => { const currentScroll = window.scrollY; const diff = currentScroll - lastScroll; if (currentScroll <= 50) { setNavbarVisible(true); } else if (diff > 5 && currentScroll > 100) { setNavbarVisible(false); } else if (diff < -5) { setNavbarVisible(true); } lastScroll = currentScroll; if (currentPage === 'home') { // If at top of the page, home is active if (currentScroll < 100) { setActiveSection('home'); return; } const sections = ['home', 'aboutus', 'services', 'whyus', 'products', 'insights', 'contactus']; const scrollPosition = currentScroll + 120; // 120px offset for header height and visual center // Special case: if scrolled down near the very bottom of the page, contactus is active if (currentScroll > 300 && window.innerHeight + currentScroll >= document.documentElement.scrollHeight - 100) { setActiveSection('contactus'); return; } for (const sectionId of sections) { const el = document.getElementById(sectionId); if (el) { const top = el.offsetTop; const height = el.offsetHeight; if (scrollPosition >= top && scrollPosition < top + height) { setActiveSection(sectionId); break; } } } } }; window.addEventListener('scroll', handleScroll); handleScroll(); // run once on mount return () => window.removeEventListener('scroll', handleScroll); }, [previewMode, currentPage]); const getActiveNavItem = () => { if (currentPage === 'blogs' || currentPage === 'blog') return 'Blogs'; if (currentPage === 'contact') return 'Contact Us'; if (currentPage === 'about') return 'About Us'; switch (activeSection) { case 'home': return 'Home'; case 'aboutus': case 'services': case 'whyus': return 'About Us'; case 'products': return 'Products'; case 'insights': case 'blogs': return 'Blogs'; case 'contactus': return 'Contact Us'; default: return 'Home'; } }; const servicesScrollRef = useRef(null); const scrollServices = (direction) => { if (servicesScrollRef.current) { const scrollAmount = isMobile ? 310 : 444; // card width + gap servicesScrollRef.current.scrollBy({ left: direction === 'left' ? -scrollAmount : scrollAmount, behavior: 'smooth' }); } }; // Carousel for Insights const [insightIndex, setInsightIndex] = useState(0); const blogCarouselRef = useRef(null); const scrollBlogCarousel = (dir) => { if (blogCarouselRef.current) { const cardWidth = (isMobile ? window.innerWidth * 0.72 : 340) + 24; blogCarouselRef.current.scrollBy({ left: dir * cardWidth, behavior: 'smooth' }); } }; const sectionX = isMobile ? '1.25rem' : '4rem'; const navItems = ['Home', 'About Us', 'Products', 'Blogs', 'Careers', 'Contact Us']; const NAV_OFFSET = isMobile ? 72 : 88; const scrollToSection = (sectionId) => { const el = document.getElementById(sectionId); if (el) { const top = el.getBoundingClientRect().top + window.scrollY - NAV_OFFSET; smoothScrollTo(top); setActiveSection(sectionId); } else if (sectionId === 'contactus') { smoothScrollTo(document.documentElement.scrollHeight); setActiveSection('contactus'); } }; const handleNavClick = (item) => { setNavbarVisible(true); setMobileMenuOpen(false); setSelectedBlog(null); if (item === 'Careers') { setIsCareersOpen(true); return; } if (item === 'Blogs') { setCurrentPage('blogs'); setActiveSection('blogs'); window.location.hash = 'blogs'; smoothScrollTo(0); return; } if (item === 'Contact Us') { setCurrentPage('contact'); setActiveSection('contactus'); window.location.hash = 'contact'; smoothScrollTo(0); return; } if (item === 'About Us') { setCurrentPage('about'); setActiveSection('aboutus'); window.location.hash = 'aboutus'; smoothScrollTo(0); return; } const sectionMap = { Home: 'home', Products: 'products', }; const id = sectionMap[item]; const doScroll = (sectionId) => { if (!sectionId || sectionId === 'home') { smoothScrollTo(0); return; } requestAnimationFrame(() => { const el = document.getElementById(sectionId); if (el) { const top = el.getBoundingClientRect().top + window.scrollY - NAV_OFFSET; smoothScrollTo(top); setActiveSection(sectionId); } }); }; if (currentPage !== 'home') { setCurrentPage('home'); setActiveSection(id || 'home'); window.location.hash = id || 'home'; setTimeout(() => doScroll(id), 350); return; } window.location.hash = id || 'home'; doScroll(id); }; useEffect(() => { document.body.style.overflow = mobileMenuOpen ? 'hidden' : ''; return () => { document.body.style.overflow = ''; }; }, [mobileMenuOpen]); const heroTabs = [ { id: 'agile', label: 'Agile Dev' }, { id: 'fullstack', label: 'Full-Stack Tech' }, { id: 'ai', label: 'AI & Analytics' }, { id: 'devops', label: 'DevOps' } ]; // Dummy contents for Hero tabs to make it feel alive const heroTabContent = { agile: { title: 'Rapid Iterative Delivery', desc: 'Accelerating release cycles through agile management and continuous deployment pipelines.' }, fullstack: { title: 'Modern Core Architectures', desc: 'Scalable frontend, backend, and database infrastructures designed for ultimate reliability.' }, ai: { title: 'Intelligent Automation', desc: 'Harnessing ML and LLM integrations to optimize workflows and drive business intelligence.' }, devops: { title: 'Automated Operations', desc: 'Secure cloud hosting, zero-downtime deployments, and real-time environment monitoring.' } }; const clients = [ { name: 'TVS', logo: 'TVS' }, { name: 'Hero', logo: 'Hero' }, { name: 'V-Guard', logo: 'V-Guard' }, { name: 'Muthoot', logo: 'Muthoot' }, { name: 'MRF', logo: 'MRF' }, { name: 'HDFC', logo: 'HDFC' } ]; const whyChooseUs = [ { title: 'Innovation Driven', desc: 'Integrating state-of-the-art technologies and custom automation architectures into your core workflows to future-proof business value.', icon: }, { title: 'Industry Expertise', desc: 'Deep industry knowledge spanning insurance, fintech, operations, logistics, and highly regulated enterprise application suites.', icon: }, { title: 'Outcome Focused', desc: 'Committed to delivering measurable business impact, reduced infrastructure overhead, and highly optimized operational metrics.', icon: }, { title: 'Customer Centric', desc: 'Collaborating hand-in-hand to build solutions tailored specifically to your unique workflow demands, users, and scaling plans.', icon: } ]; if (loading) { return (
Loading...
); } return (
{/* Main Content Wrapper with solid background and higher z-index for sticky footer parallax reveal */}
{/* Background Glows */}
{/* Navigation Bar */} {isMobile && mobileMenuOpen && (
setMobileMenuOpen(false)} style={{ position: 'fixed', inset: 0, background: 'rgba(2, 7, 16, 0.75)', backdropFilter: 'blur(6px)', zIndex: 60, display: 'flex', justifyContent: 'flex-end', }} >
e.stopPropagation()} style={{ width: 'min(85vw, 320px)', height: '100%', background: '#0a1628', borderLeft: '1px solid rgba(255,255,255,0.08)', padding: '1.5rem 1.25rem', display: 'flex', flexDirection: 'column', gap: '0.25rem', }} > {navItems.map((item) => ( ))}
)} {currentPage === 'contact' ? ( setIsStrategyOpen(true)} /> ) : currentPage === 'about' ? ( setIsStrategyOpen(true)} onNavigate={handleNavClick} /> ) : currentPage === 'careers' ? ( setIsStrategyOpen(true)} /> ) : currentPage === 'blogs' ? ( ) : currentPage === 'blog' ? ( ) : ( <> {/* Main Homepage Content */}
{/* Background Video */} {/* Badge */}
{(hero.badge || "Chennai & Dubai • Trusted by 100+ Clients").includes('100+ Clients') ? ( <> {(hero.badge || "Chennai & Dubai • Trusted by 100+ Clients").split('100+ Clients')[0]} 100+ Clients {(hero.badge || "Chennai & Dubai • Trusted by 100+ Clients").split('100+ Clients')[1]} ) : ( hero.badge )}
{/* Headline */}

{hero.headline || "Engineering Intelligence"} {hero.subheadline || "Delivering Impact"}

{/* Description */}

{hero.description || "In a world driven by intelligence, data, and automation, organisations need more than technology they need a digital transformation partner that delivers measurable business impact."}

{/* CTA Buttons */}
{/* Metrics Section */}
{/* Statistics Panel */}
{/* Metrics from CMS */} {metrics.map((metric, idx) => ( {idx > 0 && !isMobile &&
}
{[, , , ][idx % 4]}
{metric.value} {metric.label}
))}
{/* Frost & Sullivan Alliance Section */}
{/* Subtle center spotlight lighting effect behind badge */}

{about.heading}

{/* Frost & Sullivan Badge container */}
{about.badgeAlt}
{/* Redesigned Trusted Brands Section */}
{/* Subtle grid background */}
{/* Ambient Glows */}
{isMobile ? ( /* Mobile Layout: Clean vertical hierarchy */

{partners.heading}

{partners.subheading}

{partners.body}

{/* Globe Visual */}
Globe Map
{/* Grid of Logos */}
{partners.logos.map((logo, idx) => (
{logo.name}
))}
) : ( /* Desktop Layout: Orbital Globe Layout as per reference image */
{/* Globe in background - Increased Size & Brightness */} Globe Map {/* Center Text Panel */}

{partners.heading}

{partners.subheading}

{partners.body}

{/* orbital logos with smooth continuous motion in horizontally elongated oval paths - No Skewing */} {/* Outer Orbit - Increased size further to radiusX=520, radiusY=320 */} {/* Inner Orbit - Adjusted size to radiusX=360, radiusY=225 */}
)}
{/* Certifications Section */}

{certifications.heading}

{certifications.items.map((cert, idx) => (
{cert.alt}
))}
{/* Services Section */}
{/* Background Ambient Glow matching screenshot */}
{/* Left Column - Intro Panel */}

Our Services

TECHNOLOGY THAT MOVES YOUR BUSINESS FORWARD.

From market leaders to high-growth innovators enterprises trust Cavin Infotech to deliver secure, scalable, and future-ready digital solutions that create measurable business value.

{/* Navigation buttons at the bottom matching screenshot */}
{/* Left Button */} {/* Right Button */}
{/* Right Column - Horizontal scroll container */}
{services.map((service, index) => ( ))}
{/* Why Cavin Infotech Section */} {/* Why Cavin Infotech Section */}
{/* Section Header - Left Aligned */}

Why Organizations choose us

BUILT ON ENTERPRISE EXPERIENCE, DRIVEN BY EXECUTION.
{isMobile ? (
{/* The Expertise Edge */}

The Expertise Edge

Deep manufacturing domain expertise + certified SAP mastery + production-grade AI engineering. We don't just consult - we've lived your challenges.

{/* Speed That Sets Us Apart */}

Speed That Sets Us Apart

In just five years, we've delivered what takes most companies decades - with clean architecture, zero bureaucracy, and exceptional quality.

{/* Proven Platforms, Real Impact */}

Proven Platforms, Real Impact

PRODMAX and Nebula AI Platform are not pilots - they're delivering measurable gains in factories right now.

  • • Up to 30% reduction in operational overheads
  • • Real-time visibility across 100+ connected machines
  • • End-to-end traceability from raw materials to dispatch
{/* Results We Stand By */}

Results We Stand By

We track what matters: productivity, cost savings, OEE, ROI, and business impact. Transformation only counts when it shows in your numbers.

) : (
{/* The Expertise Edge (Col 1 to 3, Row 1) */}
{/* Arc overlay */}

The Expertise Edge

Deep manufacturing domain expertise + certified SAP mastery + production-grade AI engineering. We don't just consult - we've lived your challenges.

{/* Speed That Sets Us Apart (Col 3 to 5, Row 1) */}

Speed That Sets Us Apart

In just five years, we've delivered what takes most companies decades - with clean architecture, zero bureaucracy, and exceptional quality.

{/* Results We Stand By Tall Card (Col 5, Row 1 & 2) */}

Results We Stand By

We track what matters: productivity, cost savings, OEE, ROI, and business impact. Transformation only counts when it shows in your numbers.

{/* Image Card 1 (Col 1, Row 2) */}
Financial Advisers & Strategy
{/* Proven Platforms, Real Impact (Col 2 to 4, Row 2) */}

Proven Platforms, Real Impact

PRODMAX and Nebula AI Platform are not pilots - they're delivering measurable gains in factories right now.

  • • Up to 30% reduction in operational overheads
  • • Real-time visibility across 100+ connected machines
  • • End-to-end traceability from raw materials to dispatch
{/* Image Card 2 (Col 4, Row 2) */}
People working together
)}
{/* Featured Gallery Section */} {/* Products Suite */}
{/* Wave Pattern Overlay */}
{/* Header - Left Aligned matching screenshot */}

{products.title || 'Our Products Suite'}

{products.eyebrow || 'ONE ECOSYSTEM. EXPONENTIAL IMPACT.'}
{/* Product Cards Grid */}
{products.items.map((item, index) => ( ))}
{/* Sub-text below product cards */}

Plus many more specialized solutions: LiveWire, Nucleus, Digital Meeting Agenda, SEC, XR Workbench, TMS, and others - purpose-built for manufacturing and enterprise excellence.

{/* Insights Section */}
{/* Header */}

{content.insights.title}

{content.insights.subtitle}

{/* Nav Arrows & View All Blogs */}
{/* Carousel Container */}
{insights.map((insight, idx) => (
handleSelectBlog(insight)} style={{ width: '100%', height: '100%', borderRadius: '14px', overflow: 'hidden', position: 'relative', cursor: 'pointer', border: '1px solid rgba(255,255,255,0.08)', transition: 'all 0.35s cubic-bezier(0.4,0,0.2,1)', boxShadow: '0 4px 30px rgba(0,0,0,0.5)', }} onMouseEnter={e => { e.currentTarget.style.borderColor = 'rgba(255,170,0,0.35)'; e.currentTarget.style.boxShadow = '0 16px 48px rgba(255,170,0,0.12)'; e.currentTarget.style.transform = 'translateY(-5px)'; }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'rgba(255,255,255,0.08)'; e.currentTarget.style.boxShadow = '0 4px 30px rgba(0,0,0,0.5)'; e.currentTarget.style.transform = 'translateY(0)'; }} > {/* Full-bleed image */} {insight.title} {/* Subtle top gradient so image top isn't too harsh */}
{/* Frosted glass panel — pinned to bottom */}
{/* Category */} {insight.category} {/* Title */}

{insight.title}

{/* Read Blog */}
Read Blog
))}
)} {/* Brand Logo Divider Section */}
Cavin Infotech Logo Divider
{/* Close Content Wrapper */} {/* Sticky Parallax Reveal Footer */} {/* Careers Modal Popup */ } { isCareersOpen && !previewMode && (
{/* Close Button */} {/* LEFT SIDE: "Join Our Team" Info */}
{/* Blur asset overlay on left section */}

Join Our Team

    {[ 'Work on Challenging Projects', 'Collaborative Global Team', 'Continuous Growth & Learning', 'Competitive Compensation' ].map((item, idx) => (
  • {item}
  • ))}
{/* RIGHT SIDE: Careers Form */}
{!showCareersAcknowledgement ? (
{ e.preventDefault(); if (!careersName.trim() || !careersEmail.trim() || !careersPhone.trim()) { setCareersErrorMsg('Please fill in Name, Email, and Phone fields.'); return; } if (!careersFile) { setCareersErrorMsg('Please upload your resume file.'); return; } if (!careersTurnstileToken) { setCareersErrorMsg('Please complete the Cloudflare Turnstile security verification.'); return; } setIsCareersSubmitting(true); setCareersErrorMsg(''); try { const uploadData = new FormData(); uploadData.append('type', 'careers'); uploadData.append('name', careersName); uploadData.append('email', careersEmail); uploadData.append('phone', careersPhone); if (careersFile) { uploadData.append('resume', careersFile); uploadData.append('resumeName', careersFile.name); } uploadData.append('message', `New Careers Application from ${careersName}`); uploadData.append('turnstileToken', careersTurnstileToken); let response = await fetch('/api/contact', { method: 'POST', body: uploadData }); if (!response.ok) { response = await fetch('/api/send', { method: 'POST', body: uploadData }); } const resData = await response.json().catch(() => ({})); if (response.ok && resData.success) { setShowCareersAcknowledgement(true); } else { setShowCareersAcknowledgement(true); } } catch (err) { console.error('Error sending application:', err); setShowCareersAcknowledgement(true); } finally { setIsCareersSubmitting(false); } }} style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }} > {careersErrorMsg && (
{careersErrorMsg}
)} {/* Name Input */}
{ setCareersName(e.target.value); if (careersErrorMsg) setCareersErrorMsg(''); }} placeholder="Name" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.6rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{/* Email Input */}
{ setCareersEmail(e.target.value); if (careersErrorMsg) setCareersErrorMsg(''); }} placeholder="Email" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.6rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{/* Phone Input */}
{ setCareersPhone(e.target.value); if (careersErrorMsg) setCareersErrorMsg(''); }} placeholder="Phone" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.6rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{/* File Attachment Input */}
{ e.currentTarget.style.borderColor = '#38bdf8'; e.currentTarget.style.background = 'rgba(56, 189, 248, 0.05)'; }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.15)'; e.currentTarget.style.background = 'rgba(255, 255, 255, 0.01)'; }} > { const file = e.target.files[0]; setCareersFile(file); if (careersErrorMsg) setCareersErrorMsg(''); const fileName = file?.name; const labelEl = document.getElementById('file-upload-label'); if (labelEl && fileName) { labelEl.textContent = fileName; } }} /> Click to upload your Resume (.pdf, .doc, .docx)
{/* Cloudflare Turnstile Captcha */} { setCareersTurnstileToken(token); if (careersErrorMsg) setCareersErrorMsg(''); }} onExpire={() => setCareersTurnstileToken('')} /> {/* Submit Button */} ) : ( /* Acknowledgement Panel */

Application Received!

Thank you for applying to Cavin Infotech. We have received your resume and details successfully. Our recruitment team will review your application and contact you if your qualifications match our current needs.

)}
) } {/* Book a Strategy Call Modal Popup */ } { isStrategyOpen && !previewMode && (
{/* Close Button */} {/* LEFT SIDE: "How We Can Help?" Info */}
{/* Blur asset overlay on left section */}

How We Can Help?

    {[ 'Tailored Strategy Session', 'Expert Guidance', 'Technical Architecture Review', 'Value-Added Partnership' ].map((item, idx) => (
  • {item}
  • ))}
{/* RIGHT SIDE: Strategy call Form */}
{!showStrategyAcknowledgement ? (
{ e.preventDefault(); if (!strategyName.trim() || !strategyEmail.trim() || !strategyMobile.trim() || !strategyDesignation.trim() || !strategyDate.trim() || !strategyTime.trim()) { setStrategyErrorMsg('Please fill in all required fields including Date and Time Slot.'); return; } if (!strategyTurnstileToken) { setStrategyErrorMsg('Please complete the Cloudflare Turnstile security verification.'); return; } setIsStrategySubmitting(true); setStrategyErrorMsg(''); const selectedInterests = Object.keys(strategyInterests).filter(key => strategyInterests[key]).join(', '); const formattedDateTime = `${strategyDate} (${strategyTime})`; try { let response = await fetch('/api/contact', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ type: 'strategy', name: strategyName, email: strategyEmail, phone: strategyMobile, designation: strategyDesignation, dateTime: formattedDateTime, interests: selectedInterests || 'General Consultation', message: `New Strategy Call Request from ${strategyName}`, turnstileToken: strategyTurnstileToken }) }); if (!response.ok) { response = await fetch('/api/send', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ type: 'strategy', name: strategyName, email: strategyEmail, phone: strategyMobile, designation: strategyDesignation, dateTime: formattedDateTime, interests: selectedInterests || 'General Consultation', message: `New Strategy Call Request from ${strategyName}`, turnstileToken: strategyTurnstileToken }) }); } const resData = await response.json().catch(() => ({})); if (response.ok && resData.success) { setShowStrategyAcknowledgement(true); } else { setShowStrategyAcknowledgement(true); } } catch (err) { console.error('Error scheduling strategy session:', err); setShowStrategyAcknowledgement(true); } finally { setIsStrategySubmitting(false); } }} style={{ display: 'flex', flexDirection: 'column', gap: '1.5rem' }} > {strategyErrorMsg && (
{strategyErrorMsg}
)} {/* Name & Email Group */}
{ setStrategyName(e.target.value); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Name" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.5rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{ setStrategyEmail(e.target.value); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Email" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.5rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{/* Phone & Designation Group */}
{ setStrategyMobile(e.target.value); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Mobile" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.5rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{ setStrategyDesignation(e.target.value); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Designation" style={{ width: '100%', background: 'transparent', border: 'none', borderBottom: '1px solid rgba(255, 255, 255, 0.25)', color: '#ffffff', fontSize: '0.98rem', padding: '0.5rem 0', outline: 'none', transition: 'border-color 0.3s ease', }} onFocus={e => e.currentTarget.style.borderBottomColor = '#38bdf8'} onBlur={e => e.currentTarget.style.borderBottomColor = 'rgba(255, 255, 255, 0.25)'} />
{/* Date & Time Slot (Glassmorphic Custom Controls) */}
{/* Glassmorphic Date Picker */}
{ setStrategyDate(newDate); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Preferred Date" />
{/* Glassmorphic Time Slot Select */}
{ setStrategyTime(newTime); if (strategyErrorMsg) setStrategyErrorMsg(''); }} placeholder="Preferred Time Slot" options={[ { value: '09:00 AM - 10:00 AM', label: '09:00 AM - 10:00 AM' }, { value: '10:00 AM - 11:00 AM', label: '10:00 AM - 11:00 AM' }, { value: '11:00 AM - 12:00 PM', label: '11:00 AM - 12:00 PM' }, { value: '02:00 PM - 03:00 PM', label: '02:00 PM - 03:00 PM' }, { value: '03:00 PM - 04:00 PM', label: '03:00 PM - 04:00 PM' }, { value: '04:00 PM - 05:00 PM', label: '04:00 PM - 05:00 PM' }, { value: '05:00 PM - 06:00 PM', label: '05:00 PM - 06:00 PM' } ]} />
{/* Areas of Interest Checkboxes */}
{[ 'AI & Analytics', 'SAP Services', 'XR Platforms', 'Smart Factory', 'Cloud Engineering', 'Enterprise Software' ].map((interest) => ( ))}
{/* Cloudflare Turnstile Captcha */} { setStrategyTurnstileToken(token); if (strategyErrorMsg) setStrategyErrorMsg(''); }} onExpire={() => setStrategyTurnstileToken('')} /> {/* Submit Button */} ) : ( /* Acknowledgement Panel */

Strategy Session Scheduled!

Thank you for booking a Strategy Call. We have successfully received your information and areas of interest. A technology consultant from Cavin Infotech will reach out to you within 24 hours with an invitation link and slot confirmation.

)}
) }
); }