<?php
$page_title       = 'EduTrack — Smart School Management for Ghanaian Schools';
$page_description = 'EduTrack is the all-in-one school management platform trusted by schools across Ghana. Manage students, fees, exams, staff, reports and more.';
$page_active      = 'home';
include 'includes/header.php';
?>

<style>
/* ── Index-page specifics ── */
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.75)} }
@keyframes ticker     { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
@keyframes borderGlow { 0%,100%{box-shadow:0 0 0 0 rgba(0,139,145,.4)} 50%{box-shadow:0 0 0 10px rgba(0,139,145,0)} }

/* Stats number shimmer */
.stat-num {
  font-size: 2rem; font-weight: 900; letter-spacing: -.04em;
  background: var(--grad-teal-orange); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Feature cards subtle left-border accent on hover */
.card-custom:hover { border-left: 3px solid var(--teal); padding-left: calc(1.75rem - 2px); }

/* Image overlay helper */
.img-overlay { position: absolute; inset: 0; background: var(--grad-hero); opacity: .78; }

/* Floating badge on hero image */
.hero-float-badge {
  position: absolute; background: rgba(12,30,32,.9); backdrop-filter: blur(12px);
  border: 1px solid rgba(0,139,145,.3); border-radius: 14px; padding: .75rem 1rem;
  display: flex; align-items: center; gap: .6rem; box-shadow: 0 8px 32px rgba(0,0,0,.35);
  animation: floatY 5s ease-in-out infinite;
  white-space: nowrap;
}

/* Trust ticker */
.ticker-track { display: flex; gap: 2.5rem; animation: ticker 22s linear infinite; white-space: nowrap; }
.ticker-wrap  { overflow: hidden; mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%); }

/* Testimonial avatar */
.testi-avatar {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(0,139,145,.4); flex-shrink: 0;
}

/* Section divider wave */
.wave-top::before {
  content: ''; display: block; height: 50px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,25 C300,50 900,0 1200,25 L1200,0 L0,0 Z' fill='%23EEF9FA'/%3E%3C/svg%3E") no-repeat center/cover;
}

/* How It Works image frame */
.hiw-frame {
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,.18); position: relative;
  border: 1px solid rgba(0,139,145,.2);
}

@media (max-width: 767px) {
  .hero-float-badge { display: none; }
  .stat-num { font-size: 1.6rem; }
}
</style>

<!-- ════════════════════════════════════════════
     HERO
