/* ===========================================================================
   MBD MAKING BETTER DAYS — SITE STYLES
   One stylesheet for the whole site. Colours were sampled from the logo.

   CONTRAST RULES (WCAG 2.1 AA) — read before changing colours
   - navy-900 (#001830) on white ........... 17.8:1  pass
   - navy-700 (#0C3C6C) on white ...........  9.9:1  pass
   - navy-500 (#306090) on white ...........  5.4:1  pass (normal text)
   - gold-500 (#F0B424) on white ...........  1.9:1  FAIL — accents only
   - navy-900 on gold-500 ..................  9.4:1  pass (gold buttons)
   Gold is a background, border or rule. Gold is never body text on light.

   LOGO RULE
   The logo is dark navy artwork. Wherever it sits on navy it gets a light
   disc behind it (.logo-disc). Do not remove the discs.
=========================================================================== */

/* ---------------------------------------------------------------- Fonts -- */
/* Self-hosted on purpose: no request to Google, no visitor IPs shared. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-latin-variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

/* --------------------------------------------------------------- Tokens -- */
:root {
  --navy-50: #eef4fa;
  --navy-100: #d6e4f0;
  --navy-200: #adc7e0;
  --navy-300: #7ea5cb;
  --navy-400: #5b87b3;
  --navy-500: #306090;
  --navy-600: #245484;
  --navy-700: #0c3c6c;
  --navy-800: #06263f;
  --navy-900: #001830;
  --navy-950: #000d1c;

  --gold-300: #fdd777;
  --gold-400: #fcc030;
  --gold-500: #f0b424;
  --gold-600: #c99010;

  --sand-50: #fbf9f5;
  --sand-100: #f4efe6;
  --white: #ffffff;

  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Oswald", "Inter", ui-sans-serif, sans-serif;

  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --max: 72rem;
  --gutter: 1.25rem;
}
@media (min-width: 640px) {
  :root { --gutter: 2rem; }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sand-50);
  color: var(--navy-900);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--navy-700); }

/* Visible keyboard focus everywhere. Do not remove. */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* --------------------------------------------------------------- Layout -- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 4rem 0; }
@media (min-width: 640px) { .section { padding: 6rem 0; } }

.tone-light { background: var(--white); color: var(--navy-900); }
.tone-sand  { background: var(--sand-50); color: var(--navy-900); }
.tone-navy  { background: var(--navy-900); color: var(--navy-50); }

.narrow   { max-width: 48rem; }
.narrower { max-width: 42rem; }
.center   { margin-left: auto; margin-right: auto; text-align: center; }

.stack > * + * { margin-top: 1.25rem; }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .split  { grid-template-columns: 2fr 1fr; gap: 3rem; }
  .split-wide { grid-template-columns: 1.4fr 1fr; gap: 3.5rem; }
}

.plain-list { list-style: none; margin: 0; padding: 0; }

/* ----------------------------------------------------------- Typography -- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy-500);
}
.tone-navy .eyebrow, .page-header .eyebrow, .hero .eyebrow { color: var(--gold-400); }

.section-heading { font-size: 1.875rem; }
@media (min-width: 640px) { .section-heading { font-size: 2.25rem; } }

.lead { font-size: 1.125rem; line-height: 1.7; color: var(--navy-800); }
.tone-navy .lead { color: var(--navy-100); }

.muted { color: var(--navy-500); }
.small { font-size: 0.875rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.text-link {
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--navy-900); }

/* -------------------------------------------------------------- Buttons -- */
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.center .btn-row { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
/* Gold buttons carry navy text (9.4:1). Never gold text on white. */
.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-400); }
.btn-secondary { background: var(--navy-700); color: var(--white); }
.btn-secondary:hover { background: var(--navy-600); }
.btn-ghost { border-color: var(--navy-200); color: var(--navy-900); background: transparent; }
.btn-ghost:hover { border-color: var(--navy-400); background: var(--navy-50); }

/* --------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  color: var(--navy-50);
  border-bottom: 2px solid var(--gold-500);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.logo-disc {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sand-50);
  padding: 0.25rem;
}
.brand img { width: 2.5rem; height: 2.5rem; }
@media (min-width: 640px) { .brand img { width: 3rem; height: 3rem; } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.brand-sub {
  margin-top: 0.125rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}
@media (min-width: 640px) {
  .brand-name { font-size: 1.5rem; }
  .brand-sub { font-size: 0.7rem; }
}

.nav-toggle {
  display: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy-600);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle svg { width: 1.5rem; height: 1.5rem; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.main-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-50);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.main-nav a:hover { background: var(--navy-800); color: var(--gold-300); }
.main-nav a[aria-current="page"] { background: var(--navy-700); color: var(--gold-400); }

/* "Donate" is the prominent nav item (guide: Donate prominent in header).
   Gold background, navy text: 9.4:1. */
