:root {
  --paper: #f6f0e4;
  --paper-deep: #ece2cf;
  --ink: #1f1a17;
  --ink-soft: #5a4f47;
  --accent: #8c2f1b;
  --accent-ink: #fff8ee;
  --cover: #1f3d36;
  --cover-ink: #f0dfb4;
  --rule: #d5c7ad;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: 4.5rem; /* room for the sticky order bar on phones */
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 9vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }

section, .top, footer {
  padding: 3rem 1.25rem;
  max-width: 68rem;
  margin: 0 auto;
}

/* Top bar */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-style: italic;
  font-size: 1.25rem;
  text-decoration: none;
}
.top-cta {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
}

/* Hero */
.hero { padding-top: 1.5rem; display: grid; gap: 2.5rem; }
.deadline {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); margin: 1.1rem 0 1.6rem; max-width: 34rem; }
.specs {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.specs li:not(:last-child)::after { content: "·"; margin: 0 0.55rem; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  padding: 0.95rem 1.5rem;
  border-radius: 3px;
}
.button:hover, .button:focus-visible { background: #6f2313; }
button.button { border: 0; cursor: pointer; }
.free-note { font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.7rem; }
.free {
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 0.1rem 0.5rem; vertical-align: middle;
}
.more { margin-top: 1.5rem; }
.page-long { max-width: 34rem; }
.page .break { text-align: center; text-indent: 0; margin: 1rem 0; }

/* The book */
.book { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 0.5rem 0 1.5rem; }
.book figcaption { font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-soft); margin-top: 2.25rem; text-align: center; }
/* a real cover picture in place of the drawn one: the picture fills the board, the hinge and sheen lie over it */
.cover.cover-photo { padding: 0; aspect-ratio: 615 / 928; background: #1a1512; }
.cover.cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.cover.cover-photo::before {
  inset: 0;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0, rgba(0, 0, 0, 0.1) 3.2%, rgba(255, 255, 255, 0.12) 4.6%, rgba(255, 255, 255, 0) 8%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.1) 100%);
}
.cover {
  position: relative;
  width: min(68vw, 16rem);
  aspect-ratio: 2 / 3;
  /* the hinge by the spine, a soft sheen across the board, then the cloth colour */
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0, rgba(0, 0, 0, 0.12) 3.2%, rgba(255, 255, 255, 0.1) 4.6%, rgba(255, 255, 255, 0) 8%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.12) 100%),
    var(--cover);
  color: var(--cover-ink);
  padding: 9% 9% 9% 12%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  border-radius: 2px 5px 5px 2px;
  /* page block showing along the fore-edge, then a soft shadow on the table */
  box-shadow: 1px 0 0 #e6dcc6, 2px 0 0 #cfc3a9, 3px 0 0 #e0d5bd, 4px 0 0 #b9ad93,
    4px 6px 8px rgba(60, 40, 20, 0.18), 24px 30px 36px rgba(60, 40, 20, 0.26);
  transform: rotate(-2.5deg);
}
/* a thin printed frame inside the edge of the board */
.cover::before {
  content: "";
  position: absolute;
  inset: 4.5% 4.5% 4.5% 8%;
  border: 1px solid rgba(240, 223, 180, 0.55);
  pointer-events: none;
}
.cover-genre {
  font-family: var(--sans);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.cover-title { font-size: 1.7rem; line-height: 1.1; font-style: italic; }
.cover-art { width: 100%; height: auto; display: block; }
.cover-star { font-size: 0.75rem; letter-spacing: 0.06em; font-style: italic; }
.cover-star span {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-style: normal;
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Sample */
.section-intro { color: var(--ink-soft); max-width: 36rem; margin: -0.5rem 0 1.75rem; }
.sample { display: grid; gap: 1.75rem; }
.told ul { padding-left: 1.1rem; margin: 0.6rem 0 0; color: var(--ink-soft); }
.told li { margin-bottom: 0.5rem; }
.page {
  background: #fdfaf3;
  padding: 1.75rem 1.5rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 12px 28px rgba(60, 40, 20, 0.14);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 27rem;
}
.page p { text-align: justify; hyphens: auto; text-indent: 1.3em; }
.page .page-head {
  text-align: center;
  text-indent: 0;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}
.page .page-head + p { text-indent: 0; }
.page .page-num { text-align: center; text-indent: 0; font-size: 0.8125rem; color: var(--ink-soft); margin-top: 1.25rem; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; padding-left: 3.25rem; position: relative; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.35rem;
  font-size: 2.5rem;
  font-style: italic;
  line-height: 1;
  color: var(--accent);
}
.steps p { color: var(--ink-soft); margin-top: 0.3rem; }

/* What you get */
.tinted { background: var(--paper-deep); max-width: none; }
.tinted > * { max-width: 44rem; margin-left: auto; margin-right: auto; }
.gets { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.gets li { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.gets li:last-child { border-bottom: 1px solid var(--rule); }

/* Genres */
.genres { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.genres li { border: 1px solid var(--rule); border-radius: 3px; padding: 1.1rem 1.15rem; }
.genres h3 { font-style: italic; font-size: 1.3rem; }
.genres p { color: var(--ink-soft); margin-top: 0.3rem; }

/* Price */
.price { text-align: center; }
.price h2 { font-size: clamp(2.2rem, 9vw, 3.4rem); margin-bottom: 0.6rem; }
.price > p { color: var(--ink-soft); }
.editions { display: grid; gap: 1rem; margin: 1.75rem auto; max-width: 44rem; }
.edition { border: 1px solid var(--rule); border-radius: 3px; padding: 1.5rem 1.25rem; background: #fdfaf3; }
.edition h3 { font-style: italic; font-size: 1.4rem; }
.edition .amount { font-size: 2.6rem; line-height: 1.1; margin: 0.3rem 0 0.5rem; }
.edition p { color: var(--ink-soft); }
.edition .amount { color: var(--ink); }
.edition { display: flex; flex-direction: column; align-items: center; }
.edition > p:not(.amount) { margin-bottom: 1.1rem; }
.edition .button { margin-top: auto; }
.edition .amount-text { font-size: 1.6rem; font-style: italic; line-height: 1.8; }
.button-quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button-quiet:hover, .button-quiet:focus-visible { background: var(--accent); color: var(--accent-ink); }
.deadline-note {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--accent);
  border-radius: 3px;
  text-align: left;
}
.deadline-note strong { color: var(--accent); }

/* FAQ */
#faq { max-width: 44rem; }
details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.25rem; color: var(--accent); font-size: 1.3rem; line-height: 1.2; }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-soft); padding: 0 0 1.1rem; }

footer {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* Sticky order bar: phones only */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  text-decoration: none;
  padding: 0.95rem 1rem calc(0.95rem + env(safe-area-inset-bottom));
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

@media (min-width: 48rem) {
  body { font-size: 1.125rem; padding-bottom: 0; }
  section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .sticky-cta { display: none; }
  .hero { grid-template-columns: 1.3fr 1fr; align-items: center; padding-top: 3rem; }
  .cover { width: 17rem; }
  .editions { grid-template-columns: 1fr 1fr; }
  .sample { grid-template-columns: 1fr 27rem; gap: 3.5rem; align-items: start; }
  .page { padding: 2.5rem 2.5rem 1.5rem; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
  .genres { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
