/* Israeli Mothers of Crown Heights Incorporated — site styles */
:root {
  /* Brand palette: see BRAND.md */
  --plum: #5b2149;        /* Plum: primary (logo, buttons, footer) */
  --plum-deep: #3a1430;   /* Deep Plum: headings */
  --rose: #8e3a63;        /* Maroon Rose: links, accent text */
  --champagne: #c9a46a;   /* Champagne Gold: candle flames, fine accents */
  --cream: #fdf9f8;       /* Cream: page background */
  --blush: #f9eff2;       /* Blush: light tint */
  --lavender: #f4ecf3;    /* Lavender Mist: hover tint */
  --line: #ecdfe6;        /* Hairline: dividers */
  --ink: #2d2029;         /* Ink: body text */
  --muted: #6e5c68;       /* Muted: secondary text */
  --on-plum: #e2cddc;     /* text on plum */
  --on-plum-muted: #c4a5ba;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(58, 20, 48, .05), 0 12px 32px rgba(58, 20, 48, .07);
  --serif: "Cormorant Garamond", "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --hebrew: "Frank Ruhl Libre", Georgia, serif;
  --sans: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; }
a { color: var(--rose); text-underline-offset: .18em; }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--champagne); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--plum-deep);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.005em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .35em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--plum); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar { background: var(--plum); color: var(--on-plum); font-size: .82rem; letter-spacing: .04em; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.bsd { font-family: var(--hebrew); color: var(--champagne); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--plum-deep); min-width: 0; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; letter-spacing: .005em; line-height: 1; }
.brand-inc { font-style: normal; font-family: var(--sans); font-size: .7em; letter-spacing: .02em; color: var(--muted); margin-left: 2px; }
.brand-accent { color: var(--rose); }
.brand-sub { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.1rem; color: var(--rose); margin-top: 2px; line-height: 1.1; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
}
.site-nav a:hover { background: var(--lavender); color: var(--plum); }
.site-nav a[aria-current="page"] { color: var(--plum); box-shadow: inset 0 -2px 0 var(--champagne); border-radius: 0; }
.site-nav a.nav-donate { background: var(--plum); color: #fff; margin-left: 6px; border-radius: 999px; padding: 8px 18px; box-shadow: none; }
.site-nav a.nav-donate:hover { background: var(--rose); color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--plum); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: var(--plum); border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 20px 16px; gap: 0; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--champagne); padding-left: 12px; }
  .site-nav a.nav-donate { margin: 12px 0 0; text-align: center; border-bottom: 0; }
  .header-inner { position: relative; }
  .topbar-note { display: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1.45rem; }
  .brand-sub { font-size: 1rem; }
  .brand-mark { width: 40px; height: 40px; }
  .nav-toggle-label { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }

/* Hero */
.hero {
  background: var(--white);
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 780px; }
.hero h1 span { color: var(--rose); font-style: italic; font-weight: 500; }
.hero .lead { font-size: 1.25rem; }

