/* ============================================================
   Community Circles & Co — site stylesheet
   Navy-led Committed system. Off-white paper. Gold accent.
   Display: Bricolage Grotesque | Body: Public Sans
   Tokens authoritative; see DESIGN.md.
   ============================================================ */

:root {
  /* Color (OKLCH; hex shown for reference) */
  --navy-900:    oklch(0.18 0.06 252);
  --navy-800:    oklch(0.23 0.07 252);
  --navy-700:    oklch(0.30 0.07 252);
  --navy-500:    oklch(0.46 0.10 252);
  --navy-200:    oklch(0.88 0.03 252);

  --gold-800:    oklch(0.50 0.13 60);   /* deep amber; ≥4.5:1 text-grade on paper + paper-2 */
  --gold-700:    oklch(0.65 0.15 72);
  --gold-500:    oklch(0.78 0.14 78);
  --gold-300:    oklch(0.88 0.10 85);

  --paper:       oklch(0.99 0.004 85);
  --paper-2:     oklch(0.96 0.008 85);
  --ink:         oklch(0.20 0.02 252);
  --cream:       oklch(0.96 0.012 80);
  --muted:       oklch(0.46 0.02 252);

  --line:        oklch(0.90 0.01 252);
  --line-strong: oklch(0.82 0.02 252);

  --navy-50:     oklch(0.97 0.015 252);  /* soft navy-tinted hover bg */

  --cream-a06:   rgb(241 235 217 / 0.06);
  --cream-a10:   rgb(241 235 217 / 0.10);
  --cream-a12:   rgb(241 235 217 / 0.12);
  --cream-a14:   rgb(241 235 217 / 0.14);
  --cream-a16:   rgb(241 235 217 / 0.16);
  --cream-a18:   rgb(241 235 217 / 0.18);
  --cream-a40:   rgb(241 235 217 / 0.40);

  /* Type */
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Public Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --type-display: clamp(2.6rem, 6vw, 5rem);
  --type-h1:      clamp(2.2rem, 5vw, 3.8rem);
  --type-h2:      clamp(1.65rem, 3.5vw, 2.6rem);
  --type-h3:      clamp(1.25rem, 2vw, 1.6rem);
  --type-lead:    clamp(1.1rem, 1.6vw, 1.3rem);
  --type-body:    1.0625rem;
  --type-small:   0.92rem;
  --type-eyebrow: 0.8rem;

  /* Layout */
  --maxw: 1180px;
  --maxw-wide: 1360px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 36px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgb(11 23 51 / 0.04);
  --shadow-sm: 0 2px 8px rgb(11 23 51 / 0.06);
  --shadow-md: 0 14px 34px rgb(11 23 51 / 0.10);
  --shadow-lg: 0 30px 70px rgb(11 23 51 / 0.18);

  /* Z-index scale */
  --z-dropdown: 30;
  --z-sticky: 40;
  --z-backdrop: 50;
  --z-modal: 60;
  --z-toast: 70;
  --z-tooltip: 80;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: var(--type-body);
  letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, picture, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
h4 { font-size: 1.05rem; letter-spacing: -0.005em; }
p  { text-wrap: pretty; max-width: 65ch; }

.display { font-size: var(--type-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.0; }
.lead { font-size: var(--type-lead); color: var(--ink); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--muted); }
.measure { max-width: 60ch; }
.measure-sm { max-width: 46ch; }

::selection { background: var(--gold-500); color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--navy-500);
  outline-offset: 3px;
  border-radius: 4px;
}
.bg-navy :focus-visible,
.page-hero :focus-visible,
.hero__plate :focus-visible,
.closing-band :focus-visible,
.closing__copy :focus-visible,
.site-footer :focus-visible,
.impact :focus-visible {
  outline-color: var(--gold-300);
}

