/* Renewal Fellowship giving site. Brand tokens sampled from www.renewalfellowship.co.za. */
:root {
  --rf-black:      #0c0a07;  /* header bar (warm near-black) */
  --rf-footer:     #000000;  /* footer / dark form section */
  --rf-gold:       #a19340;  /* accent: GIVE button, section dividers */
  --rf-gold-hover: #8a7e36;  /* darker gold for hover/active (derived) */
  --rf-white:      #ffffff;  /* page background, text on dark */
  --rf-heading:    #1c1c1c;  /* headings on white */
  --rf-text:       #111111;  /* body text on white */
  --rf-input-bg:   #fafafa;  /* form fields */
  --rf-input-line: #767676;  /* form field border (darkened from #a9a9a9 for WCAG AA 3:1) */
  --rf-btn-dark:   #1f1f1f;  /* secondary / submit button on black */

  --rf-font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rf-font-body:    "Jost", "Futura PT", Futura, "Century Gothic", sans-serif;

  --gutter: 20px;
}

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

/* Elements with a display rule (e.g. .field-row's grid) must still hide when [hidden]. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--rf-white);
  color: var(--rf-text);
  font-family: var(--rf-font-body);
  font-size: 17px;
  line-height: 1.8;
}

a { color: inherit; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--rf-white); color: var(--rf-text); padding: 12px 16px;
}
.skip-link:focus { top: 12px; }

/* --- Header ---------------------------------------------------------------- */
.site-header { background: var(--rf-black); color: var(--rf-white); }

.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 22px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
}

.wordmark {
  display: flex; flex-direction: column;
  font-family: var(--rf-font-display); font-weight: 700;
  font-size: 26px; line-height: 0.95; letter-spacing: -0.02em;
  color: var(--rf-white); text-decoration: none;
}

.nav-toggle {
  display: none; /* only shown when JS is available, see .js rules */
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: var(--rf-white); cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block; width: 26px; height: 2px; margin: 0 auto;
  background: currentColor; position: relative;
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -8px; }
.nav-toggle__bar::after { top: 8px; }

.site-nav { flex-basis: 100%; }
.site-nav ul { list-style: none; margin: 16px 0 0; padding: 0; }
.site-nav li { border-top: 1px solid rgba(255, 255, 255, 0.15); }
.site-nav a,
.site-nav summary {
  display: block; padding: 14px 0;
  font-family: var(--rf-font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none;
  color: var(--rf-white); cursor: pointer;
}
.site-nav a:hover, .site-nav summary:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-nav a.site-nav__give {
  display: inline-block; margin: 14px 0 6px; padding: 14px 28px;
  background: var(--rf-gold); letter-spacing: 0.12em;
}
.site-nav a.site-nav__give:hover { background: var(--rf-gold-hover); text-decoration: none; }

/* Dropdowns: <details>/<summary>, so they open by click, Enter or Space with no JS. */
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s;
}
.dropdown[open] summary::after { transform: rotate(-135deg); margin-bottom: -1px; }
.site-nav .dropdown__menu { margin: 0 0 10px; padding-left: 18px; }
.site-nav .dropdown__menu li { border: 0; }
.site-nav .dropdown__menu a {
  padding: 10px 0; font-family: var(--rf-font-body); font-weight: 500;
  font-size: 16px; letter-spacing: 0.02em; text-transform: none;
}

/* Only the GIVE button (no menu links): no hamburger; keep it in the header row. */
.site-nav.site-nav--bare, .js .site-nav.site-nav--bare { display: block; flex-basis: auto; }
.site-nav--bare ul { margin: 0; }
.site-nav--bare li { border: 0; }
.site-nav--bare a.site-nav__give { margin: 0; }

/* With JS, collapse the mobile nav behind the hamburger. Without JS it stays open. */
.js .nav-toggle { display: block; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

@media (min-width: 960px) {
  .wordmark { font-size: 34px; }
  .js .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; flex-basis: auto; }
  .site-nav ul { display: flex; align-items: center; gap: 34px; margin: 0; }
  .site-nav li { border: 0; }
  .site-nav a, .site-nav summary { padding: 6px 0; }
  .site-nav a.site-nav__give { margin: 0; }

  .site-nav__group { position: relative; }
  .site-nav .dropdown__menu {
    position: absolute; top: 100%; left: -24px; z-index: 20;
    display: block; min-width: 230px; margin: 0; padding: 14px 24px 16px;
    background: var(--rf-black); border-top: 16px solid transparent; background-clip: padding-box;
  }
  .site-nav .dropdown__menu li + li { margin-top: 2px; }
  .site-nav .dropdown__menu a { padding: 8px 0; }
}