.page-hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 56px 0 44px; }
.page-hero .lead { margin-bottom: 0; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1em; }
.breadcrumb a { color: var(--muted); }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; font-size: 1rem; line-height: 1.2; text-align: center;
}
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--rose); color: #fff; }
.btn-secondary { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-secondary:hover { background: var(--plum); color: #fff; }

/* Rows: hairline-divided, editorial */
.rows { margin-top: 32px; }
.rows:first-child { margin-top: 0; }
.rows { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; column-gap: 56px;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.row > * { grid-column: 2; }
.row > h3 { grid-column: 1; grid-row: 1 / span 20; margin: 0; }
.row p:last-child { margin-bottom: 0; }
.row > .btn { justify-self: start; }
.zeffy-form { margin: 8px 0 16px; min-height: 450px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.form-help { font-size: .92rem; color: var(--muted); }
.pay-to { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--plum-deep); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .row > *, .row > h3 { grid-column: 1; grid-row: auto; }
  .row > h3 { margin-bottom: .4em; }
}
.more { font-weight: 600; }

/* Side blocks: plain text separated by a rule, no boxes */
.card, .notice { border-top: 1px solid var(--line); padding: 24px 0 0; }
.card h3, .notice h3 { margin-bottom: .4em; }
.card p:last-child, .notice p:last-child { margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

blockquote.charter {
  margin: 0; padding: 28px 32px; background: var(--blush); border-left: 5px solid var(--champagne);
  border-radius: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; color: var(--plum-deep);
}
blockquote.charter cite { display: block; margin-top: 1em; font-family: var(--sans); font-style: normal; font-size: .9rem; color: var(--muted); }

.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dl { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.facts dd { margin: 0; text-align: right; font-weight: 700; color: var(--plum-deep); overflow-wrap: anywhere; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 28px; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--champagne); border: 3px solid var(--cream);
}
.timeline .when { font-family: var(--serif); font-weight: 600; color: var(--rose); font-size: 1.2rem; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: .7em; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .8em; width: 12px; height: 1px; background: var(--rose);
}

.program { scroll-margin-top: 120px; }
.program + .program { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.program-head { margin-bottom: 12px; }
.program-head h2 { margin: 0; }


.address { font-style: normal; line-height: 1.6; }
.contact-line { margin-bottom: 20px; }
.contact-line strong { display: block; color: var(--plum-deep); }
.contact-line a { overflow-wrap: anywhere; }

.prose h2 { margin-top: 1.6em; font-size: 1.9rem; }
.prose h2:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum); color: var(--on-plum); padding: 40px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-skyline { margin-bottom: 40px; }
.footer-skyline img { display: block; width: 100%; height: auto; opacity: .7; }
@media (max-width: 700px) { .footer-skyline img { height: 120px; object-fit: cover; object-position: 50% 100%; } }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: #fff; margin-bottom: .5em; }
.footer-facts { margin: 1.25em 0 0; display: grid; gap: 8px; }
.footer-facts div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
@media (max-width: 480px) { .footer-facts div { grid-template-columns: 1fr; gap: 0; } }
.footer-facts dt { color: var(--on-plum-muted); font-weight: 600; }
.footer-facts dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.footer-heading { font-family: var(--serif); color: #fff; font-weight: 600; font-size: 1.3rem; margin-bottom: .5em; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: var(--on-plum-muted); }
.footer-bottom p { margin: 0 0 .4em; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Events gallery (masonry) ---------- */
.masonry { --gap: 20px; display: flex; gap: var(--gap); align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
/* Without JavaScript, fall back to CSS columns */
.masonry:not(.is-laid) { display: block; columns: 3 280px; column-gap: var(--gap); }
.masonry:not(.is-laid) .gallery-item { margin-bottom: var(--gap); break-inside: avoid; }
@media (max-width: 600px) { .masonry { --gap: 10px; } }

.gallery-item {
  display: block; position: relative; overflow: hidden; border-radius: 3px;
  background: var(--blush); cursor: zoom-in;
}
.gallery-item img {
  display: block; width: 100%; height: auto;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .6s ease;
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(91, 33, 73, .06); border-radius: inherit;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.035); filter: saturate(1.05); }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: rgba(36, 14, 30, .94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(36, 14, 30, .94); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 72px; }
.lightbox img { max-width: min(92vw, 1200px); max-height: 80vh; width: auto; height: auto; border-radius: 3px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.lightbox figcaption { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--on-plum); text-align: center; max-width: 40em; }
.lightbox-count { font-size: .85rem; color: var(--on-plum-muted); letter-spacing: .04em; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-family: var(--serif); font-size: 2.6rem; line-height: 1; padding: 12px 18px; opacity: .75;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox-close { top: 8px; right: 12px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox figure { padding: 56px 12px 72px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 10px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } }
