/* VCMatch brand system — static microsite build.
   Tokens replicated from vc-matcher-app-rails theme.css / cards.css / blog.css. */

:root {
  --primary: #9779F0;
  --primary-foreground: #FFFFFF;
  --accent: #435DFD;
  --accent-foreground: #FFFFFF;
  --background: #F4F4FE;
  --foreground: #101626;
  --card: #FFFFFF;
  --secondary: #EFEFFC;
  --muted: #EFEFFC;
  --muted-foreground: #494F60;
  --border: #D6D6E3;
  --deep-purple: #331F6E;
  --cyan: #3598E0;
  --radius: 0.75rem;
  color-scheme: light;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

/* ===== Header ===== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
}
.site-logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo__mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--foreground); background: var(--secondary); }
.site-nav a.pill {
  background: rgb(151 121 240 / 0.1);
  color: var(--primary);
  font-weight: 600;
}
.site-nav a.pill:hover { background: rgb(151 121 240 / 0.2); }
@media (max-width: 640px) {
  .site-nav a.hide-mobile { display: none; }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, #101626 0%, #1a1040 25%, #331F6E 45%, #435DFD 70%, #9779F0 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.85);
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Bilmond', 'Inter', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 46rem;
}
.hero p {
  margin-top: 1.1rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgb(255 255 255 / 0.85);
  max-width: 40rem;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
}
.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-size: 1.5rem; font-weight: 800; }
.hero__stat span { font-size: 0.82rem; color: rgb(255 255 255 / 0.7); }

/* Item-page hero variant */
.hero--item { padding: 2.75rem 0 2.5rem; }
.hero--item h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

.breadcrumbs {
  font-size: 0.82rem;
  color: rgb(255 255 255 / 0.75);
  margin-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs .sep { opacity: 0.5; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: rgb(255 255 255 / 0.85);
}
.hero__meta .dot { opacity: 0.5; }

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip--accent { background: rgb(67 93 253 / 0.15); color: var(--accent); }
.chip--primary { background: rgb(151 121 240 / 0.12); color: #7857d8; }
.chip--neutral { background: var(--secondary); color: var(--muted-foreground); }
.chip--onDark { background: rgb(255 255 255 / 0.15); color: #fff; }
a.chip:hover { filter: brightness(0.93); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ===== Filter bar ===== */
.filterbar {
  position: sticky;
  top: 3.75rem;
  z-index: 30;
  background: rgb(244 244 254 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.filterbar__groups { display: flex; flex-direction: column; gap: 0.55rem; }
.filter-group { display: flex; align-items: baseline; gap: 0.6rem; }
.filter-group__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-foreground);
  flex-shrink: 0;
  width: 6.2rem;
}
.filter-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.filter-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  border-radius: 9999px;
  padding: 0.22rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--foreground); }
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filterbar__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted-foreground);
}
.filterbar__clear {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: none;
}
.filterbar__clear.is-visible { display: inline; }
@media (max-width: 700px) {
  .filter-group { flex-direction: column; gap: 0.25rem; }
  .filter-group__label { width: auto; }
}

/* ===== Card grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}

.item-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.item-card:hover {
  box-shadow: 0 10px 30px rgb(16 22 38 / 0.08);
  border-color: rgb(151 121 240 / 0.45);
  transform: translateY(-2px);
}
.item-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-bottom: 0.65rem;
}
.item-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 0.15s;
}
.item-card:hover h3 { color: var(--primary); }
.item-card__byline {
  margin-top: 0.4rem;
  font-size: 0.84rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.item-card__byline strong { color: var(--foreground); font-weight: 600; }
.item-card__summary {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card .chip-row { margin-top: 0.9rem; }
.item-card__arrow {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}
.item-card:hover .item-card__arrow { opacity: 1; }

/* ===== Sections ===== */
.section { padding: 2.5rem 0; }
.section--tight { padding: 1.75rem 0; }
.section h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.section__lede { color: var(--muted-foreground); max-width: 44rem; margin-bottom: 1.5rem; }

.browse-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
}
.browse-columns h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-foreground);
  margin-bottom: 0.8rem;
}
.browse-list { list-style: none; }
.browse-list li { margin-bottom: 0.35rem; }
.browse-list a {
  font-size: 0.92rem;
  color: var(--foreground);
  font-weight: 500;
}
.browse-list a:hover { color: var(--accent); text-decoration: underline; }
.browse-list .count { color: var(--muted-foreground); font-size: 0.8rem; font-weight: 400; }

