<?php
require_once __DIR__ . '/config/config.php';
$pageTitle = 'Invest with Us - Fantom Capital';
include __DIR__ . '/includes/header.php';
?>

<!-- Hero Section -->
<section class="relative bg-gradient-to-br from-primary-blue via-blue-800 to-primary-blue text-white py-20 overflow-hidden">
  <div class="absolute inset-0 opacity-10">
    <div class="absolute top-0 left-0 w-72 h-72 bg-primary-green rounded-full filter blur-3xl"></div>
    <div class="absolute bottom-0 right-0 w-96 h-96 bg-blue-400 rounded-full filter blur-3xl"></div>
  </div>
  <div class="container mx-auto px-4 text-center relative z-10">
    <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6">Invest with Fantom Capital</h1>
    <p class="text-lg md:text-xl opacity-90 max-w-3xl mx-auto mb-8">Partner with us to grow your wealth through real asset-backed financing with predictable, attractive returns.</p>
    <div class="flex flex-wrap justify-center gap-4">
      <button onclick="openSignUpModal()" class="bg-primary-green text-white px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center gap-2">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
        </svg>
        Register Now
      </button>
      <a href="#how-it-works" class="bg-white text-primary-blue px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center gap-2">
        Learn More
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
        </svg>
      </a>
    </div>
  </div>
</section>

<!-- Stats Section -->
<section class="bg-white py-12 -mt-8 relative z-20">
  <div class="container mx-auto px-4">
    <div class="max-w-5xl mx-auto bg-white rounded-2xl shadow-2xl p-8 grid grid-cols-2 md:grid-cols-4 gap-6">
      <div class="text-center">
        <p class="text-3xl md:text-4xl font-bold text-primary-blue">500M+</p>
        <p class="text-sm text-gray-600">Loans Disbursed</p>
      </div>
      <div class="text-center">
        <p class="text-3xl md:text-4xl font-bold text-primary-green">2000+</p>
        <p class="text-sm text-gray-600">Happy Clients</p>
      </div>
      <div class="text-center">
        <p class="text-3xl md:text-4xl font-bold text-primary-blue">4%</p>
        <p class="text-sm text-gray-600">Flat Rate Interest</p>
      </div>
      <div class="text-center">
        <p class="text-3xl md:text-4xl font-bold text-primary-green">24hrs</p>
        <p class="text-sm text-gray-600">Fast Approval</p>
      </div>
    </div>
  </div>
</section>

