/* VCMatch brand — canonical plain-CSS implementation for the Fundraising Library microsites.
   Tokens mirror vc-matcher-app-rails app/assets/tailwind/vcmatch/theme.css */

:root {
  --primary: #9779F0;
  --primary-foreground: #FFFFFF;
  --accent: #435DFD;
  --accent-foreground: #FFFFFF;
  --background: #F4F4FE;
  --foreground: #101626;
  --card: #FFFFFF;
  --card-foreground: #101626;
  --secondary: #EFEFFC;
  --muted: #EFEFFC;
  --muted-foreground: #494F60;
  --border: #D6D6E3;
  --ring: #435DFD;
  --deep-purple: #331F6E;
  --cyan: #3598E0;
  --neutral-400: #B4BBD3;
  --neutral-500: #8790A7;
  --neutral-600: #676D84;
  --radius: 0.75rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Bilmond', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .brand-mark {
  background: linear-gradient(135deg, #9779F0 20%, #435DFD 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand .brand-sub {
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted-foreground);
  font-size: .875rem;
  font-weight: 500;
  padding: .375rem .75rem;
  border-radius: 9999px;
  transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--foreground); background: var(--secondary); text-decoration: none; }
.site-nav a.active { color: var(--accent); background: rgba(67, 93, 253, 0.1); }

