/* Jason Moccia — Insights (index + article pages).
   Loads after styles.css and only adds what the homepage does not already own.
   Every value here resolves to a token from styles.css: the three type voices,
   the four ink steps, the one indigo. Nothing new is introduced — an archive
   and a reading page are new layouts, not a new design. */

/* Shared page rail. Matches the homepage's 1520 / 40px measure so a reader
   moving between the two never sees the margins shift. */
.insights-page,
.post-page {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* ═══ Index: page head ══════════════════════════════════════════════════ */

.page-head {
  padding: clamp(140px, 21vh, 230px) 0 clamp(46px, 6vh, 70px);
  border-bottom: 1px solid var(--line);
}
/* One word carrying a whole page. It sits between the hero step and the
   section step: larger than a section head because nothing above it competes,
   smaller than the homepage lockup because this is a room, not the front door. */
.page-head h1 {
  margin: 0;
  font-size: clamp(54px, 8.4vw, 142px);
}
/* The promise, in the same register the newsletter panel uses on the homepage:
   upright Newsreader a step above body. Not italic — that slope is Jason's own
   voice and this is the page describing itself. */
.page-lead {
  margin: 30px 0 0;
  max-width: 44ch;
  font-size: clamp(19px, 1.55vw, 26px);
  line-height: 1.38;
  letter-spacing: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.page-count { margin: 26px 0 0; color: var(--text-3); }

/* ═══ Index: filters ════════════════════════════════════════════════════ */

/* Progressive enhancement: with scripting off these are inert buttons and
   every article stays visible, which is the correct fallback for an archive. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0 40px;
}
.filter-chip {
  padding: 9px 17px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--fs-record);
  font-weight: 700;
  font-stretch: 90%;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent-text); }
/* Selected state inverts rather than tinting — the nav pill already taught the
   reader that "current" means a filled shape, so the chips speak the same way. */
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}
.filter-count {
  margin-left: 7px;
  font-family: var(--font-record);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: .6;
}
.filter-empty {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-body-sm);
}

/* ═══ Index: the list ═══════════════════════════════════════════════════ */

.article-list {
  counter-reset: post;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-item { display: flex; }
.article-item[hidden] { display: none; }

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 32px 30px 28px;
  box-sizing: border-box;
  background: #1B1B1E;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  transition: border-color .25s, background-color .25s, transform .25s cubic-bezier(.22, .61, .36, 1);
}
.article-card:hover {
  background: #1F1F24;
  border-color: var(--line-strong);
  transform: translateY(-3px);
  color: inherit;
}
.article-card:focus-visible { outline-offset: 4px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  color: var(--text-3);
}
/* The category is the one thing on the card a reader scans for, so it takes the
   same tinted pill the sheet carousel uses for its label — one badge treatment
   across the site rather than two. Shared with the article page's .post-cat. */
.article-cat,
.post-cat {
  padding: .34em .72em;
  border-radius: 999px;
  background: rgba(123, 138, 255, .14);
  color: var(--accent-text);
}
/* The date and the read time are one fact in two parts: a separator binds them,
   and nowrap keeps them on the same line so a wrap can never strand the
   separator at the start of the next one. */
.article-dates { white-space: nowrap; }
.article-read::before,
.post-read::before {
  content: '·';
  margin: 0 9px;
  color: var(--line-strong);
}

/* Archive numerals, from a counter — the index is presentation, so it stays out
   of the accessibility tree the same way the nav drawer's numbers do. Filtering
   hides items with `display: none`, which does not increment a counter, so a
   filtered view renumbers from 01 instead of showing gaps. */
.article-item { counter-increment: post; }
.article-num {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--line-strong);
}
.article-num::before { content: counter(post, decimal-leading-zero); }

/* Card titles sit a full step below the page head, and two steps below on the
   lead card — a card title must never read as a section head. */
.article-title {
  margin: 0;
  font-size: clamp(21px, 1.65vw, 27px);
  transition: color .25s;
}
.article-card:hover .article-title { color: var(--accent-text); }
.article-desc {
  margin: 0;
  font-size: var(--fs-body-sm);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
/* Pinned to the bottom so every card in a row ends on the same line no matter
   how long its summary runs. */
.article-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  transition: color .25s;
}
.article-cta i { font-style: normal; transition: transform .25s cubic-bezier(.22, .61, .36, 1); }
.article-card:hover .article-cta { color: var(--accent-text); }
.article-card:hover .article-cta i { transform: translateX(5px); }

/* The lead card — the most recent piece, given the width of the whole row and
   the indigo-washed surface the homepage reserves for its closing panel. */
