/* Socialhose brand typefaces — self-hosted.
 *
 * Univers (display/UI) + Melior (body) are the brand pair for marketing pages
 * and email. Berkeley Mono joins them for code only — the same face the platform
 * app runs on, so a curl example on a landing page and the same command in the
 * app read identically. Prose never uses it.
 *
 * Charter is NOT a brand face any more. It stays declared purely as the serif
 * coverage fallback: Melior is Latin-only, and we ingest mentions in every
 * script, so a Greek or Cyrillic mention in a digest email picks up Charter
 * glyph-by-glyph. Every serif stack is therefore 'Melior', 'Charter', Georgia —
 * never Charter alone. (Arabic, CJK and Thai are beyond both faces.)
 *
 * Loaded by:
 *   - marketing pages via {% static 'css/brand-fonts.css' %}
 *   - email templates via the absolute https://socialhose.net/... URL (a mail
 *     client has no notion of our dev/staging hosts)
 *
 * Faces are subset to Latin/Latin-Ext; characters outside that range fall back
 * per-character, which is what we want for user content in a digest email.
 */

@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Univers-Light.dcb9d421e774.woff2") format('woff2');
}
@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Univers-Regular.6d5b5d3ca451.woff2") format('woff2');
}
@font-face {
  font-family: 'Univers';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Univers-Italic.5fcdc503babf.woff2") format('woff2');
}
@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Univers-Medium.929a2757d718.woff2") format('woff2');
}
@font-face {
  font-family: 'Univers';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Univers-Bold.81ec8da72280.woff2") format('woff2');
}
@font-face {
  font-family: 'Univers';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Univers-BoldItalic.7917036e0129.woff2") format('woff2');
}

/* Melior (LT Std) — body. Zapf drew its bowls as superellipses rather than
 * ovals, which is why it sits under Berkeley Mono the way a conventional serif
 * doesn't; the two share a geometry.
 *
 * size-adjust: 103.4% makes the swap off Charter size-neutral. Melior's
 * x-height is 46.5% of the em against Charter's 48.1% (481/465 = 1.034), so at
 * an unchanged font-size it reads slightly small. Scaling the em restores the
 * previous apparent text size without touching a single font-size rule — the
 * same technique Berkeley uses at 106.18%.
 */
@font-face {
  font-family: 'Melior';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 103.4%;
  src: url("../fonts/Melior-Roman.6cfd3f3470aa.woff2") format('woff2');
}
@font-face {
  font-family: 'Melior';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  size-adjust: 103.4%;
  src: url("../fonts/Melior-Italic.a513dfd2fca1.woff2") format('woff2');
}
@font-face {
  font-family: 'Melior';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 103.4%;
  src: url("../fonts/Melior-Bold.54243b8f55da.woff2") format('woff2');
}
@font-face {
  font-family: 'Melior';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  size-adjust: 103.4%;
  src: url("../fonts/Melior-BoldItalic.01968c125554.woff2") format('woff2');
}

/* Charter — coverage fallback only, never a brand face. Carries the Cyrillic,
 * Greek and Thai that Melior lacks, so a mention in any script still renders.
 *
 * Deliberately NOT size-adjusted, and it happens to need no adjustment: Melior
 * scaled by 1.034 lands an x-height of 0.481 em, which is exactly Charter's
 * natural x-height. A Greek or Cyrillic run sits optically level with the Latin
 * beside it for free. If the Melior size-adjust above ever changes, recheck this.
 */
@font-face {
  font-family: 'Charter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Charter-Roman.d14ccef9dd4b.woff2") format('woff2');
}
@font-face {
  font-family: 'Charter';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Charter-Italic.ddfe344b6b4d.woff2") format('woff2');
}
@font-face {
  font-family: 'Charter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Charter-Bold.4f13cfc3eb27.woff2") format('woff2');
}
@font-face {
  font-family: 'Charter';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Charter-BoldItalic.90226f335bec.woff2") format('woff2');
}

/* Berkeley Mono (TX-02) — code only. size-adjust matches the platform app's
 * faces (frontend/src/styles/theme.css): Berkeley's x-height is 51.8% of the em,
 * so at an unchanged font-size it reads noticeably small. The same 106.18% here
 * keeps one Berkeley across app and marketing rather than two apparent sizes. */
@font-face {
  font-family: 'Berkeley Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 106.18%;
  src: url("../fonts/BerkeleyMono-Regular.152c5a819cd3.woff2") format('woff2');
}
@font-face {
  font-family: 'Berkeley Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 106.18%;
  src: url("../fonts/BerkeleyMono-Bold.e2a60c4e1c05.woff2") format('woff2');
}
