/* ==========================================================================
   SaveRuralChurches.org — shared stylesheet
   Editorial aesthetic: deep forest green + cream paper + scripture red
   Typography: Fraunces (display) + Source Serif 4 (body) + IBM Plex Sans (UI)
   ========================================================================== */

:root {
  /* Color tokens */
  --ink: #2A2824;            /* body text, warm near-black */
  --ink-soft: #5C5752;       /* secondary text */
  --ink-faint: #8A857E;      /* tertiary, captions */
  --paper: #FAF6EE;          /* primary background, cream */
  --paper-deep: #F3EDE0;     /* card / nav / footer surfaces */
  --forest: #0D321D;         /* primary brand, deep forest green (matches brand lockup) */
  --forest-dark: #071B10;    /* hover, active */
  --sage: #7A8F6B;           /* accent, muted green-gray */
  --sage-pale: #D9DFCF;      /* very soft accent fill */
  --scripture: #991B1B;      /* red letters */
  --scripture-deep: #7F1717; /* red letters on hover */
  --rule: rgba(42, 40, 36, 0.14);
  --rule-soft: rgba(42, 40, 36, 0.08);

  /* Type stacks */
  --display: "Fraunces", "Hoefler Text", "Baskerville", Georgia, serif;
  --body: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --measure: 36rem;          /* ideal reading width */
  --measure-wide: 48rem;     /* wider reading width for intro sections */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* Reset + base ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}
a:hover { color: var(--forest-dark); }

::selection { background: var(--sage-pale); color: var(--forest-dark); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--forest); color: var(--paper);
  padding: 0.75rem 1.25rem; font-family: var(--ui);
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; outline: none; }

/* Layout ------------------------------------------------------------------ */
.page {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.read {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.read-wide {
  max-width: var(--measure-wide);
  margin-left: auto;
  margin-right: auto;
}

/* Site header ------------------------------------------------------------- */
.site-header {
  padding: 1.25rem var(--gutter);
  border-bottom: 0.5px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  background: rgba(250, 246, 238, 0.92);
}

.site-header__inner {
  max-width: 68rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--forest);
}
.brand__mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand__name {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
}

.site-nav {
  font-family: var(--ui);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.5rem;
}
.site-nav a:hover { color: var(--forest); }
.site-nav a.is-current { color: var(--forest); font-weight: 500; }

@media (max-width: 560px) {
  .site-nav a { margin-left: 0.9rem; font-size: 12px; }
  .brand__name { font-size: 11px; }
  .hero__subtitle { white-space: normal; }
}

/* Masthead (homepage brand lockup) ---------------------------------------- */
.masthead {
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(1rem, 3vw, 2rem);
  text-align: center;
}

.masthead__lockup {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 28rem;
  height: auto;
  border-radius: 2px;
}

/* On very wide viewports the lockup can breathe a little more */
@media (min-width: 960px) {
  .masthead__lockup { max-width: 30rem; }
}

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

/* When a masthead precedes the hero, tighten the hero's top padding so the
   brand lockup and headline read as one unified opening */
.masthead + .hero {
  padding-top: clamp(1rem, 3vw, 2rem);
}

.hero__eyebrow {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1.25rem;
}

.hero__title {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(2.4rem, 6.2vw, 4.25rem);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--forest);
  margin: 0 0 0.35rem;
}

.hero__subtitle {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
  max-width: none;
  white-space: nowrap;
}

.hero__pivot p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}

.hero__pivot p:last-of-type { margin-bottom: 2rem; }