<!-- Client Application Process / Loan Journey -->
<section id="how-it-works" class="py-20 bg-gradient-to-b from-white to-soft-gray">
  <div class="container mx-auto px-4">
    <div class="text-center mb-16">
      <h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Client Loan Application Journey</h2>
      <p class="text-lg text-gray-600 max-w-2xl mx-auto">A simple, streamlined process to get you funded quickly</p>
    </div>
    
    <!-- Journey Timeline -->
    <div class="max-w-5xl mx-auto">
      <div class="relative">
        <!-- Timeline Line -->
        <div class="hidden md:block absolute left-1/2 transform -translate-x-1/2 h-full w-1 bg-gradient-to-b from-primary-blue via-primary-green to-primary-blue"></div>
        
        <!-- Step 1 -->
        <div class="relative flex flex-col md:flex-row items-center mb-12">
          <div class="md:w-1/2 md:pr-12 md:text-right order-2 md:order-1">
            <div class="bg-white rounded-2xl p-6 shadow-xl hover:shadow-2xl transition-all duration-300 border-l-4 border-primary-blue">
              <h3 class="text-xl font-bold text-primary-blue mb-2">1. Register & Create Account</h3>
              <p class="text-gray-600">Sign up on our platform to create your personal account. Provide basic information and verify your identity.</p>
            </div>
          </div>
          <div class="w-16 h-16 bg-gradient-to-br from-primary-blue to-blue-600 rounded-full flex items-center justify-center text-white font-bold text-xl shadow-lg z-10 order-1 md:order-2 mb-4 md:mb-0">
            <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
            </svg>
          </div>
          <div class="md:w-1/2 md:pl-12 order-3"></div>
        </div>
        
        <!-- Step 2 -->
        <div class="relative flex flex-col md:flex-row items-center mb-12">
          <div class="md:w-1/2 md:pr-12 order-2 md:order-1"></div>
          <div class="w-16 h-16 bg-gradient-to-br from-primary-green to-green-600 rounded-full flex items-center justify-center text-white font-bold text-xl shadow-lg z-10 order-1 md:order-2 mb-4 md:mb-0">
            <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
            </svg>
          </div>
          <div class="md:w-1/2 md:pl-12 order-3">
            <div class="bg-white rounded-2xl p-6 shadow-xl hover:shadow-2xl transition-all duration-300 border-l-4 border-primary-green">
              <h3 class="text-xl font-bold text-primary-green mb-2">2. Submit Loan Request</h3>
              <p class="text-gray-600">Fill out the loan application form specifying the amount, purpose, and preferred repayment period.</p>
            </div>
          </div>
        </div>
        
        <!-- Step 3 -->
        <div class="relative flex flex-col md:flex-row items-center mb-12">
          <div class="md:w-1/2 md:pr-12 md:text-right order-2 md:order-1">
            <div class="bg-white rounded-2xl p-6 shadow-xl hover:shadow-2xl transition-all duration-300 border-l-4 border-primary-blue">
              <h3 class="text-xl font-bold text-primary-blue mb-2">3. Upload Documents</h3>
              <p class="text-gray-600">Upload required documents including ID, proof of income, and any collateral documents for faster processing.</p>
            </div>
          </div>
          <div class="w-16 h-16 bg-gradient-to-br from-primary-blue to-blue-600 rounded-full flex items-center justify-center text-white font-bold text-xl shadow-lg z-10 order-1 md:order-2 mb-4 md:mb-0">
            <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/>
            </svg>
          </div>
          <div class="md:w-1/2 md:pl-12 order-3"></div>
        </div>
        
        <!-- Step 4 -->
        <div class="relative flex flex-col md:flex-row items-center mb-12">
          <div class="md:w-1/2 md:pr-12 order-2 md:order-1"></div>
          <div class="w-16 h-16 bg-gradient-to-br from-primary-green to-green-600 rounded-full flex items-center justify-center text-white font-bold text-xl shadow-lg z-10 order-1 md:order-2 mb-4 md:mb-0">
            <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
            </svg>
          </div>
          <div class="md:w-1/2 md:pl-12 order-3">
            <div class="bg-white rounded-2xl p-6 shadow-xl hover:shadow-2xl transition-all duration-300 border-l-4 border-primary-green">
              <h3 class="text-xl font-bold text-primary-green mb-2">4. Review & Approval</h3>
              <p class="text-gray-600">Our team reviews your application and documents. Get approval within 24 hours for qualified applicants.</p>
            </div>
          </div>
        </div>
        
        <!-- Step 5 -->
        <div class="relative flex flex-col md:flex-row items-center">
          <div class="md:w-1/2 md:pr-12 md:text-right order-2 md:order-1">
            <div class="bg-white rounded-2xl p-6 shadow-xl hover:shadow-2xl transition-all duration-300 border-l-4 border-primary-blue">
              <h3 class="text-xl font-bold text-primary-blue mb-2">5. Receive Funds</h3>
              <p class="text-gray-600">Once approved, funds are disbursed directly to your bank account or M-Pesa. Start using your loan immediately!</p>
            </div>
          </div>
          <div class="w-16 h-16 bg-gradient-to-br from-primary-blue to-blue-600 rounded-full flex items-center justify-center text-white font-bold text-xl shadow-lg z-10 order-1 md:order-2 mb-4 md:mb-0">
            <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z"/>
            </svg>
          </div>
          <div class="md:w-1/2 md:pl-12 order-3"></div>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- Investment Registration CTA Card -->
