/* global font settings */

/*
custom media queries
should match corresponding variables with px unit
*/
@custom-media --hiq-lower-font-range (min-width: 460px);
@custom-media --hiq-upper-font-range (min-width: 900px);

html {
  /* prevent adjustments of font size after orientation changes on some mobile devices */
  -webkit-text-size-adjust: 100%;

  /* text rendering */
  text-rendering: var(--hiq-text-rendering);

  /* base font family */
  font-family: var(--hiq-font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);

  /* base font size */
  font-size: calc(var(--hiq-unitless-min-font-size) * 1px);

  /* responsive font size calculation */
  @media (--hiq-lower-font-range) {
    font-size: calc((var(--hiq-unitless-min-font-size) * 1px) + (calc(var(--hiq-unitless-max-font-size) - var(--hiq-unitless-min-font-size))) * (calc(100vw - (var(--hiq-unitless-lower-font-range) * 1px))) / (calc(var(--hiq-unitless-upper-font-range) - var(--hiq-unitless-lower-font-range))));
  }

  /* set upper font range limit */
  @media (--hiq-upper-font-range) {
    font-size: calc(var(--hiq-unitless-max-font-size) * 1px);
  }

  /* base font weight */
  font-weight: var(--hiq-font-weight-base);

  /* base letter spacing */
  letter-spacing: var(--hiq-letter-spacing-base);

  /* base line height */
  line-height: var(--hiq-line-height-base);
}

/* allow text alignment to be inherited */
body {
  text-align: start;

  /* text color */
  color: var(--hiq-text-color);
}
