Company Investment Products

```react
import React, { useState, useMemo } from 'react';

// Product Data
const PRODUCTS = [
  {
    id: 'msi',
    name: 'Monthly Salary Investment (MSI)',
    tagline: 'Secure corporate wealth with consistent monthly yields.',
    dividendRate: 0.01,
    ratePeriod: 'monthly',
    minCapital: 1000000,
    minDurationYrs: 3,
    entity: 'Corporate bodies',
    requirements: [
      "Company's Registration Certificate",
      "Proof of Tax Payment",
      "Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-emerald-900 to-teal-950',
    icon: 'briefcase'
  },
  {
    id: 'fdi',
    name: 'Fixed Deposit Investment (FDI)',
    tagline: 'Flexible growth structures for both personal and corporate capital.',
    dividendRate: 0.15, // default annual
    rates: {
      quarterly: 0.03,
      biannually: 0.07,
      annually: 0.15
    },
    ratePeriod: 'flexible',
    minCapital: 100000,
    minDurationYrs: 1,
    entity: 'Individual and Corporate bodies',
    requirements: [
      "Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-blue-900 to-indigo-950',
    icon: 'shield'
  },
  {
    id: 'tfi',
    name: 'Tuition Fee Investment (TFI)',
    tagline: 'Dedicated academic capital compounding for a brighter future.',
    dividendRate: 0.04,
    ratePeriod: 'quarterly',
    minCapital: 50000,
    minDurationYrs: 4,
    entity: 'Individual students',
    requirements: [
      "Admission Letter",
      "Student ID Card",
      "Parents' Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-amber-900 to-orange-950',
    icon: 'graduation-cap'
  },
  {
    id: 'hfi',
    name: 'Help Fund Investment (HFI)',
    tagline: 'High-impact yield designed to empower non-governmental foundations.',
    dividendRate: 0.20,
    ratePeriod: 'annually',
    minCapital: 10000000,
    minDurationYrs: 3,
    entity: 'Non-Governmental Organizations (NGOs)',
    requirements: [
      "Registration Certificate",
      "Proof of Tax Payment",
      "Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-purple-900 to-rose-950',
    icon: 'heart'
  },
  {
    id: 'dsi',
    name: 'Daily Saving Investment (DSI)',
    tagline: 'Micro-growth compounding daily for everyday savings.',
    dividendRate: 0.0003,
    ratePeriod: 'daily',
    minCapital: 1000,
    minDurationMonths: 3,
    minDurationYrs: 0.25,
    entity: 'Everyone',
    requirements: [
      "Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-cyan-900 to-slate-950',
    icon: 'coins'
  },
  {
    id: 'hci',
    name: 'Housing Construction Investment (HCI)',
    tagline: 'Realize homeownership dreams with structured asset backed growth.',
    dividendRate: 0.01,
    ratePeriod: 'monthly',
    minCapital: 250000,
    minDurationYrs: 3,
    entity: 'Individual workers',
    requirements: [
      "Employment Letter",
      "Company ID Card",
      "Property Documents",
      "Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-stone-800 to-emerald-950',
    icon: 'home'
  },
  {
    id: 'rpi',
    name: 'Retirement Planning Investment (RPI)',
    tagline: 'Decade-scale compounding for comfortable, golden-year security.',
    dividendRate: 0.10,
    ratePeriod: 'annually',
    minCapital: 10000,
    minDurationYrs: 10,
    entity: 'Individuals (25 years and above)',
    requirements: [
      "Government Approved ID Card",
      "Proof of Address"
    ],
    bgGradient: 'from-slate-900 to-neutral-950',
    icon: 'umbrella'
  }
];

// Inline SVGs for all custom icons
const Icon = ({ name, className = "w-6 h-6" }) => {
  switch (name) {
    case 'briefcase':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M20.25 14.15v4.25c0 .414-.336.75-.75.75H4.5a.75.75 0 0 1-.75-.75V14.15M20.25 14.15V9.75A2.25 2.25 0 0 0 18 7.5h-1.5A2.25 2.25 0 0 0 14.25 9.75v4.4M20.25 14.15a1.5 1.5 0 0 0-.45-1.06l-2.091-2.091a1.5 1.5 0 0 0-1.061-.439h-9.296c-.398 0-.78.158-1.06.44L4.2 13.09a1.5 1.5 0 0 0-.45 1.061m16.5 0h-16.5m16.5 0H14.25m-10.5 0H4.5" />
          <path strokeLinecap="round" strokeLinejoin="round" d="M12 14.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5z" />
        </svg>
      );
    case 'shield':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" />
        </svg>
      );
    case 'graduation-cap':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.62 48.62 0 0112 20.904a48.62 48.62 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A5.905 5.905 0 018 3.743 9.73 9.73 0 0112 3c1.378 0 2.708.285 3.91.8a5.905 5.905 0 014.162 5.592c0 .285-.02.568-.06.848m-15.482 0C7.16 10.74 9.516 11 12 11c2.484 0 4.84-.26 6.742-.853M4.26 10.147l8.232 4.41a1.249 1.249 0 001.016 0l8.232-4.41M12 20.904V12" />
        </svg>
      );
    case 'heart':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z" />
        </svg>
      );
    case 'coins':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-1.971-.659-1.171-.88-1.171-2.303 0-3.182 1.172-.879 3.07-.879 4.242 0 .18.135.339.29.479.465M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
        </svg>
      );
    case 'home':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M8.25 21v-4.875c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125V21m0 0h4.5V3.545M2.25 12l8.954-8.955a1.125 1.125 0 011.59 0L21.75 12M13.5 22.5H12" />
        </svg>
      );
    case 'umbrella':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M12 3v18m0-18a9 9 0 0 1 9 9H3a9 9 0 0 1 9-9zm0 18a3 3 0 0 1-3-3" />
        </svg>
      );
    case 'calculator':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 15.75h.007v.008H15.75v-.008zm0-2.25h.007v.008H15.75v-.008zm0-2.25h.007v.008H15.75V11.25zm-2.25 4.5h.007v.008h-.007v-.008zm0-2.25h.007v.008h-.007v-.008zm0-2.25h.007v.008h-.007V11.25zm-2.25 4.5h.007v.008h-.007v-.008zm0-2.25h.007v.008h-.007v-.008zm0-2.25h.007v.008h-.007V11.25zm-2.25 4.5h.007v.008H9v-.008zm0-2.25h.007v.008H9v-.008zm0-2.25h.007v.008H9V11.25zm-2.25-4.5h16.5a1.5 1.5 0 011.5 1.5v12a1.5 1.5 0 01-1.5 1.5H3.75a1.5 1.5 0 01-1.5-1.5v-12a1.5 1.5 0 011.5-1.5z" />
        </svg>
      );
    case 'info':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 111.063.852l-.708 2.836a.75.75 0 001.063.852l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
        </svg>
      );
    case 'check':
      return (
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" className={className}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M4.5 12.75l6 6 9-13.5" />
        </svg>
      );
    default:
      return null;
  }
};

export default function App() {
  const [selectedProduct, setSelectedProduct] = useState(PRODUCTS[0]);
  const [fdiPayoutFrequency, setFdiPayoutFrequency] = useState('annually'); // for FDI calculations
  const [investmentAmount, setInvestmentAmount] = useState(selectedProduct.minCapital);
  const [durationYears, setDurationYears] = useState(selectedProduct.minDurationYrs || 3);
  const [calcInterestType, setCalcInterestType] = useState('compound'); // simple vs compound
  const [currentTab, setCurrentTab] = useState('explore'); // explore, calculator, apply
  
  // Quick Application Form State
  const [formName, setFormName] = useState('');
  const [formEmail, setFormEmail] = useState('');
  const [formPhone, setFormPhone] = useState('');
  const [formEntity, setFormEntity] = useState('');
  const [formAcceptedTerms, setFormAcceptedTerms] = useState(false);
  const [formSubmitted, setFormSubmitted] = useState(false);

  // Safely trigger product changes and recalibrate parameters
  const handleProductChange = (prod) => {
    setSelectedProduct(prod);
    setInvestmentAmount(prod.minCapital);
    setDurationYears(prod.minDurationYrs || 1);
  };

  // Calculations for Dividends
  const calculations = useMemo(() => {
    const principal = Number(investmentAmount) || 0;
    const t = Number(durationYears) || 1;
    let rate = selectedProduct.dividendRate;
    let periodsPerYear = 1;

    if (selectedProduct.id === 'fdi') {
      if (fdiPayoutFrequency === 'quarterly') {
        rate = 0.03;
        periodsPerYear = 4;
      } else if (fdiPayoutFrequency === 'biannually') {
        rate = 0.07;
        periodsPerYear = 2;
      } else {
        rate = 0.15;
        periodsPerYear = 1;
      }
    } else if (selectedProduct.ratePeriod === 'monthly') {
      periodsPerYear = 12;
    } else if (selectedProduct.ratePeriod === 'quarterly') {
      periodsPerYear = 4;
    } else if (selectedProduct.ratePeriod === 'daily') {
      periodsPerYear = 365;
    } else if (selectedProduct.ratePeriod === 'annually') {
      periodsPerYear = 1;
    }

    let totalPayout = 0;
    let totalDividends = 0;

    if (calcInterestType === 'compound') {
      // A = P(1 + r/n)^(nt)
      totalPayout = principal * Math.pow(1 + rate, periodsPerYear * t);
      totalDividends = totalPayout - principal;
    } else {
      // Simple Interest: Total Dividends = P * r * (n * t)
      totalDividends = principal * rate * (periodsPerYear * t);
      totalPayout = principal + totalDividends;
    }

    // Determine estimated average returns
    const averageAnnualDividend = totalDividends / t;
    const averageMonthlyDividend = totalDividends / (t * 12);

    return {
      principal,
      rate: rate * 100,
      periodsPerYear,
      totalDividends,
      totalPayout,
      averageAnnualDividend,
      averageMonthlyDividend
    };
  }, [selectedProduct, fdiPayoutFrequency, investmentAmount, durationYears, calcInterestType]);

  const currencyFormatter = new Intl.NumberFormat('en-US', {
    style: 'currency',
    currency: 'USD',
    maximumFractionDigits: 0
  });

  return (
    <div className="min-h-screen bg-slate-950 text-slate-100 font-sans selection:bg-amber-500 selection:text-slate-900">
      
      {/* Premium Header */}
      <header className="border-b border-slate-900 bg-slate-950/80 backdrop-blur sticky top-0 z-50">
        <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex flex-col sm:flex-row items-center justify-between gap-4">
          <div className="flex items-center gap-3">
            <div className="w-10 h-10 rounded-full bg-gradient-to-tr from-amber-500 to-emerald-500 flex items-center justify-center font-bold text-slate-950 shadow-lg shadow-amber-500/10">
              CL
            </div>
            <div>
              <h1 className="text-xl font-extrabold tracking-tight text-white flex items-center gap-2">
                NEW CEPHASLIGHT
              </h1>
              <p className="text-xs text-amber-500 tracking-wider uppercase font-medium">Peaceful Investment Satisfaction. Since 2015</p>
            </div>
          </div>
          
          <nav className="flex items-center bg-slate-900 p-1 rounded-full border border-slate-800">
            <button 
              onClick={() => setCurrentTab('explore')}
              className={`px-4 py-1.5 rounded-full text-xs sm:text-sm font-semibold transition-all ${currentTab === 'explore' ? 'bg-gradient-to-r from-emerald-600 to-teal-600 text-white shadow' : 'text-slate-400 hover:text-slate-200'}`}
            >
              Our Products
            </button>
            <button 
              onClick={() => setCurrentTab('calculator')}
              className={`px-4 py-1.5 rounded-full text-xs sm:text-sm font-semibold transition-all ${currentTab === 'calculator' ? 'bg-gradient-to-r from-emerald-600 to-teal-600 text-white shadow' : 'text-slate-400 hover:text-slate-200'}`}
            >
              Yield Calculator
            </button>
            <button 
              onClick={() => setCurrentTab('apply')}
              className={`px-4 py-1.5 rounded-full text-xs sm:text-sm font-semibold transition-all ${currentTab === 'apply' ? 'bg-gradient-to-r from-emerald-600 to-teal-600 text-white shadow' : 'text-slate-400 hover:text-slate-200'}`}
            >
              Start Investment
            </button>
          </nav>
        </div>
      </header>

      {/* Hero Banner Section */}
      <section className="relative overflow-hidden py-16 sm:py-24 border-b border-slate-900 bg-[radial-gradient(ellipse_80%_80%_at_50%_-20%,rgba(16,185,129,0.1),rgba(0,0,0,0))]">
        <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 text-center">
          <span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-emerald-500/10 text-emerald-400 text-xs font-semibold mb-6 border border-emerald-500/20">
            <span className="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></span>
            A Decade of Trusted Financial Stewardship
          </span>
          <h2 className="text-4xl sm:text-6xl font-black text-white tracking-tight leading-tight max-w-4xl mx-auto">
            Build Wealth with <span className="bg-gradient-to-r from-emerald-400 via-amber-400 to-teal-400 bg-clip-text text-transparent">Unshakable Peace of Mind</span>
          </h2>
          <p className="mt-6 text-lg text-slate-400 max-w-2xl mx-auto leading-relaxed">
            Discover bespoke investment schemes tailored for individuals, students, corporations, and NGOs. Maximise your capital returns with our transparent, high-performing portfolios.
          </p>
          <div className="mt-10 flex flex-wrap justify-center gap-4">
            <button 
              onClick={() => setCurrentTab('calculator')}
              className="px-6 py-3.5 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-slate-950 font-bold rounded-xl shadow-lg shadow-emerald-500/10 transition-transform active:scale-95 text-sm sm:text-base"
            >
              Launch Dividend Calculator
            </button>
            <button 
              onClick={() => setCurrentTab('explore')}
              className="px-6 py-3.5 bg-slate-900 hover:bg-slate-850 text-slate-200 font-semibold rounded-xl border border-slate-800 transition-transform active:scale-95 text-sm sm:text-base"
            >
              Explore Products
            </button>
          </div>
        </div>
      </section>

      {/* Main Content Areas based on tabs */}
      <main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        
        {/* TAB 1: EXPLORE PRODUCTS */}
        {currentTab === 'explore' && (
          <div>
            <div className="flex flex-col md:flex-row md:items-end justify-between mb-8 gap-4">
              <div>
                <h3 className="text-2xl sm:text-3xl font-bold text-white">Our Signature Portfolios</h3>
                <p className="text-slate-400 mt-1">Select an asset product to review terms, returns, and required documents.</p>
              </div>
              <div className="text-sm text-slate-400 flex items-center gap-2">
                <span className="w-3 h-3 rounded-full bg-amber-500"></span>
                <span>Minimum commitment varies per asset program</span>
              </div>
            </div>

            {/* Product Grid */}
            <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
              {PRODUCTS.map((prod) => {
                const isSelected = selectedProduct.id === prod.id;
                return (
                  <div 
                    key={prod.id}
                    onClick={() => handleProductChange(prod)}
                    className={`cursor-pointer group relative rounded-2xl p-6 transition-all duration-300 border ${
                      isSelected 
                        ? 'bg-slate-900 border-emerald-500 shadow-xl shadow-emerald-950/20' 
                        : 'bg-slate-900/40 hover:bg-slate-900/80 border-slate-800'
                    }`}
                  >
                    <div className="flex justify-between items-start mb-4">
                      <div className={`p-3 rounded-xl bg-gradient-to-br ${prod.bgGradient} text-white shadow`}>
                        <Icon name={prod.icon} className="w-6 h-6" />
                      </div>
                      <span className="text-xs font-bold text-slate-500 uppercase tracking-widest bg-slate-950 px-2.5 py-1 rounded-full border border-slate-850">
                        {prod.entity.split(' ')[0]}
                      </span>
                    </div>

                    <h4 className="text-lg font-bold text-white group-hover:text-emerald-400 transition-colors">
                      {prod.name}
                    </h4>
                    <p className="text-xs text-slate-400 mt-1.5 h-10 line-clamp-2">
                      {prod.tagline}
                    </p>

                    <div className="grid grid-cols-2 gap-4 my-5 pt-4 border-t border-slate-800/60">
                      <div>
                        <span className="text-[10px] text-slate-400 uppercase tracking-wider block">Est. Yield Rate</span>
                        <span className="text-lg font-black text-amber-400">
                          {prod.id === 'fdi' ? 'Up to 15%' : `${(prod.dividendRate * 100).toFixed(2).replace('.00', '')}%`}
                          <span className="text-xs font-normal text-slate-400 ml-1">
                            {prod.id === 'fdi' ? 'annually' : prod.ratePeriod}
                          </span>
                        </span>
                      </div>
                      <div>
                        <span className="text-[10px] text-slate-400 uppercase tracking-wider block">Min. Entry Capital</span>
                        <span className="text-lg font-black text-white">
                          {currencyFormatter.format(prod.minCapital)}
                        </span>
                      </div>
                    </div>

                    <div className="mt-4 flex items-center justify-between text-xs text-slate-400">
                      <span>

Comments

Popular posts from this blog

INVEST IN YOUR SECURITY WITH YOUR MONEY WITH US.

FINANCIAL INVESTMENT BALANCE IN 10 YEARS.

FOREIGN EXCHANGE 👉 $1 = ₦500