
@font-face {
  font-family: 'Redacted';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/assets/fonts/Redacted/Redacted-Regular.woff2') format('woff2');
}

/**
 * Shared skeleton tokens for the landing page blocks.
 *
 * Every block concatenates this with its own `style.css` into
 * `makeElement({ style })` — via `./skeleton.ts`, which also prepends the
 * Redacted @font-face — so a block carries everything `[skeleton]` needs and
 * nothing has to be linked globally for the mode to work.
 *
 * The values are the wireframe's grey ramp expressed against `--text` /
 * `--background` rather than the flat hexes it was drawn with, so a skeleton
 * follows the site into dark mode instead of staying a light-mode artifact.
 */
:root {
  /* Redacted has no italic or bold cut — the fallback keeps metrics sane if the
     woff2 is missing, in which case a skeleton degrades to plain grey text. */
  --landing-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

  --landing-skeleton-heading: color-mix(in srgb, var(--background), var(--text) 70%);
  --landing-skeleton-copy: color-mix(in srgb, var(--background), var(--text) 30%);
  --landing-skeleton-kicker: color-mix(in srgb, var(--background), var(--text) 24%);
  --landing-skeleton-media: color-mix(in srgb, var(--background), var(--text) 38%);
  --landing-skeleton-rule: color-mix(in srgb, var(--background), var(--text) 12%);
  --landing-skeleton-surface: color-mix(in srgb, var(--background), var(--text) 2%);
}

/**
 * Bordered panels on the design's panel fill. Two shapes, decided by the item:
 *
 *   - icon (or number), title, a sentence — the default;
 *   - title, number, a list of what it covers — the landing page's capability
 *     panels, where the point is the inventory rather than the prose.
 *
 * `[numbered]` also flips the head row: the marker moves opposite the title
 * instead of sitting above it, which is what makes a row of panels read as
 * 01-02-03 rather than as five separate cards.
 */
landing-feature-grid {
  --feature-grid-columns: 3;
  --feature-grid-muted: color-mix(in srgb, var(--background), var(--text) 65%);
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: clamp(28px, 4vh, 44px) 28px 0;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  landing-feature-grid {
    padding: 24px 20px 0;
  }
}

landing-feature-grid [items] {
  display: grid;
  /* `auto-fit` rather than a fixed count: the design's five-panel row wraps to
     three and two on its own, and a page asking for four columns of narrow
     cards gets them without a media query per section. */
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: var(--max-page-width, 1400px);
}

@media (min-width: 1181px) {
  landing-feature-grid [items] {
    grid-template-columns: repeat(var(--feature-grid-columns), minmax(0, 1fr));
  }
}

landing-feature-grid [item] {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--light);
  background: var(--light0);
  padding: 22px 20px;
  color: inherit;
  text-decoration: none;
}

/* Only a linked cell reacts to the pointer; the rest are panels, not controls. */
landing-feature-grid a[item] {
  transition: border-color 180ms linear;
}

landing-feature-grid a[item]:hover {
  border-color: var(--text);
}

landing-feature-grid [head] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

landing-feature-grid[numbered] [head] {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* The marker leads the cell when it is a glyph and trails the title when it is
   a number, which is the difference between an icon and an index. */
landing-feature-grid[numbered] [icon] {
  order: 1;
}

landing-feature-grid [icon] {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: none;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text2);
}

landing-feature-grid[numbered] [icon] {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

landing-feature-grid [icon] img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

landing-feature-grid [icon]:empty {
  display: none;
}

landing-feature-grid [title-text] {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  color: var(--text);
}

landing-feature-grid [copy] {
  margin: 0;
  font-size: 0.90625rem;
  line-height: 1.55;
  text-wrap: pretty;
  color: var(--feature-grid-muted);
}

/* The list is set in mono because it is an inventory of names — routes,
   buckets, queues — and mono is how the rest of the page prints names. */
landing-feature-grid [list] {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--feature-grid-muted);
}

landing-feature-grid :is([title-text], [copy]):empty {
  display: none;
}

/* ---------------- SKELETON ---------------- */

landing-feature-grid[skeleton],
landing-feature-grid[skeleton] * {
  font-family: var(--landing-skeleton-font);
  font-weight: 400;
  letter-spacing: normal;
}

landing-feature-grid[skeleton] {
  background: var(--landing-skeleton-surface);
  pointer-events: none;
  user-select: none;
}

landing-feature-grid[skeleton] :is([title-text], [copy]):empty {
  display: revert;
}

landing-feature-grid[skeleton] [item] {
  background: transparent;
  border-color: var(--landing-skeleton-rule);
}

/* The icon is empty in wireframe — the logic skips both the glyph and the
   artwork — so the marker has to be drawn rather than redacted, and the
   `:empty` collapse above has to be undone for it. */
landing-feature-grid[skeleton] [icon] {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--landing-skeleton-media);
}

landing-feature-grid[skeleton] [icon] img {
  display: none;
}

landing-feature-grid[skeleton] [title-text] {
  color: var(--landing-skeleton-heading);
}

landing-feature-grid[skeleton] [copy] {
  color: var(--landing-skeleton-copy);
}

/* Uniform filler would draw a grid of identical bars, which reads as a loading
   state rather than a layout. Rotating three lengths across the cells restores
   the ragged right edge real copy has. */
landing-feature-grid[skeleton] [item]:nth-child(3n + 1) [title-text]:empty::before {
  content: 'Feature name';
}

landing-feature-grid[skeleton] [item]:nth-child(3n + 2) [title-text]:empty::before {
  content: 'A longer feature name';
}

landing-feature-grid[skeleton] [item]:nth-child(3n + 3) [title-text]:empty::before {
  content: 'Feature';
}

landing-feature-grid[skeleton] [item]:nth-child(3n + 1) [copy]:empty::before {
  content: 'Two and a bit lines of body copy describing what this one does.';
}

landing-feature-grid[skeleton] [item]:nth-child(3n + 2) [copy]:empty::before {
  content: 'Two and a bit lines of body copy, running slightly shorter than the first.';
}

landing-feature-grid[skeleton] [item]:nth-child(3n + 3) [copy]:empty::before {
  content: 'Two lines of body copy for the third cell in the row.';
}
