:root {
  --sky: #0B8FC7;
  --sky-deep: #0A6E9A;
  --ink: #15334A;
  --ink-soft: #3E5464;
  --flame: #C8410F;
  --flame-deep: #A93508;
  --pale: #EEF6FA;
  --line: #D5E6EF;
  --white: #FFFFFF;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --ui: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --hebrew: "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --wrap: 72rem;
  --measure: 36em;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 7rem; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}

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

a { color: var(--sky-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: var(--measure); }

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem;
  font-family: var(--ui);
}
.skip:focus { left: 1rem; top: 1rem; z-index: 50; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  font-family: var(--ui);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "brand donate menu" "nav nav nav";
  align-items: center;
  column-gap: 1rem;
  padding-block: 0.6rem 0.2rem;
}
.brand {
  grid-area: brand;
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 1.1rem;
}
.brand img { width: auto; height: 30px; }
@media (max-width: 799px) {
  .brand { font-size: 0.95rem; white-space: nowrap; gap: 0.35rem; min-width: 0; overflow: hidden; }
  .header-donate { padding-inline: 0.8rem; }
  .menu-toggle { margin-left: 0.4rem; padding-inline: 0.6rem; }
  .site-header .wrap { column-gap: 0.5rem; }
}
@media (max-width: 380px) { .brand img { display: none; } .brand { font-size: 0.92rem; } }
.header-donate { grid-area: donate; }
.nav {
  grid-area: nav;
  display: flex; gap: 1.5rem;
  flex-wrap: wrap; column-gap: 1.5rem; row-gap: 0;
  font-size: 1rem; font-weight: 600;
}
.nav::-webkit-scrollbar { display: none; }

/* Phone menu button (shown only on small screens once menu.js has run) */
.menu-toggle {
  grid-area: menu; display: none;
  min-width: 44px; min-height: 44px; margin-left: 0.5rem;
  font: 700 1rem var(--ui); color: var(--ink);
  background: var(--white); border: 2px solid var(--sky-deep); border-radius: 6px;
  padding: 0.4rem 0.75rem; cursor: pointer;
}
.has-menu .menu-toggle { display: inline-block; }
.has-menu .nav { display: none; }
.has-menu.menu-open .nav {
  display: flex; flex-direction: column; gap: 0;
  padding-block: 0.25rem 0.5rem; overflow: visible;
}
.has-menu.menu-open .nav a { padding-block: 0.8rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.has-menu.menu-open .nav a[aria-current="page"] { border-bottom-color: var(--sky); }
.nav a {
  display: block; white-space: nowrap;
  padding-block: 0.6rem;
  text-decoration: none; color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sky); }

/* Buttons: orange means giving; blue is everything else */
.btn {
  display: inline-block;
  font-family: var(--ui); font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  padding: 0.75rem 1.35rem; border-radius: 6px;
  text-decoration: none; text-align: center; cursor: pointer;
  background: var(--flame); color: var(--white);
  border: 2px solid var(--flame);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--flame-deep); border-color: var(--flame-deep); color: var(--white); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.98rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-blue { background: var(--sky-deep); border-color: var(--sky-deep); }
.btn-blue:hover { background: var(--ink); border-color: var(--ink); }
.btn-quiet { background: var(--white); color: var(--ink); border-color: var(--sky-deep); }
.btn-quiet:hover { background: var(--pale); border-color: var(--ink); color: var(--ink); }

/* Hero: the Hebrew verse is the one loud thing on the site */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 3vw, 3rem); }
.hero .wrap { display: grid; gap: 2.25rem; align-items: center; }
.verse {
  font-family: var(--hebrew); font-weight: 500;
  font-size: clamp(3.5rem, 2rem + 5vw, 5.5rem);
  line-height: 0.95;
  color: var(--sky-deep);
  margin: 0 0 0.2em;
  direction: rtl; text-align: left;
}
.verse-en { font-style: italic; font-size: 1.2rem; color: var(--ink-soft); margin: 0; }
.verse-en cite { font-family: var(--ui); font-style: normal; font-size: 0.85em; margin-left: 0.5em; white-space: nowrap; }
.hero h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2rem);
  max-width: 18em;
  margin-top: 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