.article-item--lead { grid-column: 1 / -1; }
.article-item--lead .article-card {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px 56px;
  align-items: end;
  padding: 44px 42px 40px;
  background: #1A1B22;
  border-color: #33364C;
}
.article-item--lead .article-card:hover { background: #1E1F28; border-color: var(--accent); }
.article-item--lead .article-meta { grid-column: 1; }
.article-item--lead .article-title {
  grid-column: 1;
  font-size: var(--fs-display-2);
  max-width: 15ch;
}
.article-item--lead .article-desc {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  font-size: var(--fs-body);
}
.article-item--lead .article-cta {
  grid-column: 2;
  grid-row: 3;
  margin-top: 0;
  border-color: #33364C;
}
.article-item--lead .article-num { color: #4A4E6B; }
.article-latest {
  padding: .34em .72em;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #FFFFFF;
}

/* ═══ Article page ══════════════════════════════════════════════════════ */

/* Reading progress. One number, one transform — the same restraint the
   Consultant → Founder rule uses on the homepage. */
#readProgress {
  position: fixed;
  z-index: 55;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}
#readProgress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-text));
}

.post {
  max-width: 748px;
  margin: 0 auto;
}
.post-head {
  padding: clamp(120px, 17vh, 190px) 0 40px;
  border-bottom: 1px solid var(--line);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 40px;
  color: var(--text-3);
}
.back-link i { font-style: normal; transition: transform .25s cubic-bezier(.22, .61, .36, 1); }
.back-link:hover { color: var(--accent-text); }
.back-link:hover i { transform: translateX(-4px); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 26px;
  color: var(--text-3);
}
/* .post-cat shares the .article-cat pill above. */
.post-title {
  margin: 0;
  font-size: clamp(33px, 4.2vw, 62px);
}
/* The deck. Upright Newsreader between the display title and the record byline
   — the same three-voice ladder the homepage newsletter panel walks. */
.post-deck {
  margin: 24px 0 0;
  max-width: 47ch;
  font-size: clamp(19px, 1.5vw, 25px);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.post-byline { margin: 32px 0 0; color: var(--text-3); }
.post-byline strong { color: var(--ink); font-weight: 700; }

/* ── body prose ── */

/* One step above the homepage's body size. The homepage is scanned; this is
   read end to end, and 8 minutes of Newsreader on dark earns the extra pixel. */
.post-body {
  padding: 46px 0 0;
  font-size: clamp(18px, 1.35vw, 20.5px);
  line-height: 1.72;
  color: var(--text-2);
}
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.35em; text-wrap: pretty; }
/* The opening paragraph carries the weight of a lede without being a separate
   element in the source — one selector instead of a frontmatter field. */
.post-body > p:first-of-type {
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--ink);
}
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(123, 138, 255, .4);
}
.post-body a:hover { text-decoration-color: var(--accent-text); }

/* Section heads inside an article take the display voice, one step down from a
   card title. The hairline above does the work a blank line cannot: it says a
   new section started, not that a paragraph got bold. */
.post-body h2 {
  margin: 2.6em 0 .75em;
  padding-top: 1.1em;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 84%;
  font-optical-sizing: auto;
  font-size: clamp(22px, 1.95vw, 30px);
  line-height: 1.08;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}
/* Same voice, no rule, and dropped to the record size — subordinate by
   treatment rather than by a second family. */
.post-body h3 {
  margin: 2.1em 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 88%;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.25;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
}
.post-body h4 {
  margin: 1.9em 0 .4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Pull quotes. Upright, not italic: an article is already Jason speaking, so
   the slope would mark nothing. The indigo rule is what sets the line apart. */
.post-pull {
  margin: 2.1em 0;
  padding: 2px 0 2px 26px;
  border-left: 2px solid var(--accent);
  font-size: clamp(20px, 1.65vw, 25px);
  line-height: 1.38;
  letter-spacing: -.004em;
  color: var(--ink);
}
.post-pull p { margin: 0 0 .5em; }
.post-pull p:last-child { margin-bottom: 0; }

.post-list {
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.post-list li { position: relative; padding-left: 1.5em; line-height: 1.6; }
.post-list--dot li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-3);
}
/* Ordered lists number in the record voice — a step count is a record, the
   same class of thing as a date or a client count. */
