/* Force page to full-bleed */ body.page-id-10961 { margin: 0 !important; padding: 0 !important; overflow-x: hidden !important; background: #f8fafc !important; } body.page-id-10961 #lqd-site-content, body.page-id-10961 .lqd-page-content, body.page-id-10961 .elementor, body.page-id-10961 .elementor-inner, body.page-id-10961 .elementor-section-wrap, body.page-id-10961 .elementor-top-section, body.page-id-10961 .e-con, body.page-id-10961 .e-con-inner, body.page-id-10961 article, body.page-id-10961 .entry-content, body.page-id-10961 .post-content, body.page-id-10961 main, body.page-id-10961 .elementor-element { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
AI-powered pre-interviews that screen candidates 10x faster. Whether you’re an agency scaling placements or an in-house team racing to hire — we’ve got the numbers.
Cost to hire. Time to hire. Interview hours.
Book a personalized demo and see exactly how IntervueBox transforms your hiring ROI — with zero risk.
// ============ STATE ============ let mode = 'inhouse'; const state = { ih: { hires:10, salary:12, candidates:25, rounds:4, time:45, cost:1500 }, ag: { recruiters:10, placements:3, salary:12, cost:50, candidates:20, screentime:30 } };
// ============ FORMATTERS ============ function fmtINR(n) { if (n >= 10000000) return '₹' + (n/10000000).toFixed(2) + ' Cr'; if (n >= 100000) return '₹' + Math.round(n/100000) + 'L'; if (n >= 1000) return '₹' + Math.round(n/1000) + 'K'; return '₹' + Math.round(n); } function fmtCompact(n) { if (n >= 10000000) return '₹' + (n/10000000).toFixed(1) + 'Cr'; if (n >= 100000) return '₹' + (n/100000).toFixed(1) + 'L'; if (n >= 1000) return '₹' + (n/1000).toFixed(0) + 'K'; return '₹' + Math.round(n); }
// ============ CALCULATIONS (Realistic Funnel Model) ============ // Methodology: Traditional hiring uses a progressive funnel where not all candidates // advance through all rounds. AI pre-interviews replace the screening round entirely. // This model is conservative — actual savings depend on your specific process. function calcInHouse() { const s = state.ih; const annualHires = s.hires * 12; const timeHrs = s.time / 60; const ivbPlatformPerHire = 1200;
// Traditional: 100%→50%→25%→12.5% per round let tradTotalHrs = 0; for (let r = 0; r < s.rounds; r++) { tradTotalHrs += annualHires * s.candidates * Math.pow(0.5, r) * timeHrs; } // IVB: AI replaces round 1 (2 min review each) + fewer remaining rounds const aiReviewHrs = annualHires * s.candidates * (2 / 60); const remainingRounds = Math.max(1, s.rounds - 1); let ivbHumanHrs = 0; for (let r = 0; r < remainingRounds; r++) { ivbHumanHrs += annualHires * s.candidates * Math.pow(0.5, r) * 0.35 * timeHrs; } const ivbTotalHrs = aiReviewHrs + ivbHumanHrs; const tradCost = tradTotalHrs * s.cost; const ivbLaborCost = ivbHumanHrs * s.cost; const ivbPlatformCost = annualHires * ivbPlatformPerHire; const ivbTotalCost = ivbLaborCost + ivbPlatformCost; const savings = tradCost - ivbTotalCost; const hrsSaved = tradTotalHrs - ivbTotalHrs; const tthPct = 50; const cphTraditional = tradCost / annualHires; const cphIVB = ivbTotalCost / annualHires; const cphReduction = ((cphTraditional - cphIVB) / cphTraditional) * 100; const savingsPerHire = savings / annualHires; const hrsPerHire = hrsSaved / annualHires; return { tradCost, ivbTotalCost, savings, hrsSaved, tradTotalHrs, ivbTotalHrs, tthPct, cphReduction, savingsPerHire, hrsPerHire, effectiveRounds: remainingRounds, humansSeen: Math.round(s.candidates * 0.35) }; } function calcAgency() { const s = state.ag; const totalRecruiters = s.recruiters; const monthlyPlacements = totalRecruiters * s.placements; const annualPlacements = monthlyPlacements * 12; // Fee = 1 month salary (salary is in lakhs) const feePerPlacement = (s.salary * 100000) / 12; // Current const monthlyRevenue = monthlyPlacements * feePerPlacement; const annualRevenue = monthlyRevenue * 12; const monthlyCost = totalRecruiters * (s.cost * 1000); const annualCost = monthlyCost * 12; const netRevenue = annualRevenue - annualCost; const hrsPerCandidateCurr = s.screentime / 60; const totalScreenHrsCurr = annualPlacements * s.candidates * hrsPerCandidateCurr; // With IVB: screen 3x more candidates → ~22% more placements (conservative) const placementIncrease = 0.22; const newMonthlyPlacements = monthlyPlacements * (1 + placementIncrease); const newAnnualPlacements = newMonthlyPlacements * 12; const newAnnualRevenue = newAnnualPlacements * feePerPlacement; // Placements per recruiter per month const placementsPerRecruiterCurr = s.placements; const placementsPerRecruiterNew = s.placements * (1 + placementIncrease); const placementsPerRecruiterIncrease = placementsPerRecruiterNew - placementsPerRecruiterCurr; // Time savings: AI pre-screen → humans review 20% of candidates (3 min each vs full screen) const newScreenHrs = annualPlacements * Math.ceil(s.candidates * 0.2) * (3 / 60); const hrsSaved = totalScreenHrsCurr - newScreenHrs; const newAnnualCost = annualCost; const newNetRevenue = newAnnualRevenue - newAnnualCost; const revenueGrowth = newNetRevenue - netRevenue; const extraPlacements = Math.round(newAnnualPlacements - annualPlacements); const efficiencyRatio = ((s.candidates * 3) / s.candidates).toFixed(1); const revPerPlacement = feePerPlacement.toFixed(0); return { annualRevenue: netRevenue, newAnnualRevenue: newNetRevenue, revenueGrowth, placementsPerRecruiterCurr, placementsPerRecruiterNew, placementsPerRecruiterIncrease, extraPlacements, efficiencyRatio, hrsSaved, annualCost, newAnnualCost, totalRecruiters, annualPlacements, newAnnualPlacements, revPerPlacement }; } // ============ UPDATE DISPLAY ============ function updateResults() { if (mode === 'inhouse') { const r = calcInHouse(); animateValue('r-ih-savings', fmtINR(r.savings)); animateValueNumeric('r-ih-hours', r.hrsSaved, v => Math.round(v).toLocaleString('en-IN')); animateValue('r-ih-tth', Math.round(r.tthPct) + '%'); animateValue('r-ih-cph', '↓' + Math.round(r.cphReduction) + '%'); document.getElementById('m-ih-sph').textContent = fmtINR(r.savingsPerHire); document.getElementById('m-ih-hph').textContent = r.hrsPerHire.toFixed(1) + ' hrs'; document.getElementById('m-ih-rounds').textContent = r.effectiveRounds + '→1'; document.getElementById('m-ih-screen').textContent = state.ih.candidates + '→' + r.humansSeen;
const maxCost = Math.max(r.tradCost, r.ivbTotalCost, 1); const ivbPct = maxCost > 0 ? Math.round(r.ivbTotalCost / maxCost * 100) : 0; const savingsPct = r.tradCost > 0 ? Math.round((r.tradCost - r.ivbTotalCost) / r.tradCost * 100) : 0; animateBar(document.getElementById('bar-ih-old'), (r.tradCost / maxCost * 100)); animateBar(document.getElementById('bar-ih-new'), ivbPct); document.getElementById('txt-ih-old').textContent = fmtCompact(r.tradCost); document.getElementById('txt-ih-new').textContent = fmtCompact(r.ivbTotalCost); document.getElementById('pct-ih-new').textContent = ivbPct + '%'; document.getElementById('badge-ih-val').textContent = savingsPct + '%';
document.getElementById('cta-amount').textContent = fmtINR(r.savings); } else { const r = calcAgency(); animateValue('r-ag-revenue', fmtINR(r.revenueGrowth)); const pprmText = r.placementsPerRecruiterCurr + '→' + Math.round(r.placementsPerRecruiterNew); animateValue('r-ag-rpr', pprmText); document.getElementById('r-ag-rpr-sub').textContent = '+' + Math.round(r.placementsPerRecruiterIncrease) + ' / recruiter / month'; animateValueNumeric('r-ag-extra', r.extraPlacements, v => Math.round(v).toLocaleString('en-IN')); animateValue('r-ag-efficiency', r.efficiencyRatio + 'x'); // Auto-calc fee = 1 month salary const autoFee = (state.ag.salary * 100000) / 12; document.getElementById('v-ag-fee').textContent = fmtINR(autoFee); document.getElementById('m-ag-revpm').textContent = '↑' + fmtINR(Number(r.revPerPlacement)); document.getElementById('m-ag-hrs').textContent = Math.round(r.hrsSaved).toLocaleString('en-IN') + ' hrs'; document.getElementById('m-ag-cap').textContent = Math.round(state.ag.candidates / 4) + '→' + Math.round(state.ag.candidates * 3 / 4); const roiAgency = (r.revenueGrowth / (state.ag.recruiters * 800 * 12)); document.getElementById('m-ag-roi').textContent = roiAgency.toFixed(1) + 'x';
const maxRev = Math.max(r.annualRevenue, r.newAnnualRevenue, 1); const newPct = maxRev > 0 ? Math.round(r.newAnnualRevenue / maxRev * 100) : 0; const growthPct = r.annualRevenue > 0 ? Math.round((r.newAnnualRevenue - r.annualRevenue) / r.annualRevenue * 100) : 0; animateBar(document.getElementById('bar-ag-old'), (r.annualRevenue / maxRev * 100)); animateBar(document.getElementById('bar-ag-new'), newPct); document.getElementById('txt-ag-old').textContent = fmtCompact(r.annualRevenue); document.getElementById('txt-ag-new').textContent = fmtCompact(r.newAnnualRevenue); document.getElementById('pct-ag-new').textContent = newPct + '%'; document.getElementById('badge-ag-val').textContent = '+' + growthPct + '%';
document.getElementById('cta-amount').textContent = fmtINR(r.revenueGrowth); } }
// Animate numeric values with spring physics const _springAnimations = {}; function animateValueNumeric(id, target, fmt) { const el = document.getElementById(id); if (!el) return; if (_springAnimations[id]) _springAnimations[id].stop(); const currentVal = parseFloat(el.textContent.replace(/[^0-9.]/g, '')) || 0; if (Math.abs(currentVal - target) < 0.5) { el.textContent = fmt(target); el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); return; } _springAnimations[id] = springTo({ from: currentVal, to: target, stiffness: 120, damping: 14, mass: 0.8, onUpdate(v, done) { el.textContent = fmt(v); if (done) { el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); delete _springAnimations[id]; } } }); } // Spring-based bar height transitions function animateBar(barEl, targetPct) { if (!barEl) return; const key = barEl.id; if (_springAnimations[key]) _springAnimations[key].stop(); const currentPct = parseFloat(barEl.style.height) || 0; _springAnimations[key] = springTo({ from: currentPct, to: targetPct, stiffness: 100, damping: 16, mass: 1, onUpdate(v) { barEl.style.height = v + '%'; } }); } function animateValue(id, val) { const el = document.getElementById(id); if (!el) return; el.textContent = val; el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); } // ============ SLIDER SETUP ============ function wireSlider(sliderId, statePath, fmtFn) { const slider = document.getElementById(sliderId); if (!slider) return; const valEl = document.getElementById('v-' + sliderId); slider.addEventListener('input', () => { const v = parseFloat(slider.value); const [modeKey, key] = statePath.split('.'); state[modeKey][key] = v; if (valEl) valEl.textContent = fmtFn(v); updatePresets(sliderId, v); updateResults(); }); }
function wirePresets() { document.querySelectorAll('.presets').forEach(container => { container.addEventListener('click', e => { const btn = e.target.closest('button'); if (!btn) return; const v = parseFloat(btn.dataset.v); const sliderId = container.dataset.for; const slider = document.getElementById(sliderId); if (!slider) return; slider.value = v; slider.dispatchEvent(new Event('input')); }); }); }
function updatePresets(sliderId, val) { const container = document.querySelector(`.presets[data-for="${sliderId}"]`); if (!container) return; container.querySelectorAll('button').forEach(b => { b.classList.toggle('active', parseFloat(b.dataset.v) === val); }); }
// Wire all sliders wireSlider('ih-hires', 'ih.hires', v => v); wireSlider('ih-salary', 'ih.salary', v => '₹' + v + 'L'); wireSlider('ih-candidates', 'ih.candidates', v => v); wireSlider('ih-rounds', 'ih.rounds', v => v); wireSlider('ih-time', 'ih.time', v => v); wireSlider('ih-cost', 'ih.cost', v => '₹' + v.toLocaleString('en-IN')); wireSlider('ag-recruiters', 'ag.recruiters', v => v); wireSlider('ag-placements', 'ag.placements', v => v); wireSlider('ag-salary', 'ag.salary', v => '₹' + v + 'L'); wireSlider('ag-cost', 'ag.cost', v => '₹' + v + 'K'); wireSlider('ag-candidates', 'ag.candidates', v => v); wireSlider('ag-screentime', 'ag.screentime', v => v); wirePresets();
// ============ MODE TOGGLE ============ const toggleBtns = document.querySelectorAll('.toggle-btn'); const toggleWrap = document.getElementById('toggleWrap'); const toggleSub = document.getElementById('toggleSub');
function switchMode(newMode) { mode = newMode; toggleBtns.forEach(b => b.classList.toggle('active', b.dataset.mode === mode)); toggleWrap.classList.toggle('agency', mode === 'agency');
const ihInputs = document.getElementById('inputs-inhouse'); const agInputs = document.getElementById('inputs-agency'); const ihResults = document.getElementById('results-inhouse'); const agResults = document.getElementById('results-agency'); const resultsTitle = document.getElementById('results-title');
if (mode === 'inhouse') { ihInputs.classList.remove('hidden'); agInputs.classList.add('hidden'); ihResults.classList.remove('hidden'); agResults.classList.add('hidden'); resultsTitle.textContent = 'Your Savings with IntervueBox'; toggleSub.textContent = 'Cost to hire. Time to hire. Interview hours.'; document.getElementById('cta-verb').textContent = 'save'; } else { ihInputs.classList.add('hidden'); agInputs.classList.remove('hidden'); ihResults.classList.add('hidden'); agResults.classList.remove('hidden'); resultsTitle.textContent = 'Your Revenue Growth with IntervueBox'; toggleSub.textContent = 'Revenue per recruiter. Extra placements. Efficiency gains.'; document.getElementById('cta-verb').textContent = 'grow'; }
// Animate results cards const visibleResults = mode === 'inhouse' ? ihResults : agResults; const cards = visibleResults.querySelectorAll('.result-card, .metric-item'); cards.forEach((card, i) => { card.style.opacity = '0'; card.style.transform = 'translateY(12px)'; setTimeout(() => { card.style.transition = 'all 0.5s cubic-bezier(0.16, 1, 0.3, 1)'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, i * 40); });
updateResults(); }
toggleBtns.forEach(btn => { btn.addEventListener('click', () => { if (btn.dataset.mode !== mode) switchMode(btn.dataset.mode); }); });
// ============ MOTION: PAGE LOAD ANIMATIONS ============ document.addEventListener('DOMContentLoaded', () => { // Hero elements const heroEls = document.querySelectorAll('.hero-badge, .hero h1, .hero p'); heroEls.forEach((el, i) => { el.style.opacity = '0'; el.style.transform = 'translateY(20px)'; setTimeout(() => { el.style.transition = 'all 0.7s cubic-bezier(0.16, 1, 0.3, 1)'; el.style.opacity = '1'; el.style.transform = 'translateY(0)'; }, i * 120); });
// Cards stagger in const cards = document.querySelectorAll('.card, .cta'); cards.forEach((card, i) => { card.style.opacity = '0'; card.style.transform = 'translateY(30px)'; setTimeout(() => { card.style.transition = 'all 0.7s cubic-bezier(0.16, 1, 0.3, 1)'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 300 + i * 120); });
// Toggle section const toggleSec = document.querySelector('.toggle-section'); const toggleSubEl = document.getElementById('toggleSub'); if (toggleSec) { toggleSec.style.opacity = '0'; toggleSec.style.transform = 'translateY(15px)'; setTimeout(() => { toggleSec.style.transition = 'all 0.6s cubic-bezier(0.16, 1, 0.3, 1)'; toggleSec.style.opacity = '1'; toggleSec.style.transform = 'translateY(0)'; }, 500); } if (toggleSubEl) { toggleSubEl.style.opacity = '0'; setTimeout(() => { toggleSubEl.style.transition = 'opacity 0.5s'; toggleSubEl.style.opacity = '1'; }, 600); }
// Initial calculation updateResults(); });
// ============ MOTION: SCROLL ANIMATIONS (only hidden sections) ============ const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; observer.unobserve(entry.target); } }); }, { threshold: 0.15, rootMargin: '0px 0px -20px 0px' });
// Only observe the hidden mode's cards (avoid flickering with already-visible cards) document.querySelectorAll('#results-agency .result-card, #results-agency .metric-item, #results-agency .bar-col').forEach(el => { el.style.transition = 'all 0.6s cubic-bezier(0.16, 1, 0.3, 1)'; observer.observe(el); });
// Expose for potential WordPress usage window.IntervueBoxROI = { switchMode, updateResults, mode, state };
// ============ STATE ============ let mode = 'inhouse'; const state = { ih: { hires:10, salary:12, candidates:25, rounds:4, time:45, cost:1500 }, ag: { recruiters:10, placements:3, salary:12, cost:50, candidates:20, screentime:30 } };
// ============ FORMATTERS ============ function fmtINR(n) { if (n >= 10000000) return '₹' + (n/10000000).toFixed(2) + ' Cr'; if (n >= 100000) return '₹' + Math.round(n/100000) + 'L'; if (n >= 1000) return '₹' + Math.round(n/1000) + 'K'; return '₹' + Math.round(n); } function fmtCompact(n) { if (n >= 10000000) return '₹' + (n/10000000).toFixed(1) + 'Cr'; if (n >= 100000) return '₹' + (n/100000).toFixed(1) + 'L'; if (n >= 1000) return '₹' + (n/1000).toFixed(0) + 'K'; return '₹' + Math.round(n); }
// ============ CALCULATIONS (Realistic Funnel Model) ============ // Methodology: Traditional hiring uses a progressive funnel where not all candidates // advance through all rounds. AI pre-interviews replace the screening round entirely. // This model is conservative — actual savings depend on your specific process. function calcInHouse() { const s = state.ih; const annualHires = s.hires * 12; const timeHrs = s.time / 60; const ivbPlatformPerHire = 1200;
// Traditional: 100%→50%→25%→12.5% per round let tradTotalHrs = 0; for (let r = 0; r < s.rounds; r++) { tradTotalHrs += annualHires * s.candidates * Math.pow(0.5, r) * timeHrs; } // IVB: AI replaces round 1 (2 min review each) + fewer remaining rounds const aiReviewHrs = annualHires * s.candidates * (2 / 60); const remainingRounds = Math.max(1, s.rounds - 1); let ivbHumanHrs = 0; for (let r = 0; r < remainingRounds; r++) { ivbHumanHrs += annualHires * s.candidates * Math.pow(0.5, r) * 0.35 * timeHrs; } const ivbTotalHrs = aiReviewHrs + ivbHumanHrs; const tradCost = tradTotalHrs * s.cost; const ivbLaborCost = ivbHumanHrs * s.cost; const ivbPlatformCost = annualHires * ivbPlatformPerHire; const ivbTotalCost = ivbLaborCost + ivbPlatformCost; const savings = tradCost - ivbTotalCost; const hrsSaved = tradTotalHrs - ivbTotalHrs; const tthPct = 50; const cphTraditional = tradCost / annualHires; const cphIVB = ivbTotalCost / annualHires; const cphReduction = ((cphTraditional - cphIVB) / cphTraditional) * 100; const savingsPerHire = savings / annualHires; const hrsPerHire = hrsSaved / annualHires; return { tradCost, ivbTotalCost, savings, hrsSaved, tradTotalHrs, ivbTotalHrs, tthPct, cphReduction, savingsPerHire, hrsPerHire, effectiveRounds: remainingRounds, humansSeen: Math.round(s.candidates * 0.35) }; } function calcAgency() { const s = state.ag; const totalRecruiters = s.recruiters; const monthlyPlacements = totalRecruiters * s.placements; const annualPlacements = monthlyPlacements * 12; // Fee = 1 month salary (salary is in lakhs) const feePerPlacement = (s.salary * 100000) / 12; // Current const monthlyRevenue = monthlyPlacements * feePerPlacement; const annualRevenue = monthlyRevenue * 12; const monthlyCost = totalRecruiters * (s.cost * 1000); const annualCost = monthlyCost * 12; const netRevenue = annualRevenue - annualCost; const hrsPerCandidateCurr = s.screentime / 60; const totalScreenHrsCurr = annualPlacements * s.candidates * hrsPerCandidateCurr; // With IVB: screen 3x more candidates → ~22% more placements (conservative) const placementIncrease = 0.22; const newMonthlyPlacements = monthlyPlacements * (1 + placementIncrease); const newAnnualPlacements = newMonthlyPlacements * 12; const newAnnualRevenue = newAnnualPlacements * feePerPlacement; // Placements per recruiter per month const placementsPerRecruiterCurr = s.placements; const placementsPerRecruiterNew = s.placements * (1 + placementIncrease); const placementsPerRecruiterIncrease = placementsPerRecruiterNew - placementsPerRecruiterCurr; // Time savings: AI pre-screen → humans review 20% of candidates (3 min each vs full screen) const newScreenHrs = annualPlacements * Math.ceil(s.candidates * 0.2) * (3 / 60); const hrsSaved = totalScreenHrsCurr - newScreenHrs; const newAnnualCost = annualCost; const newNetRevenue = newAnnualRevenue - newAnnualCost; const revenueGrowth = newNetRevenue - netRevenue; const extraPlacements = Math.round(newAnnualPlacements - annualPlacements); const efficiencyRatio = ((s.candidates * 3) / s.candidates).toFixed(1); const revPerPlacement = feePerPlacement.toFixed(0); return { annualRevenue: netRevenue, newAnnualRevenue: newNetRevenue, revenueGrowth, placementsPerRecruiterCurr, placementsPerRecruiterNew, placementsPerRecruiterIncrease, extraPlacements, efficiencyRatio, hrsSaved, annualCost, newAnnualCost, totalRecruiters, annualPlacements, newAnnualPlacements, revPerPlacement }; } // ============ UPDATE DISPLAY ============ function updateResults() { if (mode === 'inhouse') { const r = calcInHouse(); animateValue('r-ih-savings', fmtINR(r.savings)); animateValueNumeric('r-ih-hours', r.hrsSaved, v => Math.round(v).toLocaleString('en-IN')); animateValue('r-ih-tth', Math.round(r.tthPct) + '%'); animateValue('r-ih-cph', '↓' + Math.round(r.cphReduction) + '%'); document.getElementById('m-ih-sph').textContent = fmtINR(r.savingsPerHire); document.getElementById('m-ih-hph').textContent = r.hrsPerHire.toFixed(1) + ' hrs'; document.getElementById('m-ih-rounds').textContent = r.effectiveRounds + '→1'; document.getElementById('m-ih-screen').textContent = state.ih.candidates + '→' + r.humansSeen;
const maxCost = Math.max(r.tradCost, r.ivbTotalCost, 1); const ivbPct = maxCost > 0 ? Math.round(r.ivbTotalCost / maxCost * 100) : 0; const savingsPct = r.tradCost > 0 ? Math.round((r.tradCost - r.ivbTotalCost) / r.tradCost * 100) : 0; animateBar(document.getElementById('bar-ih-old'), (r.tradCost / maxCost * 100)); animateBar(document.getElementById('bar-ih-new'), ivbPct); document.getElementById('txt-ih-old').textContent = fmtCompact(r.tradCost); document.getElementById('txt-ih-new').textContent = fmtCompact(r.ivbTotalCost); document.getElementById('pct-ih-new').textContent = ivbPct + '%'; document.getElementById('badge-ih-val').textContent = savingsPct + '%';
document.getElementById('cta-amount').textContent = fmtINR(r.savings); } else { const r = calcAgency(); animateValue('r-ag-revenue', fmtINR(r.revenueGrowth)); const pprmText = r.placementsPerRecruiterCurr + '→' + Math.round(r.placementsPerRecruiterNew); animateValue('r-ag-rpr', pprmText); document.getElementById('r-ag-rpr-sub').textContent = '+' + Math.round(r.placementsPerRecruiterIncrease) + ' / recruiter / month'; animateValueNumeric('r-ag-extra', r.extraPlacements, v => Math.round(v).toLocaleString('en-IN')); animateValue('r-ag-efficiency', r.efficiencyRatio + 'x'); // Auto-calc fee = 1 month salary const autoFee = (state.ag.salary * 100000) / 12; document.getElementById('v-ag-fee').textContent = fmtINR(autoFee); document.getElementById('m-ag-revpm').textContent = '↑' + fmtINR(Number(r.revPerPlacement)); document.getElementById('m-ag-hrs').textContent = Math.round(r.hrsSaved).toLocaleString('en-IN') + ' hrs'; document.getElementById('m-ag-cap').textContent = Math.round(state.ag.candidates / 4) + '→' + Math.round(state.ag.candidates * 3 / 4); const roiAgency = (r.revenueGrowth / (state.ag.recruiters * 800 * 12)); document.getElementById('m-ag-roi').textContent = roiAgency.toFixed(1) + 'x';
const maxRev = Math.max(r.annualRevenue, r.newAnnualRevenue, 1); const newPct = maxRev > 0 ? Math.round(r.newAnnualRevenue / maxRev * 100) : 0; const growthPct = r.annualRevenue > 0 ? Math.round((r.newAnnualRevenue - r.annualRevenue) / r.annualRevenue * 100) : 0; animateBar(document.getElementById('bar-ag-old'), (r.annualRevenue / maxRev * 100)); animateBar(document.getElementById('bar-ag-new'), newPct); document.getElementById('txt-ag-old').textContent = fmtCompact(r.annualRevenue); document.getElementById('txt-ag-new').textContent = fmtCompact(r.newAnnualRevenue); document.getElementById('pct-ag-new').textContent = newPct + '%'; document.getElementById('badge-ag-val').textContent = '+' + growthPct + '%';
document.getElementById('cta-amount').textContent = fmtINR(r.revenueGrowth); } }
// Animate numeric values with spring physics const _springAnimations = {}; function animateValueNumeric(id, target, fmt) { const el = document.getElementById(id); if (!el) return; if (_springAnimations[id]) _springAnimations[id].stop(); const currentVal = parseFloat(el.textContent.replace(/[^0-9.]/g, '')) || 0; if (Math.abs(currentVal - target) < 0.5) { el.textContent = fmt(target); el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); return; } _springAnimations[id] = springTo({ from: currentVal, to: target, stiffness: 120, damping: 14, mass: 0.8, onUpdate(v, done) { el.textContent = fmt(v); if (done) { el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); delete _springAnimations[id]; } } }); } // Spring-based bar height transitions function animateBar(barEl, targetPct) { if (!barEl) return; const key = barEl.id; if (_springAnimations[key]) _springAnimations[key].stop(); const currentPct = parseFloat(barEl.style.height) || 0; _springAnimations[key] = springTo({ from: currentPct, to: targetPct, stiffness: 100, damping: 16, mass: 1, onUpdate(v) { barEl.style.height = v + '%'; } }); } function animateValue(id, val) { const el = document.getElementById(id); if (!el) return; el.textContent = val; el.classList.remove('counter-pop'); void el.offsetWidth; el.classList.add('counter-pop'); } // ============ SLIDER SETUP ============ function wireSlider(sliderId, statePath, fmtFn) { const slider = document.getElementById(sliderId); if (!slider) return; const valEl = document.getElementById('v-' + sliderId); slider.addEventListener('input', () => { const v = parseFloat(slider.value); const [modeKey, key] = statePath.split('.'); state[modeKey][key] = v; if (valEl) valEl.textContent = fmtFn(v); updatePresets(sliderId, v); updateResults(); }); }
function wirePresets() { document.querySelectorAll('.presets').forEach(container => { container.addEventListener('click', e => { const btn = e.target.closest('button'); if (!btn) return; const v = parseFloat(btn.dataset.v); const sliderId = container.dataset.for; const slider = document.getElementById(sliderId); if (!slider) return; slider.value = v; slider.dispatchEvent(new Event('input')); }); }); }
function updatePresets(sliderId, val) { const container = document.querySelector(`.presets[data-for="${sliderId}"]`); if (!container) return; container.querySelectorAll('button').forEach(b => { b.classList.toggle('active', parseFloat(b.dataset.v) === val); }); }
// Wire all sliders wireSlider('ih-hires', 'ih.hires', v => v); wireSlider('ih-salary', 'ih.salary', v => '₹' + v + 'L'); wireSlider('ih-candidates', 'ih.candidates', v => v); wireSlider('ih-rounds', 'ih.rounds', v => v); wireSlider('ih-time', 'ih.time', v => v); wireSlider('ih-cost', 'ih.cost', v => '₹' + v.toLocaleString('en-IN')); wireSlider('ag-recruiters', 'ag.recruiters', v => v); wireSlider('ag-placements', 'ag.placements', v => v); wireSlider('ag-salary', 'ag.salary', v => '₹' + v + 'L'); wireSlider('ag-cost', 'ag.cost', v => '₹' + v + 'K'); wireSlider('ag-candidates', 'ag.candidates', v => v); wireSlider('ag-screentime', 'ag.screentime', v => v); wirePresets();
// ============ MODE TOGGLE ============ const toggleBtns = document.querySelectorAll('.toggle-btn'); const toggleWrap = document.getElementById('toggleWrap'); const toggleSub = document.getElementById('toggleSub');
function switchMode(newMode) { mode = newMode; toggleBtns.forEach(b => b.classList.toggle('active', b.dataset.mode === mode)); toggleWrap.classList.toggle('agency', mode === 'agency');
const ihInputs = document.getElementById('inputs-inhouse'); const agInputs = document.getElementById('inputs-agency'); const ihResults = document.getElementById('results-inhouse'); const agResults = document.getElementById('results-agency'); const resultsTitle = document.getElementById('results-title');
if (mode === 'inhouse') { ihInputs.classList.remove('hidden'); agInputs.classList.add('hidden'); ihResults.classList.remove('hidden'); agResults.classList.add('hidden'); resultsTitle.textContent = 'Your Savings with IntervueBox'; toggleSub.textContent = 'Cost to hire. Time to hire. Interview hours.'; document.getElementById('cta-verb').textContent = 'save'; } else { ihInputs.classList.add('hidden'); agInputs.classList.remove('hidden'); ihResults.classList.add('hidden'); agResults.classList.remove('hidden'); resultsTitle.textContent = 'Your Revenue Growth with IntervueBox'; toggleSub.textContent = 'Revenue per recruiter. Extra placements. Efficiency gains.'; document.getElementById('cta-verb').textContent = 'grow'; }
// Animate results cards const visibleResults = mode === 'inhouse' ? ihResults : agResults; const cards = visibleResults.querySelectorAll('.result-card, .metric-item'); cards.forEach((card, i) => { card.style.opacity = '0'; card.style.transform = 'translateY(12px)'; setTimeout(() => { card.style.transition = 'all 0.5s cubic-bezier(0.16, 1, 0.3, 1)'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, i * 40); });
updateResults(); }
toggleBtns.forEach(btn => { btn.addEventListener('click', () => { if (btn.dataset.mode !== mode) switchMode(btn.dataset.mode); }); });
// ============ MOTION: PAGE LOAD ANIMATIONS ============ document.addEventListener('DOMContentLoaded', () => { // Hero elements const heroEls = document.querySelectorAll('.hero-badge, .hero h1, .hero p'); heroEls.forEach((el, i) => { el.style.opacity = '0'; el.style.transform = 'translateY(20px)'; setTimeout(() => { el.style.transition = 'all 0.7s cubic-bezier(0.16, 1, 0.3, 1)'; el.style.opacity = '1'; el.style.transform = 'translateY(0)'; }, i * 120); });
// Cards stagger in const cards = document.querySelectorAll('.card, .cta'); cards.forEach((card, i) => { card.style.opacity = '0'; card.style.transform = 'translateY(30px)'; setTimeout(() => { card.style.transition = 'all 0.7s cubic-bezier(0.16, 1, 0.3, 1)'; card.style.opacity = '1'; card.style.transform = 'translateY(0)'; }, 300 + i * 120); });
// Toggle section const toggleSec = document.querySelector('.toggle-section'); const toggleSubEl = document.getElementById('toggleSub'); if (toggleSec) { toggleSec.style.opacity = '0'; toggleSec.style.transform = 'translateY(15px)'; setTimeout(() => { toggleSec.style.transition = 'all 0.6s cubic-bezier(0.16, 1, 0.3, 1)'; toggleSec.style.opacity = '1'; toggleSec.style.transform = 'translateY(0)'; }, 500); } if (toggleSubEl) { toggleSubEl.style.opacity = '0'; setTimeout(() => { toggleSubEl.style.transition = 'opacity 0.5s'; toggleSubEl.style.opacity = '1'; }, 600); }
// Initial calculation updateResults(); });
// ============ MOTION: SCROLL ANIMATIONS (only hidden sections) ============ const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; observer.unobserve(entry.target); } }); }, { threshold: 0.15, rootMargin: '0px 0px -20px 0px' });
// Only observe the hidden mode's cards (avoid flickering with already-visible cards) document.querySelectorAll('#results-agency .result-card, #results-agency .metric-item, #results-agency .bar-col').forEach(el => { el.style.transition = 'all 0.6s cubic-bezier(0.16, 1, 0.3, 1)'; observer.observe(el); });
// Expose for potential WordPress usage window.IntervueBoxROI = { switchMode, updateResults, mode, state };