/*
 * Self-hosted template fonts (LF-541).
 * Single source of truth for all four surfaces: resume render/PDF, cover-letter
 * render/PDF, editor preview, and share view. Each @font-face is registered
 * under the BYTE-EXACT family string the templates reference via
 * --template-font-* (raw config strings from seed-data). Legacy Adobe names
 * "Source Sans Pro" / "Source Serif Pro" are intentionally used even though the
 * files ship as Source Sans 3 / Source Serif 4 - the config strings say the
 * legacy names, so the @font-face MUST match or nothing resolves.
 *
 * Substitutes (literal names preserved so config/CSS need no change):
 *   Georgia  -> Gelasio  (metric-compatible open substitute)
 *   Calibri  -> Carlito  (metric-compatible open substitute)
 *
 * font-display:swap on all faces. PDF determinism is guaranteed upstream by
 * document.fonts.ready in the PDF generator, which resolves only after every
 * used face finishes loading; swap keeps text readable if a face ever fails.
 *
 * All faces are Latin-subset woff2. Per-family OFL licenses: ./licenses/*.txt
 */

/* ---------- Inter ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter/Inter-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/Inter-Italic.woff2') format('woff2');
}

/* ---------- Georgia (substitute: Gelasio) ---------- */
@font-face {
  font-family: 'Georgia';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/gelasio/Gelasio-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Georgia';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/gelasio/Gelasio-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Georgia';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/gelasio/Gelasio-Italic.woff2') format('woff2');
}

/* ---------- Source Sans Pro (files: Source Sans 3) ---------- */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans/SourceSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-sans/SourceSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-sans/SourceSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans/SourceSans-Italic.woff2') format('woff2');
}

/* ---------- EB Garamond ---------- */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond/EBGaramond-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/eb-garamond/EBGaramond-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/eb-garamond/EBGaramond-Italic.woff2') format('woff2');
}

/* ---------- Lora ---------- */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora/Lora-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lora/Lora-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora/Lora-Italic.woff2') format('woff2');
}

/* ---------- DM Sans ---------- */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/dm-sans/DMSans-Bold.woff2') format('woff2');
}

/* ---------- Work Sans ---------- */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/work-sans/WorkSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/work-sans/WorkSans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/work-sans/WorkSans-Italic.woff2') format('woff2');
}

/* ---------- Playfair Display ---------- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/playfair-display/PlayfairDisplay-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/playfair-display/PlayfairDisplay-Bold.woff2') format('woff2');
}

/* ---------- Source Serif Pro (files: Source Serif 4) ---------- */
@font-face {
  font-family: 'Source Serif Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif/SourceSerif-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-serif/SourceSerif-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif/SourceSerif-Italic.woff2') format('woff2');
}

/* ---------- Space Grotesk ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-grotesk/SpaceGrotesk-Bold.woff2') format('woff2');
}

/* ---------- Calibri (substitute: Carlito) ---------- */
@font-face {
  font-family: 'Calibri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/carlito/Carlito-Regular.woff2') format('woff2');
}
