/* ==========================================================================
   Dollar Foundation
   Plain CSS, no build. Design tokens first.
   ========================================================================== */
:root {
  /* Sampled from the foundation's logo (assets/dollar-foundation-logo.jpg). */
  --navy-900: #0a0f5c;   /* deepened logo navy — header, footer, dark bands */
  --navy-700: #0b14a0;   /* logo navy — the ring, lettering and centre figure */
  --navy-500: #2f3bc4;
  --sky:      #00a0f0;   /* logo blue figure — decorative only on white */
  --sky-ink:  #00679c;   /* the blue, darkened to pass contrast as text */
  --lime:     #70d000;   /* logo green figure — decorative, or with navy text */
  --lime-ink: #2f6f00;   /* the green, darkened to pass contrast as text */
  --lime-lt:  #eaf8d6;
  --sky-lt:   #e1f4fd;
  --canvas:   #f6f8fc;
  --paper:    #ffffff;
  --ink:      #141833;
  --ink-soft: #4a4f6e;
  --rule:     #d9deec;

  --radius: 12px;
  --max: 70rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy-900);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

a { color: var(--navy-700); text-underline-offset: .18em; }
a:hover { color: var(--sky-ink); }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

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

/* The three figures from the logo, as a thin stripe under the header. */
.brand-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--lime) 0 33.3%, var(--navy-700) 33.3% 66.6%, var(--sky) 66.6% 100%);
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.75rem;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  color: var(--navy-700); text-decoration: none;
}
.brand:hover { color: var(--navy-700); }
.brand-logo { width: 3.5rem; height: 3.5rem; flex: none; border-radius: 50%; }
/* Bold capitals, echoing the lettering around the logo. */
.brand-name { font-weight: 900; font-size: 1.05rem; line-height: 1.1; letter-spacing: .06em; text-transform: uppercase; }
.brand-name small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft); }

.nav-toggle {
  display: none;
  background: transparent; color: var(--navy-700);
  border: 2px solid var(--navy-700); border-radius: var(--radius);
  padding: .45rem .8rem; font: inherit; font-weight: 700; cursor: pointer;
}

#primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
#primary-nav a {
  display: block; color: var(--ink); text-decoration: none; font-weight: 600;
  padding: .55rem .75rem; border-radius: 8px;
}
#primary-nav a:hover { background: var(--sky-lt); color: var(--navy-700); }
#primary-nav a[aria-current="page"] { color: var(--navy-700); box-shadow: inset 0 -3px 0 var(--lime); border-radius: 0; }
#primary-nav .nav-donate { background: var(--navy-700); color: #fff; margin-left: .4rem; border-radius: 999px; padding-inline: 1.1rem; }
#primary-nav .nav-donate:hover { background: var(--navy-900); color: #fff; }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-block; }
  #primary-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); box-shadow: 0 8px 16px rgba(10,15,92,.12);
  }
  #primary-nav.is-open { display: block; }
  #primary-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; }
  #primary-nav a { padding: .85rem .5rem; }
  #primary-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--lime); padding-left: 1rem; }
  #primary-nav .nav-donate { margin: .5rem 0 0; text-align: center; }
}
@media (max-width: 24rem) {
  .brand-name small { display: none; }
}
/* Without JS the menu must still be reachable. */
.no-js .nav-toggle { display: none; }
.no-js #primary-nav { display: block; position: static; box-shadow: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-900); color: #fff; }
.btn-lime { background: var(--lime); color: var(--navy-900); }
.btn-lime:hover { background: #88e21c; color: var(--navy-900); }
.btn-ghost { border-color: currentColor; color: var(--navy-700); background: transparent; }
.btn-ghost:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.on-dark .btn-ghost { color: #fff; }
.on-dark .btn-ghost:hover { background: #fff; color: var(--navy-900); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- Home hero: words beside a real photo ---- */
.hero { background: var(--navy-900); color: #fff; overflow: hidden; }
.hero .wrap {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 36rem; color: #dfe3ff; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 10px 10px 0 var(--lime); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--lime); margin-bottom: .8rem;
}
.eyebrow-ink { color: var(--lime-ink); }

.page-hero { background: var(--navy-900); color: #fff; }
.page-hero .wrap { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #dfe3ff; max-width: 42rem; margin: 0; font-size: 1.15rem; }

/* ---- Impact band ---- */
.impact { background: var(--lime-lt); border-bottom: 1px solid var(--rule); }
.impact .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: .25rem 1rem; padding-block: 1.4rem; text-align: center;
}
.impact-number { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.05; color: var(--navy-700); }
.impact-label { font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 700; color: var(--navy-900); }

/* ---- Sections ---- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--rule); }
.section-dark { background: var(--navy-900); color: #dfe3ff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 44rem; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-dark .section-head p { color: #c9cff5; }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 2.5rem; align-items: start; }
.align-center { align-items: center; }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.5rem; height: 100%;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-auto { height: auto; }
.card-icon {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sky-lt); color: var(--navy-700); margin-bottom: 1rem;
}
.card:nth-child(3n+1) .card-icon { background: var(--lime-lt); color: var(--lime-ink); }
.card:nth-child(3n+3) .card-icon { background: #e6e8fb; color: var(--navy-700); }
.card-icon svg { width: 1.6rem; height: 1.6rem; }

/* ---- Tagline and mission quote ---- */
.tagline {
  font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(1.5rem, 4vw, 2.4rem); line-height: 1.15; color: #fff; margin: 0; max-width: 22ch;
}
.tagline span { color: var(--lime); }
.mission {
  margin: 0; padding: 1.75rem 1.75rem 1.75rem 2rem;
  background: var(--paper); border-left: 6px solid var(--lime); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: clamp(1.15rem, 2.2vw, 1.3rem); line-height: 1.6; color: var(--navy-900);
}
.mission p:last-child { margin-bottom: 0; }
.mission footer { font-size: .9rem; color: var(--ink-soft); margin-top: .75rem; }

/* ---- People we help: a tag list ---- */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.tags li { background: var(--sky-lt); color: var(--navy-900); font-weight: 700; padding: .45rem 1rem; border-radius: 999px; }
.tags li:nth-child(odd) { background: var(--lime-lt); }

/* ---- Photos ---- */
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.photo figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.gallery .photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---- Timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.6rem; max-width: 44rem; }
.timeline::before {
  content: ""; position: absolute; left: .55rem; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--lime), var(--navy-700), var(--sky));
}
.timeline li { position: relative; padding-left: 2.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .2rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--navy-700);
}
.timeline-date { display: block; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lime-ink); }
.timeline h3 { margin: .15em 0 .25em; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* ---- Steps ---- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--navy-700); color: #fff; font-weight: 800;
  display: grid; place-items: center;
}

/* ---- Notices ---- */
.notice {
  background: var(--sky-lt); border: 1px solid #a9dcf5; border-left: 5px solid var(--sky);
  border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--navy-900);
}
.notice p:last-child { margin-bottom: 0; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.contact-list li { display: flex; gap: .9rem; align-items: baseline; flex-wrap: wrap; }
.contact-list strong { min-width: 5.5rem; }
.contact-list a { font-weight: 700; }

.page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.page-list li { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: .9rem 1.25rem; font-weight: 700; }

/* ---- Forms ---- */
.form { display: grid; gap: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #b8bfd6; border-radius: 8px;
  padding: .7rem .8rem; min-height: 2.9rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-700); outline: 3px solid rgba(0,160,240,.35); outline-offset: 1px; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.hp { position: absolute; left: -9999px; }
.form-status { padding: .9rem 1rem; border-radius: 8px; font-weight: 600; }
.form-status[data-state="ok"]  { background: var(--lime-lt); color: #1f4a00; }
.form-status[data-state="err"] { background: #fdeceb; color: #7a1f16; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-900); color: #c9cff5; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #fff; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-tagline { color: var(--lime); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.footer-legal { border-top: 1px solid #2a3080; margin-top: 2.5rem; padding-top: 1.25rem; font-size: .85rem; color: #a9b0e0; }

/* ---- Utilities ----
   The CSP is style-src 'self', so inline style="" attributes are blocked in
   production. Use these instead. */
.measure   { max-width: 42rem; }
.mt        { margin-top: 1.5rem; }
.mb        { margin-bottom: 1.25rem; }
.note      { font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }
.h-card    { font-size: 1.4rem; }
.wrap-narrow { --max: 40rem; }
.plain-list { margin: 0; padding-left: 1.2rem; }
.logo-lg   { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; }

.hero :focus-visible, .page-hero :focus-visible, .section-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--lime); }

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

@media print {
  .site-header, .brand-stripe, .site-footer, .btn-row { display: none; }
  body { background: #fff; }
}
