/* ============================================================
   The AI-First Operator — blog styles.
   Loaded after site.css (which provides tokens, .pill, .btn, etc.).
   Two surfaces: the index/hub (.bloglist) and the post page (.post).
   Reading typography is intentionally looser than the marketing
   pages: Neue Montreal is tightened for display, so long-form body
   copy gets a 720px measure, 19px/1.65, and off-black ink on cream.
   ============================================================ */

/* ---------- shared masthead ---------- */
.blog-masthead {
  text-align: center;
  padding: 140px 24px 24px;
  max-width: 820px;
  margin: 0 auto;
}
.blog-masthead .eyebrow {
  display: block;
  font: 600 13px/1 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.blog-masthead h1 {
  font: 500 clamp(40px, 6vw, 64px)/1.05 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.blog-masthead p {
  font: 400 19px/1.5 "Neue Montreal", system-ui, sans-serif;
  color: var(--muted);
  margin: 18px auto 0;
  max-width: 56ch;
  text-wrap: pretty;
}

/* ---------- index / hub ---------- */
.bloglist { max-width: 1080px; margin: 0 auto; padding: 48px 24px 40px; }

.bloglist__sec-label {
  font: 600 12px/1 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Category filter — soft colored pills, active gets an ink ring. */
.blogfilter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 28px; }
.blogfilter button {
  appearance: none; cursor: pointer; border: 0;
  font: 600 11px/1 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  opacity: 0.62; transition: opacity .15s ease, box-shadow .15s ease;
}
.blogfilter button:hover { opacity: 1; }
.blogfilter button[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.32); }
.blogfilter .bf-all { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.blogfilter .bf-all[aria-pressed="true"] { background: var(--ink); color: var(--cream); box-shadow: none; opacity: 1; }

/* The single "Most read" feature — subtle, elegant, set apart by a wide
   2-column layout and a hairline frame rather than loud color. */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 64px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.4); }
