/*
Theme Name: W. J. Cass
Author: W. J. Cass
Description: Responsive book and author website with native Customizer content controls.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wjcass
*/

:root {
  --navy: #172331;
  --cream: #e5d7ad;
  --red: #871b19;
  --footer-red: #600e0e;
  --font-body: "Gentium Book Plus", Georgia, "Times New Roman", serif;
  --font-heading: "Alfa Slab One", Georgia, serif;
  --page-width: 1280px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--cream);
  background: var(--footer-red);
  font-family: var(--font-body);
}
a {
  color: inherit;
}
a:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 5px;
}
.skip-link {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 12px;
  background: var(--navy);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

.hero {
  background-color: var(--navy);
  
  background-image:
    linear-gradient(rgb(16 27 41 / 82%), rgb(16 27 41 / 82%)),
    var(--wjc-background, url("assets/book-cover.png"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.site-header {
  max-width: var(--page-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  min-height: 56px;
  letter-spacing: 1px;
}
.site-header a, .site-footer a {
  text-decoration: none;
}
.site-header a:hover, .site-footer a:hover {
  text-decoration: underline;
}
.site-name {
  white-space: nowrap;
  font-size: 18px;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}
.book {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-width: var(--page-width);
  margin-inline: auto;
  padding: 3px 24px 20px;
}
h1, h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400; 
  text-align: center;
}
h1 {
  font-size: 28px;
  line-height: 1.18;
}
.heading-break {
  display: none;
}
.book-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(100%, 275px);
  margin-top: 38px;
}
.book-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 96%;
  aspect-ratio: 1;
  top: -14px;
  border-radius: 50%;
  background: var(--red);
}
.book-cover {
  display: block;
  width: 72%;
  height: auto;
}
.synopsis {
  text-align: center;
  font-size: 16px;
  line-height: 1.56;
  letter-spacing: .4px;
}
.synopsis-start {
  max-width: 285px;
  margin-top: 19px;
}
.synopsis p {
  margin: 0 0 8px;
}
.book-caption {
  font-size: 14px;
  color: #b4aa90;
}
.desktop-copy, .synopsis-end {
  display: none;
}
.order-button {
  display: block;
  width: min(100%, 235px);
  padding: 10px 16px;
  margin-top: 21px;
  color: #121d2d;
  background: var(--cream);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1.6px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
a.order-button:hover {
  background: #f1e6c7;
}
.teaser {
  background: var(--red);
  padding: 23px 24px;
  text-align: center;
}
.teaser h2 {
  max-width: 240px;
  margin-inline: auto;
  font-size: 20px;
  line-height: 1.1;
}
.teaser-next {
  display: block;
}
.teaser p {
  margin: 17px auto 0;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: .5px;
}

.page-ending {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
}
.video-section {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vh, 72px) 24px;
  background: var(--navy);
  text-align: center;
}
.video-content {
  width: 100%;
  max-width: 560px;
}
.video-label {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 2px;
}
.video-section h2 {
  margin-bottom: 28px;
  font-size: clamp(23px, 4vw, 32px);
  line-height: 1.3;
}
.video-embed {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  outline: 1px solid rgb(229 215 173 / 20%);
  box-shadow: 0 16px 40px rgb(0 0 0 / 25%);
}
.video-link {
  display: inline-block;
  margin-top: 16px;
  padding: 8px;
  font-size: 15px;
  text-underline-offset: 4px;
}
.video-link:hover {
  color: white;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 76px;
  padding: 22px 18px;
  background: var(--footer-red);
  letter-spacing: 1px;
  font-size: 18px;
}
.footer-extra {
  display: none;
}


@media (min-width: 600px) {
  .site-header {
    justify-content: space-between;
    min-height: 88px;
    padding: 14px 28px;
  }
  .site-name {
    font-size: 32px;
  }
  .site-header nav {
    gap: 16px;
  }
  .book {
    padding: 24px 32px 31px;
  }
  h1 {
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: 3px;
  }
  .heading-break {
    display: block;
  }
  .book-art {
    width: min(100%, 423px);
    margin-top: 82px;
  }
  .book-art::before {
    top: -22px;
  }
  .book-cover {
    width: 71%;
  }
  .synopsis-start {
    display: none;
  }
  .order-button {
    width: 323px;
    margin-top: 22px;
    padding: 13px 16px;
    font-size: 23px;
  }
  .teaser {
    min-height: 193px;
    padding: 23px 40px 35px;
  }
  .teaser h2 {
    max-width: 650px;
    font-size: 29px;
    line-height: 1.15;
  }
  .teaser-next {
    display: inline;
  }
  .teaser p {
    margin-top: 24px;
  }
  .mobile-break {
    display: none;
  }
  .site-footer {
    min-height: 83px;
    justify-content: space-between;
    padding-inline: 36px;
    font-size: 14px;
  }
  .footer-extra {
    display: block;
    font-size: 13px;
  }
}

@media (min-width: 740px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .site-name {
    position: relative;
    grid-column: 2;
    grid-row: 1;
  }
  .site-name::before,
  .site-name::after {
    content: "";
    position: absolute;
    top: 50%;
    width: clamp(0px, calc((100vw - 740px) / 2), 250px);
    height: 1px;
    background: var(--cream);
  }
  .site-name::before {
    right: calc(100% + 10px);
  }
  .site-name::after {
    left: calc(100% + 10px);
  }
  .site-header nav {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    gap: 30px;
  }
}


@media (min-width: 1100px) {
  .site-header {
    min-height: 76px;
    padding-block: 10px;
  }
  .site-header nav {
    gap: 28px;
  }
  .site-name::before {
    right: calc(100% + 68px);
  }
  .site-name::after {
    left: calc(100% + 68px);
  }
  .book {
    grid-template-columns: minmax(0, 1fr) 423px minmax(0, 1fr);
    column-gap: clamp(32px, 5vw, 65px);
    padding: 29px clamp(32px, 5.5vw, 70px) 35px;
    align-items: start;
  }
  h1 {
    grid-column: 1 / -1;
    font-size: 42px;
    line-height: 1.16;
  }
  .book-art {
    grid-column: 2;
    grid-row: 2;
    margin-top: 62px;
  }
  .synopsis {
    text-align: left;
  }
  .synopsis-start {
    display: block;
    grid-column: 1;
    grid-row: 2 / 4;
    margin-top: 82px;
  }
  .synopsis-start p:not(.book-caption) + p {
    margin-top: 36px;
  }
  .synopsis-end {
    display: block;
    grid-column: 3;
    grid-row: 2 / 4;
    margin-top: 76px;
  }
  .desktop-copy {
    display: inline;
  }
  .book-caption {
    display: none;
  }
  .order-button {
    grid-column: 2;
    grid-row: 3;
    width: 273px;
    margin-top: 18px;
    padding: 13px 16px;
    font-size: 18px;
  }
  .teaser {
    min-height: 217px;
    padding: 27px 70px 35px;
  }
  .teaser h2 {
    max-width: 1100px;
    font-size: 40px;
    line-height: 1.2;
  }
  .dark-word {
    display: block;
    color: #08090c;
    text-transform: uppercase;
  }
  .teaser p {
    font-size: 20px;
    margin-top: 30px;
    letter-spacing: 0;
  }
  .site-footer {
    padding-inline: max(6.1%, calc((100% - 1124px) / 2));
    font-size: 18px;
  }
  .footer-extra {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* WordPress navigation and content integration. */
.primary-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: inherit;
  padding: 0;
  margin: 0;
  list-style: none;
}
.primary-menu li { margin: 0; }
.site-header nav { min-width: 0; }
.site-name { text-transform: uppercase; }
.book-caption, .footer-extra { text-transform: uppercase; }
.book > h1 { max-width: 800px; }
.synopsis-desktop { display: none; }
.page-ending.no-video { min-height: 0; grid-template-rows: auto; }
.author-bio p { margin: 0 0 1em; }
.author-bio p:last-child { margin-bottom: 0; }
.author-quote blockquote p { white-space: pre-line; }
.site-content-shell { background: var(--navy); min-height: 80vh; }
.standard-content { max-width: 900px; margin: auto; padding: 48px 24px; line-height: 1.6; }
.standard-content h1, .standard-content h2 { text-align: left; margin-bottom: 24px; }
.standard-content article { margin-bottom: 40px; }
.standard-content img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1100px) {
  .synopsis-mobile { display: none; }
  .synopsis-desktop { display: block; }
}
