/* ============================================================
   Acorn Abbey Books — site stylesheet
   Rebuilt 2026. Hand-editable; no frameworks, no web fonts,
   no JavaScript, no trackers.

   Palette is sampled from the Reginald Dalton cover:
   terracotta title lettering, umber/sepia ground, olive coat.
   ============================================================ */

:root {
  /* colour — sampled from the cover */
  --paper:      #eae0c9;   /* warm aged-paper ground            */
  --panel:      #f2ead6;   /* slightly lighter panel            */
  --ink:        #2c2318;   /* warm near-black, body text        */
  --ink-soft:   #5c4d38;   /* secondary text, captions          */
  --umber:      #46381f;   /* deep brown, headings              */
  --terra:      #c38554;   /* terracotta — cover title lettering */
  --terra-deep: #a05a30;   /* darker terracotta, links/hover    */
  --olive:      #6f6a3a;   /* muted olive, from the coat        */
  --rule:       #d3c4a0;   /* hairline on paper                 */

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           Helvetica, Arial, sans-serif;

  /* measure */
  --shell: 900px;   /* outer column          */
  --read:  660px;   /* comfortable text line */
}

/* ---- base ------------------------------------------------- */
* { box-sizing: border-box; }

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

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

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--terra-deep);
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}
a:hover { color: var(--terra); text-decoration-color: var(--terra); }

/* keyboard focus stays visible */
a:focus-visible,
:focus-visible { outline: 2px solid var(--terra-deep); outline-offset: 2px; }

/* ---- shell ------------------------------------------------ */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- header + wordmark ------------------------------------ */
.site-head {
  padding: 40px 0 22px;
  text-align: center;
}
.wordmark {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--umber);
  margin: 0;
  line-height: 1.1;
}
.wordmark a { color: inherit; text-decoration: none; }
.tagline {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

/* ---- primary navigation ----------------------------------- */
.nav {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 22px;
}
.nav ul {
  list-style: none;
  margin: 0; padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.nav a {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 2px 14px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--terra-deep); }
.nav a[aria-current="page"] {
  color: var(--umber);
  border-bottom-color: var(--terra);
}

/* ---- shared bits ------------------------------------------ */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin: 0 0 14px;
}

/* the signature: a short terracotta hairline echoing the
   underline beneath the author's name on the cover */
.rule {
  border: 0;
  height: 2px;
  width: 74px;
  background: var(--terra);
  margin: 22px 0;
}

main { padding: 8px 0 10px; }

h1, h2, h3 { font-family: var(--serif); color: var(--umber); font-weight: 600; }

/* ---- hero (front page) ------------------------------------ */
.hero {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 46px 0 40px;
  animation: rise 0.7s ease both;
}
.hero .cover {
  flex: 0 0 300px;
  width: 300px;
  box-shadow: 0 14px 34px rgba(44, 35, 24, 0.30);
  border-radius: 2px;
}
.hero-text { flex: 1 1 auto; }
.book-title {
  font-size: 46px;
  line-height: 1.04;
  margin: 0;
  letter-spacing: 0.005em;
}
.byline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  margin: 12px 0 0;
}
.pitch { font-size: 20px; margin: 0 0 4px; }
.formats {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 6px 0 22px;
}
.formats .isbn { white-space: nowrap; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--paper);
  background: var(--terra-deep);
  padding: 11px 22px;
  border-radius: 2px;
}
.btn:hover { background: var(--umber); color: var(--paper); }

/* ---- "also from Acorn Abbey" shelf ------------------------ */
.shelf { padding: 40px 0 24px; border-top: 1px solid var(--rule); }
.shelf h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 26px;
}
.books {
  display: flex;
  gap: 34px;
  justify-content: center;
}
.bookcard { flex: 1 1 0; text-align: center; }
.bookcard a { text-decoration: none; color: var(--umber); }
.bookcard img {
  margin: 0 auto 14px;
  box-shadow: 0 8px 20px rgba(44, 35, 24, 0.22);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.bookcard a:hover img { transform: translateY(-4px); }
.bookcard .t {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  display: block;
}
.bookcard .s {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  display: block;
  margin-top: 3px;
}

.blogline {
  padding: 30px 0 8px;
  border-top: 1px solid var(--rule);
  font-size: 18px;
}

/* ---- interior reading pages ------------------------------- */
.page { max-width: var(--read); }
.page.wide { max-width: 780px; }
.page h1 { font-size: 34px; line-height: 1.12; margin: 30px 0 0; }
.page h2 { font-size: 23px; margin: 40px 0 0; }
.page p { margin: 18px 0; }

/* a cover floated beside body copy on interior pages */
.plate {
  float: right;
  width: 210px;
  margin: 8px 0 20px 30px;
  box-shadow: 0 10px 24px rgba(44, 35, 24, 0.24);
  border-radius: 2px;
}
.plate.left { float: left; margin: 8px 30px 20px 0; }

/* pull-quote for endorsements */
.quote {
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--terra);
  padding: 2px 0 2px 20px;
  margin: 22px 0;
}
.quote .who {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---- footer ----------------------------------------------- */
.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  padding: 26px 0 60px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.site-foot a { color: var(--ink-soft); }
.site-foot p { margin: 6px 0; }

/* ---- responsive ------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 18px; }
  .hero {
    flex-direction: column;
    gap: 26px;
    padding: 30px 0;
    align-items: center;
    text-align: center;
  }
  .hero .cover { flex-basis: auto; width: 240px; }
  .hero .rule { margin-left: auto; margin-right: auto; }
  .book-title { font-size: 38px; }
  .books { flex-direction: column; gap: 30px; max-width: 260px; margin: 0 auto; }
  .plate, .plate.left { float: none; width: 200px; margin: 8px auto 22px; }
  .quote { border-left: 0; border-top: 2px solid var(--terra); padding: 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .bookcard a:hover img { transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
