/* =============================================================
   barrio_npm_prototype — shared landing-cluster chrome
   Owns the visual chrome shared by the two research landings
   (/research/landing-patai + /research/landing-pae) — cluster head,
   legend row, panel grid, panel header/body/foot, featured-project
   row markup, counter-axis chips, responsive collapse.

   Axis-specific rules live per-file:
     - css/patai.css → per-slug .np-lc-panel[data-patai="…"]  {--hue, --bg}
                     + framework grid (.np-matakitenga*, Pātai-landing only)
                     + .np-d-patai-* dot colours
     - css/pae.css   → per-slug .np-lc-panel[data-pae="…"]    {--hue, --bg}
                     + per-slug .np-lc-panel[data-rautaki="…"] {--hue, --bg}
                     + .np-d-pae-* + .np-d-rautaki-* dot colours

   Templates emit .np-lc-* neutral classes + a BEM modifier on the outer
   article: .np-lc-panel--patai / .np-lc-panel--pae / .np-lc-panel--rautaki
   (currently only .np-lc-cluster--rautaki carries axis-specific styling —
   smaller subheading, tighter margin — but the modifier is emitted on
   every panel + cluster for future axis-specific tweaks).

   Established Phase F of documentation/pae-landing-mirror-plan.md.
   ============================================================= */

