/* ============================================================================
   Heritage — traditional. Ivory, charcoal, deep wine, stone.
   ----------------------------------------------------------------------------
   The reference is a printed order of service, not a web page: a centred
   masthead between double rules, small caps for structure, a notices column,
   and a genuine <table> for the timetable. Denser and more formal than Grace
   by design — the two templates are sold to congregations who would each find
   the other's website slightly wrong.
   ========================================================================== */

.demo-body--heritage {
  --ivory: #f5f1e8;
  --paper: #fbf9f3;
  --stone: #d8cfc0;
  --stone-soft: #ece5d8;
  --ink: #20252b;
  --ink-mute: #565d66;
  --wine: #7a2e33;
  --wine-deep: #5f2327;
  --rule: rgba(32, 37, 43, 0.22);

  background: var(--ivory);
  color: var(--ink);
  font-family: "Hoefler Text", "Times New Roman", "Songti SC", Times, serif;
  font-size: 17.5px;
  line-height: 1.62;
}

.h-shell {
  width: 100%;
  max-width: 1020px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.h-kicker, .h-nav, .h-topbar, .h-button, .h-index__date, .h-index__meta,
.h-notices__heading, .h-footer h3, .h-wordmark__pre, .h-wordmark__post,
.h-table thead th, .h-link {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3 { font-weight: 600; line-height: 1.2; }

/* ── Top bar and masthead ────────────────────────────────────────────────── */

.h-topbar {
  background: var(--wine-deep);
  color: #f0e3e0;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}
.h-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.55rem;
}
.h-topbar__contact { display: flex; gap: 0.75rem; }
.h-topbar a { color: inherit; text-decoration: none; }
.h-topbar a:hover { text-decoration: underline; }

.h-masthead { background: var(--paper); padding-block: 1.4rem 0; }
.h-rule { height: 1px; background: var(--rule); }
.h-rule--double {
  height: 4px;
  background:
    linear-gradient(var(--rule), var(--rule)) top / 100% 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) bottom / 100% 1px no-repeat;
}

.h-wordmark {
  display: block;
  padding-block: 1.6rem 1.4rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.h-wordmark__pre, .h-wordmark__post {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.h-wordmark__name {
  display: block;
  margin-block: 0.35rem 0.45rem;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--wine);
}
.h-wordmark__post { color: var(--ink-mute); }

.h-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem clamp(1rem, 3vw, 2.4rem);
  padding-block: 0.85rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.h-nav a { color: var(--ink); text-decoration: none; padding-block: 0.35rem; }
.h-nav a:hover { color: var(--wine); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.h-hero { background: var(--paper); padding-block: clamp(3rem, 7vw, 5.5rem); }
.h-hero__inner { max-width: 44rem; margin-inline: auto; text-align: center; }
.h-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 1.1rem;
}
.h-kicker--light { color: #e3b9b4; }
.h-hero__title {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1.6rem;
}
.h-hero__scripture {
  max-width: 34rem;
  margin-inline: auto;
  font-style: italic;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 1.1rem;
}
.h-hero__scripture span {
  display: block;
  margin-top: 0.5rem;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.h-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 1.9rem;
}

.h-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.5rem;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: #fdf7f6;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.h-button:hover { background: var(--wine-deep); border-color: var(--wine-deep); }
.h-button--plain { background: transparent; color: var(--wine); }
.h-button--plain:hover { background: rgba(122, 46, 51, 0.08); color: var(--wine); }
.h-button--light { background: #f0e3e0; border-color: #f0e3e0; color: var(--wine-deep); }
.h-button--light:hover { background: #fff; border-color: #fff; color: var(--wine-deep); }

.h-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wine);
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 46, 51, 0.35);
}
.h-link:hover { border-bottom-color: currentColor; }

/* ── Body sections ───────────────────────────────────────────────────────── */

.h-section { padding-block: clamp(3rem, 7vw, 5rem); }
.h-section--stone { background: var(--stone-soft); }

.h-heading {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 400;
  margin-bottom: 1rem;
}
.h-heading--center { text-align: center; margin-bottom: 0.5rem; }
/* Drawn rather than typed. A printer's-ornament character renders as a tiny
   unrecognisable mark in most of the fonts this template falls back to, and as
   nothing at all in some. */
.h-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: var(--wine);
}
.h-ornament::before, .h-ornament::after {
  content: "";
  width: clamp(2rem, 8vw, 4.5rem);
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.h-ornament span {
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

.h-lead { font-size: 1.1rem; color: var(--ink-mute); margin-bottom: 1.1rem; }
.h-main p + p { margin-top: 1.05rem; }
.h-main p { color: var(--ink-mute); }
.h-more { margin-top: 1.4rem; }

.h-columns {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
}
.h-columns--even { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
@media (max-width: 820px) { .h-columns { grid-template-columns: 1fr; } }

/* The notices column: a parish noticeboard, ruled like one. */
.h-notices {
  padding: 1.4rem 1.5rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.h-notices__heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wine);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}
.h-notices li + li { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(32, 37, 43, 0.1); }
.h-notices h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.25rem; }
.h-notices p { font-size: 0.92rem; color: var(--ink-mute); }

/* ── The timetable ───────────────────────────────────────────────────────── */

.h-table-wrap { overflow-x: auto; }
.h-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  background: var(--paper);
}
.h-table caption { text-align: start; }
.h-table th, .h-table td {
  padding: 0.85rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--rule);
}
.h-table thead th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 2px solid var(--wine);
}
.h-table tbody th { font-weight: 600; white-space: nowrap; }
.h-table tbody tr:last-child th, .h-table tbody tr:last-child td { border-bottom: 0; }
.h-note {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-mute);
}

/* ── The lecture index ───────────────────────────────────────────────────── */

.h-index { border-top: 1px solid var(--rule); }
.h-index__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 640px) {
  .h-index__row { grid-template-columns: 1fr; gap: 0.35rem; }
}
.h-index__date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wine);
}
.h-index__body a { font-size: 1.1rem; text-decoration: none; }
.h-index__body a:hover { color: var(--wine); text-decoration: underline; }
.h-index__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
}

/* ── The confession band ─────────────────────────────────────────────────── */

.h-creed { background: var(--wine); color: #f7ebe9; padding-block: clamp(3rem, 6vw, 4.5rem); }
.h-creed__inner { max-width: 44rem; margin-inline: auto; text-align: center; }
.h-creed blockquote {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-style: italic;
  line-height: 1.55;
}
.h-creed__foot { margin-top: 1.9rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.h-footer { background: var(--paper); border-top: 3px double var(--rule); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.h-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  font-size: 0.92rem;
  color: var(--ink-mute);
}
.h-footer__name { font-size: 1.1rem; color: var(--ink); margin-bottom: 0.4rem; }
.h-footer h3 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 0.5rem;
}

/* ── Tap targets ─────────────────────────────────────────────────────────────
   Same finding as Grace: the masthead navigation and the top bar's contact
   links were 20–30px tall. Heritage is the most typographically compact of the
   three templates, which is the look, but a small link is still a small link. */
.h-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0;
}
.h-topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.h-topbar__inner { padding-block: 0; }
.h-link { display: inline-flex; align-items: center; min-height: 44px; }