════════════════════════════════════════════ -->
<section style="background:var(--grad-hero);min-height:100vh;display:flex;align-items:center;padding:7rem 0 5rem;position:relative;overflow:hidden">

  <!-- Subtle school photo background -->
  <div style="position:absolute;inset:0;background-image:url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?w=1600&q=55&auto=format&fit=crop');background-size:cover;background-position:center;opacity:.07"></div>

  <!-- Ambient orbs -->
  <div style="position:absolute;inset:0;pointer-events:none;overflow:hidden">
    <div class="anim-float-slow" style="position:absolute;top:-10%;right:-8%;width:650px;height:650px;border-radius:50%;background:radial-gradient(circle,rgba(0,139,145,.18),transparent 65%)"></div>
    <div class="anim-float-mid"  style="position:absolute;bottom:-18%;left:-6%;width:500px;height:500px;border-radius:50%;background:radial-gradient(circle,rgba(245,162,0,.10),transparent 65%)"></div>
    <!-- Grid overlay -->
    <div style="position:absolute;inset:0;background-image:repeating-linear-gradient(0deg,rgba(255,255,255,.013) 0,rgba(255,255,255,.013) 1px,transparent 1px,transparent 64px),repeating-linear-gradient(90deg,rgba(255,255,255,.013) 0,rgba(255,255,255,.013) 1px,transparent 1px,transparent 64px)"></div>
  </div>

  <div class="container" style="position:relative;z-index:1">
    <div class="row align-items-center gy-5">

      <!-- LEFT: copy -->
      <div class="col-lg-6">

        <!-- Eyebrow -->
        <div class="anim-hero-badge" style="display:inline-flex;align-items:center;gap:.55rem;background:rgba(0,139,145,.14);border:1px solid rgba(0,139,145,.32);padding:.42rem 1.1rem;border-radius:20px;margin-bottom:1.75rem;backdrop-filter:blur(8px)">
          <span style="width:7px;height:7px;border-radius:50%;background:var(--teal-light);display:inline-block;animation:pulse-dot 2.4s infinite"></span>
          <span style="color:var(--teal-light);font-size:.76rem;font-weight:700;letter-spacing:.1em">MADE FOR GHANA &bull; RUNS ANYWHERE</span>
        </div>

        <h1 class="display-1 anim-hero-h1" style="color:#fff;margin-bottom:1.4rem">
          Run your school<br>
          <span style="background:linear-gradient(135deg,#4CC8CE,#F5A200);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text">smarter, not harder.</span>
        </h1>

        <p class="anim-hero-sub" style="color:rgba(255,255,255,.6);font-size:1.1rem;line-height:1.85;max-width:490px;margin-bottom:2.25rem">
          EduTrack gives every Ghanaian school a complete digital backbone — fees, students, staff, exams, reports &amp; more. Starting at <strong style="color:var(--orange)">GHS 150/month</strong>.
        </p>

        <div class="anim-hero-ctas d-flex flex-wrap gap-3 mb-4">
          <a href="#signup" class="btn-primary-custom"><i class="fas fa-rocket"></i>Start Free Trial</a>
          <a href="../request-demo.php" class="btn-ghost-custom"><i class="fas fa-play-circle"></i>Book a Demo</a>
        </div>

        <!-- Trust signals -->
        <div class="anim-hero-trust d-flex flex-wrap gap-3">
          <?php foreach (['No setup fees','Cancel anytime','30-day guarantee','24/7 support'] as $t): ?>
          <div style="display:flex;align-items:center;gap:.4rem;color:rgba(255,255,255,.38);font-size:.8rem">
            <i class="fas fa-check-circle" style="color:#34d399;font-size:.85rem"></i><?= $t ?>
          </div>
          <?php endforeach; ?>
        </div>
      </div>

      <!-- RIGHT: dashboard mockup + floating photos -->
      <div class="col-lg-6 d-none d-lg-block">
        <div style="position:relative" class="anim-hero-mockup">

          <!-- Main dashboard card -->
          <div style="background:rgba(255,255,255,.04);border:1px solid rgba(0,139,145,.22);border-radius:var(--radius-xl);padding:1.5rem;box-shadow:0 40px 90px rgba(0,0,0,.5),0 0 0 1px rgba(0,139,145,.08)">

            <!-- Window chrome -->
            <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem">
              <div style="display:flex;gap:.45rem">
                <div style="width:10px;height:10px;border-radius:50%;background:#ff5f57"></div>
                <div style="width:10px;height:10px;border-radius:50%;background:#febc2e"></div>
                <div style="width:10px;height:10px;border-radius:50%;background:#28c840"></div>
              </div>
              <div style="background:rgba(0,139,145,.14);border:1px solid rgba(0,139,145,.22);border-radius:6px;padding:.28rem .85rem;font-size:.7rem;color:rgba(255,255,255,.45)">EduTrack Dashboard</div>
              <div style="width:26px;height:26px;border-radius:50%;background:var(--grad-primary);display:flex;align-items:center;justify-content:center;font-size:.7rem;color:#fff;font-weight:800;box-shadow:0 2px 8px rgba(0,139,145,.4)">A</div>
            </div>

            <!-- Stats -->
            <div class="row g-2 mb-3">
              <?php
              $mock_stats = [
                ['fa-user-graduate','#008B91','547',      'Students'],
                ['fa-money-bill-wave','#F5A200','GHS 12,450','Collected'],
                ['fa-users',         '#059669','28',       'Staff'],
                ['fa-chart-line',    '#4CC8CE','94%',      'Attendance'],
              ];
              foreach ($mock_stats as [$icon,$color,$val,$lbl]): ?>
              <div class="col-6">
                <div style="background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:.8rem;transition:border-color .2s" onmouseover="this.style.borderColor='rgba(0,139,145,.3)'" onmouseout="this.style.borderColor='rgba(255,255,255,.07)'">
                  <div style="display:flex;align-items:center;gap:.45rem;margin-bottom:.35rem">
                    <i class="fas <?= $icon ?>" style="color:<?= $color ?>;font-size:.78rem"></i>
                    <span style="color:rgba(255,255,255,.3);font-size:.63rem;text-transform:uppercase;letter-spacing:.08em"><?= $lbl ?></span>
                  </div>
                  <div style="color:#fff;font-size:1.1rem;font-weight:800;letter-spacing:-.02em"><?= $val ?></div>
                </div>
              </div>
              <?php endforeach; ?>
            </div>

            <!-- Recent payments -->
            <div style="background:rgba(255,255,255,.025);border-radius:10px;padding:.8rem;border:1px solid rgba(0,139,145,.1)">
              <div style="color:rgba(255,255,255,.28);font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;margin-bottom:.7rem">Recent Payments</div>
              <?php
              $mock_rows  = ['Kwame Mensah — GHS 450','Ama Asante — GHS 280','Kofi Boateng — GHS 550'];
              $avi_colors = ['#008B91','#F5A200','#006168'];
              foreach ($mock_rows as $i => $r): ?>
              <div style="display:flex;align-items:center;justify-content:space-between;padding:.4rem 0;border-bottom:1px solid rgba(255,255,255,.04)">
                <div style="display:flex;align-items:center;gap:.6rem">
                  <div style="width:24px;height:24px;border-radius:50%;background:<?= $avi_colors[$i] ?>;display:flex;align-items:center;justify-content:center;font-size:.65rem;color:#fff;font-weight:800"><?= strtoupper(substr($r,0,1)) ?></div>
                  <span style="color:rgba(255,255,255,.6);font-size:.76rem"><?= $r ?></span>
                </div>
                <span style="color:#34d399;font-size:.7rem;font-weight:700;background:rgba(52,211,153,.1);padding:.18rem .55rem;border-radius:8px">Paid</span>
              </div>
              <?php endforeach; ?>
            </div>
          </div>

          <!-- Floating badge 1 — top right -->
          <div class="hero-float-badge" style="top:-20px;right:-24px;animation-delay:.5s">
            <div style="width:32px;height:32px;border-radius:8px;background:rgba(5,150,105,.2);display:flex;align-items:center;justify-content:center">
              <i class="fas fa-chart-line" style="color:#34d399;font-size:.9rem"></i>
            </div>
            <div>
              <div style="color:rgba(255,255,255,.4);font-size:.62rem;text-transform:uppercase;letter-spacing:.06em">Collection Rate</div>
              <div style="color:#fff;font-weight:800;font-size:.95rem">+34% <span style="color:#34d399;font-size:.72rem">this term</span></div>
            </div>
          </div>

          <!-- Floating badge 2 — bottom left -->
          <div class="hero-float-badge" style="bottom:-18px;left:-20px;animation-delay:1.2s">
            <div style="width:32px;height:32px;border-radius:8px;background:rgba(245,162,0,.18);display:flex;align-items:center;justify-content:center">
              <i class="fas fa-file-alt" style="color:var(--orange);font-size:.9rem"></i>
            </div>
            <div>
              <div style="color:rgba(255,255,255,.4);font-size:.62rem;text-transform:uppercase;letter-spacing:.06em">Reports Ready</div>
              <div style="color:#fff;font-weight:800;font-size:.95rem">248 <span style="color:var(--orange);font-size:.72rem">report cards</span></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

