
@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 market content 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. */
  --market-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

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

market-feature-row {
  --feature-row-columns: 4;
  --feature-row-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --feature-row-rule: color-mix(in srgb, var(--background), var(--text) 12%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
  padding: 44px 40px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  market-feature-row {
    gap: 28px;
    padding: 32px 20px;
  }
}

market-feature-row header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

market-feature-row [kicker] {
  margin: 0;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--feature-row-muted);
}

market-feature-row [headline] {
  margin: 0;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

market-feature-row [items] {
  display: grid;
  grid-template-columns: repeat(var(--feature-row-columns), minmax(0, 1fr));
  width: 100%;
  max-width: var(--max-page-width, 1400px);
}

market-feature-row [item] {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  padding: 0 26px;
  text-decoration: none;
  color: inherit;
}

/* The divider belongs to the cell on its right, so the row never opens with a
   stray rule. `:first-child` is not enough once the grid wraps below, which is
   why the fallbacks re-declare it per breakpoint. */
market-feature-row [item] + [item] {
  border-left: 1px solid var(--feature-row-rule);
}

@media (max-width: 1024px) {
  market-feature-row [items] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  market-feature-row [item]:nth-child(odd) {
    border-left: 0;
  }
}

@media (max-width: 640px) {
  market-feature-row [items] {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  market-feature-row [item] {
    border-left: 0;
    padding: 0;
  }
}

market-feature-row [icon] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--text);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
}

market-feature-row [icon] img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

market-feature-row [copy] {
  margin: 6px 0 0;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

market-feature-row :is([kicker], [headline], [copy]):empty {
  display: none;
}

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

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

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

market-feature-row[skeleton] :is([kicker], [headline], [copy]):empty {
  display: revert;
}

market-feature-row[skeleton] [kicker] {
  color: var(--market-skeleton-kicker);
}

market-feature-row[skeleton] [kicker]:empty::before {
  content: 'Why us';
}

/* Mid grey rather than the near-black the other blocks use for headings: in the
   kit this row's heading is a secondary one, under a section intro. */
market-feature-row[skeleton] [headline] {
  color: var(--market-skeleton-media);
}

market-feature-row[skeleton] [headline]:empty::before {
  content: 'A centred heading over the row';
}

market-feature-row[skeleton] [icon] {
  border-color: var(--market-skeleton-heading);
}

market-feature-row[skeleton] [icon] img {
  display: none;
}

market-feature-row[skeleton] [copy] {
  color: var(--market-skeleton-heading);
}

/* Rotating lengths so the four cells do not draw as four identical blocks. */
market-feature-row[skeleton] [item]:nth-child(2n + 1) [copy]:empty::before {
  content: 'Three short lines of copy sitting under the icon in this cell.';
}

market-feature-row[skeleton] [item]:nth-child(2n + 2) [copy]:empty::before {
  content: 'Three short lines of copy under the icon, running a little longer than its neighbour.';
}
