@import url('/assets/fonts/fonts.css');

/* Independent pixel fonts shared by game, editor, library and previews. */
:root {
  --heading-font: 'Red Thorn Condensed 36', sans-serif;
  --title: var(--heading-font);
  --body: 'Red Thorn Readout 14', monospace;
  --mono: 'Red Thorn Readout 12', monospace;
  --display: 'Red Thorn Terminal 14', monospace;
}
body {
  font-family: var(--body);
  font-size: 14px;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  text-rendering: auto;
}
/* Smooth field text explicitly instead of inheriting the pixel UI setting. */
button, input, select, textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, .preview-heading {
  font-family: var(--heading-font);
  font-weight: 400;
  font-synthesis: none;
}
h1, h2, .preview-heading { font-size: 36px; }
h3, h4, h5, h6 { font-family: 'Red Thorn Condensed 24', sans-serif; font-size: 24px; }

/* Smooth outlines for pages and menus; retain bitmap typography in the HUD. */
@font-face {
  font-family: 'Red Thorn Sans';
  src: url('/assets/fonts/arimo-smooth.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Red Thorn Heading';
  src: url('/assets/fonts/anton-smooth.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root:root {
  --heading-font: 'Red Thorn Heading', sans-serif;
  --title: var(--heading-font);
  --body-font: 'Red Thorn Sans';
  --body: 'Red Thorn Sans', sans-serif;
  --mono: 'Red Thorn Sans', sans-serif;
  --display: 'Red Thorn Sans', sans-serif;
}
body:is(body) {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body :is(h1, h2, h3, h4, h5, h6, .brand, .home-meta b,
  .map-caption strong, #tactical-hint, .editor-brand, .editor-header #map-name) {
  font-family: var(--heading-font);
  font-weight: 400;
}
body :is(kbd, .control-table thead th, .hud-controls) {
  font-family: var(--mono);
}
#hud {
  --heading-font: 'Red Thorn Condensed 36', sans-serif;
  --title: var(--heading-font);
  --body: 'Red Thorn Readout 14', monospace;
  --mono: 'Red Thorn Readout 12', monospace;
  --display: 'Red Thorn Terminal 14', monospace;
  font-family: var(--body);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
}
#hud .hud-controls, #hud kbd {
  font-family: 'Red Thorn Readout 10', monospace;
}