/* --- Hero ------------------------------------------------------------------ */
/* TODO: swap the solid block for the church's greyscale photo: add it under
   static/img/ and set a background-image on .hero with a dark overlay gradient.
   (Don't write a url() to a file that doesn't exist yet, even in a comment:
   collectstatic's manifest storage follows it and fails the build.) */
.hero {
  background: var(--rf-black); color: var(--rf-white);
  min-height: 240px; display: flex; align-items: center; justify-content: center;
  padding: 60px var(--gutter);
}
.hero__title {
  margin: 0; font-family: var(--rf-font-display); font-weight: 700;
  font-size: 44px; letter-spacing: 0.04em; text-transform: uppercase;
}
@media (min-width: 768px) {
  .hero { min-height: 380px; }
  .hero__title { font-size: 56px; }
}

/* --- Sections -------------------------------------------------------------- */
.section { padding: 56px 0 0; }
.section:last-child { padding-bottom: 88px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); }
.container--text { max-width: 820px; }
.container--form { max-width: 640px; }

.section-heading {
  margin: 0 0 28px; text-align: center;
  font-family: var(--rf-font-display); font-weight: 400;
  font-size: 32px; line-height: 1.15; color: var(--rf-heading);
}
.sub-heading {
  margin: 40px 0 8px; font-family: var(--rf-font-display); font-weight: 700;
  font-size: 22px; color: var(--rf-heading);
}

.divider {
  width: 340px; max-width: 70%; height: 4px; margin: 0 auto 36px;
  background: var(--rf-gold); border: 0;
}
.section-heading + .divider { margin-top: -4px; }

.container--text p { margin: 0 0 1.4em; }
.container--text strong { font-weight: 600; }

@media (min-width: 768px) {
  body { font-size: 19px; line-height: 1.9; }
  .section { padding-top: 88px; }
  .section-heading { font-size: 46px; }
}

/* --- Form ------------------------------------------------------------------ */
.give-form { margin-top: 8px; }

.field { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; gap: 0 20px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field__label {
  display: block; margin: 0 0 8px; padding: 0;
  font-weight: 500; font-size: 16px; line-height: 1.4; color: var(--rf-heading);
}
.field__hint-line { margin: -4px 0 8px; font-size: 14px; line-height: 1.4; color: #595959; }
.field__hint { font-weight: 400; font-size: 13px; color: #595959; }

.input {
  display: block; width: 100%; height: 64px; padding: 16px;
  background: var(--rf-input-bg); color: var(--rf-text);
  border: 1px solid var(--rf-input-line); border-radius: 0;
  font: inherit; font-size: 17px; line-height: 1.4;
  -webkit-appearance: none; appearance: none;
}
.input:focus-visible { border-color: var(--rf-heading); }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--rf-text) 50%),
                    linear-gradient(135deg, var(--rf-text) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}

.input-prefix { position: relative; }
.input-prefix > span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 17px; color: var(--rf-text);
}
.input-prefix .input { padding-left: 36px; }

/* Once-off / Monthly toggle: two square outlined segments, gold fill when selected.
   The radios stay in the DOM so it works without JS. */