/* Subtle hyperlink treatment for inline callouts */
.subtle-link {
  font-weight: 600;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.subtle-link:hover {
  text-decoration-color: var(--forest);
  color: var(--forest-dark);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--forest);
  color: var(--paper);
}
.btn--primary:hover { background: var(--forest-dark); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn--ghost:hover { background: var(--forest); color: var(--paper); }

.btn--small {
  padding: 10px 20px;
  font-size: 13.5px;
}

/* Honor Roll -------------------------------------------------------------- */
.honor {
  border-top: 0.5px solid var(--rule);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
}

.honor__eyebrow {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 0.5rem;
}

.honor__title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 400;
  color: var(--forest);
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

.honor__lede {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.roll {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.roll li {
  padding: 0.35rem 0 0.35rem 1.1rem;
  border-left: 2px solid var(--sage);
  font-size: 1rem;
  line-height: 1.55;
}
.roll li em {
  color: var(--forest);
  font-style: italic;
  font-weight: 500;
}

.honor__coda {
  max-width: var(--measure);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 2.25rem;
}

/* The red-letters pull quote --------------------------------------------- */
.red-letters {
  text-align: center;
  padding: 1.75rem 1rem 0.5rem;
  margin: 0;
}
.red-letters p {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.35;
  font-weight: 500;
  color: var(--scripture);
  margin: 0;
  letter-spacing: -0.005em;
}

.red-text {
  color: var(--scripture);
  font-weight: 500;
}

.secondary-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Section wells (used on sub-pages) -------------------------------------- */
.well {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.well + .well {
  border-top: 0.5px solid var(--rule-soft);
}

.section-label {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 0.75rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.section-title--xl {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
}

.lede {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-style: italic;
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

.prose {
  max-width: var(--measure);
}
.prose p {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.72;
}
.prose p + p { text-indent: 0; }
.prose h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--forest);
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.005em;
}
.prose em { color: var(--forest); }

/* Pull quote in flowing essay */
.pull {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--forest);
  max-width: var(--measure);
  margin: 2.5rem auto;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--sage);
}

/* Receipt list for "what the bargain bought" */
.receipt {
  max-width: var(--measure);
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  border-top: 0.5px solid var(--rule);
}
.receipt li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--rule);
  align-items: baseline;
}
.receipt .line { font-size: 1rem; line-height: 1.5; }
.receipt .line em { font-style: italic; color: var(--forest); }
.receipt .verdict {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.receipt .v-delivered { color: var(--sage); }
.receipt .v-denied { color: var(--scripture); }
.receipt .v-lost { color: var(--scripture); }

/* Four-point breakdown on "Other Side" page */
.tenets {
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  list-style: none;
  padding: 0;
  counter-reset: tenet;
}
.tenets li {
  counter-increment: tenet;
  padding: 1.5rem 0;
  border-top: 0.5px solid var(--rule);
}
.tenets li:first-child { border-top: 0; padding-top: 0; }
.tenets h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--scripture);
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
.tenets h3::before {
  content: counter(tenet, decimal-leading-zero);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  flex: 0 0 auto;
}
.tenets p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0.25rem 0 0;
}

/* Action strip (end of essay) -------------------------------------------- */
.action {
  background: var(--paper-deep);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
}
.action__inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}
.action .section-title { margin-bottom: 1rem; }
.action__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  max-width: 24rem;
  margin: 1.75rem auto 0;
}

