/* ============================================================
   Bluefront — Components
   Re-usable class-based UI primitives. Drop this stylesheet in
   AFTER `colors_and_type.css` and reach for the classes below
   instead of re-implementing buttons, pills, rules etc. inline.

       <link rel="stylesheet" href="colors_and_type.css">
       <link rel="stylesheet" href="components.css">

   All components honour the brand tokens — change a token in
   `colors_and_type.css` and every consumer updates.
   ============================================================ */


/* --------------------- BUTTONS --------------------- */

.bf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--bf-font-sans);
  font-weight: var(--bf-w-medium);
  font-size: 14px;
  line-height: 1;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--bf-radius-sm);
  cursor: pointer;
  box-sizing: border-box;
  transition: background 150ms ease, color 150ms ease,
              border-color 150ms ease, transform 100ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.bf-btn:focus-visible {
  outline: 2px solid var(--bf-accent);
  outline-offset: 2px;
}
.bf-btn:active { transform: translateY(1px); }

/* Primary — coral capsule */
.bf-btn--primary {
  background: var(--bf-coral);
  color: var(--bf-mist);
}
.bf-btn--primary:hover { background: var(--bf-coral-edge); }

/* Ghost — outlined, transparent. Inherits stroke colour from `color`. */
.bf-btn--ghost {
  background: transparent;
  border: 1px solid currentColor;
  font-weight: var(--bf-w-regular);
}
.bf-btn--ghost:hover { background: rgba(229,231,235,0.08); }

/* Nav — inline, transparent, no chrome. Used for top-nav links. */
.bf-btn--nav {
  background: transparent;
  height: auto;
  padding: 0;
  font-weight: var(--bf-w-regular);
  font-size: 18px;
  gap: 12px;
}
.bf-btn--nav:hover { color: var(--bf-coral); }


/* --------------------- PILLS / TAGS --------------------- */

.bf-pill {
  display: inline-flex; align-items: center;
  height: 22px;
  padding: 0 12px;
  border-radius: var(--bf-radius-pill);
  font-family: var(--bf-font-meta);
  font-weight: var(--bf-w-bold);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.bf-pill:focus-visible {
  outline: 2px solid var(--bf-coral);
  outline-offset: 2px;
}

/* Ghost · coral — value-chain tags (default) */
.bf-pill--ghost-coral {
  color: var(--bf-coral);
  border: 1px solid var(--bf-coral);
  background: transparent;
}
/* Ghost · navy — taxonomy / sector */
.bf-pill--ghost-navy {
  color: var(--bf-deep-navy);
  border: 1px solid var(--bf-deep-navy);
  background: transparent;
}
/* Filled · coral — status badge (new, featured) */
.bf-pill--filled-coral {
  background: var(--bf-coral);
  color: var(--bf-mist);
}
/* Filled · navy — neutral status (active, current) */
.bf-pill--filled-navy {
  background: var(--bf-deep-navy);
  color: var(--bf-mist);
}
/* Muted blush — past / archived states only */
.bf-pill--muted {
  background: var(--bf-blush);
  color: var(--bf-deep-navy);
}


/* --------------------- CARDS --------------------- */

.bf-card {
  border-radius: var(--bf-radius-xs);
  padding: 24px;
  background: var(--bf-bg-alt);
  border: 1px solid var(--bf-stroke-onlight);
  color: var(--bf-deep-navy);
}
.bf-card--navy {
  background: var(--bf-deep-navy);
  color: var(--bf-mist);
  border: 0;
}
.bf-card--mid-teal {
  background: var(--bf-mid-teal);
  color: var(--bf-mist);
  border: 0;
}
.bf-card--mist {
  background: var(--bf-mist);
  border-color: var(--bf-stroke-onlight);
}
.bf-card--sand {
  background: var(--bf-sand);
  border-color: var(--bf-stroke-onlight);
}
/* Size modifiers — hero frames, mandate tiles, dense report panels */
.bf-card--lg { padding: 32px; }
.bf-card--xl { padding: 48px; }


/* --------------------- CORAL RULES --------------------- */

.bf-rule {
  display: block;
  background: var(--bf-coral);
  border: 0;
  width: 100%;
  height: 4px;        /* compact — default */
}
.bf-rule--xl      { height: 14px; } /* signature tracker */
.bf-rule--sm      { height: 2px; }  /* stat-row divider */
.bf-rule--hairline{ height: 1px; }  /* chapter borders */


/* --------------------- STAT CLUSTER --------------------- */

.bf-stat {
  display: flex;
  flex-direction: column;
}
.bf-stat .bf-stat__num {
  font-family: var(--bf-font-display);
  font-weight: var(--bf-w-regular);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--bf-coral);
}
.bf-stat .bf-stat__label {
  font-family: var(--bf-font-sans);
  font-weight: var(--bf-w-regular);
  font-size: 14px;
  line-height: 1.25;
  color: var(--bf-deep-navy);
  margin-top: 6px;
}
/* Label-first variant — used in dense stat rows */
.bf-stat--label-top { flex-direction: column-reverse; }
.bf-stat--label-top .bf-stat__num {
  color: var(--bf-mid-teal);
  margin-top: 6px;
}
.bf-stat--label-top .bf-stat__label { margin-top: 0; }
/* Size modifiers — stack with --label-top as needed. Use --sm at 36 px
   for compact tile labels, --md at 50 px for theory-of-change, default
   for stat rows, --lg at 86 px for hero report panels, --xl at 110 px
   for cover-page heroes. */
