/* Shared Font Loading Configuration */

/* Google Fonts - Lexend */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100;200;300;400;500;600;700;800;900&display=swap");

/* Font Family Definitions */
:root {
  --font-primary: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-journal: "Baskerville", "Georgia", serif;
  --font-code: "Inconsolata", "Courier New", monospace;
}

/* Apply Lexend as primary font */
body,
html {
  font-family: var(--font-primary);
}

/* Journal app specific - Baskerville for editorial feel */
.journal-editor,
.journal-card,
.journal-text {
  font-family: var(--font-journal);
}

/* Code/technical areas */
code,
pre,
.code-block,
.formula {
  font-family: var(--font-code);
}

/* Font smoothing and optimization */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ensure fonts load properly on all devices */
@supports (font-display: swap) {
  /* CSS already handles this via display=swap in @import */
}

/* Fallback for older browsers without font-display support */
body {
  font-weight: 400;
  letter-spacing: -0.5px;
}
