/* ==========================================================================
   THE ASSOCIATE PASTOR — stylesheet
   Navy / ivory / restrained gold. Editorial serif heads, sans body.
   Gold is used on NAVY only: on ivory it fails contrast for text.
   ========================================================================== */

:root {
  --navy: #14263B;
  --navy-2: #1C3350;
  --ivory: #F2EDE3;
  --ivory-2: #E8E1D3;
  --gold: #D5B47A;
  --gold-ink: #7A5A22;   /* gold-family ink that passes AA on ivory */
  --charcoal: #26313D;
  --white: #FFFFFF;
  --rule: rgba(38, 49, 61, 0.16);

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --band: clamp(56px, 8vw, 112px);
  --head-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font: 600 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-ink); margin: 0 0 1.1rem;
}

.h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.h3 { font-size: 1.45rem; }

.lede { font-size: 1.2rem; max-width: 46rem; }
.measure { max-width: 46rem; }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.4rem;
  border: 1px solid var(--navy); color: var(--navy); background: transparent;
  font: 600 0.92rem/1.2 var(--sans); letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--navy); color: var(--ivory); }
.btn--solid { background: var(--navy); color: var(--ivory); }
.btn--solid:hover { background: var(--navy-2); color: var(--white); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #E2C690; color: var(--navy); }
.btn--light { border-color: var(--ivory); color: var(--ivory); }
.btn--light:hover { background: var(--ivory); color: var(--navy); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

/* --- masthead ------------------------------------------------------------ */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--ivory);
  border-bottom: 1px solid rgba(213, 180, 122, 0.35);
}
.masthead__inner { display: flex; align-items: center; gap: 24px; min-height: var(--head-h); }

.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--ivory); line-height: 1; flex-shrink: 0; }
.wordmark:hover { color: var(--ivory); }
.wordmark__the { font: 600 0.62rem/1 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.wordmark__name { font: 500 1.45rem/1 var(--serif); letter-spacing: 0.01em; white-space: nowrap; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav__link {
  color: var(--ivory); text-decoration: none; font: 400 0.92rem/1 var(--sans);
  padding: 10px 9px; border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--gold); }
.nav__link[aria-current="page"] { border-bottom-color: var(--gold); }

.masthead__cta { min-height: 40px; padding: 0.55rem 1rem; font-size: 0.85rem; }

.burger { display: none; margin-left: auto; background: none; border: 0; padding: 12px 6px; cursor: pointer; }
.burger__bar { display: block; width: 26px; height: 2px; background: var(--ivory); margin: 5px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: fixed; inset: var(--head-h) 0 0 0; z-index: 49;
  background: var(--navy); padding: 24px var(--gutter) 40px; overflow-y: auto;
}
.drawer[hidden] { display: none; }
.drawer nav { display: flex; flex-direction: column; margin-bottom: 28px; }
.drawer__link {
  color: var(--ivory); text-decoration: none; font: 400 1.5rem/1.2 var(--serif);
  padding: 14px 0; border-bottom: 1px solid rgba(242, 237, 227, 0.12);
}
.drawer__link[aria-current="page"] { color: var(--gold); }

@media (max-width: 1140px) {
  .nav, .masthead__cta { display: none; }
  .burger { display: block; }
}

/* --- hero ---------------------------------------------------------------- */

.hero { background: var(--navy); color: var(--ivory); padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 10vw, 120px); position: relative; }
.hero::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5;
}
.hero .eyebrow { color: var(--gold); }
.hero__title { color: var(--ivory); font-size: clamp(2.3rem, 7vw, 5.2rem); font-weight: 400; margin-bottom: 0.4em; }
.hero__title em { color: var(--gold); font-style: italic; display: block; }
.hero__sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); max-width: 38rem; color: rgba(242, 237, 227, 0.88); }

/* --- page opener --------------------------------------------------------- */

.opener { padding: clamp(56px, 9vw, 110px) 0 clamp(36px, 5vw, 60px); border-bottom: 1px solid var(--rule); }
.opener__title { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 400; max-width: 20ch; }
.opener__standfirst { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 44rem; margin: 0; }

/* --- bands --------------------------------------------------------------- */