.post-list--num { counter-reset: postitem; }
.post-list--num li { counter-increment: postitem; padding-left: 2.1em; }
.post-list--num li::before {
  content: counter(postitem, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .28em;
  font-family: var(--font-record);
  font-size: 11px;
  font-weight: 600;
  font-stretch: 75%;
  letter-spacing: .08em;
  color: var(--text-3);
}

.post-body code {
  padding: .12em .4em;
  border-radius: 3px;
  background: rgba(236, 234, 228, .07);
  font-family: var(--font-record);
  font-size: .82em;
  font-stretch: 75%;
  color: var(--ink);
}
.post-rule {
  margin: 2.8em 0;
  border: 0;
  height: 1px;
  background: var(--line);
}

.post-callout {
  margin: 2.1em 0;
  padding: 24px 26px;
  background: #1B1B1E;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .95em;
  line-height: 1.6;
}
.post-callout p { margin: 0; }
/* Doubled class outranks `.post-callout p` without reaching for !important. */
.post-callout .post-callout-label { margin: 0 0 10px; color: var(--accent-text); }

.post-figure { margin: 2.6em 0; }
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.post-figure figcaption { margin-top: 14px; color: var(--text-3); }

/* ── prev / next ── */

.post-siblings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 748px;
  margin: clamp(70px, 9vh, 100px) auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.post-sibling {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px;
  background: #1B1B1E;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .25s, background-color .25s;
}
.post-sibling:hover { background: #1F1F24; border-color: var(--accent); }
.post-sibling .t-record { color: var(--text-3); }
.post-sibling-title { font-size: 17px; line-height: 1.15; }
.post-sibling:hover .post-sibling-title { color: var(--accent-text); }
.post-sibling--next { text-align: right; }
.post-sibling--empty { border: 0; background: none; }

/* ═══ Newsletter band ═══════════════════════════════════════════════════ */

/* The homepage argues the newsletter case over a full 90vh panel. Here it is a
   closing block, so it keeps the panel's voice order — record label, Newsreader
   promise, Newsreader detail, proof, action — at a fraction of the height. */
.nl-band {
  margin: clamp(90px, 12vh, 140px) 0 0;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 60px);
  background: #1B1C24;
  border: 1px solid #33364C;
  border-radius: 12px;
}
.nl-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px clamp(40px, 6vw, 90px);
  align-items: end;
  max-width: 1100px;
}
.nl-band-inner > .eyebrow,
.nl-band-lead,
.nl-band-desc { grid-column: 1; }
.nl-band-action {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
.nl-band-lead {
  margin: 0 0 14px;
  max-width: 26ch;
  font-size: clamp(21px, 2vw, 32px);
  line-height: 1.24;
  letter-spacing: -.005em;
  color: var(--ink);
  text-wrap: balance;
}
.nl-band-desc {
  margin: 0 0 24px;
  font-size: var(--fs-body-sm);
  line-height: 1.55;
  color: var(--text-2);
}
/* Carries .nl-join (styles.css) in markup; only the band's tighter measure
   and flush margin differ. */
.nl-band-join {
  margin: 0;
  max-width: 32ch;
}

/* The footer itself lives in styles.css (`.site-foot`) — it is shared with the
   home page, so it is defined once where both stylesheets can reach it. */

/* ═══ Responsive ════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* The lead card's two columns need real width to earn the split; below this
     it reads better as one column with a larger title than as two cramped ones. */
  .article-item--lead .article-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 34px 30px 30px;
    /* The grid above bottom-aligns its rows; carried into a column flex box
       that same value becomes a cross-axis end, which right-aligns every child
       narrower than the card. */
    align-items: stretch;
  }
  .article-item--lead .article-title { max-width: none; font-size: clamp(26px, 4.4vw, 40px); }
  .article-item--lead .article-desc { font-size: var(--fs-body-sm); }
  .post-siblings { grid-template-columns: 1fr; }
  .post-sibling--next { text-align: left; }
  .post-sibling--empty { display: none; }
  /* The band's second column has no width to live in here, and an `auto` track
     next to a `1fr` one will happily crush the prose to one word per line. */
  .nl-band-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .nl-band-action { grid-column: 1; grid-row: auto; }
}

@media (max-width: 600px) {
  .sub-page { --page-gutter: 20px; }
  .article-list { grid-template-columns: 1fr; }
  .article-card,
  .article-item--lead .article-card { padding: 26px 22px 24px; }
  /* At this width the numeral and the category pill fight for the same corner. */
  .article-num { top: 24px; right: 22px; font-size: 10px; }
  .post-head { padding-top: 110px; }
  .back-link { margin-bottom: 28px; }
  .post-body { font-size: 17.5px; }
  .post-pull { padding-left: 18px; }
  .filters { padding: 24px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-card,
  .article-card:hover,
  .article-cta i,
  .back-link i,
  .post-sibling { transition: none; transform: none; }
  #readProgress span { transition: none; }
}