.bf-stat .bf-stat__num { font-size: 64px; }
.bf-stat--sm .bf-stat__num { font-size: 36px; }
.bf-stat--md .bf-stat__num { font-size: 50px; }
.bf-stat--lg .bf-stat__num { font-size: 86px; }
.bf-stat--xl .bf-stat__num { font-size: 110px; }
.bf-stat--label-top.bf-stat--sm .bf-stat__num { font-size: 36px; }
.bf-stat--label-top.bf-stat--md .bf-stat__num { font-size: 50px; }
.bf-stat--label-top.bf-stat--lg .bf-stat__num { font-size: 86px; }
.bf-stat--label-top.bf-stat--xl .bf-stat__num { font-size: 110px; }


/* --------------------- TABS (page-top nav) --------------------- */

.bf-tabs {
  display: flex; gap: 56px; align-items: center;
  font-family: var(--bf-font-meta);
  font-weight: var(--bf-w-bold);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.bf-tab {
  color: var(--bf-deep-navy);
  padding: 9px 18px;
  border-radius: var(--bf-radius-pill);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.bf-tab.is-active,
.bf-tab[aria-current="page"] {
  color: var(--bf-coral);
  border-color: var(--bf-coral);
}
.bf-tab:focus-visible,
.bf-btn--nav:focus-visible {
  outline: 2px solid var(--bf-coral);
  outline-offset: 2px;
}


/* --------------------- EYEBROW & QUOTE --------------------- */

.bf-eyebrow,
.bf-meta {
  font-family: var(--bf-font-meta);
  font-weight: var(--bf-w-bold);
  font-size: 10px;
  letter-spacing: var(--bf-ls-meta);
  text-transform: uppercase;
  color: var(--bf-fg-muted);
}

.bf-quote {
  font-family: var(--bf-font-sans);
  font-weight: var(--bf-w-regular);
  font-size: 18px;
  line-height: 1.5;
  color: var(--bf-deep-navy);
  max-width: 580px;
}
.bf-quote::before {
  content: "▾▾";
  display: block;
  font-family: var(--bf-font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--bf-coral);
  margin-bottom: 8px;
}


/* --------------------- FOOTNOTE NUMBERS --------------------- */

.bf-footnote {
  color: var(--bf-coral);
  font-weight: var(--bf-w-bold);
  margin-right: 4px;
}


/* --------------------- ARROW (filled glyph) ---------------------
   Brand has TWO arrow forms. Both should be used by *referencing the
   canonical SVGs* in `assets/icons/`, never inline-pasted.

   1. → filled arrow — the canonical CTA / nav glyph. Always coral.
      Use the baked variants for img usage:
        <img src="assets/icons/arrow-coral.svg" class="bf-arrow">
        <img src="assets/icons/arrow-mist.svg"  class="bf-arrow">
        <img src="assets/icons/arrow-navy.svg"  class="bf-arrow">
      …or inline `assets/icons/arrow.svg` (fill="currentColor") when
      the parent's `color` should drive the tint.

   2. ↗ diagonal stroke arrow — reserved for hero / "explore" moments.
      Inline `assets/icons/arrow-diagonal.svg` (stroke-width 1.8,
      fill="none", currentColor).

   Never paste the raw `<path d="M …">` data inline. If you find
   yourself doing it, link the SVG instead. */

.bf-arrow {
  display: inline-block;
  width: 16px; height: auto;
  flex-shrink: 0;
  color: currentColor;
  align-self: center;
}
.bf-arrow svg,
.bf-arrow img,
img.bf-arrow { width: 100%; height: auto; display: block; }
.bf-arrow--lg { width: 24px; }
.bf-arrow--xl { width: 72px; }
