/* Meals for the Soul — site styles
   One stylesheet for the whole site. Edit colours in :root. */

:root {
  --paper:        #FAF6EE;
  --paper-deep:   #F2EBDD;
  --ink:          #23201B;
  --ink-soft:     #554F45;
  --ink-faint:    #857D70;
  --gold:         #A8823C;
  --gold-soft:    #D8C69B;
  --rule:         #E0D6C2;
  --green:        #2E6B4F;
  --red:          #9B3226;
  --max:          42rem;
  --serif:  Charter, "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans:   ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { 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: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); text-decoration-color: var(--gold-soft); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--gold); }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
/* the body column: everything left-aligns with the wide header and hero,
   but prose never runs wider than is comfortable to read */
main .wrap > *, .hero .wrap > * { max-width: var(--max); }
.wrap-wide { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-head .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.brand {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-weight: 600;
  margin-right: auto;
  white-space: nowrap;
}
.brand span { color: var(--gold); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.15rem;
  font-family: var(--sans);
  font-size: 0.875rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }

/* ---------- hero ---------- */

.hero {
  padding: 3.5rem 0 2.75rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--paper-deep), var(--paper));
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}
.hero .standfirst {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  max-width: 34rem;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9rem;
}

/* ---------- type ---------- */

main { padding: 2.75rem 0 1rem; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.005em; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
p  { margin: 0 0 1.1rem; }

.lede { font-size: 1.15rem; color: var(--ink-soft); }
.small { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-faint); }

blockquote {
  margin: 1.75rem 0;
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 3px solid var(--gold-soft);
  color: var(--ink-soft);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

hr.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 3rem 0;
}
.ornament {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.5em;
  margin: 2.75rem 0;
  font-size: 0.8rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.35rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--gold); opacity: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.card {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.4rem 1.4rem 1.5rem;
  background: #fff;
}
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* ---------- books ---------- */

.volume {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.75rem;
  align-items: start;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.volume:first-of-type { border-top: 0; }
@media (max-width: 34rem) {
  .volume { grid-template-columns: 1fr; gap: 1rem; }
  .volume .cover { max-width: 9rem; }
}

.cover {
  border-radius: 1px 3px 3px 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 24px rgba(0,0,0,.14);
  width: 100%;
}

/* home hero, with a cover alongside */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 13rem;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 40rem) {
  .hero-split { grid-template-columns: 1fr; gap: 2rem; }
  .hero-split .cover-wrap { max-width: 11rem; }
}

.vol-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}
.volume h2 { margin: 0 0 0.6rem; font-size: 1.35rem; }

.status-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-faint);
  background: var(--paper-deep);
}

/* ---------- callout ---------- */

.callout {
  border: 1px solid var(--gold-soft);
  border-left-width: 3px;
  background: #FFFCF5;
  padding: 1.25rem 1.35rem;
  border-radius: 3px;
  margin: 2rem 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- reading (sample) ---------- */

.reading h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2.5rem 0 0.75rem;
}
.reading .scripture {
  background: var(--paper-deep);
  border-radius: 3px;
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.reading .scripture p:last-child { margin-bottom: 0; }
.reading .ref {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.reading .example {
  border-left: 3px solid var(--rule);
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 1.5rem 0;
}
.sources {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border-radius: 3px;
  padding: 1.25rem 1.4rem;
}
.sources p { margin-bottom: 0.85rem; }
.sources p:last-child { margin-bottom: 0; }
.sources a { word-break: break-word; }

/* ---------- quiz ---------- */

.quiz { margin: 2rem 0 1rem; }

.quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.progress {
  height: 3px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.3s ease;
}

.q-text { font-size: 1.35rem; line-height: 1.35; margin: 0 0 1.5rem; }

.options { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; }
.option {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.option:hover:not(:disabled) { border-color: var(--gold); }
.option:disabled { cursor: default; }
.option .letter {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 2px;
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 0.15rem;
}
.option.correct { border-color: var(--green); background: #F1F7F3; }
.option.correct .letter { border-color: var(--green); color: var(--green); }
.option.wrong { border-color: var(--red); background: #FBF2F1; }
.option.wrong .letter { border-color: var(--red); color: var(--red); }

.verdict {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.verdict.ok  { color: var(--green); }
.verdict.no  { color: var(--red); }
.explain {
  border-left: 3px solid var(--gold-soft);
  padding: 0.1rem 0 0.1rem 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.explain p:last-child { margin-bottom: 0; }

.score-big {
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 1;
  margin: 0.5rem 0 0.25rem;
  letter-spacing: -0.03em;
}
.score-big small { font-size: 0.35em; color: var(--ink-faint); letter-spacing: 0; }

.review { margin: 2rem 0; }
.review-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.review-item .mark { flex: none; font-family: var(--sans); font-weight: 700; }
.review-item .mark.ok { color: var(--green); }
.review-item .mark.no { color: var(--red); }
.review-item .ans { color: var(--ink-faint); font-family: var(--sans); font-size: 0.82rem; }

.quiz-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.quiz-list li { border-top: 1px solid var(--rule); }
.quiz-list li:last-child { border-bottom: 1px solid var(--rule); }
.quiz-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  text-decoration: none;
}
.quiz-list a:hover .qt { text-decoration: underline; text-decoration-color: var(--gold); }
.quiz-list .qn {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  flex: none;
}

/* ---------- forms / notify ---------- */

.notify {
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #fff;
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.notify h3 { margin-top: 0; }

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

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2.25rem 0 3rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  background: var(--paper-deep);
}
.site-foot a { color: var(--ink-soft); }
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.foot-grid h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.35rem; }
.foot-legal { border-top: 1px solid var(--rule); padding-top: 1.25rem; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 10; border-radius: 2px;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media print {
  .site-nav, .site-foot, .btn-row { display: none; }
  body { background: #fff; }
}
