/**

* Reset some basic elements
*/

body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure {

margin: 0;
padding: 0;

}

/**

* Basic styling
*/

html {

position: relative;
min-height: 100%;

}

body {

font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
color: $text-color;
background-color: $background-color;
-webkit-text-size-adjust: 100%;
-webkit-font-feature-settings: "kern" 1;
   -moz-font-feature-settings: "kern" 1;
     -o-font-feature-settings: "kern" 1;
        font-feature-settings: "kern" 1;
font-kerning: normal;
letter-spacing: -.022em;
margin-bottom: 60px;

}

/**

* Set `margin-bottom` to maintain vertical rhythm
*/

h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, %vertical-rhythm {

margin-bottom: $spacing-unit / 2;

}

p+h1, ul+h1, ol+h1, p+h2, ul+h2, ol+h2, p+h3, ul+h3, ol+h3, p+h4, ul+h4, ol+h4, p+h5, ul+h5, ol+h5, p+h6, ul+h6, ol+h6 {

margin-top: 1.4em;

}

/**

* Images
*/

img {

max-width: 100%;
vertical-align: middle;

}

/**

* Figures
*/

figure {

text-align: center;
margin-top: 40px;
margin-bottom: 40px;

}

figure > img {

-webkit-backface-visibility: hidden;
backface-visibility: hidden;
box-sizing: border-box;
display: block;
max-width: 100%;
height: auto;
margin: 0;

}

figcaption {

font-size: 17px;
line-height: 1.52947;
font-weight: 600;
letter-spacing: -.021em;
margin-top: 10px;
margin-bottom: 15px;
text-align: left

}

/**

* Lists
*/

ul, ol {

margin-left: 1.17647em;

}

li {

> ul,
> ol {
  margin-bottom: 0;
}

}

/**

* Headings
*/

h1, h2, h3, h4, h5, h6 {

font-weight: $heavy-font-weight;

code {
  font-size: inherit;
}

}

h1 { font-size: 2em; } h2 { font-size: 1.5em; } h3 { font-size: 1.17em; } h4 { font-size: 1.12em; } h5 { font-size: .83em; } h6 { font-size: .75em; }

/**

* Links
*/

a {

color: $brand-color;
text-decoration: none;

&:visited {
  color: darken($brand-color, 10%);
}

&:hover {
  color: $text-color;
  opacity: $a-hover-opacity;  
}

}

/**

* Blockquotes
*/

blockquote {

color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: $spacing-unit / 2;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;

> :last-child {
  margin-bottom: 0;
}

}

/**

* Rules
*/

hr {

border: 0;
height: 1px;
background: #d6d6d6;
margin: 65px 0

}

/**

* Code formatting
*/

pre, code {

font-family: $monospace-font-family;
font-size: 13px;
border: 1px solid $grey-color-light;
border-radius: 0;
background-color: lighten($grey-color-light, 5%);

}

code {

padding: 1px 5px;

}

pre {

padding: 8px 12px;
overflow-x: auto;

> code {
  border: 0;
  padding-right: 0;
  padding-left: 0;
}

}

/**

* Wrapper
*/

.wrapper {

width: $content-width;

margin-right: auto;
margin-left: auto;

@extend %clearfix;

@include media-query($on-medium) {
  width: 692px;
}

@include media-query($on-small) {
  width: 87.5%;
}

}

/**

* Clearfix
*/

%clearfix:after {

content: "";
display: table;
clear: both;

}