/*
 * Blog — archive head, featured split card, post grid, pagination.
 *
 * Card, media, slip and tag treatments come from components.css; this is composition.
 */

/* -------------------------------------------------------------------------
 * Head
 * ---------------------------------------------------------------------- */

.lb-blog-head {
  padding-block: 56px 32px;
}

.lb-blog-head__title {
  margin: 0 0 12px;
}

.lb-blog-head__lede {
  max-width: 62ch;
}

.lb-blog-head__lede p {
  margin: 0;
  font-size: var(--text-body-size);
  color: var(--muted);
}

.lb-tags {
  row-gap: var(--space-2);
}

/* -------------------------------------------------------------------------
 * Featured card
 * ---------------------------------------------------------------------- */

.lb-chrome a.lb-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease-standard);
}

.lb-chrome a.lb-featured:hover {
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.lb-featured__pitch {
  background: var(--surface-darker);
  color: var(--white);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  display: grid;
  align-content: center;
  gap: 14px;
}

.lb-featured__over {
  color: var(--signal-amber);
}

.lb-featured__title {
  margin: 0;
  /* The ramp's Title step — the same ruling the login panel's h2 clamp received.
     The pitch caps its own line length, so a fixed step never runs long. */
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: var(--weight-bold);
  color: var(--white);
  text-wrap: balance;
}

.lb-featured__excerpt {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--text-on-dark-2);
  max-width: 46ch;
}

.lb-featured__meta {
  font-size: var(--text-small);
  color: var(--text-on-dark-4);
}

.lb-featured__panel {
  background: var(--surface-raised);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  display: grid;
  align-content: center;
  gap: var(--space-4);
}

/* The worked example reuses the quote slip's rows, without its card chrome —
   the featured panel is already a surface. */
.lb-featured__slip {
  display: grid;
  gap: 10px;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
}

.lb-featured__slip .lb-slip__row > span:first-child {
  font-family: var(--font-bangla), var(--font-body);
}

.lb-featured__fallback {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--ink);
}

.lb-featured__more {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--deep-green);
}

/* -------------------------------------------------------------------------
 * Post grid
 * ---------------------------------------------------------------------- */

.lb-blog-grid {
  padding-block-end: 72px;
}

.lb-blog-empty {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--muted);
}

/* -------------------------------------------------------------------------
 * Pagination
 *
 * Not in the design — it was drawn with exactly six posts. Built from the system's
 * own parts, at the same 44px target as every other control.
 * ---------------------------------------------------------------------- */

.lb-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-10);
}

.lb-chrome .lb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--control-height);
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  text-decoration: none;
  transition:
    background var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    color var(--dur-base) var(--ease-standard);
}

.lb-chrome .lb-pagination a.page-numbers:hover {
  border-color: var(--deep-green);
  color: var(--deep-green);
  text-decoration: none;
}

.lb-chrome .lb-pagination .page-numbers.current {
  background: var(--deep-green);
  border-color: var(--deep-green);
  color: var(--white);
}

.lb-chrome .lb-pagination .page-numbers.dots {
  border-color: transparent;
  color: var(--muted);
  min-width: auto;
  padding: 0 var(--space-1);
}

.lb-pagination .page-numbers span {
  font-family: var(--font-bangla), var(--font-body);
}

/* The previous arrow is the next arrow, turned around. */
.lb-pagination .lb-page__prev {
  transform: rotate(180deg);
}

/* -------------------------------------------------------------------------
 * Closing CTA
 * ---------------------------------------------------------------------- */

.lb-blog-cta {
  padding-block: 56px;
}

.lb-blog-cta .lb-container {
  justify-items: start;
}

.lb-blog-cta__title {
  margin: 0;
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: var(--weight-bold);
  color: var(--white);
  max-width: 26ch;
  text-wrap: balance;
}

.lb-blog-cta__lede {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--text-on-dark-2);
  max-width: 50ch;
}
