
/*===========================================================================*/
/* General */
/*===========================================================================*/

  * {
    box-sizing: border-box;
  }

  html {
    height: 100%;
    background: #3A353E;
  }

  body {
    margin: 0;
    background: #F4F1EB;
    color: #3C254E;
  }

  body,
  textarea {
    font-family: 'Open Sans', Verdana, sans-serif;
  }

  main {
    display: block;
    max-width: 50rem;
    margin: 3rem auto 0;
    padding: 0 1rem 8rem;
  }

  h1, h2 {
    font-weight: normal;
  }

  h1 {
    margin: 3.5rem 0 1rem;
    font-size: 3rem;
  }

  h2 {
    margin: 1rem 0 1rem;
    font-size: 1.7rem;
  }

  @media (max-width: 660px) {
    h1 {
      font-size: 2rem;
      margin: 1rem 0 0.5rem;
    }

    h2 {
      font-size: 1.5rem;
      margin: 2.5rem 0 0.5rem;
    }
  }

  p {
    line-height: 1.7rem;
    font-size: 1rem;
  }

  address {
    font-style: normal;
    line-height: 1.7rem;
  }

  .image-mobile-only {
    display: none;
  }

  @media (max-width: 50rem) {
    .image-desktop-only {
      display: none;
    }

    .image-mobile-only {
      display: block;
      width: 400px;
      max-width: 100%;
      height: auto;
    }
  }

  img.banner {
    display: block;
    width: 100%;
    border-radius: 0.3rem;
    box-shadow: 0 0.25rem  1rem    rgba(0, 0, 0, 0.25),
                0 0.125rem 0.25rem rgba(0, 0, 0, 0.25);
  }

  .banner--fixed-height {
    height: 16.5rem;
    object-fit: cover;
    object-position: left;
  }

  ::selection {
    background: #6E5A7D;
    color: #fff;
  }

/*===========================================================================*/
/* Links */
/*===========================================================================*/

  a {
    text-decoration: none;
  }

  a > span,
  .button > span {
    position: relative; /* Fix Safari overflow bug */
  }

  a,
  a > span,
  .button,
  .button > span {
    outline: 0;
  }

  .text-link {
    color: #825EA6;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
  }

  .text-link > span {
    box-shadow: 0 0.125rem 0 0;
  }

  .text-link:focus {
    margin: 0 -0.125rem;
  }

  .text-link:focus > span {
    padding: 0 0.125rem;
    border-radius: 0.125rem;
    box-shadow: 0 0 0 0.125rem #8C5FAE;
  }

  .text-link:hover,
  a:hover .text-link {
    color: #8C5FAE;
  }

  .text-link:active,
  a:active .text-link {
    color: #3C254E;
  }

  .image-link:focus img {
    outline: 0.25rem solid #6E5A7D;
  }

/*===========================================================================*/
/* Accessibility */
/*===========================================================================*/

  .skipnav {
    position: absolute;
    top: -6rem;
    width: 100%;
    text-align: center;
    justify-content: center;
    z-index: 20;
  }

  .skipnav a {
    position: relative;
    top: 0;
    display: block;
    width: 100%;
    color: #fff;
    padding: 1.5rem;
    font-size: 1.25rem;
    background: #6F5680;
    opacity: 0.8;
    transition: top 0.1s;
  }

  .skipnav a:focus {
    top: 6rem;
  }

  .skipnav a:focus > span {
    box-shadow: 0 2px 0 0 #fff;
  }

/*===========================================================================*/
/* Helper Classes */
/*===========================================================================*/

  .avoid-wrap {
    display: inline-block;
  }

  .mobile-only {
    visibility: hidden;
  }

  @media (max-width: 50rem) {
    .mobile-only {
      visibility: visible;
    }
  }

/*===========================================================================*/
/* Social */
/*===========================================================================*/

  .social {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .social li a > span {
    display: flex;
    align-items: center;
    padding: 0.75rem;
  }

  .social img {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 1rem;
    opacity: 0.6;
  }

  .social a:hover img {
    opacity: 0.8;
  }

  .social a:active img {
    opacity: 0.4;
  }

/*===========================================================================*/
/* Buttons */
/*===========================================================================*/

  .button {
    font-size: 1rem;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.25),
                0 0.25rem  0.5rem  rgba(0, 0, 0, 0.25);
  }

  .button {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: #6E5A7D;
    border-radius: 0.25rem;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
  }

  .button > span {
    border-radius: 0.25rem;
    border: 0.25rem solid transparent;
    padding: 0.625rem;
    width: 100%;
  }

  button::-moz-focus-inner {
    border: 0;
  }

  .button:focus > span {
    border-color: #3C254E;
  }

  .button:hover > span {
    background: #634A73;
  }

  .button:active > span {
    background: #483952;
  }

  .button:disabled {
    background: #C5C0CA;
    cursor: default;
    box-shadow: 0 1px 0.25rem rgba(0, 0, 0, 0.25);
  }