<!-- ── Trust ticker ── -->
<div style="background:rgba(0,139,145,.06);border-top:1px solid rgba(0,139,145,.12);border-bottom:1px solid rgba(0,139,145,.12);padding:.85rem 0;overflow:hidden">
  <div class="ticker-wrap">
    <div class="ticker-track">
      <?php
      $trust_items = ['✓ GES-Standard Report Cards','✓ Instant WhatsApp Receipts','✓ Bulk Student Import','✓ BECE Grading','✓ Role-Based Access','✓ Automated Fee Reminders','✓ Parent Portal','✓ Staff Payroll','✓ AI Analytics','✓ 30-Day Free Trial',
                      '✓ GES-Standard Report Cards','✓ Instant WhatsApp Receipts','✓ Bulk Student Import','✓ BECE Grading','✓ Role-Based Access','✓ Automated Fee Reminders','✓ Parent Portal','✓ Staff Payroll','✓ AI Analytics','✓ 30-Day Free Trial'];
      foreach ($trust_items as $item): ?>
      <span style="color:var(--teal);font-size:.82rem;font-weight:600;padding:0 1rem"><?= $item ?></span>
      <?php endforeach; ?>
    </div>
  </div>
</div>

<!-- ── Stats bar ── -->
<div style="background:#fff;border-bottom:1px solid var(--border);padding:2rem 0;position:relative">
  <div style="position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--teal),var(--orange),var(--teal));animation:barGrow 1s ease both"></div>
  <div class="container">
    <div class="row g-4 text-center">
      <?php
      $stats = [
        ['17+','Modules','across all plans'],
        ['3',  'Flexible Plans','starter to premium'],
        ['500+','Students','on Growth plan'],
        ['24/7','Support','always available'],
      ];
      foreach ($stats as [$num,$title,$sub]): ?>
      <div class="col-6 col-md-3">
        <div class="stat-num"><?= $num ?></div>
        <div style="font-weight:700;color:var(--slate);font-size:.9rem;margin-top:.15rem"><?= $title ?></div>
        <div style="font-size:.78rem;color:var(--muted)"><?= $sub ?></div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</div>

<!-- ════════════════════════════════════════════
     FEATURES
════════════════════════════════════════════ -->
<section class="section" id="features" style="background:var(--bg-subtle)">
  <div class="container">
    <div class="text-center section-header reveal">
      <div class="eyebrow"><i class="fas fa-puzzle-piece me-1"></i>Everything Included</div>
      <h2 class="section-title-main">Your entire school<br>in one platform</h2>
      <p class="section-subtitle">From the first enrolment to end-of-term reports — every process is covered, connected and automated.</p>
    </div>

    <div class="row g-4">
      <?php
      $features = [
        ['fa-user-graduate', '#008B91','rgba(0,139,145,.1)',  'Student Management','Complete enrolment, profiles, attendance tracking, class promotions, and student history — all searchable in seconds.'],
        ['fa-money-bill-wave','#F5A200','rgba(245,162,0,.1)', 'Fees & Payments',   'Automated fee structures, payment records, receipts, and overdue tracking with instant WhatsApp reminders.'],
        ['fa-chart-bar',     '#059669','rgba(5,150,105,.1)',  'Reports & Analytics','Generate detailed terminal reports, fee summaries, and performance dashboards with a single click.'],
        ['fa-pencil-alt',    '#dc2626','rgba(220,38,38,.1)',  'Exams & Question Bank','Build a reusable question bank, schedule exams, record results and compute GES aggregates automatically.'],
        ['fa-calendar-alt',  '#D98400','rgba(217,119,6,.1)',  'Smart Timetable',   'Visual timetable builder with automatic teacher conflict detection and period management.'],
        ['fa-users',         '#008B91','rgba(0,139,145,.1)',  'Parent Portal',     'Parents can check fees, download results, and receive automated alerts — reducing admin calls significantly.'],
        ['fa-bell',          '#006672','rgba(0,102,114,.1)',  'Alerts & SMS',      'Broadcast messages to all parents or specific classes. Automated payment reminders go out on schedule.'],
        ['fa-chalkboard-teacher','#059669','rgba(5,150,105,.1)','Staff Management','Staff profiles, roles, subjects, and payroll-ready reports in one place.'],
        ['fa-robot',         '#dc2626','rgba(220,38,38,.1)',  'AI Analytics',      'AI-powered insights surface hidden patterns in student performance and fee collection trends.'],
        ['fa-file-alt',      '#D98400','rgba(217,119,6,.1)',  'Terminal Reports',  'Professionally formatted end-of-term reports with class rankings, subject scores and remarks.'],
        ['fa-shield-alt',    '#008B91','rgba(0,139,145,.1)',  'User Management',   'Role-based access control — admins, class teachers, accountants and more, each seeing only what they need.'],
        ['fa-database',      '#006672','rgba(0,102,114,.1)',  'Data Migration',    'Import your existing data from Excel or other systems in minutes, not days.'],
      ];
      foreach ($features as $i => [$icon,$color,$bg,$title,$desc]): ?>
      <div class="col-sm-6 col-lg-4 reveal reveal-delay-<?= ($i%4)+1 ?>">
        <div class="card-custom">
          <div class="card-icon" style="background:<?= $bg ?>">
            <i class="fas <?= $icon ?>" style="color:<?= $color ?>"></i>
          </div>
          <h5 style="font-size:1rem;font-weight:700;color:var(--navy);margin-bottom:.5rem"><?= $title ?></h5>
          <p style="color:var(--muted);font-size:.875rem;line-height:1.7;margin:0"><?= $desc ?></p>
        </div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ════════════════════════════════════════════
     HOW IT WORKS (PREVIEW) — WITH IMAGE
