/* ShurIQ Books — Review Site */
/* Book-reader typography. Generous, calm, serif body. White/light bg. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #FAF8F5;
  --bg-elev: #FFFFFF;
  --ink: #1A1816;
  --ink-soft: #4A453F;
  --rule: #E5DFD5;
  --accent: #8B3A1F;       /* warm oxblood for inline emphasis only */
  --accent-cool: #2C4A6B;  /* cool, used sparingly */
  --max-col: 36rem;        /* ~576px reading column */
  --max-page: 64rem;
  --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 18px; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ----- Chrome (header / nav / footer) ----- */

.site-head {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(250, 248, 245, 0.92);
}

.site-head__inner {
  max-width: var(--max-page);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--sans);
}

.site-head__brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.site-head__brand .brand {
  font-family: var(--sans);
}

.site-head__nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.site-head__nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 120ms ease;
}

.site-head__nav a:hover,
.site-head__nav a.active {
  color: var(--ink);
}

/* ----- Layout ----- */

main {
  padding: 3rem 1.25rem 6rem;
}

.page {
  max-width: var(--max-col);
  margin: 0 auto;
}

.page--wide {
  max-width: var(--max-page);
}

/* ----- Long-form typography ----- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

h1.title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}

h1.title .brand {
  font-family: var(--sans);
  font-weight: 600;
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  color: var(--ink);
}

h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2rem 0 0.75rem;
}

p {
  margin: 0 0 1.25rem;
}

p + p {
  text-indent: 1.5em;
  margin-top: -0.75rem;
}

p.no-indent + p,
.lede + p,
h1 + p,
h2 + p,
h3 + p,
blockquote + p,
ul + p,
ol + p,
.equation + p {
  text-indent: 0;
}

p.no-indent {
  text-indent: 0;
}

strong, b {
  font-weight: 600;
  color: var(--ink);
}

em, i {
  font-style: italic;
}

blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--ink);
  font-style: italic;
  color: var(--ink-soft);
}

blockquote p { text-indent: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem auto;
  max-width: 6rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 120ms ease;
}

a:hover {
  text-decoration-color: var(--ink);
}

ul, ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ----- Equations & code ----- */

.equation {
  font-family: var(--mono);
  font-size: 0.95rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.85rem 1.1rem;
  margin: 1.75rem 0;
  overflow-x: auto;
  color: var(--ink);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  padding: 0.05em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

pre {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* ----- Chapter nav (prev / next) ----- */

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.chapter-nav a {
  flex: 1;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 120ms ease, color 120ms ease;
  background: var(--bg-elev);
}

.chapter-nav a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chapter-nav a.next { text-align: right; align-items: flex-end; }
.chapter-nav .label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chapter-nav .title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}

/* ----- Landing-page specifics ----- */

.book-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}

@media (min-width: 720px) {
  .book-grid { grid-template-columns: 1fr 1fr; }
}

.book-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.book-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 0;
}

.book-card__sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

.book-card__chapters {
  font-family: var(--sans);
  font-size: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  border-top: 1px solid var(--rule);
}

.book-card__chapters li {
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

.book-card__chapters a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 120ms ease, padding 120ms ease;
}

.book-card__chapters a:hover {
  color: var(--ink);
  padding-left: 0.4rem;
}

.book-card__chapters .ch-no {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-right: 0.75rem;
}

/* ----- Footer ----- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

.site-foot .brand { font-family: var(--sans); }

/* ----- Print ----- */

@media print {
  .site-head, .site-foot, .chapter-nav { display: none; }
  body { background: white; color: black; }
  h1, h2, h3 { page-break-after: avoid; }
  p { orphans: 3; widows: 3; }
}