/*===========================================================================*/
/* Nav */
/*===========================================================================*/

  nav {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  nav div {
    display: inline-block;
    display: flex;
  }

  nav .left {
    margin-left: 1rem;
  }

  nav .right {
    margin-left: 0.75rem;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
  }

  nav li {
    display: inline-block;
    display: flex;
    list-style: none;
    padding: 0 0.25rem;
  }

  nav a > span {
    display: flex;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 1.25rem;
    color: #706777;
    text-decoration: none;
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border: 2px solid transparent;
    border-top: 0;
  }

  nav a:focus > span {
    border-color: #825EA6;
  }

  nav a:hover > span {
    color: #6E5A7D;
    background: RGBA(138, 116, 154, 0.25);
  }

  nav a:active > span {
    color: #3C254E;
  }

  nav a.selected > span {
    background: #836B94;
    color: #fff;
  }

  nav a.selected:focus > span {
    border-color: #30213b;
    color: #fff;
  }

  nav a.selected:hover > span {
    background: #6F5680;
    color: #fff;
  }

  @media (max-width: 50rem) {
    nav a > span{
      border-radius: 0;
      font-size: 0.9rem;
    }

    nav {
      background: #f9f8f4;
      box-shadow: 0 0.1rem 0.1rem rgba(0,0,0,0.1);
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      z-index: 10;
    }
  }

  @media (max-width: 660px) {
    nav,
    nav .left,
    nav .right,
    nav li {
      margin: 0;
      padding: 0;
    }
    nav a > span {
      font-size: 0.8rem;
      padding: 1rem 0.4rem;
    }
  }

/*===========================================================================*/
/* Blurbs / posts */
/*===========================================================================*/

  .blurb {
    margin-bottom: 3rem;
    padding: 2rem 3rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
  }

  .blurb:last-child {
    margin: 0;
  }

  .blurb blockquote {
    position: relative;
    margin: 0;
    line-height: 190%;
  }

  .blurb blockquote .quote-open,
  .blurb blockquote .quote-close {
    position: absolute;
    font-family: "Times New Roman", Times, serif;
    color: #836B94;
  }

  .blurb blockquote .quote-open {
    left: -2rem;
    font-size: 4rem;
  }

  .blurb blockquote .quote-close {
    font-size: 3.5rem;
    bottom: -0.3rem;
    margin-left: 0.5rem;
  }

  .blurb cite {
    font-style: normal;
    display: block;
    margin-top: 1rem;
    text-align: right;
  }

  .post {
    display: flex;
    align-items: center;
  }

  .post > *:first-child {
    max-width: 24%;
    height: auto;
    margin-right: 2rem;
    border: 1px solid #ddd;
  }

  .post > *:last-child {
    max-width: 25%;
    height: auto;
    margin-left: 2rem;
  }

  @media (max-width: 50rem) {
    .blurb {
      padding: 1.5rem 2rem;
      font-size: 0.9rem;
    }

    .blurb blockquote {
      line-height: 150%;
    }

    .blurb blockquote .quote-open {
      left: -1.25rem;
      font-size: 2rem;
    }

    .blurb blockquote .quote-close {
      font-size: 2rem;
    }

    .post {
      flex-direction: column;
    }

    .post > *:first-child {
      width: 24%;
      margin-right: 2rem;
      border: 1px solid #ddd;
    }

    .post > *:last-child {
      width: 25%;
      margin-left: 2rem;
    }

  }

/*===========================================================================*/
/* Book cover image */
/*===========================================================================*/

  .book-cover img {
    width: 100%;
    height: auto;
    box-shadow: 0 0.25rem  1rem    rgba(0, 0, 0, 0.25),
                0 0.125rem 0.25rem rgba(0, 0, 0, 0.25);
  }

/*===========================================================================*/
/* Footer */
/*===========================================================================*/

  footer {
    margin: 0;
    padding: 1rem;
    background: #3A353E;
    color: #C5C0CA;
  }

  footer section {
    margin: 4rem auto;
  }

  footer h2 {
    color: #E0D7E5;
    margin-top: 0;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .footer-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .footer-links li {
    display: flex;
  }

  .footer-nav li {
    justify-content: flex-end;
  }

  .footer-links li a {
    display: flex;
  }

  .footer-links li a > span {
    padding: 0.75rem;
  }

  .footer-links a {
    color: #E0D7E5;
    font-size: 1.25rem;
    font-weight: normal;
    border: 0;
  }

  .footer-links a:focus {
    border-radius: 0.125rem;
    box-shadow: 0 0 0 0.125rem #E0D7E5;
  }

  .footer-links a:hover,
  .footer-links a:hover span {
    color: #fff;
    text-decoration: none;
  }

  .footer-links a:active span {
    color: #C5C0CA;
  }

  #copyright {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #copyright a {
    display: inline-flex;
    margin-left: 0.75rem;
    opacity: 0.6;
  }

  #copyright a span {
    display: inline-flex;
    padding: 0.5rem;
    margin: 0 -0.5rem;
  }

  #copyright a span img {
    opacity: 0.6;
  }

  #copyright a:focus span {
    border-radius: 50%;
    box-shadow: 0 0 0 0.125rem #E0D7E5;
  }

  #copyright a:focus span img {
    opacity: 0.8;
  }

  #copyright a:hover img {
    opacity: 0.8;
  }

  #copyright a:active img {
    opacity: 0.4;
  }

  @media (max-width: 660px) {
    .footer-links a {
      font-size: 1rem;
    }
  }

  @media (max-width: 300px) {
    .footer-links {
      flex-direction: column;
    }

    .footer-links li {
      justify-content: center;
    }

    #copyright {
      display: block;
      text-align: center;
    }

    #copyright a {
      vertical-align: middle;
    }
  }

