/*

(\  }\
(  \_('>
(_(=_)
-"=

*/

* { box-sizing: border-box; }

body {
  background: #fefbf5;
  padding: 0;
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #222;
  text-transform: lowercase;
  font-variant-ligatures: none; /* override safari ugly 'fi' rendering */
  line-height: 2.25;
}

a, button {
  color: blue;
  text-decoration: none;
}

a:active { color: blue; }
a:visited { color: blue; }

header {
  position: fixed;
  top: 0.75rem;
  left: 2rem;
  width: 48rem;
  max-width: calc(100vw - 8rem); /* room for cart icon, optical */
  height: 4.5rem;
  margin: 0;
  background: #fefbf5;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 2.3px; /* match body 2px @ 13pt */
}

header h1 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  flex-shrink: 0;
}

header img {
  width: 2rem;
  height: 4rem;
  margin: 0;
}

nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 60%; /* ~ 30rem but shrinking in proportion with other gaps on flex */
  text-transform: uppercase;
}

nav > * {
  line-height: 1.2;
  padding: 3px 0;
}

nav .filter-button.active {
  padding: 3px 0 2px; /* take one off to compensate for border */
  border-bottom: 1px solid blue;
}

nav a:hover,
nav .filter-button:hover {
  text-decoration: none;
}

nav a#tour-alert {
  color: #2da357 !important;
}

nav .filter-button {
  color: blue;
  padding: 3px 0;
}

button  { /* reset */
  cursor: pointer;
  border: none;
  margin: 0;
  padding: 0;
  width: auto;
  overflow: visible;
  background: transparent;
  outline: none;
  color: inherit;
  font: inherit;
  line-height: normal;
  letter-spacing: inherit;
  text-transform: inherit;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
  -webkit-appearance: none;
  user-select: none;
}

main {
  display: flex;
  flex-direction: row;
  justify-content: flex-start; /* horizontal */
  align-items: center; /* vertical */
  height: 100vh;
  padding-top: 3rem; /* optical middle, accounting for nav */
  margin: 0;
  white-space: nowrap;
  overflow: visible;
}

.release {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  position: relative;
  height: auto;
  width: auto;
  margin: 0 0 0 5rem;
  padding-top: 0;
}

.release .album-art {
  display: block;
  box-shadow: 0.5rem 0.5rem 1px #e8e0d8;
  width: 450px;
  height: 450px;
}

.release .release-info {
  width: auto;
  margin: 0 0 0 1.875rem;
  padding: 0 111px 0 0; /* actually a margin lol */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.release .release-info.tighter { /* for long titles */
  padding: 0 33px 0 0;
}

.release .release-info h2 {
  margin: 0;
  padding: 0;
  font: inherit;
  display: inline;
  white-space: nowrap;
}

.release .release-info a,
.release .release-info button {
  color: blue;
  text-decoration: none;
  padding-bottom: 2px;
}

.release .release-info a:hover {
  color: blue;
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid blue;
}

/* artist and title punctuation */
.release .release-info h2.artist-name::after { content: ','; }
.release .release-info h2.release-title:not(.no-quote-marks)::before { content: '‘'; }
.release .release-info h2.release-title:not(.no-quote-marks)::after { content: '’'; }

.release .release-info ul,
.release .release-info p {
  margin-top: 1.375rem;
  padding: 0;
}

.release .release-info ul {
  list-style-type: none;
}

.release .release-info ul li {
  display: block;
  white-space: nowrap;
}

.release .release-info p {
  line-height: 1.5;
}

/* TODO find a nice way to display these */
.release .release-info .catalogue-number { display: none; }

.release.available-on-vinyl .sticker {
  display: inline-block;
  position: absolute;
  top: -45px;
  left: 300px;
  width: 120px;
  height: 120px;
  border-radius: 120px;
  box-shadow: 0 3px 6px rgba(16,16,16,0.1);
  background-image: url("../i/vinyl-sticker.gif");
  background-size: 103%;
  background-position: center bottom;
}

.release.available-on-vinyl.out-of-stock .sticker { /* class override for out of stock */
  background-image: url("../i/vinyl-out-sticker.gif");
  background-size: 110%;
  background-position: center;
}

/* slightly hairy filtering; vinyl-only on .box activated filter */
main.vinyl-only .release { display: none; }
main.vinyl-only .release.available-on-vinyl { display: flex !important; }


/* ~ ~ ~ LAYOUT SWITCH ~ ~ ~ */


@media screen and (max-width: 768px) {
  header {
    position: static;
    margin: 2rem auto 1rem;
    height: 55px;
    width: 450px;
  }

  nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100vw;
    padding: 1.5rem calc(50vw - 225px) 1rem; /* (100vw - width) / 2 */
    z-index: 3;
    background: #fefbf5;
  }

  main {
    flex-direction: column;
    height: auto;
    margin: 0 auto;
    padding-top: 0;
  }

  .release {
    flex-direction: column;
    padding-top: 2rem; /* extra, largely for the vinyl stickers, but it helps */
    margin: 0;
  }

  .release.available-on-vinyl .sticker {
    top: -8px;
  }

  .release .release-info {
    width: 100%;
    margin: 1.5rem 0 0 0;
    padding: 0 0.375rem 100px;
  }

  .release .release-info .links {
    align-self: flex-end;
    text-align: right;
  }

  .release .release-info h2,
  .release .release-info li {
    white-space: normal; /* just for tst029 on mobile lol */
  }

}

/* ~ ~ ~ MOBILE EXCEPTIONS ~ ~ ~ */

@media screen and (max-width: 515px) {
  header {
    width: 300px;
    font-size: 14px;
    letter-spacing: 2.15px;  /* match body 2px @ 13pt */
  }

  header img {
    width: 1.5rem;
    height: 3rem;
    margin: 0;
  }

  nav {
    padding: 1.5rem calc(50vw - 134px) 1rem calc(50vw - 150px); /* make a wee bit extra space for cart */
  }

  .release {
    width: 300px;
  }

  .release .album-art {
    width: 300px;
    height: 300px;
  }

  .release .release-info {
    padding: 0 0.375rem 75px; /* slightly tighter for scrolling */
  }

  .release.available-on-vinyl .sticker {
    top: 0px;
    left: 180px;
    width: 100px;
    height: 100px;
    border-radius: 100px;
    box-shadow: 0 2px 4px rgba(16,16,16,0.1);
  }
}
