<?php
/**
 * @var \App\View\AppView $this
 * @var string $message
 * @var string $url
 */
use Cake\Core\Configure;

if (Configure::read('debug')) {
    $this->setLayout('dev_error');
    $this->assign('title', $message);
    $this->assign('templateName', 'error400.php');
    $this->start('file');
    echo $this->element('auto_table_warning');
    $this->end();
} else {
    $this->setLayout('landing');
    $this->assign('title', 'Page not found');
}
?>
<?php if (!Configure::read('debug')) : ?>
<div class="mx-auto max-w-2xl px-6 py-14 md:py-20 text-neutral-800">
<?php endif; ?>
<h2 class="font-serif text-2xl font-semibold text-ink-900 md:text-3xl"><?= h($message) ?></h2>
<p class="mt-4 text-neutral-600 leading-relaxed">
    <span class="font-semibold text-ink-900"><?= __d('cake', 'Error') ?>: </span>
    <?= __d('cake', 'The requested address {0} was not found on this server.', "<strong class=\"text-ink-900\">'{$url}'</strong>") ?>
</p>
<?php if (!Configure::read('debug')) : ?>
    <p class="mt-10">
        <?= $this->Html->link(
            '← Back to home',
            '/',
            ['class' => 'text-sm font-semibold text-primary-600 hover:text-primary-800']
        ) ?>
    </p>
</div>
<?php endif; ?>
