/* ==========================================================================
   FAITH PAC site styles
   Tokens first, then base, layout, components, pages.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  --navy: #14213d;
  --navy-deep: #0d1730;
  --navy-soft: #26365c;
  --red: #b3261e;
  --red-deep: #8c1c15;
  --gold: #c9a227;
  --cream: #f6f1e7;
  --paper: #fffdf9;
  --ink: #1b1b1b;
  --ink-soft: #4d4d4d;
  --line: #e3dccd;
  --white: #ffffff;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.4rem, 1.8rem + 3.2vw, 4.2rem);

  --container: 74rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(3rem, 8vw, 6rem);
  --header-h: 4.5rem;
  --ease-reveal: cubic-bezier(0.165, 0.84, 0.44, 1);
  --radius: 6px;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.12);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal][data-reveal-ready]:not([data-reveal-done]) .word { opacity: 1; transform: none; }
  [data-rise][data-rise-ready]:not([data-rise-done]) > * { opacity: 1; transform: none; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

ul { padding-left: 1.2em; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* Buttons ---------------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.7em 1.4em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button--large { padding: 0.9em 1.8em; font-size: var(--step-0); }
.button--primary { background: var(--red); color: var(--white); border-color: var(--red); }
.button--primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--white); }
.button--secondary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.button--secondary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.button--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.button--outline:hover { background: var(--navy); color: var(--white); }
.button--ghost { background: rgba(255, 255, 255, 0.12); color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.button--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Header ----------------------------------------------------------------- */
/* The header lays over the top of every page (each page opens on a dark
   photograph or band). With scripting on it starts transparent and turns
   solid once the page has moved; with scripting off it is always solid. */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.js .site-header[data-scrolled="false"] {
  background: transparent;
  border-bottom-color: transparent;
  color: var(--white);
}
/* A page whose photo is light at the top asks for dark menu text until the
   header turns solid: set headerTone: dark in its front matter. */
@media (min-width: 52em) { .js .header-dark .site-header[data-scrolled="false"] .site-nav { color: var(--navy); } }
.nav-open .site-header {
  background: var(--paper) !important;
  border-bottom-color: var(--line) !important;
  color: var(--navy) !important;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.brand__logo { width: 3rem; height: 3rem; object-fit: contain; background: var(--white); border-radius: var(--radius); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; }
.brand__long { font-size: 0.72rem; opacity: 0.85; letter-spacing: 0.02em; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.5rem; }
.site-nav__list a:not(.button) {
  font-weight: 600; color: inherit; text-decoration: none;
  padding: 0.25rem 0; border-bottom: 2px solid transparent;
}
.site-nav__list a:not(.button):hover,
.site-nav__list a:not(.button)[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  background: none; border: 2px solid currentColor; border-radius: var(--radius);
  padding: 0.4rem 0.7rem; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav-toggle__bars span { display: block; width: 18px; height: 2px; background: currentColor; }

@media (max-width: 52em) {
  .brand__long { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); color: var(--navy); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav__list li { border-top: 1px solid var(--line); }
  .site-nav__list a:not(.button) { display: block; padding: 0.9rem 0; border-bottom: 0; }
  .site-nav__list a:not(.button)[aria-current="page"] { color: var(--red); }
  .site-nav__cta { padding-top: 0.75rem; border-top: 0 !important; }
  .site-nav__cta .button { display: block; text-align: center; }
}

/* Sections --------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--alt { background: var(--cream); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a:not(.button) { color: var(--gold); }
.section--cta { background: var(--cream); border-top: 1px solid var(--line); }
.section__intro { max-width: 46rem; margin-bottom: 2.5rem; }
.section__intro--center { margin-inline: auto; text-align: center; }
.section__intro p { font-size: var(--step-1); line-height: 1.5; }

.page-header {
  background: var(--navy); color: var(--white);
  padding-block: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) clamp(2.5rem, 6vw, 4.5rem);
}
.page-header--tall { padding-block: calc(var(--header-h) + clamp(4rem, 10vw, 7rem)) clamp(3rem, 7vw, 5rem); }
.page-header--photo { position: relative; isolation: isolate; overflow: hidden; padding-block: calc(var(--header-h) + clamp(4rem, 10vw, 7rem)) clamp(3rem, 7vw, 5rem); }
.page-header__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 65%; z-index: -2; }
/* Strongest along the bottom where the lead line sits, fading to nothing
   two thirds of the way up; the top third of the photo is untouched. */
.page-header__scrim { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(13, 23, 48, 0.78) 0%, rgba(13, 23, 48, 0.45) 33%, rgba(13, 23, 48, 0) 67%); }
.page-header--photo h1, .page-header--photo .page-header__lead { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.page-header h1 { color: var(--white); max-width: 22ch; }
.page-header__kicker,
.hero__kicker {
  margin: 0 0 0.75rem; font-size: var(--step--1); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.page-header__lead { font-size: var(--step-1); max-width: 40rem; opacity: 0.92; }
.page-header a:not(.button) { color: var(--gold); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  display: grid; align-items: end;
  min-height: min(82vh, 46rem);
  color: var(--white);
}
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; z-index: -2;
  animation: drift 70s ease-in-out infinite alternate; transform-origin: 65% 40%; }
@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.07) translate(-1.5%, 1%); }
}
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13, 23, 48, 0.25) 0%, rgba(13, 23, 48, 0.55) 55%, rgba(13, 23, 48, 0.9) 100%);
}
.hero__content { padding-block: clamp(3rem, 8vw, 5rem); max-width: 50rem; }
.hero__title { color: var(--white); font-size: var(--step-4); max-width: 18ch; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); }
.hero__lead { font-family: var(--font-serif); font-size: var(--step-2); font-style: italic; margin-top: 0.5rem; }

