/* ============================================================
   Explore Grants — public, SEO-indexable teaser pages
   Self-contained styles (decoupled from the app bundle).
   Palette mirrors the public marketing pages (landing/pricing/
   institutions): dark navy (#0d1520 / #1A2332) + gold (#B79257).
   ============================================================ */

:root {
  --nav: #0d1520;        /* nav bar + footer (matches landing) */
  --hero: #1A2332;       /* hero background */
  --gold: #B79257;
  --gold-hover: #a07e47;
  --gold-ada: #866F45;
  --navy-2: #1a2d4a;     /* secondary dark / cta band */
  --off-white: #FAF9F6;
  --ink: #1A2332;
  --ink-2: #5F6B7A;
  --ink-3: #8A94A3;
  --link: #1a2d4a;
  --card: #FFFFFF;
  --border: #E5E9EF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 21, 32, .05), 0 8px 24px rgba(13, 21, 32, .06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.55;
  padding-top: 68px; /* clears the fixed nav (matches landing/pricing/institutions) */
}
h1, h2, h3, h4 { font-family: 'Aleo', Georgia, serif; line-height: 1.2; color: var(--ink); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header (identical to the landing/pricing/institutions menu bar) ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 68px;
  background: rgba(13, 21, 32, 0.97);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo:hover { text-decoration: none; }
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--gold); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-logo-text { font-family: 'Aleo', serif; font-size: 1.1rem; font-weight: 700; color: #fff; }
.nav-logo-text strong { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: rgba(255, 255, 255, .7); font-size: .875rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }
.nav-ctas { display: flex; gap: 12px; align-items: center; }
.btn-nav-ghost {
  padding: 8px 20px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px;
  color: #fff; font-size: .875rem; font-weight: 500; background: transparent; transition: all .2s;
}
.btn-nav-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); text-decoration: none; }
.btn-nav-primary {
  padding: 8px 20px; background: var(--gold); border-radius: 8px; color: #fff;
  font-size: .875rem; font-weight: 600; border: none; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-primary:hover { background: var(--gold-hover); transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  display: inline-block; background: var(--gold); color: #fff;
  padding: .5rem 1.05rem; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: all .2s;
}
.btn-primary:hover { text-decoration: none; background: var(--gold-hover); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block; border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  padding: .45rem 1rem; border-radius: 8px; font-weight: 500; font-size: .9rem; background: transparent;
}
.btn-ghost:hover { text-decoration: none; background: rgba(255, 255, 255, .1); }

.ex-footer { margin-top: 3.5rem; padding: 2.5rem 0; background: var(--nav); color: rgba(255, 255, 255, .55); font-size: .88rem; }
.ex-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.ex-footer a { color: rgba(255, 255, 255, .8); }

/* ── Hero (index) ────────────────────────────────────────── */
.ex-hero { background: var(--hero); color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.ex-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse at 75% 35%, rgba(183, 146, 87, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 12% 80%, rgba(36, 123, 140, 0.07) 0%, transparent 50%);
}
.ex-hero .wrap { position: relative; z-index: 1; }
.ex-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 18ch; }
.ex-hero p { color: rgba(255, 255, 255, .68); font-size: 1.1rem; max-width: 60ch; margin-top: .9rem; }
.ex-hero .hero-cta { margin-top: 1.6rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Subset note ─────────────────────────────────────────── */
.ex-note {
  display: flex; align-items: flex-start; gap: .6rem;
  background: rgba(183, 146, 87, 0.1); border: 1px solid rgba(183, 146, 87, 0.3);
  color: #5c4d33; border-radius: 10px; padding: .8rem 1rem; font-size: .9rem;
  margin: 1.4rem 0;
}
.ex-note b { color: var(--gold-ada); }

/* ── Section + breadcrumb ────────────────────────────────── */
.section { padding: 2.4rem 0; }
.section h2 { font-size: 1.5rem; margin-bottom: 1.1rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); padding: 1rem 0 .25rem; }
.crumbs a { color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--gold-ada); }

