/* ============================================================
   EBPC — Pages (v3.1)
   Long-form content rhythm — heading spacing, address
   line-break handling, portrait, kv, error page, print.
   ============================================================ */


/* =========================================================
   1. PAGE HEAD
   ========================================================= */
.page-head {
  padding-block: clamp(6rem, 5rem + 5vw, 8rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.page-head .tag { margin-bottom: var(--sp-4); }
.page-head h1 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.028em;
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-4);
}
.page-head .lede {
  max-width: 44rem;
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  line-height: var(--lh-snug);
}
@media (max-width: 640px) {
  .page-head h1 {
    font-size: clamp(1.875rem, 1.4rem + 2.6vw, 2.5rem);
    letter-spacing: -0.02em;
  }
}


/* =========================================================
   2. LONG-FORM CONTENT RHYTHM
   Used by about.html, prayer-counselling.html, giving.html
   Consistently spaced headings. Paragraph weight and colour
   are handled at the base.css level.
   ========================================================= */
.section > .container > h2,
.section > .container--narrow > h2,
.section > .container--wide > h2 {
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
}
.section > .container > h2:first-child,
.section > .container--narrow > h2:first-child,
.section > .container--wide > h2:first-child {
  margin-top: 0;
}

.section > .container > h3,
.section > .container--narrow > h3 {
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
}
.section > .container > h3:first-child,
.section > .container--narrow > h3:first-child {
  margin-top: 0;
}

/* Addresses and multi-line blocks — tight line breaks */
.section p.address,
.section p.multiline {
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}


/* =========================================================
   3. PORTRAIT
   ========================================================= */
.portrait {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  max-width: 100%;
  box-shadow: var(--shadow-md);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 899px) {
  .portrait {
    max-width: 22rem;
    margin-inline: auto;
  }
}


/* =========================================================
   4. PASTOR LAYOUT
   ========================================================= */
.pastor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: start;
}
@media (min-width: 900px) {
  .pastor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--sp-14);
    align-items: center;
  }
  .pastor-layout .portrait { transform: translateY(-8px); }
}
.pastor-layout__text h2 { margin-bottom: var(--sp-4); }
.pastor-layout__text h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.015em;
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}
.pastor-layout__text .mt-lg { margin-top: var(--sp-10); }


/* =========================================================
   5. KEY–VALUE LIST (giving.html)
   ========================================================= */
.kv {
  display: grid;
  gap: 0;
  margin: 0;
}
.kv__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}
.kv__row:first-child { padding-top: 0; }
.kv__row:last-child  { padding-bottom: 0; border-bottom: 0; }
@media (min-width: 560px) {
  .kv__row {
    grid-template-columns: 12rem 1fr;
    align-items: baseline;
    gap: var(--sp-8);
  }
}
.kv__key {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--fg-faint);
}
.kv__value {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--navy-900);
  letter-spacing: -0.01em;
  word-break: break-word;
}
.kv__value--mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--dusty-blue);
}


/* =========================================================
   6. NOT-FOUND PAGE (404.html)
   ========================================================= */
.error-page {
  padding-block: clamp(4rem, 3rem + 10vw, 9rem);
  text-align: center;
}
.error-page h1 {
  font-size: clamp(2.5rem, 2rem + 4vw, 4rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
}
.error-page .lede {
  max-width: 32rem;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
  font-size: var(--fs-lg);
}
.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}


/* =========================================================
   7. SPACING HELPERS
   ========================================================= */
.mt-lg { margin-top: var(--sp-8); }


/* =========================================================
   8. RESPONSIVE FINE-TUNING
   ========================================================= */
@media (max-width: 380px) {
  .hero__title { font-size: 2rem; letter-spacing: -0.02em; }
  .hero__motto { font-size: var(--fs-sm); }
  .page-head h1 { font-size: 1.75rem; }
}


/* =========================================================
   9. PRINT
   ========================================================= */
@media print {
  .site-header,
  .nav-drawer,
  .site-footer,
  .skip-link,
  .hero__actions,
  .cta-row,
  .error-page__actions,
  .btn,
  [data-reveal] {
    display: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html, body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    font-weight: 500;
  }

  h1, h2, h3, h4, h5, h6 { color: #000; }
  a { color: #000; text-decoration: underline; }

  .section,
  .page-head,
  .error-page {
    padding-block: 1rem;
    background: none;
    border: 0;
  }

  .card,
  .schedule__row,
  .contact-list__item,
  .info-card,
  .portrait {
    border: 1px solid #ccc;
    box-shadow: none;
    border-radius: 6px;
  }

  .schedule__row--feature { background: none; color: #000; }
  .schedule__row--feature .schedule__day,
  .schedule__row--feature .schedule__name,
  .schedule__row--feature .schedule__time { color: #000; }
}