---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";

@import url('//fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600');


/*----- Variables -----*/

$spacing-unit: 10px;
$highlight-color: red;
$mq-sm: 25rem;
$mq-md: 40rem;
$mq-lg: 55rem;


/*----- General/Reset -----*/

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

body {
  margin: 0;
  padding-right: ($spacing-unit * 2);
  padding-left: ($spacing-unit * 2);
  font-family: 'Source Sans Pro', sans-serif;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

a {
  text-decoration: none;
  color: $highlight-color;
}

img {
  max-width: 100%;
  vertical-align: bottom;
}


/*----- Books -----*/

.shelf {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
  -webkit-box-align: baseline;
  -webkit-align-items: baseline;
      -ms-flex-align: baseline;
          align-items: baseline;
  max-width: 1200px;
  margin: 100px auto;
}

.book {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  margin-bottom: ($spacing-unit * 4);
  -webkit-box-flex: 1;
  -webkit-flex: 1 0 100%;
      -ms-flex: 1 0 100%;
          flex: 1 0 100%;

  @media (min-width: $mq-md) {
    -webkit-box-flex: 1;
    -webkit-flex: 1 0 50%;
        -ms-flex: 1 0 50%;
            flex: 1 0 50%;
  }

  @media (min-width: $mq-lg) {
    -webkit-box-flex: 1;
    -webkit-flex: 1 0 25%;
        -ms-flex: 1 0 25%;
            flex: 1 0 25%;
  }
}

.book-cover {
  margin: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
      -ms-flex-align: end;
          align-items: flex-end;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  padding-right: ($spacing-unit * 2);
  padding-left: ($spacing-unit * 2);

  > img {
    max-width: 100%;
    height: auto;
  }

  > a {
    display: block;
  }
}

.book-info {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  border-top: 5px solid #eee;
  padding: ($spacing-unit * 2);
}


/*----- Footer -----*/

.footer {
  margin-bottom: 100px;
  text-align: center;
}