════════════════════════════════════════════ -->
<section class="section" style="background:#fff">
  <div class="container">
    <div class="row align-items-center g-5">

      <!-- Steps -->
      <div class="col-lg-5 reveal">
        <div class="eyebrow"><i class="fas fa-route me-1"></i>Simple Process</div>
        <h2 class="section-title-main mb-3">Up and running in <span class="text-gradient">3 steps</span></h2>
        <p class="lead-custom mb-4">No technical knowledge required. Our team handles everything from setup to data migration.</p>

        <div class="d-flex flex-column gap-3 mb-4">
          <?php
          $steps = [
            ['01','fas fa-paper-plane','Submit Enquiry','Fill the form or WhatsApp us. We respond within 24 hours.','#008B91'],
            ['02','fas fa-cogs',       'We Set It Up',  'Our team installs, migrates your data and trains your staff.','#F5A200'],
            ['03','fas fa-check-circle','Go Live',      'Fully operational. Students, fees, reports — all ready.','#059669'],
          ];
          foreach ($steps as [$num,$ic,$title,$desc,$color]): ?>
          <div style="display:flex;gap:1rem;align-items:flex-start;background:<?= $color ?>0D;border:1px solid <?= $color ?>22;border-radius:var(--radius-lg);padding:1.1rem 1.25rem;transition:all .3s" onmouseover="this.style.transform='translateX(6px)';this.style.boxShadow='0 8px 24px rgba(0,0,0,.07)'" onmouseout="this.style.transform='translateX(0)';this.style.boxShadow='none'">
            <div style="width:38px;height:38px;border-radius:10px;background:<?= $color ?>;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px <?= $color ?>44">
              <i class="fas <?= $ic ?>" style="color:#fff;font-size:.9rem"></i>
            </div>
            <div>
              <div style="font-weight:700;color:var(--navy);margin-bottom:.2rem;font-size:.95rem"><?= $title ?></div>
              <div style="font-size:.83rem;color:var(--muted);line-height:1.55"><?= $desc ?></div>
            </div>
          </div>
          <?php endforeach; ?>
        </div>

        <a href="how-it-works.php" class="btn-outline-custom"><i class="fas fa-arrow-right"></i>Full Setup Guide</a>
        
      </div>

      <!-- Stock image + overlay badge -->
      <div class="col-lg-7 reveal reveal-delay-2">
        <div class="hiw-frame">
          <!-- Real classroom/school stock photo -->
          <img src="https://images.unsplash.com/photo-1497633762265-9d179a990aa6?w=900&q=75&auto=format&fit=crop"
               alt="School management in action"
               style="width:100%;height:380px;object-fit:cover;display:block">
          <!-- Teal gradient overlay at bottom -->
          <div style="position:absolute;bottom:0;left:0;right:0;height:200px;background:linear-gradient(to top,rgba(7,22,24,.95),transparent)"></div>
          <!-- Info floating over image -->
          <div style="position:absolute;bottom:1.5rem;left:1.5rem;right:1.5rem">
            <div class="d-flex flex-wrap gap-3">
              <?php
              $img_badges = [
                ['#34d399','fas fa-check-circle','Setup in 1 day'],
                ['var(--orange)','fas fa-star','5★ rated'],
                ['var(--teal-light)','fas fa-school','All school types'],
              ];
              foreach ($img_badges as [$color,$ic,$label]): ?>
              <div style="display:flex;align-items:center;gap:.4rem;background:rgba(12,30,32,.8);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:.4rem .85rem">
                <i class="<?= $ic ?>" style="color:<?= $color ?>;font-size:.8rem"></i>
                <span style="color:#fff;font-size:.78rem;font-weight:600"><?= $label ?></span>
              </div>
              <?php endforeach; ?>
            </div>
          </div>
        </div>
         <div class="mt-5 p-4 rounded-4" 
                         style="background:rgba(34,197,94,0.1);
                                border:1px solid rgba(34,197,94,0.3),">
                        <p class="text-black mb-0">
                            <i class="fas fa-check-circle text-success me-2"></i>
                            <strong>Now Available:</strong>Manage your child through our functional parent portal including Online payments via Card and Mobile Money (MTN, Vodafone, AirtelTigo). 
                            <a href="/parent-portal/login.php" class="text-success">Parent Portal</a> now live.
                        </p>
                    </div>
      </div>
    </div>
  </div>
</section>

<!-- ════════════════════════════════════════════
     SOCIAL PROOF PHOTO STRIP
