<?php
declare(strict_types=1);

/**
 * @var \App\View\AppView $this
 * @var string $primaryLabel
 * @var string $primaryUrl
 * @var string $requestedPath
 */
$fallbackUrl = $this->Url->build($primaryUrl);
$this->assign('title', "That page isn't here · CandleCraft Academy");

$this->start('meta');
?>
<meta http-equiv="refresh" content="8;url=<?= h($fallbackUrl) ?>">
<?php
$this->end();
?>

<section class="cc-error-hero">
    <div class="cc-error-code">404</div>
    <h1>That page isn't here.</h1>
    <p>The address you tried didn't match anything we know. We'll bounce you back to a working page in a few seconds — or pick one below.</p>
    <div style="font-family: monospace; font-size: 12.5px; color: var(--cc-ink-3); margin: 18px 0 28px;">
        requested · <?= h($requestedPath) ?>
    </div>
    <div class="cc-error-ctas">
        <a class="cc-btn cc-btn--primary" href="<?= h($fallbackUrl) ?>"><?= h($primaryLabel) ?> →</a>
        <a class="cc-btn cc-btn--outline" href="<?= $this->Url->build(['_name' => 'contact_add']) ?>">Send a quick note</a>
        <a class="cc-btn cc-btn--ghost" href="<?= $this->Url->build(['_name' => 'booking_index']) ?>">Browse classes</a>
    </div>
</section>