/* ── Cards / grid ────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .55rem;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(13, 21, 32, .12); }
.card h3 { font-size: 1.06rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--gold-ada); }
.card .funder { font-size: .82rem; color: var(--gold-ada); font-weight: 600; }
.card .summary { font-size: .9rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-3); margin-top: auto; }
.card .meta b { color: var(--ink-2); font-weight: 600; }

/* ── Chips ───────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: rgba(183, 146, 87, 0.12); color: var(--gold-ada); border: 1px solid rgba(183, 146, 87, 0.3); border-radius: 999px; padding: .2rem .65rem; font-size: .76rem; font-weight: 600; }

/* ── Detail layout ───────────────────────────────────────── */
.detail { padding: 1.5rem 0 0; }
.detail h1 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); max-width: 26ch; }
.detail .sub { color: var(--ink-2); margin-top: .5rem; font-size: 1.02rem; }
.metarow { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.4rem 0; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.metarow .item { display: flex; flex-direction: column; gap: .15rem; }
.metarow .item .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.metarow .item .v { font-size: 1rem; font-weight: 600; color: var(--ink); }
.prose { max-width: 70ch; }
.prose p { margin: .7rem 0; color: var(--ink-2); }
.block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin: 1.4rem 0; }
.block h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.sol-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.sol-list li a { display: block; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); font-weight: 500; }
.sol-list li a:hover { text-decoration: none; border-color: var(--gold); background: #FFFCF6; }
.awards { display: flex; flex-direction: column; gap: .8rem; }
.award { border-left: 3px solid var(--gold); padding: .35rem 0 .35rem .85rem; }
.award .t { font-weight: 600; color: var(--ink); font-size: .95rem; }
.award .m { font-size: .82rem; color: var(--ink-3); }
.award .a { font-size: .88rem; color: var(--ink-2); margin-top: .25rem; }

/* ── Locked / blurred fit-score teaser ───────────────────── */
/* Both layers share one grid cell so the box grows to fit the TALLER of the
   two (the overlay), instead of being clipped to the blurred layer's height. */
.fi-locked { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 1.4rem 0; background: #fff; }
.fi-locked__blur, .fi-locked__overlay { grid-area: 1 / 1; }
.fi-locked__blur { filter: blur(6px); -webkit-user-select: none; user-select: none; pointer-events: none; opacity: .55; padding: 1.8rem; display: flex; align-items: center; gap: 1.4rem; }
.fi-ring {
  width: 92px; height: 92px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--gold) 0 78%, var(--border) 78% 100%);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.fi-ring::after { content: ""; position: absolute; inset: 10px; background: #fff; border-radius: 50%; }
.fi-ring b { position: relative; z-index: 1; font-size: 1.5rem; font-family: 'Aleo', serif; color: var(--ink); }
.fi-blurtext .l { font-weight: 700; color: var(--ink); }
.fi-blurtext .s { color: var(--ink-2); font-size: .92rem; }
.fi-locked__overlay {
  display: flex; flex-direction: column; gap: .55rem;
  align-items: center; justify-content: center; text-align: center; padding: 1.75rem 1.25rem;
  background: rgba(250, 249, 246, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.fi-locked__overlay .lock { width: 40px; height: 40px; border-radius: 50%; background: var(--hero); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.fi-locked__overlay .l { font-weight: 700; color: var(--ink); }
.fi-locked__overlay .s { font-size: .9rem; color: var(--ink-2); max-width: 40ch; }
.fi-cta { display: inline-block; background: var(--gold); color: #fff; padding: .6rem 1.2rem; border-radius: 9px; font-weight: 600; margin-top: .35rem; transition: all .2s; }
.fi-cta:hover { text-decoration: none; background: var(--gold-hover); transform: translateY(-1px); }

/* ── Inline CTA banner ───────────────────────────────────── */
.cta-banner { background: linear-gradient(135deg, var(--navy-2), var(--nav)); color: #fff; border-radius: var(--radius); padding: 1.8rem; text-align: center; margin: 2rem 0; }
.cta-banner h2 { color: #fff; font-size: 1.4rem; }
.cta-banner p { color: rgba(255, 255, 255, .7); margin: .5rem auto 1.1rem; max-width: 52ch; }

/* ── Funder index list ───────────────────────────────────── */
.funder-index { columns: 3 220px; column-gap: 2rem; }
.funder-index a { display: block; padding: .25rem 0; font-size: .92rem; break-inside: avoid; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .fi-locked__blur { flex-direction: column; text-align: center; }
}
