/* ============================================================================
   Homepage-only components — ported from the approved home prototype.
   Everything here is scoped under `main.home` so it never collides with the
   shared .hero/.card/.btn/.stats/.eq/.block/.kicker/.dot classes in
   system.css / site.css (which mean different things elsewhere). Loaded AFTER
   system.css + site.css. Colours map to the shared tokens so the page themes
   with the rest of the site; only the decorative canvases (index.js) are tuned
   for the dark default. Nav, footer and #progress live in the shared layer.
   ============================================================================ */

:root {
  /* index-only helpers: rgba()-able channel forms of the shared brand palette
     (custom props can't split a hex into channels). Mirror --burgundy (#800020)
     and the dark-mode --accent (#c8455f). Used for the hero canvas + glows. */
  --burgundy-rgb: 128, 0, 32;
  --accent-rgb: 200, 69, 95;
}

.home { overflow-x: hidden; }
.home ::selection { background: var(--accent-dim); color: var(--text); }

/* The nav brand mark lives in the shared layer (site.css). There is one mark and
   one theme now, so nothing to swap. */

/* ── hero ─────────────────────────────────────────────────────────────────── */
/* The #net canvas was removed in the Aug 2026 diet. It had overridden the shared
   hero glow (`::before { content: none }`) because it painted its own background;
   that override is gone too, so the glow from site.css comes back — otherwise
   removing the canvas would have left the hero flat. The ::after vignette that
   faded the canvas into the page went with it. */
.home .hero { position: relative; padding-block: 5rem 4rem; border-top: 0; }
.home .hero .container { position: relative; z-index: 2; }

/* The hero was briefly a two-column grid with an at-a-glance stats panel on the right,
   filling the space the removed #net canvas left. The panel restated things the page
   already says — the accept is in the updates band immediately below it, the paper count
   is on Research — so it went, and the hero is one column again. */

.home .eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.6rem;
}
.home .optima { display: block; width: 176px; height: 76px; margin: 0 0 1.7rem; }

.home .hero h1 {
  font-size: clamp(1.9rem, 4.3vw, 3.05rem);
  line-height: 1.1; font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 1.5rem; text-wrap: balance; max-width: 24ch; color: var(--text);
}
.home .lede { font-size: 1.12rem; color: var(--text-dim); max-width: 46rem; margin: 0 0 1.8rem; }

.home .verbose { font-style: italic; color: var(--text-dim); max-width: 38rem; margin: 0 0 1.4rem; font-size: 0.98rem; opacity: 0.85; }
.home .simple { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-dim); margin: 0 0 1.8rem; }
.home .simple b { color: var(--text); font-weight: 500; }

.home .triad {
  display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--text-dim);
  margin: 0 0 2.4rem; flex-wrap: wrap;
}
.home .triad .dot-sep { color: var(--accent); }
.home .triad .lbl { color: var(--text-dim); opacity: 0.8; text-transform: uppercase; font-size: 0.64rem; letter-spacing: 0.16em; margin-right: 0.2rem; }

/* stat row */
.home .hero-stats { display: flex; gap: 3rem; flex-wrap: wrap; padding: 1.4rem 0; border-top: 1px solid var(--line); max-width: 34rem; }
.home .stat-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); opacity: 0.85; margin-bottom: 0.35rem; }
.home .stat-val { font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }
.home .stat-accent { width: 34px; height: 2px; background: var(--accent); margin-top: 1.2rem; }

/* CTAs */
.home .cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2.2rem; }
.home .btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em;
  padding: 0.7rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line);
  color: var(--text); background: transparent; cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.home .btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.home .btn-primary { background: var(--burgundy); border-color: transparent; color: #fdf0f2; }
.home .btn-primary:hover { background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(var(--burgundy-rgb), 0.45); }

/* The credibility strip is gone (Aug 2026): it restated the archive a third time,
   directly under the updates band that already carried the latest accept. */

/* ── sections ─────────────────────────────────────────────────────────────── */
.home .block { padding-block: 5.5rem; border-top: 0; }
.home .kicker { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--text-dim); text-transform: none; margin-bottom: 1rem; display: block; }
.home .kicker b { color: var(--accent); }
.home .block h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 1.6rem; text-wrap: balance; color: var(--text); }
.home .body-text { color: var(--text-dim); max-width: 42rem; }

