/* ============================================================
   landing/misc.css — R2 Values / Blog / Donate pages,
   page-specific styles only.

   Sections in this file:
   1. Shared "value card" grid: icon + title + short description.
      Used by Values (core four values) and Donate (where support
      goes). Mirrors the Mission/Vision/Values card pattern already
      shipped on about.html, under the same class names, so both
      pages read as one consistent system even though they load
      separate stylesheets.
   2. Donate-page extras (hero note spacing only; pathway cards,
      key-idea, and FAQ all reuse existing shared components as-is).
   3. Blog-page listing: hero content-tracks, featured post, filter
      row, article card grid (feeds the CMS fetch in site.js), and
      the newsletter band. Includes a CSS-only empty state for the
      article grid so a zero-post state never renders a blank gap.

   Every color/font/spacing value below is a var(--...) token
   already defined in styles.css / site-extend.css. Those files
   are frozen; nothing here overrides them, only adds to them.
   ============================================================ */

/* ---------------------------------------------------------------
   1. Shared value-card grid (Values core values, Donate where-it-goes)
   --------------------------------------------------------------- */
.value-cards { margin-top: 40px; gap: 24px; }
.value-card {
  padding: 30px 28px 32px; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.value-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -24px rgba(81,69,168,0.26); }
.value-icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--bg-soft); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.cg-card-title { font-family: var(--f-display); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 10px; line-height: 1.3; }
.value-card p { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.dark .value-card { background: rgba(255,255,255,0.04); border-color: rgba(180,166,232,0.2); }
.dark .value-card p { color: var(--on-night-2); }
.dark .cg-card-title { color: var(--on-night-1); }
.dark .value-icon { background: rgba(255,255,255,0.06); }

@media (max-width: 720px) {
  .value-cards { gap: 18px; }
}

/* ---------------------------------------------------------------
   2. Donate: hero-adjacent spacing only. Pathway cards, the
   tax-deductible key-idea callout, and the FAQ grid all reuse
   .pathway / .key-idea / .faq-grid from site-extend.css unchanged.
   --------------------------------------------------------------- */
.give-lead { margin-bottom: 8px; }

/* ---------------------------------------------------------------
   3. Blog: hero content-tracks, featured post, filters, article
   grid, newsletter band.
   --------------------------------------------------------------- */
.content-track-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 48px; }
.track-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 22px; transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease); }
.track-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -22px rgba(81,69,168,0.22); }
.track-card .series-label, .series-label {
  display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--hair); color: var(--violet);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.post-meta .series-label { min-height: 20px; padding: 2px 7px; margin-bottom: 0; font-size: 9px; }
.track-card h3 { font-family: var(--f-display); font-size: 17px; font-weight: 560; line-height: 1.28; color: var(--ink); margin-bottom: 8px; letter-spacing: 0; }
.track-card p { font-size: 13.5px; line-height: 1.58; color: var(--muted); }

.featured-article {
  background: var(--night-2); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: 56px; border: 1px solid rgba(180,166,232,0.16);
  transition: box-shadow var(--dur-base) var(--ease);
}
.featured-article:hover { box-shadow: 0 30px 64px -30px rgba(20,14,40,0.55); }
.featured-article .fa-cover { overflow: hidden; }
.featured-article .fa-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-article .fa-body { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-article h2 {
  font-family: var(--f-display); font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.18; color: var(--on-night-1); margin-bottom: 16px; text-wrap: balance;
}
.featured-article .fa-excerpt { font-size: 15px; color: var(--on-night-2); line-height: 1.62; flex: 1; }
.featured-article .fa-read { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; font-size: 14.5px; font-weight: 500; color: var(--violet-300); }
.featured-article .fa-read .arr { transition: transform var(--dur-fast) var(--ease); }
.featured-article:hover .fa-read .arr { transform: translateX(4px); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn {
  display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 9px 16px; border-radius: 9999px;
  font-size: 13px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--hair); background: var(--surface);
  color: var(--ink-2); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.filter-btn.active, .filter-btn:hover { background: var(--violet); color: #fff; border-color: var(--violet); }
.filter-btn:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px -22px rgba(81,69,168,0.28); border-color: rgba(110,91,209,0.2); }
.article-card .ac-cover { aspect-ratio: 16/8; background: linear-gradient(150deg, #EAE6FA, #E6EEFB); overflow: hidden; }
.article-card .ac-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card .ac-cover.admin-cover { display: flex; align-items: center; justify-content: center; }
.article-card .ac-cover.admin-cover span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet); }
.article-card .ac-body { padding: 24px 24px 28px; flex: 1; display: flex; flex-direction: column; }
.article-card h3 { font-family: var(--f-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.28; color: var(--ink); margin-bottom: 12px; flex: 1; }
.article-card .ac-excerpt { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.article-card .ac-read { font-size: 13.5px; font-weight: 500; color: var(--violet); display: inline-flex; align-items: center; gap: 7px; }
.article-card .ac-read .arr { transition: transform var(--dur-fast) var(--ease); }
.article-card:hover .ac-read .arr { transform: translateX(4px); }

/* CSS-only graceful empty state: only paints if .article-grid ever
   ships with zero .article-card children (e.g. demo posts removed
   before CMS posts exist). Purely decorative; adds no JS and never
   interferes with site.js inserting the live .admin-published-grid. */
.article-grid:empty {
  display: block; padding: 56px 32px; text-align: center; background: var(--bg-soft);
  border: 1px dashed var(--hair); border-radius: 18px;
}
.article-grid:empty::before {
  content: "New essays are on the way. Check back soon, or explore the notes above.";
  display: block; font-size: 15px; color: var(--muted); line-height: 1.6;
}

.newsletter-band { background: var(--bg-soft); border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft); padding: 56px 0; }
.newsletter-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.newsletter-inner .nl-text { flex: 1; min-width: 240px; }
.newsletter-inner .nl-text h3 { font-family: var(--f-display); font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 8px; }
.newsletter-inner .nl-text p { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 50ch; }
.newsletter-inner form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.newsletter-inner input[type=email] {
  font-family: var(--f-body); font-size: 14.5px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--hair);
  border-radius: 10px; padding: 12px 16px; min-width: 260px; min-height: 46px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.newsletter-inner input[type=email]:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(110,91,209,0.13); }

@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article .fa-cover { aspect-ratio: 16/7; }
  .featured-article .fa-body { padding: 30px 26px; }
  .content-track-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .content-track-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Reduced motion: flatten every hover/transition added above.
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .value-card, .track-card, .featured-article, .filter-btn, .article-card,
  .article-card .ac-read .arr, .featured-article .fa-read .arr {
    transition: none !important;
  }
}