/* Split media/text ------------------------------------------------------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 52em) {
  .split { grid-template-columns: 1.1fr 1fr; }
  .split--wide { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .split--reverse .split__text { order: 2; }
}
.split__media { margin: 0; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split__text .button { margin-top: 0.75rem; }

/* Pillars ---------------------------------------------------------------- */
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 48em) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  padding: 1.75rem; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}
.pillar h3 { margin-bottom: 0.4rem; }
.pillar p { color: rgba(255, 255, 255, 0.85); }

/* Social links ------------------------------------------------------------ */
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.button--icon { display: inline-flex; align-items: center; gap: 0.55em; }
.link--icon { display: inline-flex; align-items: center; gap: 0.5em; }
.social-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.social-row--left { justify-content: flex-start; }

/* CTA -------------------------------------------------------------------- */
.cta { text-align: center; max-width: 48rem; }
.cta h2 { margin-bottom: 0.5rem; }
.cta .button { margin-top: 1.25rem; }

/* Prose ------------------------------------------------------------------ */
.prose { max-width: 70ch; }
.prose--narrow { max-width: 62ch; }
.prose h2 { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

.pullquote { margin: 0 auto; max-width: 52rem; text-align: center; }
.pullquote p { font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.35; font-style: italic; }

/* Donate ----------------------------------------------------------------- */
.donate-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 56em) { .donate-layout { grid-template-columns: 1.4fr 1fr; } }
.donate-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); }
.donate-fallback h2 { font-size: var(--step-2); }
.donate-fallback__email { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-soft); }
.donate-notes { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; }
.donate-notes h2 { font-size: var(--step-1); }

.faq { border-top: 1px solid var(--line); padding: 0.25rem 0; }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 0.9rem 0; font-family: var(--font-serif);
  font-weight: 600; font-size: var(--step-1); color: var(--navy); list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5em; line-height: 1; color: var(--red); flex-shrink: 0; }
.faq[open] summary::after { content: "–"; }
.faq__body { padding-bottom: 1rem; }

