/* ============================================================================
   Grace — pastoral. Warm ivory, one gold accent, a great deal of space.
   ----------------------------------------------------------------------------
   Palette and typefaces match the `grace` row in `ministry_templates`, because
   a demo that disagrees with the swatches beside it on the templates page is
   worse than no demo. Self-contained: nothing here reads a token from the
   marketing site, so the two cannot drift into looking alike.
   ========================================================================== */

.demo-body--grace {
  --ivory: #faf7f0;
  --ivory-2: #f4eee1;
  --gold: #c59a4a;
  --gold-deep: #8a6620;
  --ink: #20252b;
  --ink-soft: #5c636b;
  --line: rgba(32, 37, 43, 0.12);

  background: var(--ivory);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;
  font-size: 17px;
  line-height: 1.7;
}

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

/* Sans for the small structural text — labels, navigation, metadata. The
   serif carries the reading, the sans carries the signposting. */
.g-eyebrow, .g-nav, .g-button, .g-times dt, .g-sermon__meta, .g-link,
.g-art__note, .g-footer h3, .g-sermon__series {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 { font-weight: 500; line-height: 1.18; letter-spacing: -0.01em; }

.g-eyebrow {
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.g-eyebrow--light { color: #e9cf9c; }

.g-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  background: var(--gold-deep);
  color: #fffdf8;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.g-button:hover { background: #6d5019; border-color: #6d5019; }
.g-button--sm { min-height: 40px; padding: 0.4rem 1.1rem; font-size: 0.82rem; }
.g-button--ghost { background: transparent; color: var(--gold-deep); }
.g-button--ghost:hover { background: rgba(138, 102, 32, 0.09); color: var(--gold-deep); }
.g-button--light { background: #f3e6c8; border-color: #f3e6c8; color: #2a2213; }
.g-button--light:hover { background: #fff; border-color: #fff; color: #2a2213; }

.g-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 102, 32, 0.4);
  padding-bottom: 1px;
}
.g-link:hover { border-bottom-color: currentColor; }
.g-link--light { color: #e9cf9c; border-bottom-color: rgba(233, 207, 156, 0.45); }

/* ── Header ──────────────────────────────────────────────────────────────── */

.g-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(8px);
}
.g-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 82px;
}
.g-wordmark { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.g-wordmark__mark { width: 30px; height: 30px; color: var(--gold-deep); flex: none; }
.g-wordmark__text { display: flex; flex-direction: column; line-height: 1.05; }
.g-wordmark__text strong { font-size: 1.18rem; font-weight: 600; letter-spacing: 0.01em; }
.g-wordmark__text em {
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.g-nav { display: flex; gap: 1.6rem; margin-inline-start: auto; font-size: 0.88rem; }
.g-nav a { text-decoration: none; color: var(--ink-soft); padding-block: 0.5rem; }
.g-nav a:hover { color: var(--gold-deep); }

@media (max-width: 860px) {
  .g-nav { display: none; }
  .g-header__inner { justify-content: space-between; }
  .g-button--sm { margin-inline-start: auto; }
}

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

.g-hero { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem) 0; overflow: hidden; }
.g-hero__glow {
  position: absolute;
  inset: -20% 0 auto;
  height: 70%;
  background: radial-gradient(52rem 26rem at 50% 0%, rgba(197, 154, 74, 0.2), transparent 68%);
  pointer-events: none;
}
.g-hero__inner { position: relative; max-width: 46rem; text-align: center; }
.g-hero__inner .g-eyebrow { display: block; }
.g-hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.15rem);
  margin-bottom: 1.4rem;
}
.g-hero__lede {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--ink-soft);
  font-size: 1.06rem;
}
.g-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.1rem;
}

/* The service times sit in the hero, not three screens down. It is the single
   most looked-for fact on a church website. */
.g-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0;
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.g-times > div { padding: 1.5rem 0.25rem 1.6rem; }
.g-times > div + div { border-inline-start: 1px solid var(--line); padding-inline-start: 1.5rem; }
.g-times dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.g-times dd { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.g-times dd strong { display: block; font-size: 1.5rem; font-weight: 500; color: var(--ink); }

@media (max-width: 760px) {
  .g-times > div + div { border-inline-start: 0; border-top: 1px solid var(--line); padding-inline-start: 0.25rem; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.g-section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.g-section--tint { background: var(--ivory-2); }

.g-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.g-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.g-head__lede { margin-top: 0.9rem; color: var(--ink-soft); }

.g-split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 880px) { .g-split { grid-template-columns: 1fr; } }

.g-art { margin: 0; position: relative; }
.g-art svg { width: 100%; height: auto; border-radius: 2px; }
.g-art__note {
  position: absolute;
  inset-block-end: 0.9rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  color: #7a6740;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.g-prose h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1.2rem; }
.g-prose p + p { margin-top: 1.1rem; }
.g-prose p { color: var(--ink-soft); }
.g-signature {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-style: italic;
}
.g-signature span {
  display: block;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.2rem;
}

/* ── Sermons ─────────────────────────────────────────────────────────────── */

.g-sermons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.g-sermon { padding-top: 1.4rem; border-top: 2px solid var(--gold); }
.g-sermon__series {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.55rem;
}
.g-sermon__title { font-size: 1.32rem; margin-bottom: 0.45rem; }
.g-sermon__title a { text-decoration: none; }
.g-sermon__title a:hover { color: var(--gold-deep); }
.g-sermon__ref { font-style: italic; color: var(--ink-soft); }
.g-sermon__meta {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.g-sermon__actions { display: flex; gap: 1.2rem; margin-top: 1rem; }
.g-more { margin-top: clamp(2rem, 4vw, 3rem); }

/* ── Ministries ──────────────────────────────────────────────────────────── */

.g-ministries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.g-ministries li { padding-inline-start: 1.15rem; border-inline-start: 1px solid var(--gold); }
.g-ministries h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.g-ministries p { color: var(--ink-soft); font-size: 0.95rem; }

/* ── Giving ──────────────────────────────────────────────────────────────── */

.g-give { padding-block: clamp(3rem, 7vw, 5rem); background: #2b2f26; color: #efe9dc; }
.g-give__inner {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 780px) { .g-give__inner { grid-template-columns: 1fr; } }
.g-give h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 0.9rem; }
.g-give p { color: #c8c2b4; max-width: 38rem; }
.g-give__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

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

.g-footer { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.g-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.g-footer__name { font-size: 1.15rem; color: var(--ink); margin-bottom: 0.4rem; }
.g-footer h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}

/* ── Tap targets ─────────────────────────────────────────────────────────────
   Found by adding the demonstrations to visual-check.py. These are inline text
   links in a serif at 0.85rem, so their natural height is about 25px — well
   under the 44px this project holds itself to everywhere else, and the people
   these templates are built for are overwhelmingly on a phone. A demonstration
   that a church cannot comfortably tap is demonstrating the wrong thing. */
.g-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.g-wordmark { min-height: 44px; }
.g-sermon__actions { gap: 1.4rem; margin-top: 0.5rem; }
.g-give__actions .g-link { min-height: 44px; }

@media (max-width: 820px) {
  /* A headline that is also a link is still a tap target. */
  .g-sermon__title a { display: inline-flex; min-height: 44px; align-items: center; }
}
