/* ============================================================
   LA VIA MISSIONS — DESIGN TOKENS
   Single source of truth for color, type, spacing.
   ============================================================ */

:root {
  /* ---- Color ----
     Navy is the workhorse. Photography carries warmth.
     All non-navy values stay on a cool-neutral axis. */
  --navy-900: #15275f;   /* darkest, hover state on solid btns */
  --navy-800: #1e3a8a;   /* PRIMARY — headings, buttons, progress fills */
  --navy-700: #2a4ba0;   /* secondary navy, links */
  --navy-500: #5b78c4;   /* lighter navy used in logo wordmark */
  --navy-400: #8aa1d4;   /* tertiary, captions on tinted bg */

  --paper:    #ffffff;   /* card surface */
  --canvas:   #f7f9fc;   /* page background, hero washes */
  --canvas-2: #eef2fb;   /* tinted strip (donation CTA, quote bar) */
  --canvas-3: #e3eaf6;   /* progress track */

  --hairline: #dbe3f1;   /* card borders, dividers */
  --hairline-strong: #c3cfe6;

  --ink:        #1e3a8a; /* primary text on light */
  --ink-2:      #3e4a6a; /* body text */
  --ink-3:      #6b7591; /* meta / captions */
  --ink-4:      #98a2bd; /* placeholder */

  --heart:    #1e3a8a;   /* heart icon = navy, not red */
  --success:  #2e7d4f;   /* used sparingly for "fully funded" states */

  /* ---- Type ---- */
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-ui:      "DM Sans", "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* type scale — desktop */
  --t-display-1: clamp(40px, 5.2vw, 72px);
  --t-display-2: clamp(32px, 3.6vw, 48px);
  --t-h1:        clamp(28px, 3vw, 40px);
  --t-h2:        clamp(22px, 2.2vw, 30px);
  --t-h3:        20px;
  --t-body:      16px;
  --t-small:     14px;
  --t-meta:      13px;
  --t-eyebrow:   12px;

  /* ---- Radii ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(20, 36, 80, 0.04), 0 0 0 1px var(--hairline);
  --shadow-md: 0 4px 14px rgba(20, 36, 80, 0.06), 0 0 0 1px var(--hairline);
  --shadow-lg: 0 12px 32px rgba(20, 36, 80, 0.08);

  /* ---- Spacing scale (multiples of 4) ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* ---- Container ---- */
  --container: 1280px;
  --container-narrow: 1080px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Smooth in-page anchor scrolling (jump links, DONATE → #give, etc.).
   Sticky-header offset via scroll-padding; disabled for reduced motion. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-ui);
  color: var(--ink-2);
  background: var(--paper);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-900); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: 1.1; }
h2 { font-size: var(--t-h2); line-height: 1.15; }
h3 { font-size: var(--t-h3); line-height: 1.25; }
p  { margin: 0; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--navy-700);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--navy-800);
  color: #fff;
}
.btn--primary:hover { background: var(--navy-900); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--navy-800);
  box-shadow: inset 0 0 0 1.5px var(--navy-800);
}
.btn--outline:hover { background: var(--navy-800); color: #fff; }

.btn--ghost {
  background: var(--canvas-2);
  color: var(--navy-800);
}
.btn--ghost:hover { background: var(--canvas-3); }

.btn--block {
  width: 100%;
  padding: 13px 22px;
}

.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 16px; }

.btn .icon { width: 18px; height: 18px; flex: none; }

/* Square icon-only button (favorite, share) */
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--navy-800);
  color: var(--navy-800);
  background: transparent;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--navy-800); color: #fff; }
