/* ============================================================
   THE BOYS ADVENTURE LIBRARY — stamped-cloth design system
   Ground: tan book cloth. Text: near-black ink.
   Each collection is stamped in its own ink, like the bindings.
   Type: Ultra (stamped display) / Sorts Mill Goudy (1915 body)
         / Oswald (spine-lettering utility caps)
   ============================================================ */

:root {
  --cloth: #E7DAC0;
  --cloth-deep: #DECDA9;
  --ink: #26201A;
  --ink-soft: #4A4034;
  --oxblood: #8C2F24;   /* house master + Rover Boys */
  --swift: #A6551D;     /* Tom Swift */
  --olive: #5A6234;     /* Every Boy's Library */
  --slate: #33506B;     /* early detective */
  --teal: #1F6B61;      /* radio serials */
  --series: var(--oxblood);
  --measure: 44rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cloth);
  color: var(--ink);
  font-family: "Sorts Mill Goudy", Georgia, "Times New Roman", serif;
  font-size: 1.1875rem;
  line-height: 1.6;
}

/* per-page ink */
body.ink-oxblood { --series: var(--oxblood); }
body.ink-swift   { --series: var(--swift); }
body.ink-olive   { --series: var(--olive); }
body.ink-slate   { --series: var(--slate); }
body.ink-teal    { --series: var(--teal); }

/* ---------- masthead ---------- */

.masthead {
  text-align: center;
  padding: 1.75rem 1rem 0;
}

.masthead .wordmark {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding: 0.4rem 1.25rem;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.masthead nav {
  margin-top: 0.9rem;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 0.55rem;
  white-space: nowrap;
  line-height: 2;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--series);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* ---------- stamped hero panel ---------- */

.hero {
  max-width: 52rem;
  margin: 2.25rem auto 0;
  padding: 0 1rem;
}

.hero .die {
  border: 3px solid var(--series);
  padding: 6px;
}

.hero .die-inner {
  border: 1px solid var(--series);
  text-align: center;
  padding: 2.4rem 1.5rem 2.1rem;
  color: var(--series);
}

.hero .eyebrow {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: "Ultra", "Rockwell", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 4.6vw, 2.9rem);
  line-height: 1.12;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero .imprint {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 1.2rem 0 0;
}

.hero .imprint::before,
.hero .imprint::after { content: " \2766\00a0\00a0"; } /* ❦ */
.hero .imprint::after  { content: "\00a0\00a0\2766"; }

/* ---------- main column ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 3rem;
}

main h2 {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--series);
  margin: 2.6rem 0 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--series);
}

main h3 {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 2rem 0 0.6rem;
}

main p { margin: 0 0 1.1rem; }

main a {
  color: var(--series);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

main a:hover { text-decoration-thickness: 2.5px; }

main strong { font-weight: 700; }

main em { font-style: italic; }

main hr {
  border: 0;
  border-top: 1px solid var(--ink-soft);
  margin: 2.4rem auto;
  width: 38%;
}

/* ---------- the back-page catalog (volume lists) ---------- */

main ol {
  list-style: none;
  counter-reset: vol;
  margin: 1.4rem 0;
  padding: 0;
}

main ol > li {
  counter-increment: vol;
  position: relative;
  padding: 0.75rem 0 0.75rem 3.2rem;
  border-top: 1px solid var(--cloth-deep);
}

main ol > li:last-child { border-bottom: 1px solid var(--cloth-deep); }

main ol > li::before {
  content: counter(vol);
  position: absolute;
  left: 0;
  top: 0.78rem;
  width: 2.2rem;
  text-align: right;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--series);
}

main ul { margin: 1.1rem 0; padding-left: 1.4rem; }
main ul > li { margin: 0.35rem 0; }

/* ---------- homepage collection catalog ---------- */

main p:has(> strong:only-child > a) {
  border: 2px solid var(--ink);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1rem;
}

main p:has(> strong:only-child > a) > strong > a {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  margin-bottom: 0.35rem;
}

main p:has(> strong:only-child > a:hover) { background: var(--cloth-deep); }

main p:has(> strong:only-child > a[href="/rover-boys/"]) { border-color: var(--oxblood); }
main p:has(> strong:only-child > a[href="/rover-boys/"]) a { color: var(--oxblood); }
main p:has(> strong:only-child > a[href="/tom-swift-original/"]) { border-color: var(--swift); }
main p:has(> strong:only-child > a[href="/tom-swift-original/"]) a { color: var(--swift); }
main p:has(> strong:only-child > a[href="/every-boys-library-boy-scouts/"]) { border-color: var(--olive); }
main p:has(> strong:only-child > a[href="/every-boys-library-boy-scouts/"]) a { color: var(--olive); }
main p:has(> strong:only-child > a[href="/early-detective-adventures/"]) { border-color: var(--slate); }
main p:has(> strong:only-child > a[href="/early-detective-adventures/"]) a { color: var(--slate); }
main p:has(> strong:only-child > a[href="/radio-serials/"]) { border-color: var(--teal); }
main p:has(> strong:only-child > a[href="/radio-serials/"]) a { color: var(--teal); }
main p:has(> strong:only-child > a[href="/best-adventure-books-for-boys/"]) { border-color: var(--ink); }

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

footer {
  text-align: center;
  padding: 2.2rem 1rem 2.8rem;
  border-top: 3px double var(--ink);
  max-width: 52rem;
  margin: 0 auto;
}

footer .ornament { color: var(--series); font-size: 1.2rem; }

footer p {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}

footer a { color: var(--ink-soft); }

/* ---------- accessibility & misc ---------- */

a:focus-visible {
  outline: 3px solid var(--series);
  outline-offset: 2px;
}

blockquote {
  margin: 1.4rem 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--series);
  font-style: italic;
}

@media (max-width: 540px) {
  body { font-size: 1.09rem; }
  .masthead nav a { margin: 0 0.4rem; }
  main ol > li { padding-left: 2.6rem; }
  main ol > li::before { width: 1.8rem; }
}
