/* The catalogue (index.html).

   Every value here comes from a token in scaffolds.css. If you find yourself
   reaching for a literal, add it to the catalogue scaffold instead — that's
   what keeps this page swappable. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { font-family: var(--font-display); }

/* Shared display setting. The face is condensed bold at -3% everywhere it
   appears, so it's one rule rather than four repetitions. */
.display {
  font-weight: var(--weight-display);
  font-stretch: var(--stretch-display);
  letter-spacing: var(--track-display);
  line-height: var(--leading-display);
  text-transform: uppercase;
}

/* The skip link went with the grid: it existed to jump past a screenful of
   tiles to the list, and the list is now the first thing on the page. */


/* ---------------------------------------------------------------- *
   Masthead — Pricing and Account, top right, in the muted grey.

   Nothing sits on the left any more. The mark used to, and was the
   second copy of it on a page one screen tall; the one above the list
   is now the only one, so the nav is the whole masthead.
 * ---------------------------------------------------------------- */

.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  /* With the mark gone there is no left-hand child to space away from, so
     the nav is pushed to the right rather than left where a lone
     space-between child would land. */
  justify-content: flex-end;
  padding: var(--pad-edge);
}

.masthead-nav {
  display: flex;
  gap: clamp(14px, 1.6vw, 26px);
  align-items: flex-start;
}

.masthead-link {
  font-size: var(--step-nav);
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
/* Same red as the list below it — one hover colour on the page. */
.masthead-link:hover { color: var(--accent); }
.masthead-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: var(--space-3xs);
}


/* ---------------------------------------------------------------- *
   The index — the mark over the plain list, centred in the white
   field. This is the entire catalogue.
 * ---------------------------------------------------------------- */

.index {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-m), 5vh, var(--space-xl));
  padding: var(--space-2xl) var(--pad-edge);
  background: var(--bg);
  color: var(--fg);
  text-align: center;
}

.index-mark {
  width: clamp(54px, 5.6vw, 92px);
  height: auto;
  fill: currentColor;
}

.index-list { display: flex; flex-direction: column; }

.index-link {
  font-size: var(--step-index);
  line-height: 1.22;
  color: var(--fg);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.index-link:hover { color: var(--accent); }
.index-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: var(--space-3xs);
}


/* ---------------------------------------------------------------- *
   Narrow screens

   The list takes a larger share of a small viewport than the vw term
   in the scale would give it — eight names set at 2.25vw on a phone
   read as fine print.
 * ---------------------------------------------------------------- */

@media (max-width: 640px) {
  [data-scaffold='catalogue'] {
    --step-index: clamp(1.25rem, 6vw, 2rem);
  }
}