<section class="py-20 bg-white">
  <div class="container mx-auto px-4">
    <div class="max-w-4xl mx-auto">
      <div class="relative bg-gradient-to-br from-primary-blue via-blue-700 to-primary-blue rounded-3xl overflow-hidden shadow-2xl">
        <!-- Decorative Elements -->
        <div class="absolute top-0 right-0 w-64 h-64 bg-primary-green opacity-20 rounded-full -translate-y-1/2 translate-x-1/2"></div>
        <div class="absolute bottom-0 left-0 w-48 h-48 bg-white opacity-10 rounded-full translate-y-1/2 -translate-x-1/2"></div>
        
        <div class="relative z-10 p-8 md:p-12 text-center">
          <div class="inline-flex items-center gap-2 bg-white/20 px-4 py-2 rounded-full text-white text-sm font-semibold mb-6">
            <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
            </svg>
            Start Your Investment Journey Today
          </div>
          
          <h2 class="text-3xl md:text-4xl font-bold text-white mb-4">Ready to Grow Your Wealth?</h2>
          <p class="text-lg text-white/90 mb-8 max-w-2xl mx-auto">Join thousands of investors who trust Fantom Capital. Register now to access exclusive investment opportunities, track your portfolio, and earn attractive returns.</p>
          
          <div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
            <button onclick="openSignUpModal()" class="w-full sm:w-auto bg-primary-green text-white px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center justify-center gap-2 transform hover:scale-105">
              <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
              </svg>
              Register Now
            </button>
            <a href="tel:0723000500" class="w-full sm:w-auto bg-white text-primary-blue px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center justify-center gap-2">
              <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
              </svg>
              Call Us: 0723 000 500
            </a>
          </div>
          
          <div class="mt-8 flex flex-wrap justify-center gap-6 text-white/80 text-sm">
            <div class="flex items-center gap-2">
              <svg class="w-5 h-5 text-primary-green" fill="currentColor" viewBox="0 0 20 20">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
              </svg>
              Free Registration
            </div>
            <div class="flex items-center gap-2">
              <svg class="w-5 h-5 text-primary-green" fill="currentColor" viewBox="0 0 20 20">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
              </svg>
              Secure Platform
            </div>
            <div class="flex items-center gap-2">
              <svg class="w-5 h-5 text-primary-green" fill="currentColor" viewBox="0 0 20 20">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
              </svg>
              24/7 Support
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- Why Invest Section -->
<section class="py-20 bg-soft-gray">
  <div class="container mx-auto px-4">
    <div class="text-center mb-16">
      <h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Why Invest with Fantom Capital?</h2>
      <p class="text-lg text-gray-600 max-w-2xl mx-auto">Experience the benefits of partnering with a trusted financial institution</p>
    </div>
    
    <div class="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
      <!-- Benefit 1 -->
      <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 text-center">
        <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-primary-blue to-blue-600 rounded-full flex items-center justify-center">
          <svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/>
          </svg>
        </div>
        <h3 class="text-xl font-bold text-gray-900 mb-3">Asset-Backed Security</h3>
        <p class="text-gray-600">All investments are backed by real assets including vehicles, property, and business assets for enhanced security.</p>
      </div>
      
      <!-- Benefit 2 -->
      <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 text-center">
        <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-primary-green to-green-600 rounded-full flex items-center justify-center">
          <svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
          </svg>
        </div>
        <h3 class="text-xl font-bold text-gray-900 mb-3">Attractive Returns</h3>
        <p class="text-gray-600">Earn competitive risk-adjusted returns that outperform traditional savings accounts and fixed deposits.</p>
      </div>
      
      <!-- Benefit 3 -->
      <div class="bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-2 text-center">
        <div class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-orange-500 to-red-600 rounded-full flex items-center justify-center">
          <svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
          </svg>
        </div>
        <h3 class="text-xl font-bold text-gray-900 mb-3">Transparent Reporting</h3>
        <p class="text-gray-600">Access detailed reports and real-time updates on your investments through our secure online portal.</p>
      </div>
    </div>
  </div>
</section>



<!-- Final CTA -->
<section class="py-16 bg-gradient-to-r from-primary-blue to-blue-800 text-white">
  <div class="container mx-auto px-4 text-center">
    <h2 class="text-3xl md:text-4xl font-bold mb-4">Start Your Journey Today</h2>
    <p class="text-xl mb-8 max-w-2xl mx-auto opacity-90">Join Fantom Capital and take control of your financial future</p>
    <div class="flex flex-wrap justify-center gap-4">
      <button onclick="openSignUpModal()" class="bg-primary-green text-white px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center gap-2">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
        </svg>
        Register Now
      </button>
      <a href="https://wa.link/ymy3in" target="_blank" rel="noopener" class="bg-white text-primary-blue px-8 py-4 rounded-full font-bold text-lg hover:bg-opacity-90 transition shadow-lg hover:shadow-xl inline-flex items-center gap-2">
        <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
          <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
        </svg>
        WhatsApp Us
      </a>
    </div>
  </div>
</section>

