<?php

declare(strict_types=1);

/**
 * Chrome-less placeholder rendered when site_settings.public_mode is set to
 * coming_soon or maintenance. Styling is tokens-only — no font-family / color /
 * background literals — so the page inherits the operator's active theme.
 *
 * Required scope variables: $mode ('coming_soon' | 'maintenance').
 */

/** @var string $mode */
$mode = isset($mode) && in_array((string) $mode, ['coming_soon', 'maintenance'], true)
    ? (string) $mode
    : 'coming_soon';

$heading = $mode === 'maintenance' ? 'Maintenance Mode' : 'Coming Soon';
$subcopy = $mode === 'coming_soon' ? 'Check back soon. We are preparing for launch!' : '';
?><!DOCTYPE html>
<html lang="<?= myronEscape(myronSiteLanguage()) ?>">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="robots" content="noindex, nofollow">
  <title><?= myronEscape($heading) ?></title>
  <?= myronRenderSiteFaviconLink() . "\n" ?>
  <?= myronRenderDefinitionFontHeadTags() . "\n" ?>
  <link rel="stylesheet" href="<?= myronEscape(myronBuildAssetUrl('runtime/css/tokens.css')) ?>">
  <link rel="stylesheet" href="<?= myronEscape(myronBuildAssetUrl('runtime/css/runtime-fonts.css')) ?>">
  <link rel="stylesheet" href="<?= myronEscape(myronBuildAssetUrl('runtime/css/runtime-token-overrides.css')) ?>">
  <style>
    html, body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      background: var(--myron-color-bg);
      color: var(--myron-color-text);
      font-family: var(--myron-font-role-body-family, var(--myron-typography-font-sans));
      font-size: var(--myron-typography-size-md);
      line-height: var(--myron-typography-line-normal);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    .myron-site-mode {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      padding: var(--myron-space-s6) var(--myron-space-s4);
      text-align: center;
    }
    .myron-site-mode__heading {
      margin: 0;
      font-family: var(--myron-font-role-headlines-family, var(--myron-typography-font-sans));
      font-weight: var(--myron-font-role-headlines-weight, var(--myron-typography-weight-bold));
      line-height: var(--myron-typography-line-tight);
      font-size: var(--myron-font-role-headlines-size, var(--myron-typography-size-3xl));
      letter-spacing: var(--myron-typography-tracking-tight, normal);
      color: var(--myron-color-text);
    }
    .myron-site-mode__subcopy {
      margin: var(--myron-space-s3) 0 0;
      max-width: 36rem;
      font-size: var(--myron-typography-size-lg, var(--myron-typography-size-md));
      color: var(--myron-color-text-muted);
    }
  </style>
</head>
<body>
  <main class="myron-site-mode" role="main">
    <h1 class="myron-site-mode__heading"><?= myronEscape($heading) ?></h1>
    <?php if ($subcopy !== ''): ?>
    <p class="myron-site-mode__subcopy"><?= myronEscape($subcopy) ?></p>
    <?php endif; ?>
  </main>
</body>
</html>
