/* ═══════════════════════════════════════════════════════════════
   BROTHERHOOD — Funding page (uses tokens.css for base/nav/buttons)
   ═══════════════════════════════════════════════════════════════ */

.fundpage { background: var(--bg); }
.fundpage .nav { background: oklch(0.09 0 0 / 0.62); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line-soft); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

#main { min-height: 70vh; }

/* ── page header ──────────────────────────────────────────────── */
.fund-hero {
  position: relative;
  max-width: 1180px; margin-inline: auto;
  padding: clamp(7rem, 14vh, 10rem) var(--space-gutter) clamp(2rem, 5vw, 3rem);
}
.fund-hero::before { /* soft warm glow behind the header */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 82% 8%, oklch(0.28 0.09 20 / 0.32), transparent 62%);
}
.fund-hero .rite-kicker { margin-bottom: 1.1rem; }
.fund-title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 0.98; letter-spacing: -0.014em;
  text-wrap: balance;
}
.fund-sub {
  margin-top: 1.4rem; max-width: 58ch;
  font-size: var(--step-1); line-height: 1.5; color: var(--ink-dim);
}
.fund-meta {
  margin-top: 1.5rem;
  font-size: 0.85rem; letter-spacing: 0.02em; color: var(--muted);
}
.fund-meta strong {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.1rem; color: var(--champagne);
  margin-right: 0.15rem;
}
.fund-note { font-style: italic; font-family: var(--font-serif); }

/* ── controls: search + filter chips ──────────────────────────── */
.fund-controls {
  position: sticky; top: 0; z-index: var(--z-sticky);
  max-width: 1180px; margin-inline: auto;
  padding: 1rem var(--space-gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem;
  background: oklch(0.11 0 0 / 0.86);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--line-soft);
}
.fund-search {
  display: inline-flex; align-items: center; gap: 0.6rem;
  flex: 1 1 280px; min-width: 0;
  padding: 0.7em 1em;
  border-radius: 11px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.fund-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.fund-search input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  color: var(--ink); font-size: 0.95rem;
}
.fund-search input::placeholder { color: var(--muted); }
.fund-search:focus-within { box-shadow: inset 0 0 0 1px oklch(0.87 0.06 80 / 0.5); }

.fund-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fund-chip {
  border: 0; cursor: pointer;
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  padding: 0.5em 0.95em; border-radius: 999px;
  color: var(--ink-dim); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.fund-chip:hover { color: var(--ink); }
.fund-chip:focus-visible { outline: 2px solid var(--champagne); outline-offset: 2px; }
.fund-chip.is-on {
  color: oklch(0.18 0.03 80); background: var(--champagne); box-shadow: none;
}

/* ── program grid ─────────────────────────────────────────────── */
.fund-grid {
  max-width: 1180px; margin: clamp(1.6rem, 4vw, 2.6rem) auto 0;
  padding-inline: var(--space-gutter);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(322px, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
  align-items: start;
}

.prog {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: clamp(1.25rem, 2.4vw, 1.6rem);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 24px 54px -30px oklch(0 0 0 / 0.6);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.prog:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--line), 0 32px 64px -28px oklch(0 0 0 / 0.72);
}
.prog[hidden] { display: none; }

.prog-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.prog-badge {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.34em 0.72em; border-radius: 999px; white-space: nowrap;
}
.prog-badge--accelerator { color: var(--champagne); background: oklch(0.87 0.06 80 / 0.09); box-shadow: inset 0 0 0 1px oklch(0.87 0.06 80 / 0.4); }
.prog-badge--vc { color: var(--crimson-bright); background: oklch(0.7 0.17 12 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.7 0.17 12 / 0.45); }
.prog-badge--grant { color: oklch(0.8 0.13 155); background: oklch(0.72 0.15 155 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.72 0.15 155 / 0.45); }
.prog-badge--fellowship { color: oklch(0.78 0.11 300); background: oklch(0.72 0.13 300 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.72 0.13 300 / 0.45); }
.prog-badge--credits { color: oklch(0.78 0.1 250); background: oklch(0.72 0.12 250 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.72 0.12 250 / 0.45); }
.prog-badge--crowdfunding { color: oklch(0.8 0.1 190); background: oklch(0.74 0.11 190 / 0.1); box-shadow: inset 0 0 0 1px oklch(0.74 0.11 190 / 0.45); }
.prog-amt {
  font-family: var(--font-display); font-size: 1.28rem; line-height: 1;
  color: var(--ink); white-space: nowrap;
}

.prog-name { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.05; margin-top: 0.15rem; }
.prog-meta { font-size: 0.8rem; color: var(--champagne); letter-spacing: 0.01em; }
.prog-desc { font-size: 0.88rem; line-height: 1.58; color: var(--ink-dim); }

.prog-facts {
  list-style: none; padding: 0; margin: 0.15rem 0 0;
  display: flex; flex-direction: column; gap: 0.3rem;
  font-size: 0.79rem; color: var(--muted);
}
.prog-facts li { position: relative; padding-left: 1.1rem; }
.prog-facts li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--crimson-bright); opacity: 0.75;
}
.prog-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.15rem; }
.prog-tags span {
  font-size: 0.66rem; font-weight: 500; padding: 0.3em 0.66em; border-radius: 7px;
  color: var(--ink-dim); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft);
}

.prog-qual {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem; line-height: 1.55; color: var(--muted);
}
.prog-qual-label {
  display: block; margin-bottom: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--champagne);
}
.prog-qual b { color: var(--ink-dim); font-weight: 600; }

.prog-link {
  margin-top: auto; padding-top: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.01em;
  color: var(--crimson-bright);
  transition: gap 0.3s var(--ease-out), color 0.25s ease;
}
.prog-link svg { width: 15px; height: 15px; }
.prog:hover .prog-link { gap: 0.6rem; }
.prog-link:hover { color: var(--ink); }
.prog-link:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; border-radius: 4px; }

.fund-empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem;
  font-family: var(--font-serif); font-style: italic; font-size: var(--step-1); color: var(--muted);
}
.fund-reset {
  border: 0; cursor: pointer; font: inherit; font-style: normal; font-weight: 700;
  color: var(--crimson-bright); background: none; text-decoration: underline; text-underline-offset: 3px;
}

.fund-disclaimer {
  max-width: 1180px; margin: clamp(2.4rem, 5vw, 4rem) auto 0;
  padding: 1.4rem var(--space-gutter) 0;
  font-size: 0.78rem; line-height: 1.6; color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ── footer (self-contained; mirrors the home page) ───────────── */
.footer { background: var(--bg-deep); margin-top: clamp(3rem, 7vw, 6rem); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
  max-width: 1180px; margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) var(--space-gutter);
}
.footer-mark { font-family: var(--font-display); letter-spacing: 0.3em; font-size: 1.25rem; }
.footer-tag { margin-top: 0.7rem; font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 0.95rem; }
.footer-col h3 { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; font-weight: 500; }
.footer-col a { display: block; padding-block: 0.28rem; color: var(--ink-dim); font-size: 0.95rem; transition: color 0.25s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding: 1.4rem var(--space-gutter) 2rem; max-width: 1180px; margin-inline: auto;
  font-size: 0.78rem; color: var(--muted);
}

/* ── reveal (progressive enhancement; only when JS + motion ok) ─ */
.js .prog { opacity: 0; transform: translateY(18px); }
.js .prog.in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 680px) {
  .fund-controls { position: static; }
  .fund-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* ── reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .grain { animation: none !important; }
  html { scroll-behavior: auto; }
  .js .prog { opacity: 1; transform: none; }
}
