/* MORIAH Cooperative — shared brand styles */
:root {
  --mt: #33767b;
  --mt-mid: #5a979c;
  --mt-light: #e3eff0;
  --mt-border: #b3d3d6;
  --mo: #b4497b;   /* softened brand pink; white text on it meets WCAG AA (5.0:1) */
  --mo-light: #fbeef4;
  --mo-border: #ecc5d7;
  --mtext: #1d2a33;
  --msub: #4a5e69;
  --mborder: #cfe6ea;
  --mcard: #f7fafb;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mtext);
  background: #fff;
  line-height: 1.6;
}

a { color: inherit; }

img { max-width: 100%; }

/* ── NAV ── */
.m-nav {
  background: var(--mt);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.m-nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.m-nav__mark {
  width: 32px;
  height: 32px;
  background: var(--mo);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.m-nav__name {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.m-nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.m-nav__links a {
  color: #e3eff0;
  text-decoration: none;
  font-size: 13px;
  padding: 0 0.9rem;
  line-height: 60px;
  display: block;
  transition: color .15s;
}

.m-nav__links a { white-space: nowrap; }
/* Tablets and small laptops: all links on one line beside the logo (the wordmark gives way). */
@media (min-width: 761px) and (max-width: 1120px) {
  .m-nav__name { display: none; }
  .m-nav__links a { padding: 0 .55rem; }
}

.m-nav__links a:hover,
.m-nav__links a.active { color: #fff; }

.m-nav__links a.active {
  border-bottom: 2px solid var(--mo);
}

.m-nav__donate {
  background: var(--mo);
  color: #fff !important;
  padding: 7px 15px !important;
  line-height: normal !important;
  border-radius: 6px;
  font-weight: 500;
  margin-left: 0.5rem;
}

.m-nav__donate:hover { background: #9a3d68 !important; }

/* ── ANNOUNCEMENT BANNER ── */
.m-banner {
  background: var(--mo);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.m-banner p { color: #fff; font-size: 13px; }

.m-banner__cta {
  background: #fff;
  color: var(--mo);
  padding: 4px 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── HERO ── */
.m-hero {
  background: var(--mt);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.m-hero__tag {
  display: inline-block;
  background: rgba(180,73,123,.30);
  color: #ffe9a8;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 11px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.m-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.22;
  max-width: 560px;
  margin: 0 auto 1rem;
}

.m-hero p {
  color: #e3eff0;
  font-size: .95rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

.m-hero__btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--mo);
  color: #fff;
  padding: 11px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background .15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { background: #9a3d68; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.45);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: border-color .15s;
}

.btn-outline:hover { border-color: rgba(255,255,255,.8); }

.btn-teal {
  display: inline-block;
  background: var(--mt);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background .15s;
  border: none;
  cursor: pointer;
}

.btn-teal:hover { background: #285c60; }

/* ── IMPACT STRIP ── */
.m-impact {
  background: var(--mo-light);
  border-top: 2px solid var(--mo);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.m-impact__stat { text-align: center; }

.m-impact__num {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--mo);
  display: block;
}

.m-impact__label {
  font-size: 11px;
  color: var(--msub);
  margin-top: 2px;
  display: block;
}

/* ── SECTION LABELS ── */
.s-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--mt);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .35rem;
  display: block;
}

.s-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--mtext);
  margin-bottom: .4rem;
}

.s-sub {
  font-size: .9rem;
  color: var(--msub);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 560px;
}

/* ── SECTION WRAPPERS ── */
.m-section {
  padding: 3rem 1.5rem;
}

.m-section--alt { background: var(--mcard); }
.m-section--teal { background: var(--mt-light); }
.m-section--teal .s-label { color: #285c60; }   /* darker teal: readable (AA) on the light-teal band */

.m-section__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ── CARDS ── */
.m-card {
  background: #fff;
  border: 1px solid var(--mborder);
  border-radius: 12px;
  padding: 1.25rem;
}

.m-card--featured {
  border-color: var(--mt);
  border-width: 2px;
}

.m-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: .9rem;
}

.m-card__icon--teal { background: var(--mt-light); color: var(--mt); }
.m-card__icon--orange { background: var(--mo-light); color: var(--mo); }
.m-card__icon--blue { background: #e3eff0; color: #33767b; }

.m-card h3 { font-size: 14px; font-weight: 500; margin-bottom: .35rem; }
.m-card p { font-size: 12px; color: var(--msub); line-height: 1.55; margin-bottom: .8rem; }
.m-card a { font-size: 12px; color: var(--mt); font-weight: 500; text-decoration: none; }
.m-card a.btn-teal { color: #fff; }
.m-card a:hover { text-decoration: underline; }

/* ── GRID ── */
.m-grid { display: grid; gap: 14px; }
.m-grid--3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.m-grid--4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.m-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ── PROGRESS BAR ── */
.m-progress__wrap {
  background: var(--mborder);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin: .75rem 0 .4rem;
}

.m-progress__bar {
  background: var(--mo);
  height: 100%;
  border-radius: 999px;
  transition: width .6s ease;
}

.m-progress__meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--msub);
}

.m-progress__meta strong { color: var(--mtext); font-weight: 500; }

/* ── TRAIT PILLS ── */
.m-traits { display: flex; flex-wrap: wrap; gap: 7px; margin: .9rem 0 1.25rem; }

.m-trait {
  background: var(--mt-light);
  color: #285c60;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 20px;
  font-weight: 500;
}

/* ── DIVIDER ── */
.m-divider {
  border: none;
  border-top: 1px solid var(--mborder);
  margin: 2.5rem 0;
}

/* ── FOOTER ── */
.m-footer {
  background: var(--mt);
  color: #e3eff0;
  padding: 2rem 1.5rem 1.25rem;
}

.m-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.m-footer h2, .m-footer h4 {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  margin-bottom: .6rem;
}

.m-footer ul { list-style: none; }

.m-footer ul li a {
  color: #e3eff0;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.9;
  display: block;
}

.m-footer ul li a:hover { color: #fff; }

.m-footer p { font-size: 12px; color: #e3eff0; line-height: 1.8; }

.m-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.m-footer__bottom p { font-size: 11px; color: #e3eff0; }

.m-footer__donate-link {
  background: var(--mo);
  color: #fff;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.m-footer__donate-link:hover { background: #9a3d68; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .m-nav__name { display: none; }
  .m-nav__links a { padding: 0 .5rem; font-size: 12px; }
  .m-footer__grid { grid-template-columns: 1fr; }
  .m-hero { padding: 2.5rem 1rem 2rem; }
  .m-section { padding: 2rem 1rem; }
}

/* ── Phone menu (js/site-nav.js) ── */
.nav-toggle, .nav-donate-quick { display: none; }
@media (max-width: 760px) {
  .m-nav { padding: 0 .75rem 0 1rem; gap: .5rem; }
  .m-nav__brand { margin-right: auto; }
  .m-nav__name { display: inline; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; margin: 0; border: none; border-radius: 8px;
    background: rgba(255,255,255,.12); cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-donate-quick { display: inline-flex !important; align-items: center; min-height: 40px; margin: 0 !important; padding: 0 14px !important; line-height: 1 !important; white-space: nowrap; }
  .m-nav__links {
    display: none; position: absolute; top: 60px; left: 0; right: 0; margin: 0; padding: .4rem 0 .8rem;
    flex-direction: column; align-items: stretch; background: var(--mt); box-shadow: 0 10px 24px rgba(0,0,0,.25);
  }
  .nav-open .m-nav__links { display: flex; }
  .m-nav__links a { line-height: 1.2; padding: .95rem 1.25rem; font-size: 1rem; border-bottom: none !important; }
  .m-nav__links a.active { background: rgba(255,255,255,.1); box-shadow: inset 4px 0 0 var(--mo); }
  .m-nav__links .m-nav__donate { display: none; }
}
@media (max-width: 380px) { .m-nav__name { display: none; } }

/* Comfortable forms and buttons on phones (16px text stops iPhones zooming into fields) */
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
  button, .btn, .m-btn, input[type=submit] { min-height: 44px; }
  .m-hero h1 { font-size: 1.7rem; }
}
.nav-donate-quick { text-decoration: none !important; }

/* ══ Portal look ══════════════════════════════════════════════════════════════════════════════════════════════════
   The public site and family pages share the staff portal's look: white top bar with the colored MORIAH wordmark,
   light grey-blue page, white rounded cards, bolder headings, dark footer. Later rules override the ones above. */
:root { --page: #f5f8f9; --line: #d7e2e6; --ink: #1d2a33; --wm-pink: #b4497b; --wm-yellow: #fdb913; --wm-teal: #5a979c; }
body { background: var(--page); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* Top bar (public .m-nav and family .site-header) */
.m-nav, .site-header {
  height: 64px; background: rgba(255,255,255,.97); color: var(--ink);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 6px rgba(0,0,0,.04); backdrop-filter: saturate(1.4) blur(6px);
}
.m-nav__brand, .site-brand { gap: .45rem; }
.m-nav__mark, .site-brand__logo { width: auto !important; height: 40px; background: transparent; border-radius: 0; object-fit: contain !important; }
.m-nav__name { color: var(--ink); }
.m-wordmark { font-weight: 900; font-size: 1.35rem; letter-spacing: .02em; line-height: 1; -webkit-text-stroke: .6px var(--ink); paint-order: stroke fill; white-space: nowrap; }
.m-wordmark .p { color: var(--wm-pink); } .m-wordmark .y { color: var(--wm-yellow); } .m-wordmark .t { color: var(--wm-teal); }
.m-nav__links a, .site-nav a { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 64px; }
.m-nav__links a:hover, .site-nav a:hover { color: var(--mt); }
.m-nav__links a.active, .site-nav a.active { color: var(--mt); border-bottom: 3px solid var(--mo); }
.m-nav__donate, .site-nav a.nav-donate {
  border-radius: 999px; font-weight: 700; padding: 9px 18px !important; line-height: normal !important;
  color: #fff !important; box-shadow: 0 3px 10px rgba(180,73,123,.25);
}
.site-nav a.nav-admin { color: var(--msub); }
/* The accessibility button (js/consent.js) was white for the old teal bar */
.m-nav .mc-a11y-btn, .site-header .mc-a11y-btn { color: var(--mt); border-color: var(--line); background: #fff; }
.m-nav .mc-a11y-btn:hover, .site-header .mc-a11y-btn:hover { background: #e3eff0; border-color: var(--mt-border); }

/* Phone menu */
@media (max-width: 760px) {
  .nav-toggle, .site-header .nav-toggle { background: #e3eff0; }
  .nav-toggle span, .site-header .nav-toggle span { background: var(--ink); }
  .m-nav__links, .site-header .site-nav { top: 64px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
  .m-nav__links a, .site-header .site-nav a { color: var(--ink); line-height: 1.2; }
  .m-nav__links a.active, .site-header .site-nav a.active { background: #e3eff0; color: #285c60; box-shadow: inset 3px 0 0 var(--mo); border-bottom: none !important; }
}
@media (min-width: 761px) and (max-width: 1120px) { .m-wordmark { display: none; } }

/* Headings and section labels */
.s-label { font-weight: 700; letter-spacing: .06em; }
.s-title { font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.m-hero h1 { font-weight: 800; letter-spacing: -.01em; }

/* Page, sections and cards */
.m-section { background: transparent; }
.m-section--alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-card { border-color: var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.m-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.m-card p { font-size: 13px; }
.m-card a { font-weight: 600; }
.m-impact { background: #fff; border-top: none; border-bottom: 1px solid var(--line); }
.m-impact__num { font-weight: 800; }
.m-divider { border-top-color: var(--line); }

/* Buttons */
.btn-primary, .btn-teal, .btn-outline { border-radius: 10px; font-weight: 700; }
.btn-primary { box-shadow: 0 3px 10px rgba(180,73,123,.2); }

/* Footer: the staff portal's dark sidebar colour */
.m-footer { background: var(--ink); color: #d5e3e8; }
.m-footer p, .m-footer ul li a, .m-footer__bottom p { color: #d5e3e8; }
.m-footer ul li a:hover { color: #fff; }
.m-footer__bottom { border-top-color: rgba(255,255,255,.1); }
.m-footer__donate-link { border-radius: 999px; font-weight: 700; }

/* ── Illustrations (placeholder art in /images/illustrations; swap for program photos when available) ── */
.m-figure { margin: 1.75rem 0; }
.m-figure img { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); background: var(--mt-light); }
.m-section--teal .m-figure img { border-color: rgba(255,255,255,.35); }
