/* That They Might Have Joy: website styles. Colours come from the cover (template.typ):
   its dark ground #2a1e16, the cream #f4e8cf for type, and the gold rule #c9a45c. */
:root {
  --ground: #2a1e16; --cream: #f4e8cf; --gold: #c9a45c;
  --paper: #fbf7ee; --ink: #2b2118; --muted: #6b5a48; --rule: #e3d6bd; --accent: #8a6420;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --measure: 38rem;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1c1510; --ink: #eadfc8; --muted: #b3a389; --rule: #3c2f24; --accent: #d9b56c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.125rem/1.6 var(--serif); }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; }
blockquote { margin: 1.2em 0; padding: 0 0 0 1.1em; border-left: 3px solid var(--gold); color: var(--muted); }
code { font-size: 0.9em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

/* ---- Landing page ---- */
.hero { background: var(--ground); color: var(--cream); display: flex; flex-wrap: wrap; gap: 3rem;
        align-items: center; justify-content: center; padding: 4rem 1.5rem; }
.hero .cover { width: min(320px, 80vw); height: auto; box-shadow: 0 1.2rem 2.5rem rgba(0,0,0,.55); border-radius: 2px; }
.hero .intro { max-width: 30rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3rem); margin: 0 0 .4rem; color: var(--cream); }
.hero .subtitle { font-style: italic; margin: 0; padding-top: .7rem; border-top: 2px solid var(--gold); display: inline-block; }
.hero .byline { letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin: 1.2rem 0; opacity: .85; }
.hero .strap { color: var(--cream); border-left-color: var(--gold); opacity: .92; }
.hero .strap p { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 .4rem; }
.button { display: inline-block; padding: .65rem 1.15rem; border: 1px solid var(--gold); border-radius: 4px;
          color: var(--cream); text-decoration: none; font-size: 1rem; min-height: 44px; }
.button:hover { background: rgba(201,164,92,.15); }
.button.primary { background: var(--gold); color: var(--ground); font-weight: 600; }
.button.primary:hover { background: #d8b678; }
.free { font-size: .9rem; opacity: .8; margin: .4rem 0 0; }
.landing-main { max-width: var(--measure); margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.landing-main section { margin-bottom: 3rem; }
.landing-main h2 { font-size: 1.4rem; border-bottom: 1px solid var(--rule); padding-bottom: .3rem; }
.blurb p:first-child { font-size: 1.3rem; font-style: italic; }
dl dt { font-weight: 600; margin-top: 1.1rem; }
dl dd { margin: .2rem 0 0; }

/* ---- Reading pages ---- */
.bar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 1rem;
       padding: .6rem 1.2rem; background: var(--ground); font-size: .95rem; }
.bar a { color: var(--cream); text-decoration: none; }
.bar a.home { font-weight: 600; }
.reader main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.3rem 1rem; }
.reader main h1 { font-size: 1.9rem; margin-top: 1rem; }
.reader main h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.reader main h3 { font-size: 1.15rem; margin-top: 1.8rem; }
.book-title { text-align: center; margin: 1rem 0 2rem; }
.book-title .subtitle { font-style: italic; color: var(--muted); }
.book-title .author { font-size: .95rem; letter-spacing: .05em; color: var(--muted); }
#TOC ul { list-style: none; padding-left: 0; }
#TOC li { padding: .35rem 0; border-bottom: 1px solid var(--rule); }
#TOC li a { text-decoration: none; }
table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; max-width: 100%; }
th, td { border: 1px solid var(--rule); padding: .4rem .6rem; text-align: left; vertical-align: top; }
th { background: rgba(201,164,92,.12); }
[dir="rtl"], :lang(he) { font-family: "SBL Hebrew", "Ezra SIL", "Times New Roman", serif; }
.pager { max-width: var(--measure); margin: 2rem auto 0; padding: 1rem 1.3rem; display: flex; justify-content: space-between;
         gap: 1rem; border-top: 1px solid var(--rule); font-size: 1rem; }
.pager span:last-child { text-align: right; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1.3rem 3rem; }
.foot p { margin: .3rem auto; max-width: 40rem; }

/* newsletter sign-up and the not-yet-available buy button */
.newsletter { margin-top: 1.4rem; }
.newsletter h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
.newsletter p { margin: .2rem 0 .6rem; }
.signup { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.signup input { padding: .6rem .7rem; border: 1px solid var(--gold); border-radius: 4px; min-width: 14rem; font: inherit; }
.signup label { position: absolute; left: -9999px; }
.button.disabled { opacity: .55; cursor: default; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ground); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.page-title { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
