/* The one-pager: one calm front page, six portal cards three to a row, then the ways in. Behind the
   cards, the shared map's pages (shared/system.css). */
body { background: var(--mist); }
.site { block-size: 100vh; block-size: 100dvh; }

/* The front page is wider than a content page, so the areas sit three to a row under a large title. */
/* Scoped to the front page's own header: the area pages inside its cards keep their own sizes. */
.layer-page[data-kind="home"] { max-inline-size: calc(1120px + 2 * var(--margin)); }
.layer-page[data-kind="home"] > .layer-page-header > .layer-page-title { font-size: clamp(56px, 8.4vw, 112px); line-height: .96; letter-spacing: -.045em; }
.front-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.front-grid > .layer-card { aspect-ratio: 5 / 4; }

/* An area's header is narrower than its page, so its card on the front page shows it large. */
.layer-page[data-kind="area"] > .layer-page-header { max-inline-size: 440px; }

/* The masthead heads the page's header. The header is one centred block, as wide as its widest
   line, so a card or the rail frames it whole. Everything below sits on the column grid. */
.front-masthead { display: grid; justify-items: center; gap: 12px; margin-block-end: 58px; }
.front-wordmark { font: 600 15px/1 var(--sans); letter-spacing: .22em; }
.front-slogan { color: var(--muted); font-size: 16px; line-height: 1.4; letter-spacing: -.005em; }
/* Availability closes the masthead, a step below the slogan. */
.front-status { margin-block-start: 6px; color: var(--muted); }

.layer-page[data-kind="home"] { padding-block-start: 56px; }
.layer-page[data-kind="home"] > .layer-page-header { justify-items: center; inline-size: fit-content; max-inline-size: 100%; margin-inline: auto; text-align: center; }
.layer-page[data-kind="home"] > .layer-page-header > .layer-page-subtitle { max-inline-size: 30em; }
.layer-page[data-kind="home"] > .layer-page-body { margin-block-start: 56px; }

/* Start a project in the middle, the two other routes either side. */
.front-routes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-block-start: 24px;
  padding-block-start: 40px;
  border-block-start: 1px solid var(--rule);
}
.front-route { display: grid; gap: 8px; }
.front-route:last-child { justify-items: end; text-align: end; }
.front-route h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.front-route p { max-inline-size: 22em; color: var(--muted); font-size: 15px; line-height: 1.5; }
.front-route .text-link { margin-block-start: 6px; font-size: 15px; font-weight: 500; }
.front-primary { display: grid; justify-items: center; }
.fallback-home .status { color: var(--muted); }
.front-primary .button { min-inline-size: 200px; min-block-size: 52px; font-size: 16px; }
.front-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-block-start: 24px; padding-block-start: 24px; color: var(--muted); }
.front-footer a { text-decoration: none; }
.front-footer a:hover { color: var(--ink); }
.front-footer-brand, .front-footer-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; }
.front-footer-brand { column-gap: 20px; }
/* The footer's availability: a size down, its dot and halo scaled with it so each tone keeps its colour. */
.front-footer-status { gap: 6px; font-size: 11px; }
.front-footer-status .status-dot { scale: .72; }
.front-email { text-transform: none; letter-spacing: .02em; }

/* Without JavaScript */
/* With scripting on, the page builds itself within moments of loading, so the plain HTML stays out of
   sight rather than flash first in another layout. If the scripts never arrive, it shows after 3s. */
@media (scripting: enabled) {
  .site > .fallback { visibility: hidden; max-block-size: 100%; overflow: hidden; animation: fallback-show 0s 3s forwards; }
}
@keyframes fallback-show { to { visibility: visible; max-block-size: none; overflow: visible; } }
.fallback { display: grid; gap: 20px; max-inline-size: calc(var(--frame) + 2 * var(--margin)); margin: 0 auto; padding: 56px var(--margin) 96px; }
.fallback-home { justify-items: center; text-align: center; }
.fallback h1 { font-size: 48px; line-height: 1.04; letter-spacing: -.026em; }
.fallback h2 { font-size: 28px; letter-spacing: -.015em; }
.fallback .wordmark { font-size: 15px; letter-spacing: .22em; }
.fallback-links { display: grid; inline-size: 100%; padding: 0; list-style: none; text-align: start; }
.fallback-links a { display: grid; gap: 4px; padding: 18px 0; border-block-start: 1px solid var(--rule); text-decoration: none; }
.fallback-links span, .fallback-lead { color: var(--muted); }

/* Plain pages */
.plain-bar { max-inline-size: calc(var(--frame) + 2 * var(--margin)); margin: 0 auto; padding: 28px var(--margin); }
.plain-main { display: grid; gap: 20px; max-inline-size: calc(var(--frame) + 2 * var(--margin)); margin: 0 auto; padding: 48px var(--margin) 120px; }
.plain-main h1 { font-size: 48px; line-height: 1.04; letter-spacing: -.026em; }
.plain-main > p { max-inline-size: var(--measure); font-size: 19px; line-height: 1.5; }

@media (max-width: 1000px) {
  .front-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .front-routes { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .front-primary { order: -1; justify-items: start; }
  .front-route:last-child { justify-items: start; text-align: start; }
}
@media (max-width: 710px) {
  .front-masthead { margin-block-end: 34px; }
  .layer-page[data-kind="home"] { padding-block-start: 40px; }
  .front-grid { grid-template-columns: minmax(0, 1fr); }
}
