
/* ==========================================================================
   Member Intelligence Hub — case study module
   Everything is scoped under .nbp so it can be dropped into a page without
   touching the surrounding theme.
   ========================================================================== */

.nbp {
  --paper:   #f1f2ee;
  --card:    #f8f9f6;
  --ink:     #0f1e18;
  --slate:   #46584f;
  --mute:    #6b7c73;
  --rule:    #d6dcd5;
  --stage:   #0d1a15;
  --accent:  #1f5b45;
  --signal:  #b5842f;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --data:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  box-sizing: border-box;
  margin: 0 auto;
  padding-block: clamp(36px, 6vw, 76px);
  padding-inline: 20px;
  max-width: 1180px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .nbp:not([data-theme="light"]) {
    --paper:  #0a100d;
    --card:   #121a16;
    --ink:    #edf1ed;
    --slate:  #a5b3aa;
    --mute:   #8a978e;
    --rule:   #22302a;
    --accent: #6fb294;
    --signal: #d3a455;
  }
}

.nbp[data-theme="dark"] {
  --paper:  #0a100d;
  --card:   #121a16;
  --ink:    #edf1ed;
  --slate:  #a5b3aa;
  --mute:   #8a978e;
  --rule:   #22302a;
  --accent: #6fb294;
  --signal: #d3a455;
}

.nbp *, .nbp *::before, .nbp *::after { box-sizing: inherit; }
.nbp :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nbp img { max-width: 100%; display: block; }

/* ------------------------------------------------------------------ header */

.nbp__head {
  display: grid;
  gap: 14px;
  max-width: 62ch;
}

.nbp__eyebrow {
  margin: 0;
  font-family: var(--data);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}

.nbp__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -.028em;
  text-wrap: balance;
}

.nbp__dek {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.5;
  color: var(--slate);
}

/* Spec plate — mono pairs, hairline separated. */
.nbp__spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0;
  margin-top: clamp(26px, 3.4vw, 40px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.nbp__spec div {
  padding: 14px 18px 14px 0;
  border-right: 1px solid var(--rule);
}

.nbp__spec div:last-child { border-right: 0; }
.nbp__spec div + div { padding-left: 18px; }

.nbp__spec dt {
  font-family: var(--data);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}

.nbp__spec dd {
  margin: 5px 0 0;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink);
}

/* ------------------------------------------------------------------- stage */

.nbp__stage {
  position: relative;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding: clamp(14px, 2vw, 26px);
  background: var(--stage);
  border-radius: 4px;
  overflow: hidden;
}

/* A faint plate behind the shot so the light UI sits on something, not on a
   void. */
.nbp__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(118% 88% at 50% 0%, rgba(31,91,69,.38), transparent 64%);
  pointer-events: none;
}

.nbp__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 1800 / 1125;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 3px;
  background: #fff;
}

.nbp__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .34s ease, transform .34s ease;
}

.nbp__shot.is-current { opacity: 1; transform: none; }

.nbp__count {
  position: absolute;
  z-index: 2;
  top: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 26px);
  padding: 5px 9px;
  border-radius: 3px;
  background: rgba(13,26,21,.74);
  color: #edf1ed;
  font-family: var(--data);
  font-size: 11.5px;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.nbp__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 3px;
  background: rgba(13,26,21,.68);
  color: #edf1ed;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}

.nbp__arrow:hover { background: rgba(13,26,21,.94); border-color: rgba(255,255,255,.5); }
.nbp__arrow--prev { left: clamp(8px, 1.4vw, 16px); }
.nbp__arrow--next { right: clamp(8px, 1.4vw, 16px); }

/* ----------------------------------------------------------------- caption */

.nbp__caption {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 2.4vw, 34px);
  margin-top: clamp(22px, 2.6vw, 32px);
  padding-bottom: clamp(22px, 2.6vw, 30px);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 860px) {
  .nbp__caption { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.nbp__slide-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.15;
  letter-spacing: -.018em;
  text-wrap: balance;
}

.nbp__what { margin: 0; color: var(--slate); }

.nbp__howlabel {
  margin: 0 0 10px;
  font-family: var(--data);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}

.nbp__how {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

/* Not a grid: these items mix a bold lead-in with a following text node, and
   in a grid container that stray text becomes its own item in a 13px column —
   which renders as one character per line. */
.nbp__how li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--slate);
}

.nbp__how li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 9px;
  height: 1px;
  background: var(--accent);
}

.nbp__how b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ thumbs */

.nbp__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 10px;
  margin-top: clamp(20px, 2.4vw, 26px);
}

.nbp__thumb {
  display: grid;
  gap: 8px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nbp__thumb img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--rule);
  border-radius: 2px;
  filter: saturate(.72);
  opacity: .62;
  transition: opacity .18s ease, filter .18s ease;
}

.nbp__thumb span {
  font-family: var(--data);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}

.nbp__thumb:hover img { opacity: .85; filter: none; }
.nbp__thumb[aria-current="true"] { border-bottom-color: var(--accent); }
.nbp__thumb[aria-current="true"] img { opacity: 1; filter: none; border-color: var(--accent); }
.nbp__thumb[aria-current="true"] span { color: var(--ink); }

/* --------------------------------------------------------------- receipts */

.nbp__receipts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 0;
  margin-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid var(--rule);
}

.nbp__receipt {
  padding: 18px 18px 18px 0;
  border-right: 1px solid var(--rule);
}

.nbp__receipt:last-child { border-right: 0; }
.nbp__receipt + .nbp__receipt { padding-left: 18px; }

.nbp__receipt b {
  display: block;
  font-family: var(--data);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.nbp__receipt span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--mute);
}

/* --------------------------------------------------------------- hard part */

.nbp__note {
  margin-top: clamp(30px, 3.6vw, 44px);
  padding: clamp(20px, 2.6vw, 28px) clamp(20px, 2.6vw, 30px);
  border-left: 3px solid var(--signal);
  background: var(--card);
  border-radius: 0 3px 3px 0;
}

.nbp__note p:first-of-type {
  margin: 0 0 12px;
  font-family: var(--data);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal);
}

.nbp__note p + p {
  margin: 0;
  max-width: 72ch;
  font-size: clamp(15.5px, 1.6vw, 17px);
  line-height: 1.55;
  color: var(--slate);
}

.nbp__note em { color: var(--ink); font-style: italic; }

.nbp__foot {
  margin-top: clamp(26px, 3vw, 34px);
  font-size: 13.5px;
  color: var(--mute);
}

@media (prefers-reduced-motion: reduce) {
  .nbp__shot { transition: none; transform: none; }
  .nbp__thumb img { transition: none; }
}

@media (max-width: 560px) {
  .nbp__spec div,
  .nbp__receipt { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
  .nbp__spec div:last-child,
  .nbp__receipt:last-child { border-bottom: 0; }
  .nbp__arrow { width: 38px; height: 38px; }
}
