/* Font preview: the font options and the font bar at the top of versions 3 and 4 (AL, 4 Dec 2026).
   Not part of the live site. */

/* ---------- font options ---------- */
/* Each option sets the heading face, the body face, and the heading weight and spacing that suit it. */
:root[data-font="jakarta"]  { --display: "Plus Jakarta Sans", system-ui, sans-serif; --body: "Plus Jakarta Sans", system-ui, sans-serif; --hw: 700; --ht: -0.02em; }
:root[data-font="dm"]       { --display: "DM Sans", system-ui, sans-serif; --body: "DM Sans", system-ui, sans-serif; --hw: 700; --ht: -0.02em; }
:root[data-font="plex"]     { --display: "IBM Plex Sans", system-ui, sans-serif; --body: "IBM Plex Sans", system-ui, sans-serif; --hw: 600; --ht: -0.01em; }
:root[data-font="space"]    { --display: "Space Grotesk", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif; --hw: 600; --ht: -0.02em; }
:root[data-font="fraunces"] { --display: "Fraunces", Georgia, serif; --body: "Inter", system-ui, sans-serif; --hw: 600; --ht: -0.01em; }
/* Five more for version 4. --bw is the weight for the largest type (version 2's big headlines and results). */
:root[data-font="manrope"]    { --display: "Manrope", system-ui, sans-serif; --body: "Manrope", system-ui, sans-serif; --hw: 700; --ht: -0.02em; }
:root[data-font="instrument"] { --display: "Instrument Sans", system-ui, sans-serif; --body: "Instrument Sans", system-ui, sans-serif; --hw: 600; --ht: -0.02em; --bw: 700; }
:root[data-font="sora"]       { --display: "Sora", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif; --hw: 600; --ht: -0.03em; --bw: 700; }
:root[data-font="schibsted"]  { --display: "Schibsted Grotesk", system-ui, sans-serif; --body: "Schibsted Grotesk", system-ui, sans-serif; --hw: 700; --ht: -0.02em; }
:root[data-font="archivo"]    { --display: "Archivo", system-ui, sans-serif; --body: "Archivo", system-ui, sans-serif; --hw: 700; --ht: -0.02em; }
:root[data-font="current"]  { --hw: 700; --ht: -0.02em; }
/* Fonts that stop at 700, and the serif, read better a step lighter at the largest sizes. */
:root[data-font="plex"], :root[data-font="space"] { --bw: 700; }
:root[data-font="fraunces"] { --bw: 600; }

h1, h2, h3, .brand, .proof b, .ledger b, .pager b, .email { font-weight: var(--hw, 700); }
h1, h2 { letter-spacing: var(--ht, -0.02em); }

/* ---------- font bar (preview only) ---------- */
.font-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.font-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; min-height: 48px; }
.font-bar .label { display: none; font: 600 0.85rem "Inter", system-ui, sans-serif; color: var(--muted); margin-right: 4px; }
.font-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 8px;
  background: transparent; border: 0; border-radius: 12px; cursor: pointer;
  font: 500 0.85rem "Inter", system-ui, sans-serif; color: var(--muted);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.font-opt:hover { background: var(--bg); color: var(--ink); }
.font-opt:active { transform: scale(0.98); }
.font-opt .aa { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.font-opt[aria-pressed="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 2px var(--ink); }
/* Each sample is set in its own font. */
.font-opt[data-font="jakarta"] .aa { font-family: "Plus Jakarta Sans"; }
.font-opt[data-font="dm"] .aa { font-family: "DM Sans"; }
.font-opt[data-font="plex"] .aa { font-family: "IBM Plex Sans"; }
.font-opt[data-font="space"] .aa { font-family: "Space Grotesk"; }
.font-opt[data-font="fraunces"] .aa { font-family: "Fraunces"; }
.font-opt[data-font="manrope"] .aa { font-family: "Manrope"; }
.font-opt[data-font="instrument"] .aa { font-family: "Instrument Sans"; }
.font-opt[data-font="sora"] .aa { font-family: "Sora"; }
.font-opt[data-font="schibsted"] .aa { font-family: "Schibsted Grotesk"; }
.font-opt[data-font="archivo"] .aa { font-family: "Archivo"; }
.font-opt[data-font="current"] .aa { font-family: "Bricolage Grotesque"; }
/* On phones only the samples show; the names stay available to screen readers. */
.font-opt .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 768px) {
  .font-bar .label { display: inline; }
  .font-opt { padding: 0 8px; gap: 6px; font-size: 0.8rem; }
  .font-opt .name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

