/* ============================================================
   allisterk.com — hub.css · v5 (self-contained)
   ------------------------------------------------------------
   The hub's complete stylesheet. No shared/common assets: the
   foundation (tokens, type, palette) that used to come from
   tokens.css is inlined below with the hub's own values
   (golden-pollen pigment on warm paper) already resolved.

   The design language, stated once and obeyed everywhere:

   1. TWO levels, and the level is legible from the unit.
      SITES are the page: a full-width row, one per line —
        [ 3.25rem logo tile ] [ name + one-liner ] [ mono meta, right ]
      TOOLS are a footnote to it: a 3-across card, name at ~60% of
      the row-name's size, no logo tile on the shared left axis.
      Hairline separators either way. No boxes, no mats.
   2. Logos sit directly on the paper — object-fit: contain in a
      fixed square, never cropped, never framed.
   3. Ink on paper. A destination's pigment appears ONLY on hover
      (a quiet wash + the name). Color is a reward, not decoration.
      Every listed thing answers the cursor, including the ones with
      no URL to go to.
   4. Two faces, few sizes: Crimson Pro for names and prose,
      JetBrains Mono for labels and addresses.
   5. Nothing is decorated. The page is whitespace and 1px lines —
      the striped bar over Sites is gone.
   6. Rhythm: 4.5rem between sections, 2.75rem down to a subsection,
      1.5rem inside rows.
   ============================================================ */

:root {
  /* type */
  --type-serif: "Crimson Pro", "Iowan Old Style", Georgia, serif;
  --type-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ink */
  --ink:       #14110E;
  --ink-soft:  #6B6357;
  --ink-faint: rgba(20, 17, 14, 0.13);
  --ink-rule:  rgba(20, 17, 14, 0.18);

  /* paper (warm) */
  --paper: #F7F3EA;

  /* golden-pollen pigment family.
     --pigment-link is the deep cousin: pollen itself is 1.38:1 on
     paper (decorative only); deep is 7.9:1 (AAA) for text. */
  --pigment:      #FFCA3A;
  --pigment-deep: #5C4A0E;
  --pigment-soft: #FFE388;
  --pigment-link: var(--pigment-deep);

  /* ── The family palette ──────────────────────────────────
     Every destination's pigment, because the hub is the one page
     that shows all of them: `hub_pigment_style()` in _lib/render.php
     writes `--pigment: var(--pg-<name>)` onto each site row so the
     row hovers in the colour of the place it goes.

     These lived in the old shared tokens.css. When v4 went
     self-contained that file was deleted and these were not carried
     over, so every site row was setting --pigment to an undefined
     variable — which made `color-mix()` invalid and silently killed
     the hover wash, the name colour and the arrow. The tools rows
     had no inline style, inherited the pollen values above, and kept
     working: hence "sites no longer hover like g-code generators".
     Contrast figures are against warm paper / against ink. */
  --pg-tangerine:        #EF3A24;
  --pg-tangerine-deep:   #7A1810;   /* paper: 13   (AAA) */
  --pg-tangerine-soft:   #F8A294;   /* ink:    9.1 (AAA) */
  --pg-coral:            #FF595E;
  --pg-coral-deep:       #8A1A1F;   /* paper:  9.95 (AAA) */
  --pg-coral-soft:       #FFB5B7;   /* ink:   10.6  (AAA) */
  --pg-pollen:           #FFCA3A;
  --pg-pollen-deep:      #5C4A0E;   /* paper:  7.9 (AAA) */
  --pg-pollen-soft:      #FFE388;   /* ink:   14   (AAA) */
  --pg-yellowgreen:      #8AC926;
  --pg-yellowgreen-deep: #324A12;   /* paper:  8.86 (AAA) */
  --pg-yellowgreen-soft: #C5E58F;   /* ink:   12.7  (AAA) */
  --pg-steelblue:        #1982C4;
  --pg-steelblue-deep:   #0E4868;   /* paper:  8.6 (AAA) */
  --pg-steelblue-soft:   #9CC6E2;   /* ink:   10.4 (AAA) */
  --pg-grape:            #6A4C93;
  --pg-grape-deep:       #3A2A52;   /* paper: 11.85 (AAA) */
  --pg-grape-soft:       #B7A4D2;   /* ink:    8.4  (AAA) */

  /* One focus ring for the whole site (WCAG 2.4.7). */
  --focus: #14110E;
}