.icon-btn.is-active { background: var(--navy-800); color: #fff; }

/* ============================================================
   Card
   ============================================================ */
.card {
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Progress bar
   ============================================================ */
.progress {
  position: relative;
  height: 22px;
  background: var(--canvas-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--navy-800);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.progress--lg { height: 28px; }
.progress--lg .progress__fill { font-size: 13px; padding-right: 12px; }

/* ============================================================
   Location pill (overlay on imagery)
   ============================================================ */
.pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(4px);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 36, 80, 0.12);
}
.pin svg { width: 14px; height: 14px; color: var(--navy-800); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Lightly frosted at the top of the page; solidifies on scroll (JS adds .is-scrolled). */
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 4px 18px rgba(20,36,80,0.06);
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-800);
}
/* Brand sizing — wordmark dominant, compass stays modest. */
.site-header .brand svg { width: 44px; height: 44px; }
.site-header .brand img { height: 50px; width: auto; }
.brand__wordmark {
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--navy-700);
}
.brand__wordmark .top {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
  display: block;
}
.brand__wordmark .bottom {
  font-size: 9px; letter-spacing: 0.34em;
  font-weight: 500;
  display: block;
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid var(--navy-500);
  color: var(--navy-500);
}

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-700);
  padding: 6px 2px;
  position: relative;
}
/* Donate button inside the nav: explicit white text so .nav a's navy
   color doesn't override .btn--primary's intended white.
   Extra horizontal padding so the pill comfortably fits "DONATE ♥". */
.nav a.btn--primary,
.nav a.btn--primary:hover {
  color: #fff;
  padding: 13px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.nav a.btn--primary::after { display: none; }
.nav a:hover { color: var(--navy-900); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--navy-800);
}
.nav .dropdown { position: relative; }
/* Invisible bridge that extends the hover hit area through the gap between
   the trigger and the menu, so the menu doesn't close when the cursor
   crosses the gap. */
.nav .dropdown::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 280px;
  height: 16px;
}
.nav .dropdown__menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--hairline);
  padding: 8px;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.nav .dropdown:hover .dropdown__menu,
.nav .dropdown:focus-within .dropdown__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav .dropdown__menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.nav .dropdown__menu a:hover { background: var(--canvas-2); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--canvas-2);
  border-top: 1px solid var(--hairline);
  padding: 48px var(--gutter) 32px;
  color: var(--ink-3);
  font-size: 14px;
}
.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
}
.site-footer h4 {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin-bottom: 12px;
  font-weight: 600;
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--navy-800); }
.site-footer__bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
}
.socials { display: inline-flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--navy-800);
  box-shadow: 0 0 0 1px var(--hairline);
}
.socials a:hover { background: var(--navy-800); color: #fff; }

@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; align-items: center; }

/* Donation strip (page-bottom CTA) */
.donate-strip {
  background: var(--canvas-2);
  border-radius: var(--r-md);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.donate-strip__icon {
  width: 56px; height: 56px;
  flex: none;
  color: var(--navy-800);
}
.donate-strip__copy { flex: 1; }
.donate-strip__copy h3 {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.donate-strip__copy p { color: var(--ink-3); font-size: 14px; }

/* ============================================================
   Photo placeholder (striped, monospace label)
   For slots awaiting real photography.
   ============================================================ */
.photo-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--canvas-2) 0,
      var(--canvas-2) 12px,
      var(--canvas-3) 12px,
      var(--canvas-3) 24px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-500);
  position: relative;
}
.photo-placeholder__inner {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(20,36,80,0.06);
}
.photo-placeholder__inner svg { width: 14px; height: 14px; color: var(--navy-500); }

/* ============================================================
   Impact band — "by the numbers" strip
   ============================================================ */