.feature__media {
  background: var(--cream);
  aspect-ratio: 16 / 11;
  position: relative;
  overflow: hidden;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature__glyph {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 28px;
  font: 500 30px/1.15 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: -0.02em; color: var(--ink);
}
.feature__body { padding: 40px 40px 36px; display: flex; flex-direction: column; gap: 14px; }
.feature__flag {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1 "Neue Montreal", system-ui, sans-serif;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
}
.feature__title { font: 500 clamp(26px, 3vw, 34px)/1.15 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.feature__dek { font-size: 17px; line-height: 1.55; color: var(--muted); margin: 0; }
.feature__meta { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.feature__cta { color: var(--blue); font-weight: 500; }

/* Post grid — image cover + title + date only, by request. Quiet, scannable cards. */
.postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.postcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #fff; text-decoration: none; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* Category filter collapses non-matching cards via the [hidden] attribute;
   override .postcard's flex display so they actually disappear. */
.postcard[hidden] { display: none; }
.postcard:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -24px rgba(0,0,0,0.5); }
.postcard__thumb { aspect-ratio: 16 / 10; background: var(--cream); border-bottom: 1px solid var(--line); overflow: hidden; }
.postcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.postcard__inner { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; }
.postcard__date { font: 400 13px/1 "Neue Montreal", system-ui, sans-serif; color: var(--muted); letter-spacing: 0.01em; }
.postcard__title { font: 500 20px/1.28 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.postcard__dek { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.postcard__cta { margin-top: auto; padding-top: 6px; color: var(--blue); font-weight: 500; font-size: 14px; }

.bloglist__empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 17px; }

/* ---------- inline newsletter callout (index + posts) ---------- */
.nlcard {
  background: var(--ink); color: var(--cream);
  border-radius: 20px; padding: 40px 40px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  margin: 64px auto 0; max-width: 1080px;
}
.nlcard h3 { font: 500 26px/1.15 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.015em; margin: 0 0 8px; color: #fff; }
.nlcard p { color: rgba(255,255,255,0.72); font-size: 15px; line-height: 1.5; margin: 0; }
.nlcard form { display: flex; gap: 10px; flex-wrap: wrap; }
.nlcard input {
  flex: 1; min-width: 200px; height: 52px; border-radius: 10px; border: 0;
  padding: 0 16px; background: rgba(255,255,255,0.08); color: #fff;
  font: 400 16px "Neue Montreal", system-ui, sans-serif;
}
.nlcard input::placeholder { color: rgba(255,255,255,0.45); }
.nlcard button {
  height: 52px; padding: 0 24px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font: 500 16px "Neue Montreal", system-ui, sans-serif;
  transition: background .25s ease;
}
.nlcard button:hover { background: var(--blue-deep); }
.nlcard__note { font-size: 12.5px; color: rgba(255,255,255,0.55); margin-top: 10px; grid-column: 1 / -1; }

/* Light variant — used inside posts so it doesn't fight the dark end-CTA below it. */
.nlcard--light { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.nlcard--light h3 { color: var(--ink); }
.nlcard--light p { color: var(--muted); }
.nlcard--light input { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.nlcard--light input::placeholder { color: rgba(0,0,0,0.4); }
.nlcard--light .nlcard__note { color: var(--muted); }

/* ============================================================
   POST PAGE
   ============================================================ */
.post { background: var(--bg); color: var(--ink); }
.post__head { max-width: 760px; margin: 0 auto; padding: 140px 24px 0; }
.post__crumb { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.post__crumb a { color: var(--muted); text-decoration: none; }
.post__crumb a:hover { color: var(--blue); }
.post__crumb span.sep { opacity: 0.5; }
.post__title { font: 500 clamp(34px, 5vw, 52px)/1.08 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.022em; text-wrap: balance; margin: 16px 0 18px; }
.post__dek { font: 400 20px/1.5 "Neue Montreal", system-ui, sans-serif; color: var(--muted); max-width: 60ch; margin: 0 0 24px; }
/* Title + date only (no author byline, per request). */
.post__meta {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.post__hero-img { margin: 40px auto 0; max-width: 1040px; padding: 0 24px; }
/* aspect-ratio + object-fit keep every hero the same 16:9 box no matter the source
   image size; the cream backing letterboxes anything that isn't exactly 16:9. */
.post__hero-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--cream); border-radius: 16px; display: block; }

/* Subtle "Connect on LinkedIn" link (blog masthead + post meta) */
.connect-li { display: inline-flex; align-items: center; gap: 7px; font: 500 13.5px/1 "Neue Montreal", system-ui, sans-serif; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; transition: border-color .18s ease, color .18s ease; }
.connect-li:hover { border-color: var(--blue); color: var(--blue); }
.connect-li svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.blog-masthead .connect-li { margin-top: 22px; }
.post__meta .connect-li { margin-left: auto; padding: 5px 11px; font-size: 12.5px; }
@media (max-width: 560px) { .post__meta .connect-li .connect-li__label { display: none; } }

/* Reading column — tuned for Neue Montreal on cream. */
.post__body { max-width: 720px; margin: 0 auto; padding: 56px 24px 0; font-size: 19px; line-height: 1.65; letter-spacing: -0.005em; }
.post__body > * + * { margin-top: 1.5em; }
.post__body p { color: #1a1a1a; text-wrap: pretty; }
.post__body h2 { font: 500 30px/1.2 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.02em; margin-top: 2em; scroll-margin-top: 100px; }
.post__body h3 { font: 500 22px/1.3 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.01em; margin-top: 1.7em; }
.post__body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post__body a:hover { color: var(--blue-deep); }
.post__body ul, .post__body ol { padding-left: 1.3em; }
.post__body li + li { margin-top: 0.5em; }
.post__body img { border-radius: 12px; margin: 2em auto; max-width: 100%; }
.post__body figure { margin: 2em 0; }
.post__body figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }

/* TL;DR — a collapsible light-blue callout under the hero, collapsed by default.
   Answer-first bullets (also helps AI engines cite the post). */
.post__tldr { background: #eaf1fd; border: 1px solid #d4e2fb; border-radius: 14px; overflow: hidden; }
.post__tldr-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 16px 22px;
  font: 500 15.5px/1.2 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.005em;
  color: var(--blue-deep);
}
.post__tldr-trigger:hover { background: #e1ebfc; }
.post__tldr__caret { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.post__tldr-trigger[aria-expanded="true"] .post__tldr__caret { transform: rotate(180deg); }
.post__tldr-panel { overflow: hidden; transition: height .32s var(--ease); }
.post__tldr-panel[hidden] { display: none; }
.post__tldr-panel-inner { padding: 2px 22px 20px; }
.post__tldr-panel ul { margin: 0; padding: 16px 0 0; list-style: none; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #d4e2fb; }
.post__tldr-panel li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.5; color: #1a2533; }
.post__tldr-panel li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
@media (prefers-reduced-motion: reduce) { .post__tldr__caret, .post__tldr-panel { transition: none; } }

.post__pullquote { border-left: 3px solid var(--blue); padding: 6px 0 6px 28px; margin: 2.2em 0; }
.post__pullquote p { font: 500 26px/1.35 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.015em; text-wrap: balance; color: var(--ink); margin: 0; }

.callout { display: flex; gap: 14px; background: #c9daf8; border-radius: 14px; padding: 20px 22px; font-size: 16px; line-height: 1.5; }
.callout--tip { background: #c8ebc1; }
.callout--note { background: #fceab6; }
.callout__body strong { display: block; margin-bottom: 4px; }

.post__body pre { background: #0f1012; color: #e8e8e6; border-radius: 12px; padding: 18px 20px; overflow-x: auto; font: 400 13.5px/1.6 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0; }
.post__body :not(pre) > code { background: var(--cream); border: 1px solid var(--line); border-radius: 6px; padding: 0.12em 0.4em; font: 400 0.85em ui-monospace, Menlo, monospace; }

/* in-post newsletter (uses .nlcard but single column) */
.post__nl { margin: 56px auto 0; max-width: 720px; padding: 0 24px; }
.post__nl .nlcard { grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 32px 30px; }

.post__share { max-width: 720px; margin: 48px auto 0; padding: 24px 24px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.post__share span { font-size: 13px; color: var(--muted); }
.post__share a { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 13px; transition: border-color .2s ease, color .2s ease; }
.post__share a:hover { border-color: var(--blue); color: var(--blue); }

/* End-of-post: Read next (left) + Work with us (right) */
.post__next { max-width: 1080px; margin: 64px auto 72px; padding: 0 24px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: stretch; }
.post__next-col { background: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; }
.post__next-label { display: block; font: 600 11px/1 "Neue Montreal", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.post__next-card { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); }
.post__next-thumb { width: 104px; height: 76px; flex: none; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.post__next-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post__next-thumb--all { display: grid; place-items: center; font-size: 26px; color: var(--blue); }
.post__next-info { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.post__next-title { font: 500 19px/1.25 "Neue Montreal", system-ui, sans-serif; letter-spacing: -0.01em; margin: 0; }
.post__next-card:hover .post__next-title { color: var(--blue); }
.post__next-svc { display: block; text-decoration: none; color: var(--ink); padding: 13px 0; border-top: 1px solid var(--line); }
.post__next-work .post__next-svc:first-of-type { border-top: 0; padding-top: 0; }
.post__next-svc strong { display: block; font-weight: 500; font-size: 16px; letter-spacing: -0.01em; }
.post__next-svc span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.post__next-svc:hover strong { color: var(--blue); }
.post__next-book { display: inline-block; margin-top: 16px; font-weight: 500; font-size: 15px; color: var(--blue); text-decoration: none; }
.post__next-book:hover { color: var(--blue-deep); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature__media { aspect-ratio: 16/9; }
  .postgrid { grid-template-columns: 1fr; }
  .nlcard, .post__nl .nlcard { grid-template-columns: 1fr; }
  .post__next { grid-template-columns: 1fr; }
  .blog-masthead { padding-top: 120px; }
  .post__head { padding-top: 120px; }
  .post__body { font-size: 17px; }
}