figcaption {
  font-family: var(--ui); font-size: 0.95rem; line-height: 1.4;
  color: var(--ink-soft); margin-top: 0.5rem;
}

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.alt { background: var(--pale); }
.lead { font-size: 1.25rem; line-height: 1.6; }
.page-title { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem); }
.region { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.25rem; border-top: 2px solid var(--sky); }
.region + p { color: var(--ink-soft); }

.about { display: grid; gap: 2rem; align-items: start; }
.charity {
  background: var(--white);
  border-top: 4px solid var(--sky);
  border-radius: 0 0 6px 6px;
  padding: 1.4rem 1.5rem;
  font-family: var(--ui);
}
.charity p { margin: 0; }
.charity-number {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.6rem; letter-spacing: 0.02em; color: var(--ink);
  margin: 0.15rem 0 0.6rem !important;
}

.programs { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; gap: 2rem 4.5rem; }
.programs h3 { margin: 0 0 0.5rem; }
.programs p { margin: 0; color: var(--ink-soft); max-width: 28em; }


/* Highlighted organizations: text cards in a grid that always closes evenly */
.org-grid { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 0 3rem; }
.org-grid li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.org-grid h3 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.org-grid .place { display: block; margin-bottom: 0.35rem; }
.org-grid p { margin: 0; color: var(--ink-soft); }
.place { font-family: var(--ui); font-size: 0.95rem; font-weight: 600; color: var(--sky-deep); }

/* Full list: names with places, in columns */
.directory { list-style: none; padding: 0; margin: 1.5rem 0 0; columns: 1; column-gap: 3rem; }
.directory li { break-inside: avoid; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.directory .place { font-weight: 400; color: var(--ink-soft); white-space: nowrap; }
.back { font-family: var(--ui); font-weight: 600; margin-bottom: 1rem; }
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; font-family: var(--ui); font-weight: 600; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.9rem;
  border: 2px solid var(--sky-deep); border-radius: 6px; text-decoration: none; color: var(--ink);
}
.jump a:hover { border-color: var(--sky-deep); background: var(--pale); }
.back a::before { content: "← "; }
.see-all { margin-top: 2rem; }
.credit { font-size: 0.85rem; }

.photo-row { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.photo-row figure { margin: 0; }
.photo-row img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }

.more { font-family: var(--ui); font-weight: 400; margin-top: 2rem; }

/* New program page */
.roadmap { list-style: none; counter-reset: step; padding: 0; margin: 2.5rem 0 0; max-width: 44rem; }
.roadmap li { counter-increment: step; position: relative; padding: 0 0 2.25rem 4rem; }
.roadmap li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--ui); font-weight: 700; font-size: 1.05rem;
  color: var(--sky-deep); background: var(--white); border: 2px solid var(--sky);
}
.roadmap li::after { content: ""; position: absolute; left: calc(1.25rem - 1px); top: 2.75rem; bottom: 0.25rem; width: 2px; background: var(--line); }
.roadmap li:last-child { padding-bottom: 0; }
.roadmap li:last-child::after { display: none; }
.roadmap li.current::before { color: var(--white); background: var(--sky-deep); border-color: var(--sky-deep); }
.roadmap h3 { margin: 0 0 0.35rem; }
.roadmap p { margin: 0; color: var(--ink-soft); }
.roadmap .stage { font-family: var(--ui); font-weight: 600; font-size: 0.95rem; color: var(--sky-deep); margin-bottom: 0.15rem; padding-top: 0.45rem; }

/* Teaser band for the new program */
.teaser { display: grid; gap: 1.5rem; align-items: center; }
.teaser p { margin-bottom: 0; }
.status {
  display: inline-block; font-family: var(--ui); font-weight: 700; font-size: 0.95rem;
  color: var(--sky-deep); background: var(--pale); border: 0;
  border-radius: 4px; padding: 0.2rem 0.6rem; margin-bottom: 1rem;
}