/* Showcase instruction page — two-track steps layout -------------------- */
.track {
  max-width: var(--measure-wide);
  margin: 0 0 2.5rem;
  padding: 0;
}
.track__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.track__badge {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--forest);
  padding: 4px 12px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.track__badge--alt {
  background: var(--sage);
}
.track__title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--forest);
  margin: 0;
  letter-spacing: -0.005em;
}
.track__lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 1.5rem;
  max-width: var(--measure);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  padding: 1rem 0 1rem 3rem;
  border-top: 0.5px solid var(--rule-soft);
  position: relative;
  font-size: 1rem;
  line-height: 1.65;
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--paper);
  background: var(--forest);
  border-radius: 50%;
}
.steps li:first-child::before { top: 0; }
.steps li em { color: var(--forest); font-style: normal; font-weight: 600; }
.steps li .step-note {
  display: block;
  font-family: var(--ui);
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.steps--sage li::before {
  background: var(--sage);
}

/* Showcase instruction page — bottom CTA bar */
.showcase-cta {
  background: var(--forest);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  text-align: center;
}
.showcase-cta p {
  font-family: var(--body);
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgba(250, 246, 238, 0.85);
  max-width: var(--measure);
  margin: 0 auto 1.5rem;
}
.showcase-cta .btn--primary {
  background: var(--paper);
  color: var(--forest);
}
.showcase-cta .btn--primary:hover {
  background: var(--paper-deep);
  color: var(--forest-dark);
}
@media (min-width: 780px) {
  .showcase-cta .cta-grid {
    grid-template-columns: auto 1fr;
    text-align: left;
  }
}

/* Volunteer zones + QR strip (used on homepage and showcase page) --------- */
.volunteer-strip {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  border-top: 0.5px solid var(--rule);
}
.volunteer-strip__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: start;
}
@media (min-width: 780px) {
  .volunteer-strip__inner {
    grid-template-columns: 1fr auto;
  }
}
.volunteer-strip figure {
  margin: 0;
}
.volunteer-strip img {
  width: 100%;
  border-radius: 2px;
  border: 0.5px solid var(--rule);
}
.volunteer-strip figcaption {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}
.volunteer-strip__qr {
  text-align: center;
}
.volunteer-strip__qr img {
  max-width: 18rem;
  margin: 0 auto;
  border: none;
}

/* Showcase section with poster preview ---------------------------------- */
.showcase {
  background: var(--paper-deep);
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter);
}
.showcase__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 780px) {
  .showcase__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.showcase__poster {
  margin: 0;
  text-align: center;
}
.showcase__poster img {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  border: 0.5px solid var(--rule);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04), 0 8px 24px rgba(13, 50, 29, 0.08);
  border-radius: 2px;
}
.showcase__poster figcaption {
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-top: 0.9rem;
  text-transform: uppercase;
}
.showcase__body {
  max-width: 28rem;
}
.showcase__body .section-label { margin-bottom: 0.75rem; }
.showcase__body .section-title { margin-bottom: 1rem; }
.showcase__body .lede {
  font-size: 1.0625rem;
  margin: 0 0 1.5rem;
  max-width: none;
}
.showcase__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
@media (min-width: 780px) {
  .showcase { text-align: left; }
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  padding: 3rem var(--gutter) 2.5rem;
  border-top: 0.5px solid var(--rule);
  font-family: var(--ui);
  font-size: 13px;
  color: var(--ink-faint);
}
.site-footer__inner {
  max-width: 68rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-footer a:hover { color: var(--forest); }
.site-footer__links a + a { margin-left: 1.25rem; }

/* Breadcrumb on sub-pages ------------------------------------------------- */
.crumb {
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding: 1.75rem 0 0;
}
.crumb a {
  color: var(--sage);
  text-decoration: none;
}
.crumb a:hover { color: var(--forest); }

/* Page title block for sub-pages ----------------------------------------- */
.page-title-block {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 0.5px solid var(--rule);
}
.page-title-block .hero__eyebrow { margin-bottom: 0.85rem; }
.page-title-block h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
  max-width: 30ch;
}
.page-title-block p {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0;
}

/* Subtle fade-in on load ------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__subtitle, .hero__pivot, .hero__cta {
    animation: rise 700ms cubic-bezier(0.2, 0.65, 0.25, 1) both;
  }
  .hero__subtitle { animation-delay: 60ms; }
  .hero__pivot { animation-delay: 140ms; }
  .hero__cta { animation-delay: 220ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print ------------------------------------------------------------------- */
@media print {
  .site-header, .site-nav, .site-footer, .secondary-cta, .hero__cta, .action { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  .hero, .well { padding: 0.5rem 0; }
  .hero__title, .section-title, .honor__title { color: black; }
  a { color: black; text-decoration: underline; }
}
