/* ============================================================
   He Is My Neighbor — site styles
   Clean, subtle, off-white. Micro-animations driven by GSAP.
   ============================================================ */

:root {
  --bg: #faf9f6;
  --bg-soft: #f3f1ec;
  --ink: #1f1d1a;
  --ink-soft: #57534e;
  --ink-faint: #8a857d;
  --accent: #b05c3b;
  --accent-soft: #d8c8be;
  --line: #e7e3dc;
  --radius: 10px;
  --max: 1080px;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark em { font-style: normal; color: var(--accent); }

.site-nav { display: flex; gap: 28px; align-items: center; }

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 40px; }

.hero .eyebrow {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.hero p.lede {
  margin-top: 22px;
  max-width: 56ch;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

/* ---------- Gallery (slideable + expandable) ---------- */

.gallery-section { padding: 28px 0 16px; }

.gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 24px 20px;
  margin: 0 auto;
  max-width: calc(var(--max) + 48px);
  scroll-snap-type: x mandatory;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
  -webkit-overflow-scrolling: touch;
}
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 3px; }
.gallery::-webkit-scrollbar-track { background: transparent; }

.gallery figure {
  flex: 0 0 auto;
  width: min(420px, 78vw);
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}

.gallery img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}
.gallery figure:hover img { transform: scale(1.025); }

.gallery figure::after {
  content: "⤢";
  position: absolute;
  right: 12px; bottom: 12px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(31, 29, 26, 0.45);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.gallery figure:hover::after { opacity: 1; }

.gallery-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  padding-bottom: 8px;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(26, 24, 21, 0.92);
  opacity: 0;
  visibility: hidden;
}
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.25s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------- Sections ---------- */

section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-soft); }

.block h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.005em;
}

.block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 28px 0 10px;
}

.block p { max-width: 68ch; color: var(--ink-soft); margin-bottom: 16px; }
.block p strong { color: var(--ink); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.goal-list { list-style: none; margin-top: 8px; display: grid; gap: 16px; }
.goal-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
}
.goal-list.pairs {
  grid-template-columns: 1fr 1fr;
  gap: 20px 48px;
  margin-top: 28px;
  max-width: 920px;
}
.goal-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.quote {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 24px;
  margin: 36px 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 60ch;
}
.quote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 48px;
  margin-top: 32px;
}

.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { font-size: 0.97rem; margin-bottom: 0; }

/* Board */

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.board-card { text-align: left; }
.board-card .portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 14px;
  filter: saturate(0.92);
  transition: filter 0.4s ease;
}
.board-card:hover .portrait { filter: saturate(1); }
.board-card h3 { margin: 0 0 4px; }
.board-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---------- Newsletters ---------- */

.year-group { margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.year-group summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  user-select: none;
}
.year-group summary::-webkit-details-marker { display: none; }
.year-group summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--ink-faint);
  transition: transform 0.3s ease;
}
.year-group[open] summary::after { transform: rotate(45deg); }
.newsletter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 4px 22px;
}
.newsletter-links a {
  font-size: 0.88rem;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.newsletter-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { text-decoration: none; background: #3a3631; }
.btn:active { transform: scale(0.98); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #9a4f31; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-soft);
}
.btn.ghost:hover { background: rgba(31, 29, 26, 0.04); border-color: var(--ink); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Contact / Donate ---------- */

.info-list { list-style: none; margin-top: 12px; }
.info-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  display: flex;
  gap: 16px;
}
.info-list li:last-child { border-bottom: 0; }
.info-list .label {
  flex: 0 0 90px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}

.address-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 20px 0;
  font-size: 1rem;
  line-height: 1.8;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer .wordmark { font-size: 1.05rem; }
.site-footer p {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 8px;
  max-width: 44ch;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--ink-soft); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Reveal (GSAP) ---------- */

.reveal { opacity: 0; }
html.no-js .reveal, html.gsap-failed .reveal { opacity: 1; }

/* ---------- Page header (interior pages) ---------- */

.page-head { padding: 64px 0 8px; }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.page-head p {
  margin-top: 16px;
  color: var(--ink-soft);
  max-width: 60ch;
  font-size: 1.05rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; }
  .nav-toggle { display: block; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .goal-list.pairs { grid-template-columns: 1fr; gap: 16px; }
  .gallery img { height: 220px; }
  section.block { padding: 48px 0; }
}

.site-footer p.legal { margin-top: 4px; font-size: 0.8rem; }

/* Privacy dialog */
.privacy-dialog {
  max-width: 480px;
  width: calc(100% - 48px);
  margin: auto;
  padding: 28px 28px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink-soft);
  box-shadow: 0 8px 24px rgba(31, 29, 26, 0.08);
  font-size: 0.95rem;
  line-height: 1.65;
}
.privacy-dialog::backdrop { background: rgba(26, 24, 21, 0.35); }
.privacy-dialog h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.privacy-dialog p { margin-bottom: 12px; }
.privacy-dialog .privacy-date { font-size: 0.8rem; color: var(--ink-faint); }
.privacy-dialog form { margin-top: 8px; }
.privacy-dialog .btn { padding: 9px 20px; font-size: 0.9rem; cursor: pointer; font-family: inherit; }
.block p.ein { margin-top: 16px; font-size: 0.85rem; color: var(--ink-faint); }
