/**
 * ---------------------------------------------------------------------------------------------------- #
 *
 * Basic Formattings
 *
 */

html {
    box-sizing: border-box;
    font-size: $global-font-size;
}

// fix IE root font size calculation
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    html {
        font-size: $global-font-size-ie;
    }
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

[hidden] {
    display: none !important; // stylelint-disable-line declaration-no-important
}


/**
 * Body
 */

body {
    overflow-y: scroll;
    margin: 0;
    font-family: $base-font;
    font-size: $base-fontsize;
    font-weight: 400;
    line-height: $base-lineheight;
    text-align: left;
    text-rendering: optimizeLegibility;
    text-size-adjust: 100%;
    color: $dark-gray;
    background: $white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/**
 * Headlines
 */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: $headline-font;
    font-weight: 400;
}


/**
 * General Text Formattings
 */

b,
strong {
    font-weight: 700;
}

i,
em,
dfn {
    font-style: italic;
}

address {
    font-style: normal;
}

abbr {
    border-bottom: 1px dotted $medium-gray;
    font-variant: small-caps;
    letter-spacing: 1px;
    cursor: help;
}

sub,
sup {
    position: relative;
    font-size: 10px;
    line-height: 10px;
}

sub {
    top: 4px;
}

sup {
    top: -6px;
}

q,
cite,
blockquote {
    font-family: $blockquote-font;
    font-style: italic;
}

pre,
code {
    background-color: $light-gray;
}

hr {
    height: 1px;
    margin: 0;
    border: 0;
    padding: 0;
    background-color: $medium-gray;
}

mark {
    color: $dark-gray;
    background-color: $secondary-color;
}


/**
 * Textselection
 */

::-moz-selection {
    text-shadow: none;
    color: #fff;
    background-color: rgba($dark-gray, .99); // rgba to adjust Chrome-Firefox differences
}

::selection {
    text-shadow: none;
    color: #fff;
    background-color: rgba($dark-gray, .99); // rgba to adjust Chrome-Firefox differences
}


/**
 * Monospaced Text
 */

pre,
code,
kbd,
samp,
var {
    font-family: $monospaced-font;
}


/**
 * Images
 */

img {
    display: block;
    max-width: 100%;
}


/**
 * Buttons
 */

button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

button {
    @extend %btn;

    overflow: visible;
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-transform: none;
    background-color: transparent;
}