.band { padding: var(--band) 0; }
.band + .band:not(.band--navy):not(.band--tint) { border-top: 1px solid var(--rule); padding-top: var(--band); }
.band--tint { background: var(--ivory-2); }
.band--navy { background: var(--navy); color: rgba(242, 237, 227, 0.9); }
.band--navy h2, .band--navy h3 { color: var(--ivory); }
.band--navy .eyebrow { color: var(--gold); }
.band--navy a:not(.btn) { color: var(--gold); }
/* Navy-on-navy would vanish: buttons on a navy band invert. */
.band--navy .btn { border-color: var(--ivory); color: var(--ivory); }
.band--navy .btn:hover { background: var(--ivory); color: var(--navy); }
.band--navy .btn--solid, .band--navy .btn--gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.band--navy .btn--solid:hover, .band--navy .btn--gold:hover { background: #E2C690; color: var(--navy); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.statement { font: 400 clamp(1.4rem, 2.6vw, 2rem)/1.4 var(--serif); color: var(--navy); max-width: 52rem; margin: 0; }

/* --- cards --------------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 2.5rem; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--ivory); padding: 32px 28px 30px; display: flex; flex-direction: column; position: relative; }
.band--tint .card { background: var(--ivory-2); }
.card__num { font: 500 0.85rem/1 var(--sans); color: var(--gold-ink); letter-spacing: 0.1em; margin-bottom: 18px; }
.card__title { font-size: 1.5rem; margin-bottom: 0.6rem; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { color: var(--gold-ink); }
.card__body { flex: 1; }
.card__body p:last-child { margin-bottom: 0; }
.card__link { margin-top: 18px; font-weight: 600; font-size: 0.9rem; color: var(--gold-ink); text-decoration: none; }
.card__link::after { content: " →"; }

.band--navy .cards { background: rgba(242, 237, 227, 0.14); border-color: rgba(242, 237, 227, 0.14); }
.band--navy .card { background: var(--navy); }
.band--navy .card__num, .band--navy .card__link { color: var(--gold); }
.band--navy .card__title a { color: var(--ivory); }

/* --- lists / steps ------------------------------------------------------- */

.list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.list li { padding: 0.55rem 0 0.55rem 1.4rem; border-bottom: 1px solid var(--rule); position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 7px; height: 1px; background: var(--gold-ink); }
.band--navy .list li { border-color: rgba(242, 237, 227, 0.14); }
.band--navy .list li::before { background: var(--gold); }

.list--cols { columns: 2 260px; column-gap: 40px; }
.list--cols li { break-inside: avoid; }

.steps { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: s; }
.steps__item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); }
.steps__item:last-child { border-bottom: 1px solid var(--rule); }
.steps__num { font: 400 1.9rem/1 var(--serif); color: var(--gold-ink); }
.steps__name { font-size: 1.3rem; margin-bottom: 0.25rem; }
.steps__item p { margin: 0; }
.band--navy .steps__item { border-color: rgba(242, 237, 227, 0.14); }
.band--navy .steps__num { color: var(--gold); }

.questions { counter-reset: q; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.questions li { counter-increment: q; padding: 14px 0 14px 48px; position: relative; border-top: 1px solid var(--rule); font: 400 1.2rem/1.45 var(--serif); color: var(--navy); }
.questions li::before { content: counter(q); position: absolute; left: 0; top: 14px; font: 600 0.85rem/1.9 var(--sans); color: var(--gold-ink); }

.notice {
  border-left: 3px solid var(--gold-ink); background: var(--ivory-2);
  padding: 18px 22px; margin: 1.75rem 0; max-width: 46rem;
}
.notice p:last-child { margin-bottom: 0; }
.band--tint .notice { background: var(--ivory); }

.empty-state { font: italic 400 1.25rem/1.5 var(--serif); color: var(--charcoal); max-width: 40rem; margin: 2rem 0 0; }

/* --- forms --------------------------------------------------------------- */

.form { max-width: 760px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.field { display: flex; flex-direction: column; }
.field--wide, .field:has(textarea) { grid-column: 1 / -1; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }

.field label { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field__help { font-size: 0.88rem; margin: -2px 0 6px; opacity: .85; }
.req { color: #8A2F1F; }
.opt { font-weight: 400; font-size: 0.85rem; opacity: .75; }

.field input, .field textarea, .field select {
  font: 400 1rem/1.4 var(--sans); color: var(--charcoal);
  background: var(--white); border: 1px solid #8C939B; border-radius: 0;
  padding: 11px 12px; min-height: 46px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }

.field--check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.field--check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--navy); }
.field--check label { font-weight: 400; flex: 1; margin: 0; }
.field--check .field__help { flex-basis: 100%; padding-left: 32px; }

.form__note { font-size: 0.9rem; margin: 18px 0; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.band--navy .field label, .band--navy .form__note { color: var(--ivory); }
.band--navy .req { color: var(--gold); }

.join { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.join__lede { max-width: 30rem; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } }

/* --- prose (policies, resources) ---------------------------------------- */

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.75rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }

/* --- footer -------------------------------------------------------------- */

.footer { background: var(--charcoal); color: rgba(242, 237, 227, 0.82); padding: 64px 0 28px; font-size: 0.95rem; }
.footer a { color: rgba(242, 237, 227, 0.92); text-decoration: none; }
.footer a:hover { color: var(--gold); text-decoration: underline; }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 960px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
.wordmark--footer { margin-bottom: 18px; }
.footer__heading { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 6px 0 16px; }
.footer__nav, .footer__social { list-style: none; padding: 0; margin: 0; }
.footer__nav li, .footer__social li { margin-bottom: 9px; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(242, 237, 227, 0.14); margin-top: 48px; padding-top: 22px; font-size: 0.88rem; }
.footer__base p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }

/* --- print (resources print cleanly) ------------------------------------ */

@media print {
  .masthead, .drawer, .footer, .skip-link, .btn-row, #join { display: none !important; }
  body { background: #fff; }
  .band, .opener { padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
