/* Worship A-Z — public site. No fonts, no scripts beyond invite.js, no third parties. */
:root {
  --ink: #16130e;
  --ink-soft: #554e44;
  --paper: #faf7f1;
  --card: #ffffff;
  --rule: #e3dcd0;
  --gold: #8a6a1f;
  --gold-soft: #f2ead6;
  --measure: 34rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2ece1;
    --ink-soft: #b3a999;
    --paper: #14120f;
    --card: #1c1915;
    --rule: #332e26;
    --gold: #d8b463;
    --gold-soft: #241f16;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
}
a { color: var(--gold); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Header ------------------------------------------------------------ */
.site-header {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark svg { display: block; width: 26px; height: auto; fill: var(--gold); }
.wordmark { font-weight: 700; letter-spacing: .01em; }
.site-header nav, .site-footer nav {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font: 500 14px/1.4 ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}
.site-header nav a { color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--gold); text-decoration: underline; }

/* Main -------------------------------------------------------------- */
main { padding: 0 20px; }
section, .doc { max-width: var(--measure); margin: 0 auto; padding-block: 28px; }
/* The promise cards need room to breathe; the prose measure squeezed three
   columns into ~150px each and broke headings across two lines. */
/* The landing page shares one left edge: the section is wide enough for three
   cards, and prose inside it is held to the reading measure and left-aligned
   rather than re-centred, which would produce a second, ragged gutter. */
.hero, .plain, .promises { max-width: 62rem; }
.hero > *, .plain > * { max-width: var(--measure); }
section + section { padding-top: 4px; }
.promises h2, .plain h2 { margin-top: 0; }
/* Balanced headings stop "Worship A-Z" breaking after the hyphen and leaving a
   lone "Z" on its own line. Ignored by browsers that do not support it. */
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1.8em 0 .4em; }
p, li { max-width: var(--measure); }
.lede { font-size: 1.1rem; color: var(--ink-soft); }
.hero { padding-block: 56px 24px; }
.plain h2 { font-size: 1.2rem; }

/* Cards ------------------------------------------------------------- */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards article {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 18px 18px 20px;
}
.cards h3 { margin-top: 0; color: var(--gold); }
.cards p { font-size: .95rem; color: var(--ink-soft); margin-bottom: 0; }

/* Legal documents --------------------------------------------------- */
.doc h2 { margin-top: 0; }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.legal-note {
  font: 500 14px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink-soft); background: var(--gold-soft);
  border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
  padding: 10px 14px; margin: 1.2em 0;
}
.doc table { border-collapse: collapse; width: 100%; font-size: .93rem; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }

/* Invite ------------------------------------------------------------ */
.invite-code {
  font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em; color: var(--gold);
  background: var(--gold-soft); border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px 18px; text-align: center; margin: 1em 0 1.4em;
}

/* Footer ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--rule); margin-top: 48px; padding: 28px 20px 48px;
  font: 400 14px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink-soft);
}
.site-footer p { margin: .3em 0; }
.site-footer nav { margin-top: 14px; }
.site-footer nav a { color: var(--ink-soft); }