/* Team ------------------------------------------------------------------- */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.team-card { text-align: center; padding: 2rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.team-card__avatar {
  width: 5.5rem; height: 5.5rem; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--gold);
  font-family: var(--font-serif); font-size: 2rem; font-weight: 700;
}
.team-card__role { font-size: var(--step-1); margin-bottom: 0.25rem; }
.team-card__name { color: var(--ink-soft); }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.card h2 { font-size: var(--step-1); }
.embed-frame { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.embed-frame iframe { display: block; width: 100%; min-height: 800px; border: 0; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.85); padding-block: 3rem 2rem; margin-top: 0; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--gold); }
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 48em) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-footer__brand { font-family: var(--font-serif); font-size: var(--step-1); font-weight: 700; color: var(--white); margin-bottom: 0.25rem; }
.site-footer__long { font-size: var(--step--1); opacity: 0.8; }
.site-footer__heading { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; color: var(--gold); margin-bottom: 0.75rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: 0.4rem; }
.site-footer__links a { text-decoration: none; }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: var(--step--1); opacity: 0.85; }
.site-footer__disclaimer { font-weight: 700; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.35); display: inline-block; padding: 0.35rem 0.75rem; border-radius: var(--radius); }

/* Motion ----------------------------------------------------------------- */
/* Headings marked data-reveal are split into words by site.js and rise in
   one at a time. Until the script marks a heading done, its words are held
   hidden here; the script itself animates them. */
[data-reveal] .word { display: inline-block; will-change: transform, opacity; }
[data-reveal][data-reveal-ready]:not([data-reveal-done]) .word { opacity: 0; transform: translateY(0.55em); }

/* Blocks marked data-rise: the children are held down and hidden until the
   script lifts them in one by one. */
[data-rise] > * { will-change: transform, opacity; }
[data-rise][data-rise-ready]:not([data-rise-done]) > * { opacity: 0; transform: translateY(28px); }

/* Scenes: a section with a photograph behind its words -------------------- */
.scene {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy-deep); color: var(--white);
  padding-block: clamp(4rem, 10vw, 7rem);
}
.scene__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.45; }
.scene__scrim { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(13, 23, 48, 0.92) 0%, rgba(13, 23, 48, 0.7) 55%, rgba(13, 23, 48, 0.5) 100%); }
.scene h2, .scene h3 { color: var(--white); }
.scene__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 52em) { .scene__grid { grid-template-columns: 1fr 1.1fr; } }
.scene__lead {
  font-family: var(--font-serif); font-style: italic; font-size: var(--step-2); line-height: 1.35; color: var(--cream);
}
.scene__body { color: var(--cream); }
.scene__body p { margin-bottom: 1em; }
.kicker {
  margin: 0 0 0.75rem; font-size: var(--step--1); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--red);
}
.scene .kicker, .section--navy .kicker { color: var(--gold); }

/* Core values ----------------------------------------------------------- */
.values-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 56em) { .values-layout { grid-template-columns: 20rem 1fr; } }
.values { list-style: none; margin: 0; padding: 0; }
.values li {
  display: grid; gap: 0.4rem 1.25rem; padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.values li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 40em) { .values li { grid-template-columns: 3rem 14rem 1fr; align-items: start; } }
.values__index { font-family: var(--font-serif); font-size: var(--step-1); color: var(--red); }
.values__title { font-family: var(--font-serif); font-weight: 600; font-size: var(--step-1); color: var(--navy); }
.values__text { color: var(--ink); }

/* Officers ------------------------------------------------------------- */
.officers { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40em) { .officers { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64em) { .officers { grid-template-columns: repeat(5, 1fr); } }
.officers .team-card { padding: 2rem 1.25rem; }
.hero .scene__media, .page-header--photo .scene__media { opacity: 1; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.team-card__bio { font-size: var(--step--1); color: var(--ink-soft); }
