<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/** TALENT APPLICATION — Expects: $categories. */
?>
<section class="page-hero">
	<div class="container">
		<div class="page-hero-inner" data-reveal>
			<div class="breadcrumb"><a href="<?= base_url() ?>">Home</a> / <a href="<?= base_url('talent') ?>">Talent</a> / <span>Apply</span></div>
			<span class="eyebrow">Talent Network</span>
			<h1>Become a <span class="serif-italic text-iris">Bloom Iris</span> face</h1>
			<p>We're always discovering new talent. Tell us about yourself and join the network.</p>
		</div>
	</div>
</section>

<section class="section">
	<div class="container" style="max-width:780px;">
		<div class="form-card" data-reveal>
			<?= flash() ?>
			<form action="<?= base_url('apply/talent/submit') ?>" method="post" enctype="multipart/form-data">
				<?= form_hidden($this->security->get_csrf_token_name(), $this->security->get_csrf_hash()) ?>
				<div style="position:absolute;left:-9999px;" aria-hidden="true"><input type="text" name="website" tabindex="-1"></div>

				<span class="eyebrow">Your Details</span>
				<div class="field-row" style="margin-top:16px;">
					<div class="field"><label>Full Name <span class="req">*</span></label><input type="text" name="name" value="<?= set_value('name') ?>" required></div>
					<div class="field"><label>Category <span class="req">*</span></label>
						<select name="category" required>
							<option value="">Select…</option>
							<?php foreach ($categories as $key => $label): ?>
								<option value="<?= $key ?>" <?= set_select('category', $key) ?>><?= html_escape($label) ?></option>
							<?php endforeach; ?>
						</select>
					</div>
				</div>
				<div class="field-row">
					<div class="field"><label>Email <span class="req">*</span></label><input type="email" name="email" value="<?= set_value('email') ?>" required></div>
					<div class="field"><label>Phone <span class="req">*</span></label><input type="text" name="phone" value="<?= set_value('phone') ?>" required></div>
				</div>
				<div class="field-row">
					<div class="field"><label>Location</label><input type="text" name="location" value="<?= set_value('location') ?>" placeholder="City, Country"></div>
					<div class="field"><label>Instagram Handle</label><input type="text" name="instagram" value="<?= set_value('instagram') ?>" placeholder="@yourhandle"></div>
				</div>
				<div class="field-row">
					<div class="field"><label>Follower Count</label><input type="text" name="followers" value="<?= set_value('followers') ?>" placeholder="e.g. 12K"></div>
					<div class="field"><label>Portfolio / Website</label><input type="url" name="portfolio_url" value="<?= set_value('portfolio_url') ?>" placeholder="https://"></div>
				</div>

				<div class="field"><label>Tell Us About Yourself <span class="req">*</span></label>
					<textarea name="bio" required placeholder="Your experience, what makes you unique, and what you're looking for…"><?= set_value('bio') ?></textarea>
				</div>

				<div class="field"><label>Profile Photo</label>
					<input type="file" name="photo" accept="image/*">
					<span class="field-hint">Optional. JPG, PNG or WEBP — up to 8MB.</span>
				</div>

				<button type="submit" class="btn btn-primary btn-block btn-lg"><?= bloom_icon('star', 18) ?> Submit Application</button>
			</form>
		</div>
	</div>
</section>