.impact-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.impact-band__cell {
  padding: 28px var(--s-5);
  text-align: center;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.impact-band__cell:last-child { border-right: 0; }
.impact-band__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  color: var(--navy-800);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.impact-band__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
@media (max-width: 720px) {
  .impact-band__cell { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .impact-band__cell:last-child { border-bottom: 0; }
}

/* ============================================================
   Quick-give chips + monthly toggle (donate strip enhancement)
   ============================================================ */
.give-block { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.give-toggle {
  display: inline-flex;
  background: var(--canvas-3);
  border-radius: var(--r-pill);
  padding: 4px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
}
.give-toggle button {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  color: var(--ink-3);
  transition: background .2s, color .2s;
  font-family: inherit;
}
.give-toggle button.is-active {
  background: var(--paper);
  color: var(--navy-800);
  box-shadow: 0 1px 3px rgba(20,36,80,0.08);
}
.give-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.give-chips button {
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
  color: var(--navy-800);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  transition: background .15s, color .15s, box-shadow .15s;
}
.give-chips button:hover { box-shadow: inset 0 0 0 1.5px var(--navy-800); }
.give-chips button.is-active {
  background: var(--navy-800);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--navy-800);
}
.give-impact {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.4;
}
.give-impact strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Trust badge row
   ============================================================ */
.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 32px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 8px;
}
.trust-badge__icon {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--canvas-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-800);
}
.trust-badge__icon svg { width: 22px; height: 22px; }
.trust-badge__copy { line-height: 1.3; }
.trust-badge__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.trust-badge__sub {
  font-size: 12px;
  color: var(--ink-3);
}

/* ============================================================
   Donor activity strip (live-feel)
   ============================================================ */
.donor-feed {
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.donor-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.donor-feed__pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2e7d4f;
  display: inline-block;
  margin-right: 6px;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(46,125,79,0.6);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,125,79,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(46,125,79,0); }
}
.donor-feed__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.donor-feed__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--canvas-2);
  color: var(--navy-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex: none;
}
.donor-feed__name { color: var(--ink); font-weight: 500; }
.donor-feed__amt  { color: var(--navy-700); font-weight: 600; }
.donor-feed__time { color: var(--ink-3); font-size: 12px; margin-left: auto; flex: none; }

/* Eyebrow with icon (program label) */
.program-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--navy-800);
}
.program-eyebrow svg { width: 56px; height: 56px; flex: none; }
.program-eyebrow .label {
  font-family: var(--font-display);
  color: var(--navy-800);
  line-height: 1;
}
.program-eyebrow .label .top {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--navy-500);
  display: block;
  margin-bottom: 6px;
}
.program-eyebrow .label .bottom {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ============================================================
   Mobile top bar (≤760px): hamburger + drop panel
   ============================================================ */
.nav__toggle { display: none; }
.nav__panel { display: none; }

@media (max-width: 760px) {
  .site-header__inner {
    gap: 10px;
    padding: 10px 16px;
  }
  .site-header .brand svg { width: 36px; height: 36px; }
  .brand__wordmark .top {
    font-size: 17px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .brand__wordmark .bottom {
    font-size: 8px;
    letter-spacing: 0.28em;
    white-space: nowrap;
  }

  /* Hide desktop nav children except DONATE */
  .nav > a:not(.btn--primary),
  .nav > .dropdown { display: none; }

  .nav { gap: 8px; }

  /* Shrink DONATE so it fits next to the hamburger */
  .nav a.btn--primary {
    padding: 10px 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hairline);
    background: transparent;
    border-radius: var(--r-sm);
    color: var(--navy-800);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }
  .nav__toggle svg { width: 22px; height: 22px; }
  .nav__toggle:focus-visible {
    outline: 2px solid var(--navy-500);
    outline-offset: 2px;
  }

  .nav__panel {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 12px 24px rgba(15,23,42,0.08);
    padding: 8px 16px 18px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .nav.is-open .nav__panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__panel a {
    display: block;
    padding: 14px 8px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy-700);
    border-bottom: 1px solid var(--hairline);
    text-decoration: none;
  }
  .nav__panel a:last-child { border-bottom: none; }
  .nav__panel a:hover,
  .nav__panel a:active { color: var(--navy-900); }
  .nav__panel .nav__group-label {
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy-500);
    padding: 16px 8px 4px;
  }
  .nav__panel a.is-sub {
    font-size: 13px;
    padding-left: 22px;
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 500;
    color: var(--ink);
  }
}