.main-nav a.nav-donate { background: var(--gold-500); color: var(--navy-900); margin-left: 0.25rem; }
.main-nav a.nav-donate:hover { background: var(--gold-400); color: var(--navy-900); }
.main-nav a.nav-donate[aria-current="page"] { background: var(--gold-400); color: var(--navy-900); box-shadow: inset 0 -3px 0 var(--navy-900); }

/* Right side of the bar on small screens: Donate Now + menu button. */
.header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.header-donate { padding: 0.5rem 0.9rem; }

/* Wide screens: full nav, no separate Donate Now button (the gold nav item
   does that job). */
@media (min-width: 1200px) {
  .header-actions { display: none; }
}

/* Small screens: the nav is always reachable without JavaScript. When JS
   runs it adds .js to <html>, and only then is the nav collapsed behind
   the menu button. */
@media (max-width: 1199px) {
  .site-header .bar { flex-wrap: wrap; }
  .main-nav { width: 100%; }
  .main-nav ul { flex-direction: column; padding-bottom: 0.75rem; }
  .main-nav a { padding: 0.75rem; }
  .main-nav a.nav-donate { margin-left: 0; }
  .js .nav-toggle { display: inline-flex; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: block; }
}
/* Phones: keep logo, Donate Now and the menu button on one row. */
@media (max-width: 479px) {
  .brand-sub { display: none; }
  .header-donate { padding: 0.5rem 0.7rem; font-size: 0.8rem; }
}

/* ----------------------------------------------------------------- Hero -- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: var(--white);
}
.hero::before {
  /* Sunrise glow echoing the logo. Decorative. */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 24rem;
  background: radial-gradient(60% 100% at 50% 0%, rgba(240, 180, 36, 0.22), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid { display: grid; align-items: center; gap: 3rem; padding: 4rem 0; }
@media (min-width: 640px) { .hero-grid { padding: 6rem 0; } }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.hero h1 { margin-top: 1.25rem; font-size: 2.25rem; line-height: 1.05; }
@media (min-width: 640px) { .hero h1 { font-size: 3.75rem; } }
.hero .lead { color: var(--navy-100); max-width: 36rem; margin-top: 1.5rem; }
.hero .btn-row { margin-top: 2.25rem; }
.hero-logo { display: flex; justify-content: center; }
@media (min-width: 1024px) { .hero-logo { justify-content: flex-end; } }
.hero-logo .logo-disc {
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(240, 180, 36, 0.4);
}
@media (min-width: 640px) { .hero-logo .logo-disc { padding: 2rem; } }
.hero-logo img { width: 13rem; }
@media (min-width: 640px) { .hero-logo img { width: 16rem; } }
@media (min-width: 1024px) { .hero-logo img { width: 20rem; } }

/* ---------------------------------------------------------- Page header -- */
.page-header { background: var(--navy-900); color: var(--navy-50); padding: 4rem 0; }
@media (min-width: 640px) { .page-header { padding: 5rem 0; } }
.page-header h1 { margin-top: 0.75rem; font-size: 2.25rem; line-height: 1.15; }
@media (min-width: 640px) { .page-header h1 { font-size: 3rem; } }
.page-header .lead { color: var(--navy-100); max-width: 42rem; margin-top: 1.25rem; }

/* ---------------------------------------------------------------- Notice -- */
.notice {
  border-top: 2px solid var(--gold-500);
  border-bottom: 2px solid var(--gold-500);
  background: rgba(240, 180, 36, 0.12);
}
.notice p { padding: 1rem 0; font-size: 0.875rem; color: var(--navy-900); }

/* ----------------------------------------------------------------- Cards -- */
.card {
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  background: var(--sand-50);
  padding: 1.75rem;
}
.card-white { background: var(--white); }
.card h3 { font-size: 1.25rem; color: var(--navy-900); }
.card p { color: var(--navy-800); }
.card-sm { padding: 1.5rem; }
.card-sm h3 { font-size: 1.125rem; }
.card-sm p { font-size: 0.875rem; }

.program-card { display: flex; flex-direction: column; }
.program-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.program-card p { flex: 1; margin-top: 0.75rem; }
.program-card .more {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-700);
  text-decoration: none;
  text-underline-offset: 4px;
}
.program-card .more:hover { text-decoration: underline; }

.callout {
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius);
  background: var(--sand-100);
  padding: 1.75rem;
}
.callout h3, .callout h2 { font-size: 1.125rem; }
.callout p { color: var(--navy-800); }

