<?php
/// file: app/View/contact/index.php

declare(strict_types=1);

/** @var array<string, mixed> $flash */
/** @var array<string, mixed> $errors */
$f = $flash ?? [];
?>
<div class="contact-page-root md:pt-32">
<section class="section-spacing">
    <div class="container-shell grid gap-16 lg:grid-cols-2">
        <div>
            <p class="muted-label">Contact</p>
            <h1 class="cinematic-heading mt-4">Begin with the launch—not the logistics.</h1>
            <p class="mt-8 text-silver-400">Tell us what you are building, for whom, and what “finished” should feel like. We read every message.</p>
            <?php if (! empty($f['success'])): ?>
                <div class="mt-8 rounded-2xl border border-emerald-500/30 bg-emerald-500/10 p-6 text-emerald-200"><?= e((string) $f['success']) ?></div>
            <?php endif; ?>
            <?php if (! empty($f['error'])): ?>
                <div class="mt-8 rounded-2xl border border-red-500/30 bg-red-500/10 p-6 text-red-200"><?= e((string) $f['error']) ?></div>
            <?php endif; ?>
        </div>
        <div class="rounded-3xl border border-white/10 bg-charcoal/40 p-6 sm:p-8 md:p-10">
            <?php \App\Core\View::component('contact-form', ['errors' => $errors ?? []]); ?>
        </div>
    </div>
</section>
</div>