/* Partners */
.partners { display: grid; gap: 2.25rem; margin-top: 2.25rem; }
.partner { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; align-content: start; }
.partner img {
  width: 112px; height: 112px; object-fit: contain; padding: 0.6rem;
  border-radius: 6px; background: var(--white); border: 1px solid var(--line);
}
.partner img.fill { object-fit: cover; object-position: 50% 45%; padding: 0; }
.partner h3 { margin-bottom: 0.35rem; }
.partner p { margin-bottom: 0.5rem; color: var(--ink-soft); }
.partner-links { font-family: var(--ui); font-weight: 600; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.partner-links a { display: inline-block; padding-block: 0.5rem; }

/* Give band */
.give-band { background: var(--ink); color: var(--white); }
.give-band h2 { color: var(--white); }
.give-band p { color: #D6E4EE; }
.give-band .btn-quiet { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.give-band .btn-quiet:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* Donate page */
.give-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; column-gap: 3rem; }
.give-list li { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.give-list h3 { margin: 0 0 0.3rem; }
.give-list p { margin: 0 0 1rem; color: var(--ink-soft); }
.give-list .featured {
  background: var(--pale); border-top: 4px solid var(--sky);
  border-radius: 0 0 6px 6px; padding: 1.5rem;
}
.give-list .featured h3, .give-list .featured .h3 { font-size: 1.5rem; }
.give-list .h3, .note .h3 { margin: 0 0 0.3rem; }
.give-list .featured { margin-bottom: 1.5rem; }
.give-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.btn-outline { background: var(--white); color: var(--flame); border-color: var(--flame); }
.btn-outline:hover { background: var(--flame); color: var(--white); }
.usd-link { font-family: var(--ui); font-weight: 600; font-size: 1rem; color: var(--sky-deep); display: inline-flex; align-items: center; min-height: 44px; }
.give-list.single { max-width: 46rem; }
.to-regions { font-family: var(--ui); font-weight: 600; margin: 0.75rem 0 0; }
.to-regions a, .back a { display: inline-flex; align-items: center; min-height: 44px; }
.directory li { display: flex; flex-wrap: wrap; column-gap: 0.4rem; align-items: baseline; }
.place { font-size: 1rem; }
.note { background: var(--pale); border-left: 4px solid var(--sky); padding: 1.25rem 1.5rem; border-radius: 0 6px 6px 0; margin-top: 2rem; max-width: 46rem; }
.note p:last-child { margin-bottom: 0; }

/* Contact & footer */
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.contact-grid { display: grid; gap: 2rem; margin-top: 2.5rem; }
.contact-grid h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.contact-grid p { margin: 0; }

.signup { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 30rem; }
.signup label { flex-basis: 100%; font-family: var(--ui); }
.signup input {
  flex: 1 1 12rem; min-width: 0;
  font: inherit; font-family: var(--ui); padding: 0.6rem 0.9rem;
  border: 2px solid var(--ink-soft); border-radius: 6px; background: var(--white); color: var(--ink);
}
.signup input:focus-visible { border-color: var(--sky-deep); outline: 3px solid var(--ink); outline-offset: 2px; }

.site-footer { background: var(--pale); padding-block: 2.5rem; font-family: var(--ui); font-size: 0.98rem; color: var(--ink-soft); }
.site-footer .wrap { display: grid; gap: 1.25rem; }
.site-footer p { margin: 0; }
.footer-logo { width: 180px; }

.wide-photo { margin: 2rem 0 0; }
.wide-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 35%; border-radius: 6px; }
.wide-photo img.bottom { object-position: 60% 90%; }

@media (min-width: 640px) {
  .photo-row { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .partner { grid-template-columns: 112px 1fr; gap: 1.25rem; }
  .org-grid { grid-template-columns: 1fr 1fr; }
  .org-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .directory { columns: 2; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 800px) {
  .site-header .wrap {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav donate";
    padding-block: 0.55rem;
  }
  .nav, .has-menu .nav { display: flex; justify-content: flex-end; margin-right: 0.75rem; }
  .has-menu .menu-toggle { display: none; }
}

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1fr; column-gap: 4rem; }
  .about { grid-template-columns: 1fr 18rem; column-gap: 4rem; }
  .programs, .give-list { grid-template-columns: 1fr 1fr; }
  .teaser { grid-template-columns: 1fr auto; column-gap: 4rem; }
  .org-grid { grid-template-columns: repeat(3, 1fr); }
  .org-grid li:last-child:nth-child(odd) { grid-column: auto; }
  .directory { columns: 3; }
  .programs li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .give-list .featured { grid-column: 1 / -1; }
  .partners { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
  .partner { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; column-gap: 2rem; }
}

/* Home page: four clear ways into the rest of the site */
.doors { display: grid; gap: 1rem; }
.door {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--white); border: 2px solid var(--line); border-radius: 6px;
  padding: 1.25rem 1.4rem; transition: border-color 0.15s ease;
}
.door:hover { border-color: var(--sky-deep); color: var(--ink); }
.door-title {
  display: block; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.25;
  color: var(--sky-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  margin-bottom: 0.3rem;
}
.door-text { display: block; color: var(--ink-soft); }
.door .status { margin-bottom: 0.6rem; }
.charity-line { font-family: var(--ui); font-size: 1rem; color: var(--ink-soft); margin-top: 1.75rem; max-width: none; }
.nowrap { white-space: nowrap; }
.door .status-after { margin: 0.6rem 0 0; }
.page-title + .status { margin-top: -0.25rem; }
.contact-grid.single { grid-template-columns: 1fr; max-width: 34rem; }
@media (min-width: 640px) { .contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 46rem; } }
@media (min-width: 760px) {
  .doors { grid-template-columns: 1fr 1fr; }
  .door:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Phones: fewer things per screen. Same content, less stacking. */
@media (max-width: 639px) {
  body { font-size: 1.1rem; line-height: 1.65; }
  figcaption { font-size: 1rem; }
  .verse-en cite { display: block; margin: 0.25rem 0 0; }
  .hero-photo img { aspect-ratio: 16 / 9; }
  .roadmap li { padding-left: 3.1rem; }
  .jump { display: grid; grid-template-columns: 1fr 1fr; }
  .jump a { justify-content: center; }
  .contact-actions { flex-direction: column; align-items: stretch; }
  .lead { font-size: 1.2rem; }
  .stage, .status, .site-footer { font-size: 1rem; }
  .credit { font-size: 0.9em; }
  .signup label { font-size: 1rem; }
  h2 { font-size: 1.6rem; }
  section { padding-block: 2.5rem; }
  .phone-hide { display: none; }

  /* Hero: one clear button; the second becomes a quiet link */
  .hero { padding-block: 1.75rem 2rem; }
  .hero .wrap { gap: 1.5rem; }
  .hero h1 { font-size: 1.45rem; margin-top: 1.25rem; }
  .hero-actions { align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.25rem; }
  .hero-actions .btn-quiet {
    background: none; border: 0; padding: 0.6rem 0.1rem; min-height: 44px;
    text-decoration: underline; text-underline-offset: 0.2em; color: var(--sky-deep);
  }
  .give-band .hero-actions .btn-quiet { color: var(--white); background: none; }

  /* About: the charity number as a quiet line, not a big box */
  .about { gap: 1rem; }
  .charity { background: none; border: 0; padding: 0; border-radius: 0; }
  .charity-number { font-size: 1.15rem; margin: 0 0 0.25rem !important; }

  /* Lists: tighter */
  .programs { gap: 1.25rem; margin-top: 1.5rem; }
  .org-grid li { padding: 1rem 0; }

  /* Photos: one row you swipe through, instead of three stacked screens */
  .photo-row {
    display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: -1.25rem; padding-inline: 1.25rem; scroll-padding-inline: 1.25rem; scrollbar-width: none;
  }
  .photo-row::-webkit-scrollbar { display: none; }
  .photo-row figure { flex: 0 0 82%; scroll-snap-align: start; }

  /* Partners: name and one line only */
  .partner img, .partner-links { display: none; }
  .partners { gap: 1.25rem; margin-top: 1.5rem; }
  .partner p { margin-bottom: 0; }

  /* Contact: addresses side by side */
  .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.75rem; }

  /* Who we've helped: six highlights on phones, the rest are one tap away */
  .org-grid li:nth-child(n+7) { display: none; }
  .see-all { margin-top: 1.25rem; }

  /* Home page top: centered like a cover */
  .hero .wrap > div:first-child { text-align: center; }
  .hero .verse { text-align: center; }
  .hero h1 { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-photo figcaption { text-align: center; }

  /* Footer: centered, smaller logo */
  .site-footer .wrap { justify-items: center; text-align: center; }
  .footer-logo { width: 140px; margin-inline: auto; }
}

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