<?php require __DIR__.'/../layouts/header.php'; ?>
<div class="auth">
  <h1>Create your account</h1>
  <p>Velora is strictly for adults aged 18 and over.</p>
  <p class="muted" style="font-size:13px;margin-bottom:12px">You get a <strong>72-hour free trial</strong> to discover and match. <strong>Inbox &amp; messaging unlock after Monthly Access (KES 500)</strong> — this keeps chats genuine.</p>
<form method="post" action="<?= url('register') ?>" autocomplete="on">
    <?= csrf() ?>
    <label>Name
      <input name="name" required maxlength="80" minlength="2" placeholder="Your first name" value="<?= old('name') ?>">
    </label>
    <label>Email
      <input type="email" name="email" required placeholder="you@example.com" value="<?= old('email') ?>">
    </label>
    <label>Date of birth
      <input type="date" name="dob" required max="<?= date('Y-m-d', strtotime('-18 years')) ?>">
    </label>
    <label>Password
      <input type="password" name="password" minlength="8" required placeholder="At least 8 characters" autocomplete="new-password">
    </label>
    <label>Confirm password
      <input type="password" name="password_confirm" minlength="8" required placeholder="Repeat password" autocomplete="new-password">
    </label>
    <label class="check">
      <input type="checkbox" name="adult" value="1" required>
      I confirm I am 18 or older and accept the Terms and Privacy Policy.
    </label>
    <button class="btn" type="submit">Create account</button>
  </form>
  <p style="margin-top:14px;font-size:14px;color:var(--muted)">Already have an account? <a href="<?= url('login') ?>">Sign in</a></p>
</div>
<?php require __DIR__.'/../layouts/footer.php'; ?>