════════════════════════════════════════════ -->
<div style="background:var(--bg-subtle);padding:3rem 0;overflow:hidden">
  <div class="container">
    <div class="text-center mb-4">
      <p style="color:var(--muted);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em">Schools across Ghana love EduTrack</p>
    </div>
    <div class="row g-3 align-items-center">
      <?php
      $school_imgs = [
        ['https://assets.globalpartnership.org/s3fs-public/styles/standard_blog_banner/public/blog_post/image/blog-photo_sabre-ed.jpg?VersionId=YdBSpHf3aGq1M2fRiShWoQiCmK_aG.kD&itok=VlPMILTL', 'Students in class'],
        ['https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQloWFwGN5eW-CsAUUCqpqnlwNHc6pvgAZ0ug&s', 'Teacher and students'],
        ['https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ1YwHi3Pm6MSSTJxzzhwVwKB8ugNQ801ESSg&s', 'School learning'],
        ['https://www.nasia.gov.gh/wp-content/uploads/IMG_8059-scaled.jpg', 'School administrator'],
      ];
      foreach ($school_imgs as $i => [$src,$alt]): ?>
      <div class="col-6 col-md-3 reveal reveal-delay-<?= $i+1 ?>">
        <div style="border-radius:var(--radius-lg);overflow:hidden;position:relative;box-shadow:var(--shadow-md)">
          <img src="<?= $src ?>" alt="<?= $alt ?>" style="width:100%;height:160px;object-fit:cover;display:block;transition:transform .5s ease" onmouseover="this.style.transform='scale(1.06)'" onmouseout="this.style.transform='scale(1)'">
          <div style="position:absolute;inset:0;background:linear-gradient(to top,rgba(12,30,32,.6),transparent 60%)"></div>
        </div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</div>

<!-- ════════════════════════════════════════════
     PRICING
════════════════════════════════════════════ -->
<section class="section" id="pricing" style="background:#fff">
  <div class="container">
    <div class="text-center section-header reveal">
      <div class="eyebrow"><i class="fas fa-tag me-1"></i>Pricing</div>
      <h2 class="section-title-main">Simple, transparent pricing</h2>
      <p class="section-subtitle">All plans include unlimited admin users. No hidden fees. Upgrade or downgrade at any time.</p>
    </div>

    <div class="row g-4 justify-content-center align-items-stretch">
      <?php
      $plans = [
        ['starter','Starter','GHS 150','month','Perfect for small primary and JHS schools.',
         '#64748b','rgba(100,116,139,.1)',
         ['Dashboard & overview','Up to 200 students','Fees & payment records','Expense tracking','Basic reports','Staff management','SMS alerts','User roles & permissions','Settings & configuration'],
         false],
        ['growth','Growth','GHS 250','month','The most popular choice for growing schools.',
         '#008B91','rgba(0,139,145,.1)',
         ['Everything in Starter','Up to 500 students','Terminal report cards','Exams & question bank','Visual timetable','Parent portal','Online payment links','Data migration tool'],
         true],
        ['premium','Premium','GHS 400','month','For large schools that need the full platform.',
         '#F5A200','rgba(245,162,0,.1)',
         ['Everything in Growth','Unlimited students','AI analytics dashboard','AI exam generator','Priority support','Custom integrations','Dedicated account manager'],
         false],
      ];
      foreach ($plans as [$key,$name,$price,$period,$desc,$color,$bg,$feats,$popular]): ?>
      <div class="col-lg-4 col-md-6 reveal">
        <div style="background:#fff;border-radius:var(--radius-xl);border:<?= $popular?'2px solid #008B91':'1px solid var(--border)' ?>;padding:2.25rem;height:100%;position:relative;box-shadow:<?= $popular?'0 24px 64px rgba(0,139,145,.14)':'var(--shadow-sm)' ?>;display:flex;flex-direction:column;transition:all .3s" onmouseover="this.style.transform='translateY(-5px)'" onmouseout="this.style.transform='translateY(0)'">
          <?php if ($popular): ?>
          <div style="position:absolute;top:-1px;right:2rem;background:var(--grad-primary);color:#fff;font-size:.7rem;font-weight:800;padding:.4rem 1.2rem;border-radius:0 0 10px 10px;letter-spacing:.06em;box-shadow:0 4px 12px rgba(0,139,145,.3)">MOST POPULAR</div>
          <?php endif; ?>
          <div style="margin-bottom:1.5rem">
            <div style="display:inline-flex;align-items:center;gap:.5rem;background:<?= $bg ?>;padding:.4rem .9rem;border-radius:20px;margin-bottom:1rem">
              <div style="width:8px;height:8px;border-radius:50%;background:<?= $color ?>"></div>
              <span style="font-size:.78rem;font-weight:700;color:<?= $color ?>"><?= strtoupper($name) ?></span>
            </div>
            <div style="font-size:2.75rem;font-weight:900;color:var(--navy);line-height:1;letter-spacing:-.04em">
              <?= $price ?><span style="font-size:1rem;font-weight:500;color:var(--muted)"> / <?= $period ?></span>
            </div>
            <p style="color:var(--muted);font-size:.875rem;margin:.75rem 0 0"><?= $desc ?></p>
          </div>
          <ul style="list-style:none;padding:0;margin:0 0 1.75rem;flex:1;display:flex;flex-direction:column;gap:.6rem">
            <?php foreach ($feats as $f): ?>
            <li style="display:flex;align-items:flex-start;gap:.6rem;font-size:.875rem;color:var(--slate)">
              <i class="fas fa-check" style="color:<?= $color ?>;margin-top:3px;font-size:.75rem;flex-shrink:0"></i><?= $f ?>
            </li>
            <?php endforeach; ?>
          </ul>
          <a href="#signup"
             onclick="document.getElementById('planSelect').value='<?= $key ?>'; updatePricingSummary()"
             style="display:block;text-align:center;padding:.85rem;border-radius:var(--radius-md);font-weight:700;font-size:.9rem;text-decoration:none;transition:all .25s;<?= $popular?'background:var(--grad-primary);color:#fff;box-shadow:var(--shadow-teal)':'background:transparent;border:1.5px solid '.$color.';color:'.$color ?>"
             onmouseover="<?= $popular?"this.style.boxShadow='0 8px 28px rgba(0,139,145,.45)'":"this.style.background='{$color}';this.style.color='#fff'" ?>"
             onmouseout="<?= $popular?"this.style.boxShadow='var(--shadow-teal)'":"this.style.background='transparent';this.style.color='{$color}'" ?>">
            Get <?= $name ?> Plan <i class="fas fa-arrow-right ms-1"></i>
          </a>
        </div>
      </div>
      <?php endforeach; ?>
    </div>

    <div class="text-center mt-4 reveal">
      <div style="display:inline-flex;align-items:center;gap:.75rem;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:var(--radius-md);padding:.85rem 1.5rem">
        <i class="fas fa-piggy-bank" style="color:#059669"></i>
        <span style="font-size:.9rem;color:#15803d"><strong>Save 2 months</strong> with annual billing — contact us for an annual quote.</span>
      </div>
    </div>
  </div>