/* ── primitives (the Contribute triad; the friction equation moved to
   site.css + research.html Notation when the homepage stopped arguing the thesis) ── */
.home .primitives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.home .prim { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.4rem; background: var(--surface); transition: border-color 0.25s var(--ease), transform 0.25s var(--ease); }
.home .prim:hover { border-color: var(--accent); transform: translateY(-3px); }
.home .prim-sym { font-family: var(--font-mono); font-size: 2rem; font-style: italic; color: var(--accent); line-height: 1; margin-bottom: 0.7rem; }
.home .prim-name { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.home .prim-desc { font-size: 0.88rem; color: var(--text-dim); line-height: 1.55; }
.home .prim-desc em { color: var(--text); font-style: italic; }

/* ── programme / fund card ────────────────────────────────────────────────── */
.home .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; margin-top: 2rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.home .card:hover { border-color: var(--accent); transform: translateY(-2px); }
.home .card-eyebrow { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
.home .card h3 { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.home .card p { color: var(--text-dim); margin: 0 0 1.2rem; max-width: none; }
.home .card-foot { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; }
.home .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); display: inline-block; }

/* The metrics band is gone: it restated the hero stats verbatim — both blocks
   counted the same 20 publications, three screens apart. */

/* ── fund teaser ──────────────────────────────────────────────────────────── */
.home .fund .card { background: linear-gradient(180deg, rgba(var(--burgundy-rgb), 0.12), var(--surface)); border-color: var(--accent); }
.home .fund ul { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 0.7rem; }
.home .fund li { color: var(--text-dim); font-size: 0.95rem; padding-left: 1.4rem; position: relative; max-width: none; }
.home .fund li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 680px) { .home .primitives { grid-template-columns: 1fr; } }

/* ── the lab: crew row ────────────────────────────────────────────────────── */
/* A compact three-up of who actually works here. Deliberately not .person from
   site.css — that carries an 88px avatar and biography prose, which is About's
   job. This is a name, a role, and a link. */
.home .crew { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2.4rem; }
.home .crew__member {
  display: flex; flex-direction: column; gap: 0.4rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.home .crew__member:hover { border-color: var(--accent); transform: translateY(-3px); }
.home .crew__mark {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 0.4rem;
}
.home .crew__name { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.home .crew__role {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); line-height: 1.5;
}

/* ── featured open tasks (generated from roles.json) ──────────────────────── */
/* The effort figure leads, because "a weekend" is the part that makes someone
   read the second line. Same argument as the .task rows on join.html. */
.home .opentasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.home .opentask {
  display: flex; flex-direction: column; gap: 0.55rem;
  border: 1px solid var(--line); border-left: 3px solid var(--burgundy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.3rem 1.4rem; background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.home .opentask:hover { border-color: var(--accent); border-left-color: var(--accent); transform: translateY(-3px); }
.home .opentask__effort {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.home .opentask__task { font-size: 0.95rem; color: var(--text); line-height: 1.45; font-weight: 500; }
.home .opentask__who { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }

@media (max-width: 780px) {
  .home .crew, .home .opentasks { grid-template-columns: 1fr; }
}

/* ── hero etymology ───────────────────────────────────────────────────────── */
/* Moved into the hero (Aug 2026) from a standalone section three screens down. It
   explains the name the reader has just read, so it belongs before the lede, not
   after the whole pitch. Kept in mono at a smaller size than the lede so it reads
   as a gloss rather than as the opening argument. */
.home .hero__etym {
  font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.75;
  color: var(--text-dim); max-width: 46rem; margin: 0 0 1.6rem;
  border-left: 2px solid var(--burgundy); padding-left: 1.15rem;
}
.home .hero__etym b { color: var(--accent); font-weight: 500; }
.home .hero__etym i { color: var(--text); font-style: italic; }
.home .hero__ipa { color: var(--text); }
