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'; // 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(() => { const hash = typeof window !== 'undefined' ? window.location.hash : ''; if (hash === '#contact' || hash === '#contactus') return 'contact'; if (hash === '#about' || hash === '#aboutus') return 'about'; return 'home'; }); useEffect(() => { const syncPageFromHash = () => { const hash = window.location.hash; if (hash === '#contact' || hash === '#contactus') { setCurrentPage('contact'); setActiveSection('contactus'); window.scrollTo({ top: 0, behavior: 'smooth' }); } else if (hash === '#about' || hash === '#aboutus') { setCurrentPage('about'); setActiveSection('aboutus'); window.scrollTo({ top: 0, behavior: 'smooth' }); } else if (hash === '#home' || hash === '') { setCurrentPage('home'); } }; window.addEventListener('hashchange', syncPageFromHash); return () => window.removeEventListener('hashchange', syncPageFromHash); }, []); 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); // Strategy Form Fields const [strategyName, setStrategyName] = useState(''); const [strategyEmail, setStrategyEmail] = useState(''); const [strategyMobile, setStrategyMobile] = useState(''); const [strategyDesignation, setStrategyDesignation] = useState(''); const [strategyDateTime, setStrategyDateTime] = useState(''); const [strategyInterests, setStrategyInterests] = useState({ 'AI & Analytics': false, 'SAP Services': false, 'XR Platforms': false, 'Smart Factory': false, 'Cloud Engineering': false, 'Enterprise Software': 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 || currentPage === 'contact') return; const handleScroll = () => { const sections = ['home', 'aboutus', 'services', 'whyus', 'products', 'insights', 'contactus']; const scrollPosition = window.scrollY + 120; // 120px offset for header height and visual center // Special case: if at the very bottom of the page, contactus is active if (window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 50) { 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]); const getActiveNavItem = () => { 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': case 'insights': return 'Products'; 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', 'Careers', 'Contact Us']; const NAV_OFFSET = isMobile ? 72 : 88; const scrollToSection = (sectionId) => { if (sectionId === 'contactus') { const footer = document.getElementById('contactus'); if (footer) { const top = footer.getBoundingClientRect().top + window.scrollY - NAV_OFFSET; window.scrollTo({ top: Math.max(0, top), behavior: 'smooth' }); } else { window.scrollTo({ top: document.documentElement.scrollHeight, behavior: 'smooth' }); } setActiveSection('contactus'); return; } const el = document.getElementById(sectionId); if (!el) return; const top = el.getBoundingClientRect().top + window.scrollY - NAV_OFFSET; window.scrollTo({ top: Math.max(0, top), behavior: 'smooth' }); setActiveSection(sectionId); }; const handleNavClick = (item) => { setMobileMenuOpen(false); if (item === 'Careers') { setIsCareersOpen(true); return; } if (item === 'Contact Us') { setCurrentPage('contact'); setActiveSection('contactus'); window.location.hash = 'contact'; window.scrollTo({ top: 0, behavior: 'smooth' }); return; } if (item === 'About Us') { setCurrentPage('about'); setActiveSection('aboutus'); window.location.hash = 'aboutus'; window.scrollTo({ top: 0, behavior: 'smooth' }); return; } const sectionMap = { Home: 'home', 'About Us': 'aboutus', Products: 'products', }; const id = sectionMap[item]; if (currentPage !== 'home') { setCurrentPage('home'); setActiveSection(id || 'home'); window.location.hash = id || 'home'; setTimeout(() => { if (id && id !== 'home') { scrollToSection(id); } else { window.scrollTo({ top: 0, behavior: 'smooth' }); } }, 100); return; } if (!id) return; window.location.hash = id; setTimeout(() => scrollToSection(id), isMobile ? 150 : 0); }; 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} /> ) : ( <> {/* 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.

{/* Bottom CTA Button */}
{/* Insights Section */}
{/* Header */}

{content.insights.title}

{content.insights.subtitle}

