import { Commissioner, JetBrains_Mono } from "next/font/google";

/**
 * RRYM / 002 — SULSYS
 * Typography, V4. Two voices.
 *
 * COMMISSIONER carries display and text. Low-contrast, rectilinear, a little
 * engineered — the temperament of the SulSys.Net wordmark without imitating
 * it. One family at two weights does the job Inter and Inter Tight used to do
 * between them, and it does it with a point of view: Inter is the face a site
 * gets when nobody chose one, and this site is now choosing.
 *
 * JETBRAINS MONO is the document voice. It used to be labels only; in V4 it is
 * promoted to a display voice for everything Nexys itself would print — a
 * document name, an amount, a total, a document number, a key cap, a date. The
 * numbers on this site now look like Nexys's numbers, which is the single
 * typographic move that makes it Sulsys's rather than any software company's.
 *
 * Both carry Latin Extended (Albanian ë ç, Turkish ğ ş ı İ) and Cyrillic
 * (Macedonian ѓ ќ љ њ џ) in one family. That coverage was the gate: the four
 * home headlines and one ledger were rendered in all four scripts at 375 and
 * 1440 before this file changed.
 *
 * `next/font/google` downloads the files at build time and serves them from
 * this origin — no request ever reaches Google from a visitor's browser, which
 * is what the Content Security Policy in next.config.ts assumes. Declaring the
 * subsets separately lets the browser fetch only the ranges a page needs.
 */

export const commissioner = Commissioner({
  subsets: ["latin", "latin-ext", "cyrillic"],
  // 400/450 for text, 600 for headings, 700 for the few display statements.
  weight: ["400", "500", "600", "700"],
  display: "swap",
  variable: "--font-commissioner",
  fallback: ["system-ui", "sans-serif"],
});

export const jetbrainsMono = JetBrains_Mono({
  subsets: ["latin", "latin-ext", "cyrillic"],
  weight: ["400", "500", "700"],
  display: "swap",
  variable: "--font-jetbrains-mono",
  fallback: ["ui-monospace", "monospace"],
});

export const fontClassNames = [commissioner.variable, jetbrainsMono.variable].join(" ");