/* ---------- Wraps ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: var(--maxw-wide); }
.section { padding-block: clamp(64px, 9vw, 130px); }
.section-tight { padding-block: clamp(48px, 6vw, 84px); }
.bg-paper-2 { background: var(--paper-2); }
.bg-navy { background: var(--navy-800); color: var(--cream); }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--cream); }

/* ---------- Eyebrow (budget: ≤2 per page) ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-800);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--gold-500);
}
.eyebrow.no-rule::before { display: none; }
.bg-navy .eyebrow { color: var(--gold-300); }
.bg-navy .eyebrow::before { background: var(--gold-500); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy-800);
  --fg: var(--cream);
  --bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1;
  padding: 16px 26px;
  min-height: 50px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--bd);
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn .arrow { transition: transform 0.22s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--donate { --bg: var(--gold-500); --fg: var(--navy-900); }
.btn--donate:hover { background: oklch(0.74 0.15 78); }

.btn--primary { --bg: var(--navy-800); --fg: var(--cream); }
.btn--primary:hover { background: var(--navy-700); }

.btn--ghost {
  --bg: transparent;
  --fg: var(--navy-800);
  --bd: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--navy-800); background: var(--navy-50); }

.btn--on-navy {
  --bg: var(--cream);
  --fg: var(--navy-900);
}
.btn--on-navy:hover { background: #fff; }

.btn--on-navy-ghost {
  --bg: transparent;
  --fg: var(--cream);
  --bd: var(--cream-a40);
}
.btn--on-navy-ghost:hover { border-color: var(--cream); background: var(--cream-a10); }

.btn--lg { padding: 19px 32px; font-size: 1.1rem; min-height: 56px; }

/* ---------- Text link ---------- */
.textlink {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--gold-500);
  transition: gap 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.textlink:hover { gap: 12px; color: var(--navy-800); border-bottom-color: var(--gold-700); }
.bg-navy .textlink { color: var(--cream); border-bottom-color: var(--gold-500); }
.bg-navy .textlink:hover { color: var(--gold-300); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}
.nav {
  position: relative;
  display: flex; align-items: center; gap: 24px;
  min-height: 78px;
  padding-block: 12px;
}
.nav__links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  list-style: none; padding: 0;
}
.nav__links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav__links a:hover { background: var(--navy-200); }
.nav__links a.active { color: var(--navy-800); background: var(--navy-200); }
.nav__cta { margin-left: 10px; }

.brand { display: inline-flex; align-items: center; gap: 13px; min-height: 44px; }
.brand__mark { flex: none; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-800);
  margin-top: 5px;
}

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 48px; height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px; position: relative;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
.nav.open .nav__toggle span { background: transparent; }
.nav.open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1040px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 16px var(--gutter) 24px;
    margin: 0;
    clip-path: inset(0 0 100% 0);
    opacity: 0; pointer-events: none;
    transition: clip-path 0.3s var(--ease), opacity 0.25s var(--ease);
  }
  .nav.open .nav__links { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav__links a { display: block; padding: 14px 18px; font-size: 1.1rem; border-radius: 12px; }
  .nav__cta { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
  .nav__cta .btn { width: 100%; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--navy-800); color: var(--cream); padding: 12px 18px; border-radius: 10px;
  z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: oklch(0.86 0.012 252);
  padding-block: clamp(56px, 7vw, 88px) 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 44px;
}
.site-footer h4 {
  font-family: var(--font-display);
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-500); margin-bottom: 18px;
}
.site-footer a { color: oklch(0.86 0.012 252); transition: color 0.18s var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer-contact { display: grid; gap: 10px; color: oklch(0.78 0.012 252); }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--cream-a16);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-social a:hover { background: var(--cream-a10); border-color: var(--cream-a40); transform: translateY(-2px); }
.footer-social svg { width: 19px; height: 19px; }
.footer-social button {
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--cream-a16);
  background: transparent; color: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: not-allowed; opacity: 0.55;
}
.footer-social button svg { width: 19px; height: 19px; }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__name small { color: var(--gold-300); }
.footer-note {
  color: oklch(0.74 0.012 252); font-size: 0.92rem; line-height: 1.65; margin-top: 18px; max-width: 36ch;
}
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--cream-a12);
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between;
  color: oklch(0.68 0.012 252); font-size: 0.9rem;
}
.fiscal-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream-a06);
  border: 1px solid var(--cream-a14);
  border-radius: 999px; padding: 8px 16px;
  color: oklch(0.84 0.012 252); font-size: 0.9rem;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Photos ---------- */
