/* [1.vars.css] */

:root {
  --body-color: #B2DFDB;
  --inner-body-color: white;
  --link-color: #007185;
  --border-color: #999;

  --grey1: #333;
  --grey2: #666;
  --grey3: #999;
}

@media (prefers-color-scheme: dark) {
  :root {
    --body-color: #003B3B;
    --link-color: #80D8FF;
    --border-color: #555;
    --inner-body-color: black;

    --grey1: #f0f0f0;
    --grey2: #c0c0c0;
    --grey3: #999999;
  }
}


/* [2.layout.css] */

body {
  background: var(--body-color);
  min-width: 280px;
  padding: 10px;
  @media (max-width: 500px) {
    padding: 3px;
  }
}

header {
  padding: 30px 10px;
  a.logo {
    max-width: 40%;
    min-width: 100px;
    margin: 0 auto;
    display: block;
    width: 150px;
    @media (prefers-color-scheme: dark) {
      filter: invert(1);
    }
  }
}

footer {
  text-align: center;
  padding-bottom: 20px;
}

main {
  max-width: 2000px;
  margin: 0px auto;
  margin-bottom: 100px;
  background: var(--inner-body-color);
  border-radius: 3px;
  box-shadow: 0 3px 6px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  @media (max-width: 500px) {
    padding: 14px;
  }
}


/* [3.typography.css] */

body {
  font-family: "Assistant", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1rem;
  font-style: normal;
  color: var(--grey1);
}

a {
  text-decoration: none;
  color: inherit;
  &:hover {
    color: var(--link-color);
  }
}

h1 {
  font-size: 2.1em;
  @media (min-width: 480.1px) and (max-width: 1024px) {
    font-size: 2em;
  }
  @media (max-width: 480px) {
    font-size: 2em;
  }
  font-weight: 300;
  font-style: normal;
  margin-top: 0px;
  margin-bottom: 30px;
}

h2 {
  font-weight: 400;
  font-size: 1.5em;
  font-style: normal;
  margin-top: 0px;
  color: var(--grey1);
}

h3 {
  font-size: 1.1em;
  font-weight: 300;
  color: var(--grey2);
}


/* [4.images.css] */

img {
  width: 100%;
}

.book-image {
  border: 1px solid var(--border-color);
}


/* [5.modifiers.css] */

.quiet {
  color: var(--grey3);
}

.italic {
  font-style: italic;
}

.large {
  font-size: 1.25em;
}

.larger {
  font-size: 1.5em;
}

h1, h2, h3, p {
  &.tight { margin-bottom: 0.2em };
  @media (max-width: 1024px) {
    &.tight { margin-bottom: 0.5em };
  }
}

/* [6.buttons.css] */

a.button {
  background: #F9D92C;
  border-radius: 80px;
  box-shadow: 0px 10px 14px -7px #3e7327;
  border: 2px double #FFEA4D;
  white-space: nowrap;
  font-weight: 500;

  font-size: 1.5em;
  padding: 12px 60px;
  color: black;

  @media (min-width: 480.1px) and (max-width: 1024px) {
    font-size: 1.25em;
    padding: 12px 40px;
  }
  @media (max-width: 480px) {
    font-size: 1em;
    padding: 12px 30px;
  }

  &:hover, &:active {
    color: inherit;
    background: linear-gradient(to bottom, #FFEB4D, #F9D92C);
  }

  &:active {
    position: relative;
    top: 2px;
  }
}


/* [book-grid.css] */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px 20px;
}


/* [book-page.css] */

#book-page {
  .header {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    grid-template-columns: 4fr 2fr;
    grid-template-rows: 1fr;

    .buy {
      align-content: center;
      text-align: center;
      padding: 10px;
    }

    @media (max-width: 1024px) {
      grid-template-columns: 1fr;
      grid-template-rows: 2fr;
      .title {
        text-align: center;
      }
      .buy {
        padding: 30px 10px;
      }
    }
  }

  .body {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);

    .front-cover {
      grid-column: 1 / span 2;
      grid-row: 1 / span 2;
    }
    @media (min-width: 480.1px) and (max-width: 1024px) {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(4, 1fr);
    }
    @media (max-width: 480px) {
      grid-template-columns: 1fr;
      grid-template-rows: repeat(9, 1fr);
      .front-cover {
        grid-column: 1 / span 1;
        grid-row: 1 / span 1;
      }
    }
  }

  .footer {
    padding: 20px;
    text-align: center;
  }
}


/* [v.image-zoom.css] */

/* =============================================================================
Image Zoom JS v0.0.1 | MIT License | https://github.com/alecrios/image-zoom-js
============================================================================= */

[data-zoom-backdrop] {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 900;
	background-color: rgba(255, 255, 255, 0.8);
	opacity: 0;
	transition: opacity 300ms ease;
	pointer-events: none;
}

[data-zoom-backdrop='active'] {
	opacity: 1;
	pointer-events: auto;
}

[data-zoom-image] {
	position: relative;
	z-index: 800;
	transform: none;
	transition: transform 300ms ease;
	cursor: zoom-in;
}

[data-zoom-image='active'] {
	z-index: 1000;
	cursor: zoom-out;
}