/* ===== Item page (prose) ===== */
.article-body { padding: 2.75rem 0 3.5rem; }
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.4rem 0 0.9rem;
}
.article-body p { font-size: 1.05rem; line-height: 1.78; margin-bottom: 1.25rem; }

.answer-block {
  background: linear-gradient(135deg, #ede7fb 0%, #e4e0fd 50%, #dfe5ff 100%);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  box-shadow:
    0 0 0 1px rgb(151 121 240 / 0.25),
    0 2px 8px rgb(151 121 240 / 0.12),
    0 8px 24px rgb(67 93 253 / 0.08);
  margin-bottom: 2rem;
}
.answer-block h2 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--deep-purple);
}
.answer-block p { font-size: 1.1rem; line-height: 1.75; margin: 0; color: var(--foreground); }

.lessons-list { list-style: none; margin: 0 0 1.5rem; }
.lessons-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.8rem;
  font-size: 1.02rem;
  line-height: 1.65;
}
.lessons-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

blockquote.pull-quote {
  border-left: 4px solid var(--accent);
  padding: 0.35rem 0 0.35rem 1.4rem;
  margin: 1.75rem 0;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--foreground);
}
blockquote.pull-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--muted-foreground);
}

/* ===== Attribution / cross-link cards ===== */
.source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--foreground);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2.25rem 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.source-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgb(16 22 38 / 0.25);
}
.source-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(255 255 255 / 0.6);
  margin-bottom: 0.25rem;
}
.source-card__title { font-weight: 700; font-size: 1.05rem; }
.source-card__domain { font-size: 0.84rem; color: rgb(255 255 255 / 0.65); margin-top: 0.15rem; }
.source-card__arrow { font-size: 1.4rem; color: var(--primary); flex-shrink: 0; }

.availability-note {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  background: #FFF7E6;
  border: 1px solid #F0DCA8;
  color: #6B5518;
  border-radius: calc(var(--radius) - 0.25rem);
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  margin: -1.25rem 0 2rem;
}

.vc-crosslink {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2.25rem 0;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.vc-crosslink:hover { box-shadow: 0 8px 24px rgb(16 22 38 / 0.07); border-color: rgb(151 121 240 / 0.45); }
.vc-crosslink__logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vc-crosslink__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}
.vc-crosslink__name { font-weight: 700; font-size: 1.05rem; }
.vc-crosslink__hint { font-size: 0.85rem; color: var(--muted-foreground); margin-top: 0.1rem; }
.vc-crosslink__arrow { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.subtle-crosslink {
  font-size: 0.92rem;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin: 2.25rem 0 0;
}
.subtle-crosslink a { color: var(--accent); font-weight: 600; }
.subtle-crosslink a:hover { text-decoration: underline; }

/* ===== Related ===== */
.related { background: var(--secondary); border-top: 1px solid var(--border); }
.related .card-grid { padding-top: 1.5rem; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid rgb(214 214 227 / 0.6);
  background: rgb(16 22 38 / 0.04);
  padding: 2rem 0;
  margin-top: 0;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-footer__links a { transition: color 0.15s; }
.site-footer__links a:hover { color: var(--foreground); }

/* ===== Facet pages ===== */
.facet-intro {
  font-size: 1.12rem;
  line-height: 1.75;
  color: rgb(255 255 255 / 0.88);
  max-width: 44rem;
  margin-top: 1rem;
}

.empty-state {
  text-align: center;
  color: var(--muted-foreground);
  padding: 3.5rem 1rem;
  display: none;
}
.empty-state.is-visible { display: block; }
