/* =============================================================
   Freedom Alliance — Planned Giving Microsite
   Brand values extracted from freedomalliance.org (live site):
     red        #8c0000   headings, accents, donate button
     red hover  #b10707
     navy       #202f65   sub-nav, rules
     navy deep  #022040   footer background
     navy btn   #00226a   primary button (theme "Button Font" rule)
     steel      #a3b1c1   footer body text
     ink        #0a0a0a   body text (theme app.css)
   Fonts (live site theme customizer):
     body      'Work Sans'
     headings  'Barlow Condensed', 500, letter-spacing 2px
     buttons   'Montserrat', 600, letter-spacing 1px
   Base size raised 16px -> 18px for a 60+ donor audience.
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --fa-red:        #8c0000;
  --fa-red-hover:  #b10707;
  --fa-navy:       #202f65;
  --fa-navy-deep:  #022040;
  --fa-navy-btn:   #00226a;
  --fa-steel:      #a3b1c1;
  --fa-ink:        #0a0a0a;
  --fa-ink-soft:   #3a3a3a;
  --fa-bg:         #ffffff;
  --fa-bg-alt:     #f4f6f9;
  --fa-rule:       #d8dee7;

  --font-body: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-head: 'Barlow Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-btn:  'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --measure: 70ch;
  --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--fa-bg);
  color: var(--fa-ink);
  font-family: var(--font-body);
  font-size: 1rem;              /* = 18px at the 112.5% root */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--fa-red);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.3rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.7rem); letter-spacing: 1px; }
/* h4 is a small label — Work Sans keeps short strings legible at size */
h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--fa-navy);
  text-transform: none;
}
p { margin: 0 0 1.1em; }
p, li { max-width: var(--measure); }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .5em; }
strong { font-weight: 600; }