/* ---------- cluster heading + legends ---------- */
.np-lc-cluster { margin: 32px 0 50px; }
.np-lc-cluster-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; padding-bottom: 13px; margin-bottom: 22px;
  border-bottom: 2px solid #2c2c2b;
}
.np-lc-cluster-head h2 {
  font-weight: 600; font-size: 22px; letter-spacing: -.2px;
  line-height: 1.15; margin: 0;
}
.np-lc-cluster-head h2 .np-en { font-weight: 400; color: #6c675f; }
.np-lc-cluster-head .np-lede {
  font-size: 14px; color: #6c675f; max-width: 520px; margin: 5px 0 0;
}
.np-lc-cluster-head .np-head-aside {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.np-lc-cluster-head .np-see-all {
  font-size: 13px; font-weight: 700; color: #356a66;
  text-decoration: none; white-space: nowrap;
}
.np-lc-cluster-head .np-see-all:hover { text-decoration: underline; }

/* Rautaki modifier — subordinate cluster below the Pae grid on the Pae
   landing. Tighter top margin so it flows visually from the Pae cluster;
   smaller h2 because it's a subheading, not a primary section head. */
.np-lc-cluster--rautaki { margin: 26px 0 50px; }
.np-lc-cluster--rautaki .np-lc-cluster-head h2 { font-size: 20px; }

/* ---------- legend row ---------- */
.np-legend {
  display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
  font-size: 12.5px; color: #6c675f;
}
.np-legend .np-lbl {
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  font-size: 11px;
}
.np-legend .np-k { display: inline-flex; align-items: center; gap: 6px; }
.np-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* ---------- 2×2 panel grid ---------- */
.np-lc-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}

/* ---------- panel shell ---------- */
.np-lc-panel {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid #e4e0d8;
  border-top: 6px solid var(--hue);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(40,40,40,.05), 0 6px 18px rgba(40,40,40,.06);
  --hue: #6c675f;
  --hue-dk: #2c2c2b;
}

/* ---------- panel header — photo behind a scrim ----------
   --bg is supplied per-panel as an inline custom property. When the
   corresponding term has no image field populated, the per-slug CSS
   default in patai.css / pae.css takes over. */
.np-lc-head {
  position: relative; min-height: 152px;
  padding: 18px 20px 16px;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  background-image:
    linear-gradient(to top,
      rgba(20,18,16,.80) 0%,
      rgba(20,18,16,.42) 52%,
      rgba(20,18,16,.30) 100%),
    var(--bg, none);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.np-lc-name {
  align-self: flex-start; display: inline-block;
  background: var(--hue); color: #fff;
  font-weight: 700; font-size: 19px; letter-spacing: -.2px; line-height: 1.15;
  padding: 7px 14px; border-radius: 6px;
  margin: 0 0 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.np-lc-name-link { color: inherit; text-decoration: none; }
.np-lc-name-link:hover,
.np-lc-name-link:focus { color: inherit; text-decoration: underline; }
.np-lc-desc {
  font-size: 14px; line-height: 1.45;
  color: rgba(255,255,255,.96);
  margin: 0; max-width: 46ch;
  /* Softer text-shadow for landing-cluster description over
     coloured hero — tightened blur 2px→1px + alpha .45→.20 so the
     shadow reads as edge separation only, not a heavy drop. */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.20);
}

/* ---------- panel body (featured projects list) ---------- */
.np-lc-body {
  display: flex; flex-direction: column; flex: 1;
  padding: 6px 6px 0;
}
.np-lc-feat-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #6c675f;
  padding: 14px 16px 4px;
}
.np-lc-projects { list-style: none; margin: 0; padding: 0; }
.np-lc-projects li { border-top: 1px solid #e4e0d8; }
.np-lc-projects li:first-child { border-top: 0; }

/* ---------- featured-project row markup ----------
   Neutral class names used by both landings + reused inside .np-lc-projects.
   Counter-axis chip lives on the child .np-*-tag (see below). */
.np-feat {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 13px 16px;
  text-decoration: none; color: inherit;
  transition: background .16s;
}
.np-feat:hover { background: #faf8f3; color: inherit; }
.np-feat .np-swatch {
  flex: none; width: 8px; align-self: stretch; border-radius: 4px;
  background: var(--hue); min-height: 38px;
}
.np-feat .np-ftx { flex: 1; }
.np-feat h4 {
  font-weight: 600; font-size: 14.5px; line-height: 1.25;
  margin: 0 0 3px; color: #2c2c2b;
}
.np-feat p {
  font-size: 12.5px; color: #6c675f; margin: 0; line-height: 1.4;
}
.np-feat .np-fmeta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.np-feat .np-ftype {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--hue-dk);
}
.np-feat .np-farw {
  flex: none; align-self: center; color: var(--hue-dk); font-weight: 700;
}

/* ---------- orthogonal project-type hue on the row ----------
   On the Pae and Pātai landings the panel is ALREADY the cluster, so the
   row swatch inheriting the panel's --hue spends colour on information the
   reader has by context. These rules re-key the swatch and the type label
   to the PROJECT TYPE instead, so a flagship Research Programme is
   identifiable at a glance inside any Pae panel. TWN 2026-08-22.

   Deliberately scoped to the swatch + label, NOT set as --hue on the row:
   the arrow (.np-farw) and the "Featured" promotion chip (.np-feat-badge)
   keep the panel hue, so the panel still reads as Pae/Pātai-owned.

   NOT applied on /research/landing-type — there the panel IS the type, so
   the axis isn't orthogonal and this would fight the panel's own colour.

   A row whose primary type has no canonical hue gets data-t="other", which
   matches no rule and keeps inheriting the panel --hue. Intentional
   fallback — better a coherent panel colour than a grey gap. */
.np-feat[data-t="full"]            .np-swatch { background: var(--np-pt-full); }
.np-feat[data-t="programme"]       .np-swatch { background: var(--np-pt-programme); }
.np-feat[data-t="scoping"]         .np-swatch { background: var(--np-pt-scoping); }
.np-feat[data-t="doctoral"]        .np-swatch { background: var(--np-pt-doctoral); }
.np-feat[data-t="internship"]      .np-swatch { background: var(--np-pt-internship); }
.np-feat[data-t="whakaaweawe"]     .np-swatch { background: var(--np-pt-whakaaweawe); }
.np-feat[data-t="featured-impact"] .np-swatch { background: var(--np-pt-featured-impact); }

/* Label takes the -dk variant — it is text on white, so it needs the
   darker end of the pair for contrast, matching .np-ftype's existing
   use of --hue-dk. `full` and `programme` read well at full strength. */
.np-feat[data-t="full"]            .np-ftype { color: var(--np-pt-full-dk); }
.np-feat[data-t="programme"]       .np-ftype { color: var(--np-pt-programme-dk); }
.np-feat[data-t="scoping"]         .np-ftype { color: var(--np-pt-scoping-dk); }
.np-feat[data-t="doctoral"]        .np-ftype { color: var(--np-pt-doctoral-dk); }
.np-feat[data-t="internship"]      .np-ftype { color: var(--np-pt-internship-dk); }
.np-feat[data-t="whakaaweawe"]     .np-ftype { color: var(--np-pt-whakaaweawe-dk); }
.np-feat[data-t="featured-impact"] .np-ftype { color: var(--np-pt-featured-impact-dk); }

/* Counter-axis chips inside .np-feat.
     - .np-pae-tag   → Pae chip, rendered on the Pātai landing rows.
     - .np-patai-tag → Pātai chip, rendered on the Pae landing rows. */
.np-feat .np-pae-tag,
.np-feat .np-patai-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #6c675f;
}
.np-feat .np-pae-tag .np-dot,
.np-feat .np-patai-tag .np-dot { width: 9px; height: 9px; }

/* Editorial "Featured" promotion chip on a row that carries the Featured
   project term. Sits in .np-fmeta alongside the type label + counter-axis
   chip. Solid panel hue so it matches the page's colour-coded language. */
.np-feat-badge {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
  background: var(--hue); color: #fff;
  line-height: 1.4;
}

/* ---------- panel footer (count + browse-all) ---------- */
.np-lc-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #e4e0d8;
  background: #fcfbf8;
}
.np-lc-count { font-size: 13px; color: #2c2c2b; }
.np-lc-count strong { color: var(--hue-dk); }
.np-lc-browse {
  font-size: 13px; font-weight: 700; color: var(--hue-dk);
  text-decoration: none; white-space: nowrap;
}
.np-lc-browse:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .np-lc-grid { grid-template-columns: 1fr; gap: 18px; }
}


/* Project date line on browse surfaces — "Commenced 2023 · Completed 2024".
   Sits in the .np-fmeta run beside the type label and counter-axis chips
   on the three research landings, and on the spotlight/teaser card faces.

   Quieter than .np-ftype deliberately: the type label is the row's primary
   classifier and the date is supporting detail, so this is regular weight
   against the type's 700 and steps down a colour. It must not compete for
   the same glance.

   The "Added <year>" fallback never reaches these surfaces — the builders
   pass allow_added: FALSE (see project-date-line-rollout-plan.md §8), so a
   project with no real date renders no span at all rather than an empty
   one. Every consumer gates on the value being non-empty. */
.np-fdate {
  font-size: 11px;
  font-weight: 400;
  color: #8a8377;
  white-space: nowrap;
}
/* On the spotlight hero the line is its own row under the pae chip rather
   than an inline meta item, so it needs to break out of the chip run. */
.np-fdate--hero {
  display: block;
  margin-top: 4px;
}
