html {
  @include breakpoint(mobile) {
    font-size: $mobile-base-font-size;
  }
  @include breakpoint(tablet) {
    font-size: $base-font-size;
  }
}

body {
  -webkit-font-smoothing: antialiased;

  // Font family declaration for headers and body text
  * {
    font-family: $body-font-family;
    font-size: calc(#{$base-font-size} * #{$font-size-multiplier});
    line-height: 27px;
  }
  h1, h2, h3, h4, h5 {
    &, * {
      font-family: $header-font-family;
    }
  }

  // Header text specification
  h1 {
    &, * {
      letter-spacing: setLetterSpacing($header-font-family);
      font-weight: setHeaderFontWeight($header-font-family);
      margin-top: 0;
      margin-bottom: calculateRem(28);
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h1-font-size} * #{$font-size-multiplier});
        line-height: 43px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h1-font-size} * #{$font-size-multiplier});
        line-height: 57px;
      }
    }
  }
  h2 {
    &, * {
      letter-spacing: setLetterSpacing($header-font-family);
      font-weight: setHeaderFontWeight($header-font-family);
      margin-top: 0;
      margin-bottom: calculateRem(24);
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h2-font-size} * #{$font-size-multiplier});
        line-height: 33px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h2-font-size} * #{$font-size-multiplier});
        line-height: 43px;
      }
    }
  }
  h3 {
    &, * {
      letter-spacing: setLetterSpacing($header-font-family);
      font-weight: setH3FontWeight($header-font-family);
      margin-top: 0;
      margin-bottom: calculateRem(16);
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h3-font-size} * #{$font-size-multiplier});
        line-height: 28px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h3-font-size} * #{$font-size-multiplier});
        line-height: 36px;
      }
    }
  }
  h4 {
    &, * {
      letter-spacing: calculateRem(1);
      font-weight: 700;
      margin-top: 0;
      margin-bottom: calculateRem(14);
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h4-font-size} * #{$font-size-multiplier});
        line-height: 24px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h4-font-size} * #{$font-size-multiplier});
        line-height: 28px;
      }
    }
  }
  h5 {
    &, * {
      font-size: calculateRem(20);
      line-height: calculateRem(24);
      letter-spacing: 0;
      font-weight: 700;
      margin-top: 0;
      margin-bottom: calculateRem(12);
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h5-font-size} * #{$font-size-multiplier});
        line-height: 22px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h5-font-size} * #{$font-size-multiplier});
        line-height: 24px;
      }
    }
  }
  h6 {
    &, * {
      letter-spacing: 0;
      font-weight: 600;
      margin-top: 0;
      margin-right: 0;
      margin-bottom: calculateRem(12);
      margin-left: 0;
      @include breakpoint(mobile) {
        font-size: calc(#{$mobile-h6-font-size} * #{$font-size-multiplier});
        line-height: 22px;
      }
      @include breakpoint(tablet) {
        font-size: calc(#{$h6-font-size} * #{$font-size-multiplier});
        line-height: 24px;
      }
    }
  }


  // Paragraph text specification
  p {
    font-size: calc(#{$base-font-size} * #{$font-size-multiplier});
    line-height: 27px;
    font-weight: 400;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: calculateRem(36);
    margin-left: 0;
  }

  li {
    font-size: calc(#{$base-font-size} * #{$font-size-multiplier});
    line-height: 27px;
    font-weight: 400;
  }

  // Anchor/link text specification
  a {
    cursor: pointer;
    color: $primary-color;
    text-decoration: none;
    &:not(.button):not(.icon-button):not(.no-hover):not(.no-link-styles):hover {
      color: setLinkHoverColor($primary-color);
    }
    &.no-hover {
      color: inherit;
    }
  }

  // Some special cases
  h1.title + h3.subtitle {
    margin-top: calculateRem(-24);
    margin-bottom: calculateRem(28);
  }
}
