/* THE STAND-IN — site styles. Upmarket psychological suspense:
   warm paper, ink, a single cold accent. Restraint over melodrama. */

:root {
  --ink: #1f1c18;
  --ink-dim: #5b554c;
  --ink-faint: #8c857a;
  --bg: #f4f0e8;
  --bg-raise: #fbf9f4;
  --paper: #fffdf8;
  --accent: #6e2b2b;      /* a dark stage-curtain red, used sparingly */
  --cold: #44505a;        /* the cold the book ends in */
  --rule: #ddd6c8;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.74;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- shared shell ---- */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 28px; }

/* ---- hero ---- */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse at 50% 18%, rgba(110,43,43,0.06), transparent 62%),
    var(--bg);
}

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.36em;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 2rem;
}

.hero h1 {
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
}

.hero .epigraph {
  margin-top: 2.4rem;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1.15rem;
  max-width: 30ch;
}

.hero .by {
  margin-top: 2.6rem;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cta {
  margin-top: 3rem;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--paper);
  transition: border-color .2s, color .2s, background .2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { border-color: var(--accent); color: var(--paper); background: var(--accent); }
.btn.primary:hover { color: var(--paper); background: #5a2222; }

/* ---- sections ---- */
section { padding: 5.5rem 0; border-bottom: 1px solid var(--rule); }

h2.section-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.8rem;
}

section p { margin-bottom: 1.3rem; color: var(--ink); }
section p.lead { font-size: 1.22rem; color: var(--ink-dim); }

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.4rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-dim);
}

/* ---- parts list ---- */
.parts { list-style: none; }
.parts li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
}
.parts li:last-child { border-bottom: none; }
.parts .pt { font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.parts .pd { color: var(--ink-dim); font-size: 0.96rem; }

/* ---- excerpt ---- */
.excerpt {
  background: var(--bg-raise);
  border: 1px solid var(--rule);
  padding: 2.4rem;
  font-size: 1.05rem;
}
.excerpt p { color: var(--ink-dim); }

/* ---- footer ---- */
footer {
  padding: 3rem 0 4rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}
footer p { margin-bottom: 0.6rem; }

/* ---- manuscript reading view ---- */
.reader {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 28px 6rem;
  background: var(--paper);
}
.reader .topbar {
  position: sticky; top: 0; background: rgba(255,253,248,0.94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule);
  padding: 14px 0; margin: -4rem -28px 3rem; text-align: center;
}
.reader .topbar a { font-family: var(--sans); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; }
.reader h1 {
  font-weight: 400; font-size: 2rem; line-height: 1.2;
  margin: 4.5rem 0 0.4rem; padding-top: 3rem; border-top: 1px solid var(--rule);
}
.reader h1:first-of-type { border-top: none; padding-top: 0; margin-top: 1rem; }
.reader h3 { font-weight: 400; font-style: italic; color: var(--accent);
  font-size: 1.1rem; margin: 1.5rem 0; }
.reader h2 { font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint);
  margin: 2rem 0 1rem; }
.reader p { margin-bottom: 1.25rem; }
.reader em { font-style: italic; }
.reader hr { border: none; text-align: center; margin: 2.4rem 0; }
.reader hr::after { content: "\2756"; color: var(--ink-faint); font-size: 0.9rem; }
.reader blockquote { font-size: 1.05rem; }

@media (max-width: 560px) {
  body { font-size: 18px; }
  section { padding: 4rem 0; }
}