</section>

<!-- ════════════════════════════════════════════
     TESTIMONIALS — WITH REAL PHOTOS
════════════════════════════════════════════ -->
<section class="section" style="background:var(--navy);position:relative;overflow:hidden">
  <div style="position:absolute;top:-100px;left:50%;transform:translateX(-50%);width:800px;height:300px;border-radius:50%;background:radial-gradient(ellipse,rgba(0,139,145,.1),transparent 70%);pointer-events:none"></div>
  <div class="container" style="position:relative;z-index:1">
    <div class="text-center section-header reveal">
      <div class="eyebrow" style="background:rgba(0,139,145,.18);border-color:rgba(0,139,145,.35);color:var(--teal-light)">
        <i class="fas fa-star me-1"></i>What Schools Say
      </div>
      <h2 class="section-title-main" style="color:#fff">Trusted by school administrators</h2>
      <p class="section-subtitle" style="color:rgba(255,255,255,.45)">Real feedback from real schools across Ghana</p>
    </div>
    <div class="row g-4">
      <?php
      $testimonials = [
        [
          '"EduTrack completely changed how we manage fees. Parents get instant WhatsApp receipts and overdue reminders go out automatically. Our collection rate jumped from 60% to 92%."',
          'Mr. Francis Agyeman', 'Head Teacher', 'Primary School, Accra',
          'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMMi1HrVfGGunadH1Vsw37qC019R6TD-MwgA&s',
        ],
        [
          '"The terminal report cards alone were worth it. What used to take 3 days of manual work now takes 20 minutes. Our teachers are actually happy at term-end now."',
          'Mr. Kweku Asante', 'School Administrator', 'JHS, Kumasi',
          'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRPCdJkqFdXTQ4SjVTNY255V9NhbZumcX0qUQ&s',
        ],
        [
          '"Setup was painless. Oric\'s team imported all our data and trained our staff in one afternoon. We were live the same week. Best decision we made this year."',
          'Mrs. Abena Ofori', 'Proprietress', 'Private School, Takoradi',
          'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7WpRUrG7W-oFUDsaEffm9V9-LmM1He9LxmQ&s',
        ],
      ];
      foreach ($testimonials as $i => [$quote,$name,$role,$school,$avatar]): ?>
      <div class="col-lg-4 reveal reveal-delay-<?= $i+1 ?>">
        <div style="background:rgba(255,255,255,.03);border:1px solid rgba(0,139,145,.14);border-radius:var(--radius-lg);padding:2rem;height:100%;display:flex;flex-direction:column;transition:all .3s;position:relative;overflow:hidden" onmouseover="this.style.borderColor='rgba(0,139,145,.35)';this.style.background='rgba(0,139,145,.05)'" onmouseout="this.style.borderColor='rgba(0,139,145,.14)';this.style.background='rgba(255,255,255,.03)'">
          <!-- Orange top accent -->
          <div style="position:absolute;top:0;left:2rem;right:2rem;height:2px;background:var(--grad-orange);border-radius:0 0 2px 2px"></div>
          <!-- Stars -->
          <div style="color:var(--orange);font-size:.9rem;margin-bottom:1.1rem;letter-spacing:.08em">&#9733;&#9733;&#9733;&#9733;&#9733;</div>
          <!-- Quote mark -->
          <div style="font-size:3.5rem;line-height:.8;color:rgba(0,139,145,.2);font-family:Georgia,serif;margin-bottom:.5rem">"</div>
          <p style="color:rgba(255,255,255,.72);font-size:.925rem;line-height:1.8;flex:1"><?= $quote ?></p>
          <!-- Attribution with real photo -->
          <div style="margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid rgba(255,255,255,.06);display:flex;align-items:center;gap:.85rem">
            <img src="<?= $avatar ?>" alt="<?= $name ?>" class="testi-avatar" loading="lazy">
            <div>
              <div style="color:#fff;font-weight:700;font-size:.9rem"><?= $name ?></div>
              <div style="color:var(--teal-light);font-size:.78rem;font-weight:500"><?= $role ?></div>
              <div style="color:rgba(255,255,255,.35);font-size:.75rem"><?= $school ?></div>
            </div>
          </div>
        </div>
      </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ════════════════════════════════════════════
     SIGNUP FORM
