<?php
require_once __DIR__ . '/config/bootstrap.php';

// If logged in, send to dashboard. Otherwise show the landing page.
if (Session::isLoggedIn()) {
    redirect('/dashboard');
}

// Serve the static landing HTML (already in repo root as index.html)
$landing = __DIR__ . '/index.html';
if (file_exists($landing)) {
    readfile($landing);
} else {
    redirect('/login');
}