/* ---------- Hero ---------- */
.gradient-hero {
  background: linear-gradient(160deg, #101626 0%, #1a1040 25%, #331F6E 45%, #435DFD 70%, #9779F0 100%);
  color: #fff;
}
.gradient-brand {
  background: linear-gradient(135deg, #9779F0 38%, #435DFD 60%, #101626 90%);
  color: #fff;
}
.hero { padding: 4rem 0 3.5rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 700;
}
.hero .kicker {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9999px;
  padding: .3rem .85rem;
  margin-bottom: 1.25rem;
}
.hero p.lede {
  font-size: 1.125rem;
  max-width: 44rem;
  color: rgba(255,255,255,.88);
  margin: 0;
}
.hero .hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero .hero-stats .stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.hero .hero-stats .stat span { font-size: .8rem; color: rgba(255,255,255,.75); }
.hero a { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}
.section .section-sub { color: var(--muted-foreground); font-size: .95rem; margin: .35rem 0 0; max-width: 46rem; }
.see-all { font-size: .875rem; font-weight: 600; white-space: nowrap; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  position: relative;
}
.card:hover {
  box-shadow: 0 10px 25px -5px rgba(16, 22, 38, .1), 0 8px 10px -6px rgba(16, 22, 38, .08);
  border-color: rgba(151, 121, 240, .35);
}
.card h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; letter-spacing: -0.01em; }
.card h3 a { color: var(--foreground); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a { color: var(--accent); text-decoration: none; }
.card .card-meta { font-size: .8rem; color: var(--muted-foreground); }
.card .card-summary {
  font-size: .875rem;
  color: var(--muted-foreground);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .35rem;
}
.card .card-arrow { font-size: .82rem; font-weight: 600; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.card:hover .card-arrow { opacity: 1; transform: none; }

/* Chips & badges */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  border-radius: 9999px;
  padding: .18rem .7rem;
  font-size: .72rem;
  font-weight: 500;
  background: rgba(67, 93, 253, .1);
  color: var(--accent);
  white-space: nowrap;
}
.chip.chip-primary { background: rgba(151, 121, 240, .12); color: #6b46d8; }
.chip.chip-muted { background: var(--secondary); color: var(--muted-foreground); }
.badge-format {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 9999px;
  padding: .18rem .65rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  align-self: flex-start;
}
.badge-format.article { background: rgba(151, 121, 240, .14); color: #5c3fc9; }
.badge-format.video { background: rgba(53, 152, 224, .14); color: #1d6ca8; }
.badge-format.thread { background: rgba(67, 93, 253, .12); color: #2b3fc4; }

/* ---------- Filter bar ---------- */
.filter-bar {
  position: sticky;
  top: 3.5rem;
  z-index: 40;
  background: rgba(244, 244, 254, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.filter-groups { display: flex; flex-direction: column; gap: .5rem; }
.filter-group { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.filter-group .filter-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--neutral-500);
  min-width: 5.2rem;
}
.filter-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  border-radius: 9999px;
  padding: .28rem .8rem;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--foreground); }
.filter-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-count { font-size: .82rem; color: var(--muted-foreground); }
.filter-clear { background: none; border: none; color: var(--accent); font-size: .8rem; font-weight: 600; cursor: pointer; font-family: inherit; padding: .25rem .5rem; }
.filter-empty { padding: 2.5rem 0; text-align: center; color: var(--muted-foreground); display: none; }

/* ---------- Journey strip ---------- */
.journey { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; counter-reset: step; }
.journey-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.journey-step .step-num {
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(135deg, #9779F0, #435DFD);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .6rem;
}
.journey-step h3 { margin: 0 0 .2rem; font-size: 1rem; }
.journey-step .step-desc { font-size: .8rem; color: var(--muted-foreground); margin: 0 0 .7rem; }
.journey-step ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.journey-step li { font-size: .84rem; line-height: 1.4; padding-left: 1.1rem; position: relative; }
.journey-step li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.journey-step li a { color: var(--foreground); }
.journey-step li a:hover { color: var(--accent); }
.journey-step li .li-fmt { color: var(--neutral-500); font-size: .72rem; }

/* ---------- Format cards ---------- */
.format-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.format-card {
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: transform .2s, box-shadow .2s;
}
.format-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(16,22,38,.4); text-decoration: none; }
.format-card.f-articles { background: linear-gradient(150deg, #331F6E 0%, #6b46d8 60%, #9779F0 100%); }
.format-card.f-videos { background: linear-gradient(150deg, #101626 0%, #1e3a8a 55%, #3598E0 100%); }
.format-card.f-threads { background: linear-gradient(150deg, #1a1040 0%, #435DFD 70%, #6f86ff 100%); }
.format-card b { font-size: 1.9rem; line-height: 1; }
.format-card .fc-name { font-size: 1.05rem; font-weight: 700; }
.format-card .fc-desc { font-size: .82rem; color: rgba(255,255,255,.82); }
.format-card .fc-cta { margin-top: .5rem; font-size: .82rem; font-weight: 600; }

/* ---------- Browse links ---------- */
.browse-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.browse-cols h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--neutral-500); margin: 0 0 .75rem; }
.browse-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.browse-cols a { color: var(--foreground); font-size: .875rem; }
.browse-cols a:hover { color: var(--accent); }
.browse-cols .b-count { color: var(--neutral-500); font-size: .78rem; }

/* ---------- Prose / editorial ---------- */
.prose { font-size: 1.05rem; line-height: 1.78; max-width: 46rem; color: var(--foreground); }
.prose p { margin: 0 0 1.1rem; }
.prose blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1.25rem;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted-foreground);
}

/* ---------- Product module ---------- */
.product-module {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.product-module .pm-text b { display: block; font-size: 1rem; }
.product-module .pm-text span { font-size: .85rem; color: var(--muted-foreground); }
.btn {
  display: inline-block;
  border-radius: 9999px;
  padding: .55rem 1.3rem;
  font-size: .875rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: background .15s;
  white-space: nowrap;
}
.btn:hover { background: #2f49e8; text-decoration: none; color: #fff; }
.btn.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.btn.btn-ghost:hover { border-color: var(--primary); background: var(--secondary); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .8rem; color: var(--muted-foreground); padding: 1rem 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--neutral-400); }
.breadcrumbs a { color: var(--muted-foreground); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- People ---------- */
.person-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #9779F0, #435DFD);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}
.person-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.person-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.person-row:hover { border-color: rgba(151,121,240,.4); box-shadow: 0 6px 16px -6px rgba(16,22,38,.12); }
.person-row .avatar { width: 2.6rem; height: 2.6rem; font-size: .95rem; }
.person-row b a { color: var(--foreground); }
.person-row b a::after { content: ""; position: absolute; inset: 0; }
.person-row:hover b a { color: var(--accent); text-decoration: none; }
.person-row .pr-meta { font-size: .78rem; color: var(--muted-foreground); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(16, 22, 38, .04);
  margin-top: 3rem;
  padding: 2rem 0;
}
.site-footer .container { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.site-footer p { margin: 0; font-size: .875rem; color: var(--muted-foreground); }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.site-footer nav a { font-size: .875rem; color: var(--muted-foreground); transition: color .15s; }
.site-footer nav a:hover { color: var(--foreground); text-decoration: none; }
@media (min-width: 768px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; }
}

/* ---------- Misc ---------- */
.note { font-size: .8rem; color: var(--muted-foreground); }
.availability-note { font-size: .78rem; color: #92400e; background: #fef3c7; border-radius: .4rem; padding: .2rem .6rem; display: inline-block; }
@media (max-width: 640px) {
  .hero { padding: 3rem 0 2.5rem; }
  .site-header .container { height: auto; padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; }
  .filter-bar { position: static; }
}