════════════════════════════════════════════ -->
<section class="section" id="signup" style="background:linear-gradient(135deg,#061214,#0B3035);position:relative;overflow:hidden">
  <div style="position:absolute;top:-150px;right:-100px;width:500px;height:500px;border-radius:50%;background:radial-gradient(circle,rgba(0,139,145,.12),transparent 65%);pointer-events:none"></div>
  <div style="position:absolute;bottom:-100px;left:-80px;width:400px;height:400px;border-radius:50%;background:radial-gradient(circle,rgba(245,162,0,.08),transparent 65%);pointer-events:none"></div>

  <div class="container" style="position:relative;z-index:1">
    <div class="row justify-content-center">
      <div class="col-xl-10">
        <div class="row g-5 align-items-center">

          <!-- Left copy -->
          <div class="col-lg-5 reveal">
            <div class="eyebrow" style="background:rgba(0,139,145,.18);border-color:rgba(0,139,145,.35);color:var(--teal-light)">
              <i class="fas fa-rocket me-1"></i>Get Started
            </div>
            <h2 style="color:#fff;font-size:clamp(1.6rem,3vw,2.1rem);font-weight:800;line-height:1.2;margin-bottom:1rem">Ready to transform your school?</h2>
            <p style="color:rgba(255,255,255,.5);font-size:.975rem;line-height:1.8;margin-bottom:2rem">Fill in the form and our team will contact you within 24 hours to set up your school, import your data, and get you live.</p>

            <!-- Perks -->
            <div class="d-flex flex-column gap-3 mb-4">
              <?php
              $perks = [
                ['fa-clock',     'Setup in one day',    'Our team handles the entire installation remotely.'],
                ['fa-database',  'Free data import',    'We import your existing student and fee records.'],
                ['fa-headset',   'Free training',       'Remote training for your admin team included.'],
                ['fa-shield-alt','30-day guarantee',    'Not satisfied? Get a full refund, no questions asked.'],
              ];
              foreach ($perks as [$icon,$title,$desc]): ?>
              <div style="display:flex;align-items:flex-start;gap:.85rem">
                <div style="width:38px;height:38px;border-radius:10px;background:rgba(0,139,145,.18);border:1px solid rgba(0,139,145,.32);display:flex;align-items:center;justify-content:center;flex-shrink:0">
                  <i class="fas <?= $icon ?>" style="color:var(--teal-light);font-size:.85rem"></i>
                </div>
                <div>
                  <div style="color:#fff;font-weight:600;font-size:.9rem"><?= $title ?></div>
                  <div style="color:rgba(255,255,255,.38);font-size:.82rem;line-height:1.5"><?= $desc ?></div>
                </div>
              </div>
              <?php endforeach; ?>
            </div>

            <!-- Admin photo strip -->
            <div style="display:flex;align-items:center;gap:.75rem;background:rgba(0,139,145,.1);border:1px solid rgba(0,139,145,.2);border-radius:12px;padding:.85rem 1rem">
              <div style="display:flex">
                <?php
                $admin_photos = [
                  'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMMi1HrVfGGunadH1Vsw37qC019R6TD-MwgA&s',
                  'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRPCdJkqFdXTQ4SjVTNY255V9NhbZumcX0qUQ&s',
                  'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7WpRUrG7W-oFUDsaEffm9V9-LmM1He9LxmQ&s',
                ];
                foreach ($admin_photos as $j => $p): ?>
                <img src="<?= $p ?>" alt="School admin" style="width:32px;height:32px;border-radius:50%;border:2px solid #0B3035;object-fit:cover;margin-left:<?= $j?'-8px':'0' ?>">
                <?php endforeach; ?>
              </div>
              <div>
                <div style="color:#fff;font-size:.82rem;font-weight:600">Join 50+ schools already using EduTrack</div>
                <div style="color:rgba(255,255,255,.35);font-size:.75rem">Accra · Kumasi · Takoradi · Cape Coast &amp; more</div>
              </div>
            </div>
          </div>

          <!-- Form -->
          <div class="col-lg-7 reveal reveal-delay-2">
            <div style="background:rgba(255,255,255,.035);border:1px solid rgba(0,139,145,.22);border-radius:var(--radius-xl);padding:2.5rem;backdrop-filter:blur(16px);box-shadow:0 24px 64px rgba(0,0,0,.3)">

              <!-- Pricing summary -->
              <div id="pricingSummary" style="background:rgba(0,139,145,.12);border:1px solid rgba(0,139,145,.28);border-radius:var(--radius-md);padding:1rem 1.25rem;margin-bottom:1.75rem;display:flex;align-items:center;justify-content:space-between;overflow:hidden;position:relative">
                <div style="position:absolute;inset:0;background:linear-gradient(135deg,rgba(0,139,145,.08),transparent);pointer-events:none"></div>
                <div style="position:relative">
                  <div style="color:rgba(255,255,255,.45);font-size:.7rem;text-transform:uppercase;letter-spacing:.1em">Selected Plan</div>
                  <div style="color:#fff;font-weight:700;font-size:1rem" id="summaryPlanName">Starter</div>
                </div>
                <div style="text-align:right;position:relative">
                  <div style="font-size:1.75rem;font-weight:900;color:var(--teal-light);line-height:1" id="summaryPrice">GHS 150</div>
                  <div style="color:rgba(255,255,255,.35);font-size:.75rem">/month</div>
                </div>
              </div>

              <div id="formAlert" class="d-none mb-3 p-3 rounded-3 small"></div>

              <form id="signupForm">
                <div class="row g-3">
                  <div class="col-md-8">
                    <label style="color:rgba(255,255,255,.55);font-size:.78rem;font-weight:600;display:block;margin-bottom:.4rem;letter-spacing:.03em">School Name *</label>
                    <input type="text" name="school_name" required placeholder="e.g. Westgate Academy"
                           style="width:100%;background:rgba(255,255,255,.065);border:1.5px solid rgba(255,255,255,.1);color:#fff;border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.9rem;outline:none;transition:all .2s;font-family:var(--font)"
                           onfocus="this.style.borderColor='rgba(0,139,145,.65)';this.style.background='rgba(0,139,145,.09)'"
                           onblur="this.style.borderColor='rgba(255,255,255,.1)';this.style.background='rgba(255,255,255,.065)'">
                  </div>
                  <div class="col-md-4">
                    <label style="color:rgba(255,255,255,.55);font-size:.78rem;font-weight:600;display:block;margin-bottom:.4rem;letter-spacing:.03em">Plan *</label>
                    <select id="planSelect" name="plan" onchange="updatePricingSummary()"
                            style="width:100%;background:rgba(255,255,255,.065);border:1.5px solid rgba(255,255,255,.1);color:#fff;border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.9rem;outline:none;font-family:var(--font)">
                      <option value="starter" style="background:#0B3035">Starter — GHS 150/mo</option>
                      <option value="growth"  style="background:#0B3035">Growth — GHS 250/mo</option>
                      <option value="premium" style="background:#0B3035">Premium — GHS 400/mo</option>
                    </select>
                  </div>
                  <?php
                  $form_fields = [
                    ['col-md-6','text', 'contact_name','Contact Name *',  'Head teacher / Director'],
                    ['col-md-6','tel',  'phone',       'Phone Number *',  '024 XXX XXXX'],
                    ['col-md-6','email','email',       'Email Address',   'school@email.com'],
                  ];
                  foreach ($form_fields as [$col,$type,$name,$label,$ph]): ?>
                  <div class="<?= $col ?>">
                    <label style="color:rgba(255,255,255,.55);font-size:.78rem;font-weight:600;display:block;margin-bottom:.4rem;letter-spacing:.03em"><?= $label ?></label>
                    <input type="<?= $type ?>" name="<?= $name ?>" <?= str_ends_with($label,'*')?'required':'' ?> placeholder="<?= $ph ?>"
                           style="width:100%;background:rgba(255,255,255,.065);border:1.5px solid rgba(255,255,255,.1);color:#fff;border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.9rem;outline:none;transition:all .2s;font-family:var(--font)"
                           onfocus="this.style.borderColor='rgba(0,139,145,.65)';this.style.background='rgba(0,139,145,.09)'"
                           onblur="this.style.borderColor='rgba(255,255,255,.1)';this.style.background='rgba(255,255,255,.065)'">
                  </div>
                  <?php endforeach; ?>
                  <div class="col-md-6">
                    <label style="color:rgba(255,255,255,.55);font-size:.78rem;font-weight:600;display:block;margin-bottom:.4rem;letter-spacing:.03em">Hosting Preference</label>
                    <select name="hosting" style="width:100%;background:rgba(255,255,255,.065);border:1.5px solid rgba(255,255,255,.1);color:#fff;border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.9rem;outline:none;font-family:var(--font)">
                      <option value="shared" style="background:#0B3035">Managed (Oric handles it)</option>
                      <option value="vps"    style="background:#0B3035">VPS / Self-hosted</option>
                      <option value="cloud"  style="background:#0B3035">Oric Cloud</option>
                    </select>
                  </div>
                  <div class="col-12">
                    <label style="color:rgba(255,255,255,.55);font-size:.78rem;font-weight:600;display:block;margin-bottom:.4rem;letter-spacing:.03em">Message (optional)</label>
                    <textarea name="message" rows="2" placeholder="Any specific requirements or questions…"
                              style="width:100%;background:rgba(255,255,255,.065);border:1.5px solid rgba(255,255,255,.1);color:#fff;border-radius:var(--radius-sm);padding:.75rem 1rem;font-size:.9rem;outline:none;resize:none;transition:all .2s;font-family:var(--font)"
                              onfocus="this.style.borderColor='rgba(0,139,145,.65)';this.style.background='rgba(0,139,145,.09)'"
                              onblur="this.style.borderColor='rgba(255,255,255,.1)';this.style.background='rgba(255,255,255,.065)'"></textarea>
                  </div>
                  <div class="col-12">
                    <button type="submit" id="submitBtn" class="btn-primary-custom w-100 justify-content-center" style="padding:1rem">
                      <i class="fas fa-paper-plane"></i>Send Enquiry — It's Free
                    </button>
                    <p style="color:rgba(255,255,255,.25);font-size:.75rem;text-align:center;margin-top:.75rem">
                      <i class="fas fa-lock me-1"></i>Your information is safe and never shared with third parties.
                    </p>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

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