{/* Nav Arrows */}
{/* Carousel Container */}
{insights.map((insight, idx) => (
{ 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 */} {!showCareersAcknowledgement ? (
{ e.preventDefault(); try { const serviceId = import.meta.env.VITE_EMAILJS_SERVICE_ID || 'vishva_cavintest'; const publicKey = import.meta.env.VITE_EMAILJS_PUBLIC_KEY || 'YOUR_EMAILJS_PUBLIC_KEY'; const templateId = import.meta.env.VITE_EMAILJS_TEMPLATE_ID_CAREERS || 'YOUR_EMAILJS_TEMPLATE_ID_CAREERS'; if (publicKey === 'YOUR_EMAILJS_PUBLIC_KEY' || templateId === 'YOUR_EMAILJS_TEMPLATE_ID_CAREERS') { console.warn('EmailJS Credentials not configured in .env. Please configure VITE_EMAILJS_PUBLIC_KEY and VITE_EMAILJS_TEMPLATE_ID_CAREERS'); alert('EmailJS credentials are not configured in your .env file.'); return; } const res = await fetch('https://api.emailjs.com/api/v1.0/email/send', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ service_id: serviceId, template_id: templateId, user_id: publicKey, template_params: { type: 'careers', name: careersName, email: careersEmail, phone: careersPhone, mobile: '', designation: 'N/A', dateTime: 'N/A', interests: 'N/A', resumeName: careersFile ? careersFile.name : 'None', from_name: careersName, reply_to: careersEmail, message: `New Careers Application:\nName: ${careersName}\nEmail: ${careersEmail}\nPhone: ${careersPhone}\nResume File: ${careersFile ? careersFile.name : 'None'}` } }) }); if (!res.ok) { const errMsg = await res.text(); console.error('EmailJS Error:', errMsg); alert(`Failed to send email: ${errMsg}`); return; } setShowCareersAcknowledgement(true); } catch (err) { console.error('Error sending application:', err); alert(`Error sending application: ${err.message}`); } }}>

Join Our Team

Submit your details and resume below. Our recruitment team will review your application.

{/* Name Input */}
setCareersName(e.target.value)} placeholder="John Doe" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.75rem 1rem', color: '#ffffff', fontSize: '0.9rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Email Input */}
setCareersEmail(e.target.value)} placeholder="john@example.com" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.75rem 1rem', color: '#ffffff', fontSize: '0.9rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Phone Input */}
setCareersPhone(e.target.value)} placeholder="+91 00000 00000" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.75rem 1rem', color: '#ffffff', fontSize: '0.9rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* File Attachment Input */}
{ e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.background = 'rgba(255, 170, 0, 0.05)'; }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'rgba(255, 170, 0, 0.3)'; e.currentTarget.style.background = 'rgba(255, 170, 0, 0.02)'; }} > { const file = e.target.files[0]; setCareersFile(file); 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)
{/* 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 */} {!showStrategyAcknowledgement ? (
{ e.preventDefault(); const selectedInterests = Object.keys(strategyInterests).filter(key => strategyInterests[key]).join(', '); try { const serviceId = import.meta.env.VITE_EMAILJS_SERVICE_ID || 'vishva_cavintest'; const publicKey = import.meta.env.VITE_EMAILJS_PUBLIC_KEY || 'YOUR_EMAILJS_PUBLIC_KEY'; const templateId = import.meta.env.VITE_EMAILJS_TEMPLATE_ID_STRATEGY || 'YOUR_EMAILJS_TEMPLATE_ID_STRATEGY'; if (publicKey === 'YOUR_EMAILJS_PUBLIC_KEY' || templateId === 'YOUR_EMAILJS_TEMPLATE_ID_STRATEGY') { console.warn('EmailJS Credentials not configured in .env. Please configure VITE_EMAILJS_PUBLIC_KEY and VITE_EMAILJS_TEMPLATE_ID_STRATEGY'); alert('EmailJS credentials are not configured in your .env file.'); return; } const res = await fetch('https://api.emailjs.com/api/v1.0/email/send', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ service_id: serviceId, template_id: templateId, user_id: publicKey, template_params: { type: 'strategy', name: strategyName, email: strategyEmail, phone: strategyMobile, mobile: strategyMobile, designation: strategyDesignation, dateTime: strategyDateTime, interests: selectedInterests || 'None', resumeName: 'None', from_name: strategyName, reply_to: strategyEmail, message: `New Strategy Session Booking:\nName: ${strategyName}\nEmail: ${strategyEmail}\nMobile: ${strategyMobile}\nDesignation: ${strategyDesignation}\nPreferred Date & Time: ${strategyDateTime}\nAreas of Interest: ${selectedInterests || 'None'}` } }) }); if (!res.ok) { const errMsg = await res.text(); console.error('EmailJS Error:', errMsg); alert(`Failed to send email: ${errMsg}`); return; } setShowStrategyAcknowledgement(true); } catch (err) { console.error('Error scheduling strategy session:', err); alert(`Error scheduling strategy session: ${err.message}`); } }}>

Book a Strategy Call

Fill in the details below to schedule a session with our experts.

{/* Name Input */}
setStrategyName(e.target.value)} placeholder="John Doe" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.7rem 0.9rem', color: '#ffffff', fontSize: '0.88rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Email Input */}
setStrategyEmail(e.target.value)} placeholder="john@example.com" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.7rem 0.9rem', color: '#ffffff', fontSize: '0.88rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Mobile Input */}
setStrategyMobile(e.target.value)} placeholder="+91 00000 00000" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.7rem 0.9rem', color: '#ffffff', fontSize: '0.88rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Designation Input */}
setStrategyDesignation(e.target.value)} placeholder="e.g. Chief Technology Officer" style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.7rem 0.9rem', color: '#ffffff', fontSize: '0.88rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Preferred Date & Time Input */}
setStrategyDateTime(e.target.value)} style={{ background: 'rgba(255, 255, 255, 0.03)', border: '1px solid rgba(255, 255, 255, 0.08)', borderRadius: '8px', padding: '0.7rem 0.9rem', color: '#ffffff', fontSize: '0.88rem', outline: 'none', transition: 'all 0.3s ease', }} onFocus={e => { e.currentTarget.style.borderColor = '#ffaa00'; e.currentTarget.style.boxShadow = '0 0 10px rgba(255, 170, 0, 0.15)'; }} onBlur={e => { e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.08)'; e.currentTarget.style.boxShadow = 'none'; }} />
{/* Areas of Interest Checkboxes */}
{[ 'AI & Analytics', 'SAP Services', 'XR Platforms', 'Smart Factory', 'Cloud Engineering', 'Enterprise Software' ].map((interest) => ( ))}
{/* 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.

)}
)}
); }