/* ── Base ───────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* 21px base × 1.15 "large" scale, resolved. */
html { font-size: 24px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--type-serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--pigment-link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Focus ring — every focusable thing, one shape. WCAG 2.4.7. The hub
   had none at all: keyboard users had no idea where they were. */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}
/* Rows and cards are big targets — inset the ring so it hugs them. */
a.row:focus-visible, a.card:focus-visible, a.cta:focus-visible {
  outline-offset: 2px;
}

::selection { background: var(--pigment-soft); color: var(--ink); }

/* ── Header weather (hub-header.js · "Strata") ────────────
   Document-anchored (absolute, not fixed): it belongs to the
   top of the page and stays there when you scroll away. The
   field is fractal noise with a domain warp, coloured from the
   whole FAMILY palette — the hub is the one page that shows
   every property, so its weather is made of their pigments.
   Settings live in site.json → motion.opts. */
.hub-header {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 130px;   /* provisional; hub-header.js sets the real band */
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; }

/* ── Page scaffold ───────────────────────────────────────── */

.page { max-width: 56rem; margin: 0 auto; padding: 1.75rem 1.5rem 2rem; }
@media (min-width: 900px) { .page { padding: 2.25rem 3rem 3rem; } }

/* —— Hello ————————————————————————————————— */
.hello { padding: 3rem 0 3.25rem; }
@media (min-width: 900px) { .hello { padding: 4rem 0 3.75rem; } }
.hello h1 {
  font-family: var(--type-serif);
  font-weight: 340;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 16ch;
}
.hello h1 .role {
  font-style: italic;
  font-weight: 460;
  color: var(--pigment-deep);
  transition: opacity 160ms ease;
}
.hello h1 .stop { color: var(--pigment); }
.hello .sub {
  margin: 1.5rem 0 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* —— Section heads ——————————————————————————— */
section { margin-top: 4.5rem; }
/* Tools sit under Sites, not beside it: half the gap, so the reader
   reads them as a subsection of the page rather than a peer of it. */
section.tools { margin-top: 2.75rem; }
.sec {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 0.5rem;
}
.sec h2 {
  font-family: var(--type-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
}
.sec .quip {
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
/* A subsection head is quieter than a section head. */
.sec-sub h2 { font-size: 0.7rem; color: var(--ink-soft); }
.sec-sub .quip { font-size: 0.88rem; }

/* —— The row — used by sites AND tools ————————— */
ul.rows { list-style: none; margin: 0; padding: 0; }
ul.rows > li { border-bottom: 1px solid var(--ink-rule); }
ul.rows > li:last-child { border-bottom: none; }

.row {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "tile" "body" "side";
  gap: 0.6rem;
  align-items: center;
  padding: 1.5rem 0.5rem 1.5rem 0.25rem;
  color: var(--ink);
  border: none;
  text-decoration: none;
  transition: background-color 200ms ease;
}
/* On one column, a tile with no logo is just a hole — skip it. */
.row .tile:not(:has(img)) { display: none; }
@media (min-width: 700px) {
  .row {
    grid-template-columns: 3.25rem 1fr auto;
    grid-template-areas: "tile body side";
    gap: 1.5rem;
  }
  /* On the grid, the empty tile keeps the shared left axis. */
  .row .tile:not(:has(img)) { display: flex; }
}
a.row:hover { background: color-mix(in srgb, var(--pigment) 8%, var(--paper)); }

.row .tile {
  grid-area: tile;
  width: 3.25rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row .tile img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.row .body { grid-area: body; min-width: 0; }
.row .name {
  display: block;
  font-style: italic;
  font-weight: 430;
  font-size: clamp(1.45rem, 2.8vw, 1.8rem);
  line-height: 1.15;
  transition: color 200ms ease;
}
a.row:hover .name { color: var(--pigment-deep); }
.row .gloss {
  display: block;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 0.3rem;
  max-width: 52ch;
}

.row .side {
  grid-area: side;
  font-family: var(--type-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: left;
  white-space: nowrap;
}
@media (min-width: 700px) { .row .side { text-align: right; } }
.row .side .sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
/* The arrow used to sit at --ink-faint (~1.15:1) — invisible, and
   the only glyph saying "this row goes somewhere". Now ink-soft at
   rest, deepening on hover. Pollen itself is 1.38:1 and cannot carry
   a mark on paper, so hover uses the deep cousin. */
.row .side .arrow {
  display: inline-block;
  margin-left: 0.35em;
  color: var(--ink-soft);
  transition: color 200ms ease, transform 200ms ease;
}
a.row:hover .side .arrow {
  color: var(--pigment-deep);
  transform: translateX(4px);
}

/* —— Tools — the subservient level ————————————————
   Sites are the page. Tools are a footnote to it, so they get a
   different unit (a 3-across card, not a full-width row), a name at
   a third of the row-name's size, and no logo tile competing on the
   shared left axis. Anatomy: name → one line of gloss → mono meta
   pinned to the card's foot so the row of cards aligns even when the
   glosses run different lengths. */
ul.cards {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 620px) { ul.cards { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
@media (min-width: 900px) { ul.cards { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; } }

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.45rem;
  padding: 1rem 0.5rem 1.1rem 0;
  /* border: none first — the base `a` rule paints a currentColor
     bottom border on every anchor, which drew a hard line under the
     one card that happens to have an href. */
  border: none;
  border-top: 1px solid var(--ink-rule);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 200ms ease, border-top-color 200ms ease;
}
a.card:hover {
  background: color-mix(in srgb, var(--pigment) 10%, var(--paper));
  border-top-color: var(--pigment-deep);
}

.card .card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.card .mark {
  flex: none;
  width: 1.15rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .mark img { max-width: 100%; max-height: 100%; object-fit: contain; }

.card .name {
  font-style: italic;
  font-weight: 430;
  font-size: 1.12rem;      /* the sites row is up to 1.8rem */
  line-height: 1.2;
  transition: color 200ms ease;
}
a.card:hover .name { color: var(--pigment-deep); }
.card .name .arrow {
  font-family: var(--type-mono);
  font-style: normal;
  font-size: 0.7em;
  color: var(--ink-soft);
  transition: color 200ms ease, transform 200ms ease;
  display: inline-block;
}
a.card:hover .name .arrow { color: var(--pigment-deep); transform: translateX(3px); }

.card .gloss {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.card .meta {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--type-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card .meta span:last-child { text-align: right; }

/* —— Previously — struck, vertical, quiet ————————— */
ul.gone { list-style: none; margin: 0.5rem 0 0; padding: 0; }
ul.gone li {
  display: block;
  width: fit-content;
  margin: 0 0 0.7rem;
  font-family: var(--type-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--pigment);
}
/* Hover lands on the LI, not the anchor: only one of these five
   entries still has a URL, so anchoring the effect to <a> left the
   other four dead to the pointer. The line stays struck — the
   strikethrough is the point — but it deepens and the label comes up
   to full ink, so the whole list answers the cursor. */
ul.gone li {
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
ul.gone li:hover {
  color: var(--ink);
  text-decoration-color: var(--pigment-deep);
}
ul.gone li a {
  color: inherit;
  border: none;
  text-decoration: inherit;
  text-decoration-color: inherit;
}
ul.gone li .note {
  text-decoration: none;
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  margin-left: 0.35em;
}
ul.gone li.alive { text-decoration: none; }

/* —— Say hi ————————————————————————————————— */
.sayhi p { font-size: 1.3rem; margin: 0.5rem 0 1.25rem; }
.sayhi p em { color: var(--ink-soft); }

a.cta {
  display: inline-block;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--ink);
  padding: 1em 1.6em;
  font-family: var(--type-serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  isolation: isolate;
}
a.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pigment);   /* ink-on-pollen: 12.3 (AAA) */
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(.7, 0, .2, 1);
  z-index: -1;
}
a.cta:hover         { color: var(--ink); border-color: var(--ink); }
a.cta:hover::before { transform: translateX(0); }

/* —— Footer — body width, no tint ————————————————— */
.bottom {
  margin-top: 4.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  font-family: var(--type-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
@media (min-width: 700px) {
  .bottom { grid-template-columns: 1fr auto auto; gap: 1.5rem; align-items: baseline; }
}
.bottom a { color: var(--ink-soft); border: none; }
.bottom a:hover { color: var(--ink); }

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .hub-header { display: none !important; }
}