.pill {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-open { background: var(--navy-700); color: var(--white); }
.pill-soon { background: var(--gold-500); color: var(--navy-900); }
.pill-dev  { background: var(--navy-100); color: var(--navy-800); }

/* ---------------------------------------------------------------- Values -- */
.values { text-align: center; }
.values h2 {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.values p { margin-top: 0.75rem; color: var(--navy-100); }

/* ----------------------------------------------------------------- About -- */
.facts dt { font-weight: 600; color: var(--navy-500); font-size: 0.875rem; }
.facts dd { margin: 0.25rem 0 0; color: var(--navy-900); font-size: 0.875rem; }
.facts div + div { margin-top: 1rem; }

blockquote.purpose {
  margin: 1rem 0 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--gold-500);
  color: var(--navy-800);
  font-style: italic;
}

/* ----------------------------------------------------------------- Board -- */
.director {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.25rem;
}
.initials {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.director .name { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.director .role { display: block; margin-top: 0.125rem; font-size: 0.875rem; color: var(--navy-600); }

/* -------------------------------------------------------------- Programs -- */
.program + .program { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--navy-100); }
.program { scroll-margin-top: 7rem; }
.program .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.program .index {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--navy-600);
}
.status-box h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-500);
}
.status-box { align-self: start; }

.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.steps li { display: flex; gap: 1.25rem; }
.steps li + li { margin-top: 1.5rem; }
.step-num {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
}
.steps h3 { font-size: 1.125rem; color: var(--gold-400); }
.steps p { margin-top: 0.25rem; color: var(--navy-100); }
.rule-note {
  margin-top: 2.5rem;
  padding-left: 1.5rem;
  border-left: 4px solid var(--gold-500);
  color: var(--navy-100);
}

/* ----------------------------------------------------------------- Forms -- */
.form label { display: block; font-weight: 600; color: var(--navy-900); }
.form .req { color: var(--navy-500); font-weight: 400; }
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--navy-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy-900);
  font: inherit;
}
.form .field + .field, .form .row + .field, .form .field + .row { margin-top: 1.5rem; }
.form .row { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form .help { margin-top: 0.5rem; font-size: 0.875rem; color: var(--navy-600); }
.form button { margin-top: 1.5rem; padding: 0.75rem 2rem; }
/* Honeypot: off-screen for people, still present for bots. */
.form .hp { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- Donate -- */
.donate-embed { margin-top: 2rem; }
.donate-embed iframe { width: 100%; min-height: 900px; border: 0; }
.donate-pending {
  margin-top: 2rem;
  border: 2px dashed var(--navy-300);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--navy-700);
}

/* ---------------------------------------------------------------- Footer -- */
.site-footer { background: var(--navy-950); color: var(--navy-100); }
.footer-grid { display: grid; gap: 2.5rem; padding: 3.5rem 0; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-identity { grid-column: span 2; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } .footer-identity { grid-column: auto; } }
.footer-identity .row { display: flex; align-items: center; gap: 0.75rem; }
.footer-identity img { width: 2.75rem; height: 2.75rem; }
.footer-identity .brand-name { color: var(--white); font-size: 1.125rem; }
.site-footer h2 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.site-footer ul { list-style: none; margin: 1rem 0 0; padding: 0; font-size: 0.875rem; }
.site-footer li + li { margin-top: 0.5rem; }
.site-footer a { color: var(--navy-100); text-underline-offset: 4px; }
.site-footer ul a { text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); text-decoration: underline; }
.site-footer address { margin-top: 1rem; font-style: normal; font-size: 0.875rem; }
.site-footer address > div + div { margin-top: 0.75rem; }
.site-footer .label { display: block; color: var(--navy-300); }
.footer-legal {
  border-top: 1px solid var(--navy-800);
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--navy-300);
}
.footer-legal .stack { max-width: 48rem; }
.footer-legal > p { margin-top: 1.5rem; }

/* ------------------------------------------------------- Placeholder mark --
   Unfinished content carries data-placeholder="true". On localhost only,
   js/site.js adds .show-placeholders to <html> and these get outlined so
   they are obvious while testing. Production renders them normally.
   The real pre-launch gate is `node scripts/check.mjs`.
--------------------------------------------------------------------------- */
.show-placeholders [data-placeholder="true"] {
  outline: 1px dashed var(--gold-600);
  outline-offset: 3px;
  background-color: rgba(240, 180, 36, 0.07);
}

/* Home values strip: three columns from tablet width up. */
@media (min-width: 640px) { .values { grid-template-columns: repeat(3, 1fr); } }

/* Privacy notice and other long text. */
.prose h2 { font-size: 1.375rem; margin-top: 2rem; }
.prose p { color: var(--navy-800); }

/* Mission page: the statement is the page, so give it room. */
.mission-text { font-size: 1.375rem; line-height: 1.6; }
@media (min-width: 640px) { .mission-text { font-size: 1.5rem; } }

/* Help cards: keep buttons aligned at the bottom. */
.help-card { display: flex; flex-direction: column; }
.help-card p { flex: 1; }

/* Footer brand name now carries the full name. */
.footer-identity .brand-name { font-size: 1rem; }

/* Buttons in the footer keep their own colours (footer link colours would
   otherwise put light text on gold and fail contrast). */
.site-footer .btn-primary, .site-footer .btn-primary:hover { color: var(--navy-900); text-decoration: none; }

/* Long email addresses must wrap on narrow phones. */
a[href^="mailto:"] { overflow-wrap: anywhere; }