/*===========================================================================*/
/* Buy now button */
/*===========================================================================*/

  #buy-now {
    width: 100%;
    margin-top: 1rem;
  }

  #buy-now > span {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.75rem;
  }

/*===========================================================================*/
/* Modal */
/*===========================================================================*/

  .modal-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    z-index: 11;
  }

  .modal-is-visible {
    display: flex;
  }

  .modal-window {
    position: relative;
    max-width: 32rem;
    margin: auto;
    background: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.5);
    border-radius: 0.3rem;
    overflow-wrap: break-word;
    z-index: 1;
  }

  .modal-window.left {
    text-align: left;
  }

  .modal-window.left h2 {
    margin-left: 0rem;
    margin-right: 1.5rem;
  }

  .modal-window .close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    height: 3rem;
    width: 3rem;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    cursor: pointer;
    outline: none;
  }

  .modal-window .close > span {
    outline: none;
    color: #836B94;
    border-radius: 0.25rem;
    padding: 0.625rem;
    font-size: 1.25rem;
    font-weight: bold;
    border: 2px solid transparent;
    background: none;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .modal-window .close:focus > span {
    color: #88344e;
    border-color: inherit;
  }

  .modal-window .close:hover > span {
    color: #88344e;
  }

  .modal-window .close:active > span {
    color: #661C33;
  }

  .modal-window h2 {
    margin: 0 1.5rem 0.5rem;
  }

  .modal-window ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .modal-window a {
    display: flex;
    border: 2px solid transparent;
    border-radius: 0.25rem;
  }

  .modal-window a > span {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
  }

  .modal-window a > span > span {
    box-shadow: none;
    white-space: nowrap;
  }

  .modal-window a:focus {
    border-color: #8C5FAE;
  }

  .modal-window a:hover > span > span {
    box-shadow: 0 0.125rem 0 0;
  }

  .modal strong {
    color: #836B94;
  }

  .modal .modal-img-container {
    box-shadow: inset 0 0 0.25rem rgba(0, 0, 0, 0.25),
                inset 0 0 1rem    rgba(0, 0, 0, 0.25);
  }

  .modal img {
    position: relative;
    display: block;
    width: 100%;
    z-index: -2;
  }

  .modal .button-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem -0.75rem;
  }

  .modal .button-container .button {
    flex-grow: 1;
    margin: 0 0.5rem 0.75rem;
  }

  @media (max-width: 300px) {
    .modal-window {
      position: absolute;
      overflow: auto;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: 0;
      background: #fff;
      padding: 2rem;
      text-align: center;
      box-shadow: none;
      border-radius: 0;
    }
  }
