/* Self-hosted webfonts.
 *
 * These used to come from fonts.googleapis.com via a render-blocking <link>.
 * That host is unreachable or very slow for visitors in mainland China, and a
 * blocked stylesheet delays first paint, so the files now ship with the app and
 * are served from our own origin (see frontend/public/fonts/).
 *
 * woff2 only: every supported browser has decoded woff2 for years, and shipping
 * the legacy .woff twins would roughly double the payload (the CJK faces are
 * ~1.1 MB each).
 *
 * No unicode-range is declared on purpose. The Tailwind stack asks for
 * "Source Sans 3" before "Noto Sans SC", so the browser only reaches for the
 * heavy CJK files when a glyph is not covered by the Latin faces.
 */

/* --- Fraunces: display / headings --- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}

/* --- Source Sans 3: Latin body text --- */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}

/* --- Noto Sans SC: CJK text (only fetched when CJK glyphs are present) --- */
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-chinese-simplified-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-chinese-simplified-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-sc-chinese-simplified-600-normal.woff2") format("woff2");
}
