/**

* Reset some basic elements
*/

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

margin: 0;
padding: 0;

}

h1 {

@include relative-font-size(1.5);

}

sup {

@include relative-font-size(0.8);
font-family: $title-font-family;
weight: 700;

}

button {

background: $background-color;
padding: $spacing-unit / 3 $spacing-unit;
border-radius: $spacing-unit;
border: 1px solid $brand-color;
color: $brand-color;
font-family: $base-font-family;
font-size: $small-font-size;
font-weight: bold;
text-transform: uppercase;
transition: all .3s ease;
margin-bottom: $spacing-unit / 2;

}

button:hover {

cursor: pointer;
background: $brand-color;
color: $background-color;

}

/**

* Basic styling
*/

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;
display: flex;
min-height: 100vh;
flex-direction: column;

}

/**

* 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;

}

/**

* `main` element
*/

main {

display: block;

}

/**

* Figures
*/

figure > img {

display: block;

}

figcaption {

font-size: $small-font-size;

}

/**

* Lists
*/

ul, ol {

margin-left: $spacing-unit;

}

li {

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

}

/**

* Headings
*/

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

color: $brand-color;
font-family: $title-font-family;
font-weight: $title-font-weight;

}

/**

* Links
*/

a {

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

&:visited {
  color: $link-color;
}

&:hover {
  color: $text-color;
  text-decoration: underline;
}

.social-media-list &:hover {
  text-decoration: none;

  .username {
    text-decoration: underline;
  }
}

}

/**

* Blockquotes
*/

blockquote {

@include relative-font-size(1.5);
font-style: italic;
color: $brand-color;

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

}

/**

* Code formatting
*/

pre, code {

@include relative-font-size(0.8);
border: 1px solid $grey-color-dark;
border-radius: 3px;
background-color: $grey-color-light;
font-family: "DM Mono", monospace;

}

code {

padding: 1px 5px;

}

pre {

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

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

}

/**

* Wrapper
*/

.wrapper {

max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
max-width:         calc(#{$content-width} - (#{$spacing-unit} * 2));
margin-right: auto;
margin-left: auto;
padding-right: $spacing-unit;
padding-left: $spacing-unit;
@extend %clearfix;

@include media-query($on-laptop) {
  max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
  max-width:         calc(#{$content-width} - (#{$spacing-unit}));
  padding-right: $spacing-unit / 1.5;
  padding-left: $spacing-unit / 1.5;
}

}

/**

* Clearfix
*/

%clearfix:after {

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

}

/**

* Icons
*/

.svg-icon {

width: 16px;
height: 16px;
display: inline-block;
fill: #{$grey-color};
padding-right: 5px;
vertical-align: text-top;

}

.social-media-list {

li + li {
  padding-top: 5px;
}

}

/**

* Tables
*/

table {

margin-bottom: $spacing-unit;
width: 100%;
text-align: $table-text-align;
color: lighten($text-color, 18%);
border-collapse: collapse;
border: 1px solid $grey-color-light;
tr {
  &:nth-child(even) {
    background-color: lighten($grey-color-light, 6%);
  }
}
th, td {
  padding: ($spacing-unit / 3) ($spacing-unit / 2);
}
th {
  background-color: lighten($grey-color-light, 3%);
  border: 1px solid darken($grey-color-light, 4%);
  border-bottom-color: darken($grey-color-light, 12%);
}
td {
  border: 1px solid $grey-color-light;
}

}

// footer .site-footer {

border-top: 1px solid $grey-color-dark;
background: $grey-color-light;
padding: $spacing-unit 0;
margin-top: $spacing-unit * 2;

}

.footer-heading {

@include relative-font-size(1.125);
margin-bottom: $spacing-unit / 2;

}

.feed-subscribe .svg-icon {

padding: 5px 5px 2px 0

}

.contact-list, .social-media-list {

list-style: none;
margin-left: 0;

}

.footer-col-wrapper, .social-links {

@include relative-font-size(0.9375);
color: $text-color;

}

.footer-col {

margin-bottom: $spacing-unit / 2;

}

.footer-col-1, .footer-col-2 {

width: calc(50% - (#{$spacing-unit} / 2));

}

.footer-col-3 {

width: calc(100% - (#{$spacing-unit} / 2));

}

@media screen and (min-width: $on-palm) {

.footer-col-1 {
  width: calc(35% - (#{$spacing-unit} / 2));
}

.footer-col-2 {
  width: calc(20% - (#{$spacing-unit} / 2));
}

.footer-col-3 {
  width: calc(45% - (#{$spacing-unit} / 2));
}

}

@media screen and (min-width: $on-laptop) {

.footer-col-wrapper {
  display: flex
}

.footer-col {
  width: calc(100% - (#{$spacing-unit} / 2));
  padding: 0 ($spacing-unit / 2);

  &:first-child {
    padding-right: $spacing-unit / 2;
    padding-left: 0;
  }

  &:last-child {
    padding-right: 0;
    padding-left: $spacing-unit / 2;
  }
}

}