.photo {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border-radius: var(--r-md);
  aspect-ratio: 4 / 3;
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo--tall { aspect-ratio: 3 / 4; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--square { aspect-ratio: 1 / 1; }
.photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-200), var(--paper-2));
  color: var(--navy-700);
  font-family: var(--font-display); font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px; border-radius: 999px;
  background: var(--navy-200); color: var(--navy-800);
}
.chip--gold  { background: var(--gold-300); color: var(--navy-900); }
.chip--ghost { background: transparent; color: var(--navy-800); border: 1px solid var(--line-strong); }
.bg-navy .chip { background: var(--cream-a10); color: var(--cream); }
.bg-navy .chip--gold { background: var(--gold-500); color: var(--navy-900); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.96rem; color: var(--ink);
}
.field .req { color: var(--gold-800); margin-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  min-height: 52px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--navy-500);
  box-shadow: 0 0 0 4px oklch(0.46 0.10 252 / 0.18);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--gold-700); }
.field .hint { color: var(--muted); font-size: 0.88rem; }

.checkbox-group { display: grid; gap: 10px; }
.checkbox-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.checkbox-row:hover { border-color: var(--navy-500); background: var(--navy-50); }
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; min-height: auto;
  accent-color: var(--navy-800);
}

/* ---------- Layout helpers ---------- */
.stack    { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 10px; }
.stack-lg { display: grid; gap: 32px; }
.row      { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.divider  { height: 1px; background: var(--line); border: 0; margin-block: 24px; }

/* ---------- Page hero (Tile A flavored sub-page header) ---------- */
.page-hero {
  background: var(--navy-800);
  color: var(--cream);
  padding-block: clamp(64px, 9vw, 128px) clamp(56px, 8vw, 96px);
  position: relative; overflow: hidden;
}
.page-hero h1 { color: var(--cream); font-size: var(--type-h1); max-width: 22ch; }
.page-hero p.lead { color: oklch(0.88 0.012 80); max-width: 56ch; margin-top: 18px; }
.page-hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.page-hero__photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.page-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .page-hero__grid { grid-template-columns: 1fr; }
}

/* ---------- Reveals ---------- */
.reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }
[data-reveal-stagger] > * { transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
[data-reveal-stagger]:not(.is-visible) > * { opacity: 0; transform: translateY(20px); }
@media (prefers-reduced-motion: reduce) {
  .reveal, [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* JS-off safety: if site.js never runs, never hide content. */
.no-js .reveal, .no-js [data-reveal-stagger] > * {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ---------- Program icon medallion ---------- */
.icon-medallion {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--navy-200);
  color: var(--navy-800);
  flex: none;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}
.icon-medallion svg { width: 26px; height: 26px; }
a:hover > .icon-medallion,
.card:hover .icon-medallion,
.program:hover .icon-medallion { background: var(--gold-500); color: var(--navy-900); }

/* ---------- Section heading scaffolding ---------- */
.section-head {
  max-width: 60ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 { margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--muted); }

/* ---------- Note / inline callout (no side stripe) ---------- */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  background: oklch(0.96 0.04 85);
  border: 1px solid var(--gold-300);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 0.95rem; color: var(--navy-900);
  max-width: 65ch;
}
.note svg { width: 19px; height: 19px; flex: none; color: var(--gold-700); margin-top: 2px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.no-wrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