.segmented { display: grid; grid-template-columns: 1fr 1fr; }
.segmented__option { position: relative; display: block; cursor: pointer; }
.segmented__option input {
  position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.segmented__option span {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 8px 10px;
  border: 1px solid var(--rf-heading); background: var(--rf-white); color: var(--rf-heading);
  /* 19px bold keeps white-on-gold (3.1:1) within WCAG AA "large text". */
  font-family: var(--rf-font-display); font-weight: 700; font-size: 19px;
}
.segmented__option + .segmented__option span { border-left-width: 0; }
.segmented__option:hover span { background: var(--rf-input-bg); }
.segmented__option input:checked + span {
  background: var(--rf-gold); border-color: var(--rf-gold); color: var(--rf-white);
}
.segmented__option input:focus-visible + span {
  outline: 3px solid var(--rf-gold); outline-offset: 3px; position: relative; z-index: 1;
}

.field--check { display: flex; gap: 14px; align-items: flex-start; }
.field--check input { flex: none; width: 22px; height: 22px; margin: 4px 0 0; accent-color: var(--rf-gold); }
.field--check label { font-size: 16px; line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 14px 28px;
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
  font-family: var(--rf-font-body); text-transform: uppercase;
}
.btn--primary {
  background: var(--rf-gold); color: var(--rf-white);
  /* 19px / 700 so white on gold passes WCAG AA as large text. */
  font-size: 19px; font-weight: 700; letter-spacing: 0.15em;
}
.btn--primary:hover { background: var(--rf-gold-hover); }
.btn--primary:disabled { cursor: not-allowed; opacity: 0.6; }
.btn--block { display: flex; width: 100%; }

.form-note { margin: 14px 0 0; font-size: 15px; text-align: center; color: #595959; }

/* --- EFT ------------------------------------------------------------------- */
.eft-intro { margin: -8px 0 24px; text-align: center; }

/* Square, bordered card in the site's style: no rounded corners, no shadow. */
.bank-card { border: 1px solid var(--rf-heading); background: var(--rf-white); }
.bank-card::before { content: ""; display: block; height: 4px; background: var(--rf-gold); }
.bank-details { margin: 0; padding: 8px 24px 12px; }
.bank-details__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  padding: 14px 0; border-bottom: 1px solid #e3e3e3;
}
.bank-details__row:last-child { border-bottom: 0; }
.bank-details dt { font-weight: 500; font-size: 16px; color: #595959; }
.bank-details__note { display: block; font-weight: 400; font-size: 13px; line-height: 1.3; }
.bank-details dd { margin: 0; display: flex; align-items: center; gap: 12px; }
.bank-details__value { font-weight: 600; font-size: 18px; color: var(--rf-text); letter-spacing: 0.02em; }
.bank-details__row--primary .bank-details__value {
  font-family: var(--rf-font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.06em;
}
.copy-btn {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--rf-heading); border-radius: 0;
  background: var(--rf-white); color: var(--rf-heading); cursor: pointer;
  font-family: var(--rf-font-body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.copy-btn:hover { background: var(--rf-input-bg); }
.copy-btn.is-copied { background: var(--rf-heading); color: var(--rf-white); }
@media (max-width: 479px) {
  .bank-details { padding: 4px 16px 8px; }
  .bank-details__row { flex-direction: column; align-items: flex-start; }
}

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--rf-footer); color: var(--rf-white); }
.site-footer__inner {
  max-width: 1100px; margin: 0 auto; padding: 64px var(--gutter) 48px; text-align: center;
}
.taglines { list-style: none; margin: 0 0 32px; padding: 0; font-size: 17px; line-height: 1.7; }
.taglines li + li { margin-top: 8px; }
.taglines strong {
  font-family: var(--rf-font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.social { list-style: none; display: flex; justify-content: center; gap: 12px; margin: 0 0 28px; padding: 0; }
.social a {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  color: var(--rf-white);
}
.social a:hover { color: var(--rf-gold); }
.site-footer__small { margin: 0; font-size: 14px; color: #cfcfcf; }
.site-footer__small a { color: var(--rf-white); }

/* --- Errors ---------------------------------------------------------------- */
/* #b00020 on white is 7.1:1. */
.error-summary {
  margin: 0 0 32px; padding: 20px 24px;
  border: 3px solid #b00020; background: var(--rf-white);
}
.error-summary:focus { outline: 3px solid var(--rf-gold); outline-offset: 3px; }
.error-summary__title { margin: 0 0 8px; font-weight: 600; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: #b00020; font-weight: 500; }
.field__error { margin: 0 0 8px; color: #b00020; font-weight: 500; font-size: 15px; line-height: 1.4; }
.field--error .input { border: 2px solid #b00020; }
.field--check .field__error { margin-top: 6px; }

/* --- Message pages (redirect / return / cancel) ------------------------------ */
.section--message { padding-bottom: 88px; min-height: 50vh; }
.message { text-align: center; }
.message .btn { margin-top: 12px; }
