/* Site styles layered on the Grayscale theme (css/styles.css).
 *
 * Palette is drawn from the covers: warm near-black surfaces (the covers' shadows) and a blush accent
 * (the covers' skin tones). The accent means one thing: "you can click this".
 * Type: Montserrat for display, matching the cover lettering; Nunito Sans for reading.
 */

:root {
  --ink: #0b0909;          /* page surface */
  --ink-2: #141011;        /* alternate section surface */
  --card: #1d1718;         /* cards */
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.72);  /* secondary text: 10.3:1 on --ink, 9.6:1 on --card */
  --text-3: rgba(255, 255, 255, 0.62);  /* tertiary text: 7.8:1 on --ink, 7.4:1 on --card */
  --line: rgba(255, 255, 255, 0.14);
  --accent: #eaa99b;       /* interactive only: 10.1:1 on --ink */
  --accent-hover: #f5c9bd;
  --on-accent: #1b0f0c;    /* text on accent: 9.5:1 */
  --focus: #fff;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  letter-spacing: normal;
  background: var(--ink);
}

.bg-black { background-color: var(--ink) !important; }
.bg-dark-soft { background-color: var(--ink-2); }
.text-white-50 { color: var(--text-2) !important; }

.section-pad { padding: 5rem 0; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Labels above headings: neutral, not the accent, since they aren't clickable. */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

/* ---------------------------------------------------------------- focus and skip link */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.navbar-toggler:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 3px;
  box-shadow: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: 0.375rem;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: 0.375rem;
  box-shadow: none !important;
}

.btn-primary,
.btn-primary:focus {
  color: var(--on-accent);
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:active,
.btn-check:active + .btn-primary {
  color: var(--on-accent);
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline-light {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover,
.btn-outline-light:active {
  color: var(--ink);
  background-color: #fff;
  border-color: #fff;
}

.btn-lg { font-size: 1.05rem; padding: 1rem 1.9rem; }

.btn-sm,
.btn-sm.btn-outline-light,
.btn-sm.btn-primary {
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------------------------------------------------------------- navbar: dark at every width and scroll position */

#mainNav,
#mainNav.navbar-shrink {
  background-color: rgba(11, 9, 9, 0.94);
  border-bottom: 1px solid var(--line);
}

#mainNav .navbar-brand,
#mainNav.navbar-shrink .navbar-brand {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
}

#mainNav .navbar-toggler {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.55);
  min-height: 44px;
}

#mainNav .nav-link,
#mainNav.navbar-shrink .nav-link {
  color: var(--text-2);
  font-family: var(--font-display);
  font-weight: 500;
}

#mainNav .nav-link:hover,
#mainNav.navbar-shrink .nav-link:hover,
#mainNav .nav-link.active,
#mainNav.navbar-shrink .nav-link.active {
  color: var(--text);
}

@media (min-width: 992px) {
  /* Transparent over the hero at the top, solid once scrolled. Text stays white either way. */
  #mainNav {
    background-color: transparent;
    border-bottom-color: transparent;
  }
  #mainNav.navbar-shrink {
    background-color: rgba(11, 9, 9, 0.94);
    border-bottom-color: var(--line);
  }
  #mainNav .nav-link,
  #mainNav.navbar-shrink .nav-link {
    padding: 1.6rem 1.25rem 1.35rem;
    border-bottom: 0.2rem solid transparent;
  }
  /* Current section: underline plus white text, so it's not color alone. */
  #mainNav .nav-link.active,
  #mainNav.navbar-shrink .nav-link.active {
    border-bottom-color: var(--accent);
  }
}

/* ---------------------------------------------------------------- landing hero: the covers are the signature */

.hero {
  padding: 8rem 0 5rem;
  background:
    radial-gradient(ellipse 60% 70% at 75% 45%, rgba(234, 169, 155, 0.12), transparent 70%),
    var(--ink);
  overflow: hidden;
}

