/* 

Responsive grid - Nigel Hawketts - Vantech Media - March 2013

================= BREAKPOINTS: ================

    Device names (NFCs) for convenience only:
    
    Mobile:         0 - 35em
    Tablet:        30 - 52.5em
    Desktop:       52.5em+ (max-width 986px)

============================================= */

/* ============= NORMALIZE: ================= */

*
{
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

footer, header, nav, section
{
  display: block;
}

[hidden]
{
  display: none;
}

html
{
  font: 14px "Lora", serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  margin: 0;
  height: 100%;
}

a
{
  text-decoration: none;
  color: #2D507C;
  outline: 0;
  transition: color 0.5s;
}

a:hover
{
  color: #794979;
}

a img
{
  border: none;
}

strong
{
  font-weight: bold;
}

i
{
  font-style: normal;
}

q
{
  quotes: "\201C" "\201D" "\2018" "\2019";
}

small
{
  font-size: 80%;
}

sub, sup
{
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup
{
  top: -0.5em;
}

sub
{
  bottom: -0.25em;
}

img
{
  border: 0;
}

svg:not(:root)
{
  overflow: hidden;
}

/* Tables */

table
{
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2
{
  margin-bottom: 0.5em;
}

h3, h4, h5, h6, p, ul, ol, dl
{
  margin-bottom: 1em;
}

ul
{
  margin-left: 0;
  padding-left: 2em;
}

/* ========== END NORMALIZE. BEGIN =========== */

html
{
  background-color: #EBE3E0;
  background: url('../graphics/background-02.jpg'), url('../graphics/background-01.jpg');
  background-repeat: repeat-x, repeat;
  background-attachment: fixed, fixed;
  color: #241D19;
  padding: 1em;
}

body
{
  max-width: 986px;
  margin: 0 auto;
  padding: 0.5em 0;
  background-color: #fff;
  box-shadow: 0 0 0.35em rgba(0, 0, 0, 0.25);
  border-radius: 0.125em;
}

header, nav, section, footer
{
  background-color: #fff;
  border: 0.075em solid #EBE3E0;
  margin: 0 0.5em;
  padding: 1em;
  overflow: hidden;
  border-radius: 0.125em;
}

nav
{
  padding: 0;
  text-align: center;
  border-top: none;
  border-bottom: none;
}

header
{
  border-bottom: none;
  border-top-left-radius: 0.125em;
  border-top-right-radius: 0.125em;
}

header a
{
  display: block;
  background: transparent url('../graphics/logo.svg') 50% 50% no-repeat;
  background-size: 100% auto;
  margin: 0 auto;
  width: 32%;
  padding-bottom: 16%;
}

header a *
{
  display: none;
}

/* ======== Navigation ========== */

nav ul
{
  list-style: none;
  margin: 0 1em;
  padding: 0.5em 0;
  border: 0.075em solid #EBE3E0;
  border-left: none;
  border-right: none;
}

nav li
{
  display: inline-block;
  margin: 0.125em 0;
  padding: 0;
}

nav a, #trigger-touch-nav
{
  display: block;
  background-color: #fff;
  padding: 0.5em 0.75em;
  border-radius: 0.25em;
  color: #1D3F6A;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1.05em;
}

nav a:hover, #trigger-touch-nav:hover
{
  color: #fff;
  background-color: #9BB7DB;
}

#trigger-touch-nav
{
  display: none;
}

section
{
  min-height: 30em;
  line-height: 1.5;
  border-bottom: none;
}

section
{
  border-top: none;
}

h1, h2, h3, h4, h5, h6
{
  font-weight: normal;
  color: #121212;
}

h2
{
  font-size: 1.75em;
}

h3
{
  font-size: 1.45em;
}

h4
{
  font-size: 1.225em;
}


/* ISBN Table */

table, td, th
{
  border: 0.125em solid #C3C4B6;
}

table
{
  border-collapse: collapse;
  border-right: none;
  border-top: none;
  margin: 0 0 1em 0;
}

td, th
{
  text-align: left;
  padding: 0.5em;
  border-left: none;
  border-bottom: none;
}

th
{
  background-color: #E1E3D6;
}

table small
{
  font-size: 0.825em;
}

ul, ol
{
  margin-left: 0;
  padding-left: 1em;
}

ol
{
  list-style: lower-alpha;
  font-size: 1.25em;
}

ol li
{
  font-size: 0.775em;
}

dt
{
  padding: 0 0 0 1.25em;
  background: transparent url('../graphics/list-marker.png') 0 0.315em no-repeat;
  font-weight: bold;
}

dd
{
  padding: 0 0 1em 1.25em;
}

footer
{
  margin-bottom: 0;
  border-top: none;
  border-bottom-left-radius: 0.125em;
  border-bottom-right-radius: 0.125em;
  font-size: 0.95em;
  text-align: center;
}

footer, footer a
{
  color: #706865;
}

footer a:hover
{
  color: #6C96CB;
}

/* ======= IMAGE VIEWER ======= */

body#image-viewer section
{
  position: relative;
  border-top: 0.075em solid #EBE3E0;
}

#image-viewer-close
{
  display: block;
  position: absolute;
  top: 1em;
  right: 1em;
  width: 10em;
  height: 1.75em;
  background-image: url(../graphics/vm-icon-close.svg);
  background-position: 100% 0;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  text-align: right;
  padding-right: 2em;
}


/* ======= GRID ========== */

.unit
{
  float: left;
  width: 100%;
  padding: 0 1em 0 0;
}

.img-env img
{
  width: 100%;
  box-shadow: 0 0 0.5em rgba(0,0,0,0.3);
  border: 0.5em solid #fff;
}

.width-75
{
  width: 75%;
}

.width-50
{
  width: 50%;
}

.width-25
{
  width: 25%;
}

/* ===== END GRID ====== */


/* NFC 'TABLET' */

@media all and (max-width: 52.5em)
{

  html
  {
    font-size: 14px;
    padding: 0.5em;
  }
  
  header a
  {
    width: 45%;
    padding-bottom: 20%;
  }

  .width-75, .width-25
  {
    width: 50%;
  }

}

/* NFC 'MOBILE' */

@media all and (max-width: 32.5em)
{

  html
  {
    font-size: 14px;
    padding: 0;
  }

  body
  {
    padding: 0;
  }

  header, nav, section, footer
  {
    margin: 0;
    padding: 0.5em;
    border: none;
  }
  
  header a
  {
    width: 62.5%;
    padding-bottom: 30%;
  }

  nav
  {
    padding: 0.5em 0;
    font-size: 1.1em;
  }

  nav ul
  {
    padding: 0;
    margin: 0;
    border-bottom: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
  }

  nav.active ul
  {
    max-height: 50em;
    transition: max-height 1s;
  }

  nav li, #trigger-touch-nav
  {
    display: block;
    padding: 0;
    margin: 0;
  }

  nav a, #trigger-touch-nav
  {
    margin: 0;
    padding: 0.75em;
    border-bottom: 0.075em solid #EBE3E0;
    border-radius: 0;
  }

  #trigger-touch-nav
  {
    border-top: 0.075em solid #EBE3E0;
    border-bottom: none;
    font-weight: bold;
  }

  .width-75, .width-50, .width-25
  {
    width: 100%;
    padding-right: 0;
  }

  .img-env img
  {
    margin: 0 auto;
  }

}