/* ---------- Links & focus ---------- */
a { color: var(--fa-red); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--fa-red-hover); }
:focus-visible {
  outline: 3px solid var(--fa-navy-btn);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On dark grounds the navy ring would vanish — switch to white */
.site-footer :focus-visible,
.subnav :focus-visible,
.hero :focus-visible,
.callbar :focus-visible { outline-color: #ffffff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--fa-navy-btn); color: #fff;
  padding: .8rem 1.3rem; font-family: var(--font-btn); font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section--alt { background: var(--fa-bg-alt); }
.section--tight { padding: 2.5rem 0; }
.prose { max-width: var(--measure); }
/* When .prose sits directly on .wrap, keep the wrap full width and constrain
   the children instead — otherwise the 70ch cap plus the wrap's auto margins
   centre the column and it stops lining up with the rest of the page. */
.wrap.prose { max-width: var(--wrap); }
.wrap.prose > * { max-width: var(--measure); }
.lede { font-size: 1.16rem; line-height: 1.6; color: var(--fa-ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-btn);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 1rem;
  line-height: 1.3;
  padding: .95rem 1.9rem;
  border: 2px solid var(--fa-navy-btn);
  background: var(--fa-navy-btn);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: #fff; color: var(--fa-navy-btn); border-color: var(--fa-navy-btn); }
.btn--red { background: var(--fa-red); border-color: var(--fa-red); color: #fff; }
.btn--red:hover { background: #fff; color: var(--fa-red); border-color: var(--fa-red); }
.btn--ghost-light { background: transparent; border-color: #fff; color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--fa-red); border-color: #fff; }
.btn--sm { padding: .6rem 1.15rem; font-size: .86rem; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--fa-rule); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .85rem; padding-bottom: .85rem;
}
.site-header__logo { display: block; flex: 0 0 auto; }
.site-header__logo img { width: 74px; height: auto; }
.site-header__right { display: flex; align-items: center; gap: 1.25rem; }
.site-header__back {
  font-family: var(--font-btn); font-weight: 600; font-size: .82rem; letter-spacing: .5px;
  color: var(--fa-navy-btn); text-decoration: none;
}
.site-header__back:hover { color: var(--fa-red); text-decoration: underline; }
.site-header__title {
  font-family: var(--font-head); letter-spacing: 2px; font-size: 1.15rem;
  color: var(--fa-navy); margin: 0; line-height: 1.1;
}
.site-header__titlewrap { display: none; }
@media (min-width: 900px) { .site-header__titlewrap { display: block; } }

/* ---------- Sub-nav ---------- */
.subnav { background: var(--fa-navy); }
.subnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0;
}
.subnav li { margin: 0; max-width: none; }
.subnav a {
  display: block;
  font-family: var(--font-btn); font-weight: 600; font-size: .84rem; letter-spacing: .6px;
  color: #fff; text-decoration: none;
  padding: .95rem 1.15rem;
  border-bottom: 4px solid transparent;
}
.subnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.subnav a[aria-current="page"] { border-bottom-color: #fff; background: rgba(255,255,255,.10); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--fa-navy-deep);
  /* Base declaration: JPEG for older browsers. */
  background-image: linear-gradient(rgba(2,32,64,.72), rgba(2,32,64,.72)), url('../img/hero.jpg');
  /* Progressive enhancement: image-set() serves WebP where supported.
     Browsers that don't understand image-set() discard this whole
     declaration and keep the JPEG above. No JavaScript involved. */
  background-image:
    linear-gradient(rgba(2,32,64,.72), rgba(2,32,64,.72)),
    -webkit-image-set(url('../img/hero.webp') type('image/webp'), url('../img/hero.jpg') type('image/jpeg'));
  background-image:
    linear-gradient(rgba(2,32,64,.72), rgba(2,32,64,.72)),
    image-set(url('../img/hero.webp') type('image/webp'), url('../img/hero.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center 38%;
  color: #fff;
}
/* Phones get the 900px-wide crop (6 KB WebP) instead of the 1800px one. */
@media (max-width: 719px) {
  .hero {
    background-image: linear-gradient(rgba(2,32,64,.72), rgba(2,32,64,.72)), url('../img/hero-sm.jpg');
    background-image:
      linear-gradient(rgba(2,32,64,.72), rgba(2,32,64,.72)),
      image-set(url('../img/hero-sm.webp') type('image/webp'), url('../img/hero-sm.jpg') type('image/jpeg'));
  }
}
.hero__inner { padding: 4.5rem 0; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero p { color: #eef2f7; }
.hero .lede { color: #e8edf4; font-size: 1.22rem; max-width: 46ch; }
.hero__actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.pagehead { background: var(--fa-navy-deep); color: #fff; }
.pagehead__inner { padding: 2.8rem 0; }
.pagehead h1 { color: #fff; margin-bottom: .3em; }
.pagehead p { color: #dbe3ec; max-width: 62ch; margin: 0; }

/* ---------- Cards ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards li { margin: 0; max-width: none; }
.card {
  height: 100%;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--fa-rule);
  border-top: 5px solid var(--fa-red);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.card h3 { margin-bottom: .4em; }
.card p { max-width: none; }
.card__more { margin-top: auto; padding-top: .6rem; font-weight: 600; }

/* ---------- Reassurance / callout ---------- */
.callout {
  border-left: 6px solid var(--fa-red);
  background: var(--fa-bg-alt);
  padding: 1.6rem 1.75rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout h2, .callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Contact strip ---------- */
.contactstrip { background: var(--fa-navy-deep); color: #fff; }
.contactstrip__inner { padding: 2.75rem 0; }
.contactstrip h2 { color: #fff; margin-bottom: .35em; }
.contactstrip p { color: #dbe3ec; }
.contactstrip a { color: #fff; text-decoration: underline; }
.contactstrip a:hover { color: var(--fa-steel); }
.contactstrip__grid { display: grid; gap: 1.5rem; }
@media (min-width: 780px) { .contactstrip__grid { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.contactstrip__lines { font-size: 1.1rem; line-height: 1.9; margin: 0; }
.contactstrip__lines strong { display: block; font-size: 1.15rem; }

/* ---------- Gift sections (ways-to-give) ---------- */
.gift {
  border-top: 3px solid var(--fa-navy);
  padding-top: 2rem;
  margin-top: 3rem;
}
.gift:first-of-type { margin-top: 1rem; }
.gift__num {
  display: inline-block;
  font-family: var(--font-btn); font-weight: 600; font-size: .8rem; letter-spacing: 1.5px;
  color: #fff; background: var(--fa-navy); padding: .3rem .75rem; border-radius: 2px;
  margin-bottom: .9rem;
}
.gift h2 { margin-bottom: .35em; }
.gift__cols { display: grid; gap: 1.75rem; }
@media (min-width: 860px) { .gift__cols { grid-template-columns: 1fr 1fr; } }
.gift__block h4 { margin-bottom: .5em; }
.gift__next {
  margin-top: 1.4rem; padding: 1.1rem 1.3rem;
  background: var(--fa-bg-alt); border-radius: var(--radius);
}
.gift__next p { margin: 0; max-width: none; }

/* ---------- Bequest language card ---------- */
.bequest {
  margin: 2.5rem 0;
  border: 3px solid var(--fa-navy);
  border-radius: var(--radius);
  background: #fff;
}
.bequest__head {
  background: var(--fa-navy); color: #fff;
  padding: 1rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.bequest__head h3 { color: #fff; margin: 0; font-size: 1.35rem; }
.bequest__body { padding: 1.75rem 1.5rem; }
.bequest__text {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: none;
  border-left: 5px solid var(--fa-red);
  padding-left: 1.25rem;
}
.bequest__note { margin: 1.25rem 0 0; font-size: .95rem; color: var(--fa-ink-soft); }
.copybtn { white-space: nowrap; }
.copy-status { font-size: .95rem; font-weight: 600; color: var(--fa-navy); margin: .9rem 0 0; }
.copy-status:empty { margin: 0; }
/* "How it works" / "Why donors choose this" are h3 for correct heading order,
   but they read as small labels, so they take the h4 treatment. */
.gift__block > h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--fa-navy);
}
.quickref h2 { margin-top: 0; font-size: clamp(1.4rem, 2.4vw, 1.7rem); letter-spacing: 1px; }

/* ---------- Quick reference box ---------- */
.quickref {
  border: 2px dashed var(--fa-navy);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  background: var(--fa-bg-alt);
}
.quickref h3 { margin-top: 0; }
.quickref dl { margin: 0; display: grid; gap: .35rem 1.5rem; }
@media (min-width: 620px) { .quickref dl { grid-template-columns: auto 1fr; } }
.quickref dt { font-weight: 600; color: var(--fa-navy); }
.quickref dd { margin: 0 0 .75rem; }
@media (min-width: 620px) { .quickref dd { margin-bottom: .35rem; } }

/* ---------- Placeholder markers ---------- */
.ph {
  background: #fff3cd;
  border-bottom: 2px dotted #8a6d00;
  padding: 0 .2em;
  font-weight: 600;
  color: #5a4700;
}

/* ---------- FAQ accordion ---------- */
.faq { max-width: 78ch; }
.faq details {
  border: 1px solid var(--fa-rule);
  border-radius: var(--radius);
  margin-bottom: .85rem;
  background: #fff;
}
.faq details[open] { border-color: var(--fa-navy); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 3rem 1.1rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--fa-navy);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.7rem; line-height: 1; font-weight: 400; color: var(--fa-red);
}
.faq details[open] summary::after { content: "\2013"; }
.faq summary:hover { background: var(--fa-bg-alt); }
.faq .faq__body { padding: 0 1.35rem 1.2rem; }
.faq .faq__body p:last-child, .faq .faq__body ul:last-child { margin-bottom: 0; }

/* ---------- Forms (static fallback reference) ---------- */
.embed-slot {
  border: 2px dashed var(--fa-steel);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #fbfcfd;
  color: var(--fa-ink-soft);
}
.form-ref { max-width: 640px; }
.field { margin-bottom: 1.3rem; }
.field label, .fieldset__legend { display: block; font-weight: 600; margin-bottom: .4rem; color: var(--fa-navy); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .7rem .8rem;
  border: 2px solid #b9c2cf;
  border-radius: var(--radius);
  background: #fff;
  color: var(--fa-ink);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--fa-navy-btn); }
.field .hint { font-size: .9rem; color: var(--fa-ink-soft); margin: .35rem 0 0; }
fieldset { border: 1px solid var(--fa-rule); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.3rem; }
legend { font-weight: 600; color: var(--fa-navy); padding: 0 .4rem; }
.check { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .7rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .25rem; flex: 0 0 auto; accent-color: var(--fa-navy-btn); }
.check label { font-weight: 400; margin: 0; color: var(--fa-ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--fa-navy-deep); color: var(--fa-steel); }
.site-footer a { color: var(--fa-steel); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__cols { display: grid; gap: 2.25rem; padding: 3rem 0 2rem; }
@media (min-width: 860px) { .site-footer__cols { grid-template-columns: 220px 1fr 260px; gap: 3rem; } }
.site-footer__logo img { width: 150px; height: auto; }
.site-footer h2 { color: #f2f2f2; font-size: 1.25rem; font-weight: 400; letter-spacing: 1.5px; margin-bottom: .7em; }
.site-footer p, .site-footer li { font-size: .95rem; line-height: 1.85; max-width: none; }
.footer-menu { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.footer-menu li { margin-bottom: .3rem; break-inside: avoid; }
@media (min-width: 860px) {
  .site-footer__mid { padding: 0 2.5rem; border-left: 1px solid rgba(255,255,255,.2); border-right: 1px solid rgba(255,255,255,.2); }
}
.site-footer__contact address { font-style: normal; }

.social { list-style: none; display: flex; gap: .6rem; margin: 0; padding: 0; }
.social li { margin: 0; max-width: none; }
.social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.social a:hover { background: #fff; }
.social svg { width: 19px; height: 19px; fill: #fff; display: block; }
.social a:hover svg { fill: var(--fa-navy-deep); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.2);
  padding: 1.5rem 0 2rem;
  display: grid; gap: 1.25rem;
}
@media (min-width: 860px) { .footer-bottom { grid-template-columns: 1fr auto; align-items: center; } }
.footer-bottom p { margin: 0; font-size: .9rem; }
.footer-legal { margin-top: .4rem; }
.footer-legal a { margin-right: 1rem; }

.disclaimer {
  border-top: 1px solid rgba(255,255,255,.2);
  padding: 1.25rem 0 1.75rem;
  font-size: .88rem;
  line-height: 1.7;
  color: #93a3b5;
}
.disclaimer p { margin: 0; max-width: 92ch; }

/* ---------- Mobile sticky call bar ---------- */
.callbar { display: none; }
@media (max-width: 719px) {
  .callbar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    background: var(--fa-red);
    box-shadow: 0 -2px 10px rgba(0,0,0,.25);
  }
  .callbar a {
    display: block; text-align: center;
    padding: .9rem 1rem;
    color: #fff; text-decoration: none;
    font-family: var(--font-btn); font-weight: 600; font-size: 1rem; letter-spacing: .5px;
  }
  .callbar a:hover, .callbar a:active { background: var(--fa-red-hover); color: #fff; }
  body { padding-bottom: 3.9rem; }
}

/* ---------- Print ---------- */
@media print {
  @page { margin: 1.6cm; }
  html { font-size: 100%; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  .site-header__right, .subnav, .callbar, .hero__actions,
  .copybtn, .copy-status, .contactstrip, .social, .embed-slot,
  .skip-link, .card__more { display: none !important; }
  .hero, .pagehead {
    background: none !important; color: #000 !important;
    border-bottom: 3px solid #000; padding: 0;
  }
  .hero h1, .pagehead h1 { color: #000 !important; }
  .hero p, .hero .lede, .pagehead p { color: #000 !important; }
  .hero__inner, .pagehead__inner { padding: 0 0 1rem; }
  .site-header { border-bottom: 0; }
  .site-header__logo img { width: 60px; }
  h1, h2, h3 { color: #000 !important; page-break-after: avoid; break-after: avoid; }
  h4 { color: #000 !important; }
  .section { padding: 1rem 0; }
  .gift, .bequest, .quickref, .callout, .card {
    page-break-inside: avoid; break-inside: avoid;
  }
  .gift { border-top: 2px solid #000; }
  .bequest { border: 2px solid #000; }
  .bequest__head { background: none !important; color: #000 !important; padding: .5rem 0; border-bottom: 1px solid #000; }
  .bequest__head h3 { color: #000 !important; }
  .bequest__body { padding: 1rem 0; }
  .bequest__text { border-left: 3px solid #000; }
  .quickref { border: 2px solid #000; background: none; }
  .callout { background: none; border-left: 3px solid #000; }
  .gift__next { background: none; border: 1px solid #000; }
  .ph { background: none; font-weight: 700; }
  .site-footer { background: none !important; color: #000 !important; }
  .site-footer a { color: #000 !important; }
  .site-footer__cols { padding: 1rem 0 0; }
  .site-footer__mid, .footer-menu { display: none; }
  .site-footer__logo { display: none; }
  .disclaimer { color: #000; }
  .faq details { border: 1px solid #000; }
  .faq details > .faq__body { display: block !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
  a[href^="#"]::after, a[href^="tel"]::after, a[href^="mailto"]::after { content: ""; }
  /* The logo is an image link; printing its URL just litters the top of page 1. */
  .site-header__logo::after { content: "" !important; }
}