<!-- Sign Up Modal -->
<div id="signUpModal" class="fixed inset-0 z-[100] flex items-center justify-center p-4 opacity-0 invisible transition-all duration-300" style="background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);">
  <div class="bg-white rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto transform scale-95 transition-transform duration-300">
    <div class="bg-gradient-to-r from-primary-blue to-blue-700 p-6 rounded-t-2xl relative">
      <button onclick="closeSignUpModal()" class="absolute top-4 right-4 text-white hover:bg-white/20 rounded-full p-2 transition">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
        </svg>
      </button>
      <h3 class="text-xl font-bold text-white">Create Your Account</h3>
      <p class="text-white/80 text-sm mt-1">Join Fantom Capital today</p>
    </div>
    
    <form class="p-6 space-y-4" onsubmit="handleSignUp(event)">
      <div class="grid grid-cols-2 gap-4">
        <div>
          <label class="block text-sm font-semibold text-gray-700 mb-1">First Name</label>
          <input type="text" name="firstName" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm" placeholder="John">
        </div>
        <div>
          <label class="block text-sm font-semibold text-gray-700 mb-1">Last Name</label>
          <input type="text" name="lastName" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm" placeholder="Doe">
        </div>
      </div>
      
      <div>
        <label class="block text-sm font-semibold text-gray-700 mb-1">Email Address</label>
        <input type="email" name="email" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm" placeholder="john@example.com">
      </div>
      
      <div>
        <label class="block text-sm font-semibold text-gray-700 mb-1">Phone Number</label>
        <input type="tel" name="phone" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm" placeholder="0723 000 500">
      </div>
      
      <div>
        <label class="block text-sm font-semibold text-gray-700 mb-1">Password</label>
        <div class="relative">
          <input type="password" name="password" id="investPassword" required minlength="8" class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm pr-10" placeholder="Min. 8 characters">
          <button type="button" onclick="toggleInvestPassword('investPassword', 'investPasswordIcon')" class="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700">
            <svg id="investPasswordIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
            </svg>
          </button>
        </div>
      </div>
      
      <div>
        <label class="block text-sm font-semibold text-gray-700 mb-1">Confirm Password</label>
        <div class="relative">
          <input type="password" name="confirmPassword" id="investConfirmPassword" required class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-blue text-sm pr-10" placeholder="Confirm password">
          <button type="button" onclick="toggleInvestPassword('investConfirmPassword', 'investConfirmPasswordIcon')" class="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700">
            <svg id="investConfirmPasswordIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
            </svg>
          </button>
        </div>
      </div>
      
      <div class="flex items-start gap-2">
        <input type="checkbox" id="terms" required class="mt-1 accent-primary-blue">
        <label for="terms" class="text-xs text-gray-600">I agree to the <a href="<?php echo SITE_URL; ?>/terms.php" class="text-primary-blue hover:underline">Terms of Service</a> and <a href="<?php echo SITE_URL; ?>/privacy.php" class="text-primary-blue hover:underline">Privacy Policy</a></label>
      </div>
      
      <button type="submit" class="w-full bg-gradient-to-r from-primary-blue to-primary-green text-white py-3 rounded-lg font-bold hover:shadow-lg transition">
        Create Account
      </button>
      
      <p class="text-center text-sm text-gray-600">
        Already have an account? <a href="#" class="text-primary-green font-semibold hover:underline">Login</a>
      </p>
    </form>
  </div>
</div>

<style>
  #signUpModal.active {
    opacity: 1;
    visibility: visible;
  }
  #signUpModal.active > div {
    transform: scale(1);
  }
</style>

<script>
function toggleInvestPassword(inputId, iconId) {
  const input = document.getElementById(inputId);
  const icon = document.getElementById(iconId);
  if (input.type === 'password') {
    input.type = 'text';
    icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"/>';
  } else {
    input.type = 'password';
    icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>';
  }
}

function openSignUpModal() {
  const modal = document.getElementById('signUpModal');
  modal.classList.add('active');
  document.body.style.overflow = 'hidden';
}

function closeSignUpModal() {
  const modal = document.getElementById('signUpModal');
  modal.classList.remove('active');
  document.body.style.overflow = '';
}

function handleSignUp(event) {
  event.preventDefault();
  const form = event.target;
  const password = form.password.value;
  const confirmPassword = form.confirmPassword.value;
  
  if (password !== confirmPassword) {
    alert('Passwords do not match!');
    return;
  }
  
  // Show success message
  alert('Registration successful! Please check your email to verify your account.');
  closeSignUpModal();
  form.reset();
}

// Close modal on backdrop click
document.getElementById('signUpModal').addEventListener('click', function(e) {
  if (e.target === this) {
    closeSignUpModal();
  }
});
</script>

<?php include __DIR__ . '/includes/footer.php'; ?>
