<?php $locale = current_locale(); ?>
<section class="hero-grid participant-start-grid">
    <div class="hero-copy">
        <p class="eyebrow participant-hero-eyebrow"><?= e(trans('participant.eyebrow', [], $locale)) ?></p>
        <h1><?= e(trans('participant.start_heading', [], $locale)) ?></h1>
        <p class="lead">
            <?= e(trans('participant.start_lead', [], $locale)) ?>
        </p>
    </div>

    <div class="card form-card">
        <h2><?= e(trans('participant.start_form_title', [], $locale)) ?></h2>
        <p class="support-copy"><?= e(trans('participant.start_form_copy', [], $locale)) ?></p>
        <form method="post" action="<?= e(base_url('/participant/start')) ?>" class="stack-form">
            <input type="hidden" name="_csrf" value="<?= e(csrf_token()) ?>">

            <label>
                <span><?= e(trans('participant.full_name', [], $locale)) ?></span>
                <input type="text" name="full_name" value="<?= e(old('full_name')) ?>" required>
            </label>

            <label>
                <span><?= e(trans('participant.email', [], $locale)) ?></span>
                <input type="email" name="email" value="<?= e(old('email')) ?>" required>
            </label>

            <label>
                <span><?= e(trans('participant.phone', [], $locale)) ?></span>
                <input type="text" name="phone" value="<?= e(old('phone')) ?>" required>
            </label>

            <label>
                <span><?= e(trans('common.language', [], $locale)) ?></span>
                <select name="language" required>
                    <?php foreach ($languages as $languageCode => $languageLabel): ?>
                        <option value="<?= e($languageCode) ?>" <?= old('language', $locale) === $languageCode ? 'selected' : '' ?>>
                            <?= e($languageLabel) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </label>

            <button class="primary-button" type="submit"><?= e(trans('participant.begin_test', [], $locale)) ?></button>
        </form>
    </div>
</section>