/* The Cold Halloo — shared stylesheet (landing + reader). Dark-on-light, serif, mobile-first. */

:root {
  --ink: #1b1b19;
  --ink-soft: #444039;
  --muted: #7a746b;
  --paper: #f6f3ec;
  --paper-2: #efe9dd;
  --rule: #d8d1c2;
  --accent: #5a3b2e;       /* dried-blood / old-leather brown */
  --accent-ink: #ffffff;
  --link: #6a3b2a;
  --maxw: 40rem;
}

* { box-sizing: border-box; }

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

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

.muted { color: var(--muted); font-size: 0.92rem; }

/* ---------- shared header ---------- */

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.book-title {
  font-size: 2.6rem;
  line-height: 1.05;
  margin: 0 0 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logline {
  font-size: 1.12rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.4rem;
}

/* ---------- landing page ---------- */

.landing .hero {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.read-button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1.3rem;
  border-radius: 2px;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.read-button:hover { background: #44291f; text-decoration: none; }
.read-button.small { padding: 0.5rem 1rem; font-size: 0.95rem; }

.cta { margin: 0.4rem 0 1rem; }
.cta-inline { margin: 0 0 1.4rem; }

.freebadge {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.blurb p { margin: 0 0 1.1rem; }

.comps, .contents {
  border-top: 1px solid var(--rule);
  margin-top: 2.2rem;
  padding-top: 1.6rem;
}

h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 1rem;
}

.comps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comps-list li { margin: 0 0 0.5rem; }
.comp-author { font-weight: 600; }
.comp-title { color: var(--ink-soft); }

/* table of contents on landing */
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.toc-list li { border-bottom: 1px solid var(--rule); }
.toc-list a {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.6rem 0.2rem;
  color: var(--ink);
}
.toc-list a:hover { background: var(--paper-2); text-decoration: none; }
.toc-num {
  flex: 0 0 1.6rem;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.toc-title { flex: 1; }

/* ---------- reader (manuscript.html) ---------- */

.reader-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.8rem;
  margin-bottom: 1.6rem;
}

.toc {
  position: sticky;
  top: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  margin: 0 0 3rem;
  max-height: 60vh;
  overflow: auto;
  z-index: 5;
}
.toc h2 { margin-top: 0; }
.toc ol {
  margin: 0;
  padding-left: 1.4rem;
}
.toc li { margin: 0.25rem 0; font-size: 0.95rem; }

.chapter {
  margin: 0 0 3.5rem;
}

.chapter h1 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 2.5rem 0 1.6rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--rule);
  letter-spacing: 0.01em;
  scroll-margin-top: 1rem;
}
.chapter:first-of-type h1 { border-top: none; padding-top: 0; }

.chapter h2 { /* dossier subheads rarely; keep tidy */
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.chapter p {
  margin: 0 0 1.15rem;
  text-align: left;
  hyphens: auto;
}

/* scene break --- inside a chapter */
.chapter hr {
  border: none;
  text-align: center;
  margin: 2rem 0;
}
.chapter hr::before {
  content: "\2766"; /* floral heart bullet */
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.4em;
}

blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}
blockquote p { margin: 0; }

.toplink {
  margin: 2rem 0 0;
  font-size: 0.85rem;
}
.toplink a { color: var(--muted); }

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

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 0.3rem; }

/* ---------- responsive ---------- */

@media (max-width: 30rem) {
  html { font-size: 17px; }
  .book-title { font-size: 2.1rem; }
  main { padding: 1.8rem 1rem 3rem; }
}

@media (min-width: 48rem) {
  html { font-size: 19px; }
}