@media (min-width: 992px) {
  .hero { padding: 9rem 0 6rem; min-height: 100vh; display: flex; align-items: center; }
  .hero > .container { width: 100%; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0.5rem 0 1.25rem;
}

.hero-tagline {
  max-width: 30rem;
  color: var(--text-2);
  font-size: 1.2rem;
  line-height: 1.55;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Fan of covers, oldest at the back, newest in front. --i is the index, --n the count. */
.cover-fan {
  position: relative;
  aspect-ratio: 5 / 4;
  max-width: 34rem;
  margin: 3.5rem auto 0;
}

@media (min-width: 992px) {
  .cover-fan { margin-top: 0; }
}

.cover-fan-item {
  --step: calc(var(--i) - (var(--n) - 1) / 2);
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 42%;
  transform-origin: 50% 120%;
  transform: translateX(-50%) translateX(calc(var(--step) * 18%)) rotate(calc(var(--step) * 6deg));
  z-index: calc(var(--i) + 1);
  border-radius: 0.25rem;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cover-fan-item img { display: block; width: 100%; height: auto; }

@media (max-width: 575.98px) {
  .cover-fan { aspect-ratio: 4 / 3; }
  .cover-fan-item {
    width: 40%;
    transform: translateX(-50%) translateX(calc(var(--step) * 12%)) rotate(calc(var(--step) * 5deg));
  }
}

/* ---------------------------------------------------------------- cover images */

.shadow-cover {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 0.25rem;
}

/* ---------------------------------------------------------------- series grid */

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 0.375rem;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .book-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.5);
  }
}

.book-card-cover img { display: block; width: 100%; height: auto; }

.book-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.25rem 1.5rem;
}

.book-card-title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.book-card-title a { color: var(--text); text-decoration: none; }
.book-card-title a:hover { color: var(--accent); }

.book-card-hook { color: var(--text-2); font-size: 0.95rem; flex: 1; }

.book-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- themes: plain labels, not button-like pills */

.theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theme-chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  border-radius: 0.25rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- FAQ */

.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------- book pages */

.book-hero { padding: 8rem 0 4rem; }

@media (min-width: 992px) {
  .book-hero { padding-top: 9rem; }
}

.book-title { font-size: 2.25rem; line-height: 1.15; font-weight: 400; }

@media (min-width: 992px) {
  .book-title { font-size: 3rem; }
}

.book-hero .lead { color: rgba(255, 255, 255, 0.85); }

.breadcrumb-item a { color: var(--text-2); }

.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-3);  /* 7.8:1 */
}

.book-blurb p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  line-height: 1.75;
}

.reading-order li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.reading-order li a { color: var(--text-2); text-decoration: none; }
.reading-order li a:hover { color: var(--accent); text-decoration: underline; }

.reading-order li.current { color: var(--text); font-weight: 700; }

/* Not a control, so neutral rather than the accent. */
.badge-here {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer { padding: 4rem 0; }

.site-footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100%;
  color: var(--text-2);
}

.site-footer .social a:hover { color: var(--text); }

@media (max-width: 767.98px) {
  .book-hero picture img {
    display: block;
    max-width: 260px;
    margin: 0 auto;
  }
}

/* ---------------------------------------------------------------- proof: rating, price, reviews */

.stars { color: var(--accent); letter-spacing: 0.1em; }

.proof-line {
  color: var(--text-2);
  font-size: 0.95rem;
  margin: -1rem 0 2rem;
}
.proof-line strong { color: var(--text); font-weight: 600; }
.proof-item { white-space: nowrap; }
.proof-item + .proof-item::before { content: "·"; margin: 0 0.5rem; color: var(--text-3); }

.price-note,
.book-blurb .price-note {
  color: var(--text-3);
  font-size: 0.875rem;
  margin: 0.75rem 0 0;
}

.review {
  height: 100%;
  margin: 0;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.book-blurb .review { height: auto; margin-top: 2rem; }
.review-quote { margin: 0.75rem 0 1rem; }
.review-quote p { color: var(--text); font-size: 1.05rem; line-height: 1.55; margin: 0; }
.review-by { color: var(--text-3); font-size: 0.875rem; }
.review-by a { color: var(--text-2); }
@media (max-width: 575.98px) {
  .proof-item { display: block; }
  .proof-item + .proof-item::before { content: none; }
}