<script>
const planData = {
  starter:{name:'Starter',price:'GHS 150'},
  growth: {name:'Growth', price:'GHS 250'},
  premium:{name:'Premium',price:'GHS 400'}
};
function updatePricingSummary() {
  const plan = document.getElementById('planSelect').value;
  document.getElementById('summaryPlanName').textContent = planData[plan].name;
  document.getElementById('summaryPrice').textContent    = planData[plan].price;
}

document.getElementById('signupForm').addEventListener('submit', async function(e) {
  e.preventDefault();
  const btn   = document.getElementById('submitBtn');
  const alert = document.getElementById('formAlert');
  btn.disabled = true;
  btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Sending…';
  alert.className = 'd-none';

  try {
    const resp = await fetch('../license-server/submit_enquiry.php', {method:'POST', body: new FormData(this)});
    const data = await resp.json();
    if (data.success) {
      alert.className = 'mb-3 p-3 rounded-3 small';
      alert.style.cssText = 'background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.3);color:#34d399';
      alert.innerHTML = '<i class="fas fa-check-circle me-2"></i>' + data.message;
      this.reset();
    } else throw new Error(data.error || 'Submission failed');
  } catch(err) {
    alert.className = 'mb-3 p-3 rounded-3 small';
    alert.style.cssText = 'background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#f87171';
    alert.innerHTML = '<i class="fas fa-exclamation-circle me-2"></i>' + err.message;
  }
  btn.disabled = false;
  btn.innerHTML = '<i class="fas fa-paper-plane"></i> Send Enquiry — It\'s Free';
  alert.classList.remove('d-none');
});
</script>
