/* ==========================================================================
   blckmn.css — listing (home + category) redesign
   Editorial / refined. Layered on top of the legacy theme; only loaded by
   the default layout, so every rule here is scoped to listing pages.
   ========================================================================== */

:root {
  --bm-ink:    #1b1b1b;
  --bm-soft:   #43464b;
  --bm-muted:  #767a82;
  --bm-line:   #e9e9e7;
  --bm-panel:  #f5f4f1;
  --bm-dark:   #363636;
  --bm-accent: #f07261;
  --bm-sans:   'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bm-serif:  'Source Serif 4', Georgia, Cambria, 'Times New Roman', Times, serif;
  --bm-radius: 12px;
  --bm-ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

/* NOTE: the legacy theme sets `html { font-size: 62.5% }`, so 1rem = 10px.
   All font-sizes below are calibrated to that root (e.g. 1.6rem = 16px). */

/* Default body copy for listing pages = the article body size (20px).
   Everything inherits this unless a rule below intentionally sets it smaller. */
#content #primary.content-areas { font-size: 2rem; line-height: 1.6; }

/* Use the full width of the theme's 1100px panel instead of the legacy 9-col cage.
   (Don't exceed .mega-container's 1100px max-width — it has overflow:auto and
   would clip the right edge.) */
#content #primary.content-areas.col-md-9 { width: 100%; float: none; padding: 0; }

/* Masthead tagline — match the default body size (20px). */
#masthead h2.site-description {
  font-size: 2rem;
  line-height: 1.5;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Category bar
   -------------------------------------------------------------------------- */
.bm-catbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .25rem 0 1.6rem;
  margin: 0 0 2.4rem;
  border-bottom: 1px solid var(--bm-line);
}

.bm-catbar__link {
  font-family: var(--bm-sans);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--bm-muted);
  padding: .9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .2s var(--bm-ease), background-color .2s var(--bm-ease), border-color .2s var(--bm-ease);
}

.bm-catbar__link:hover {
  color: var(--bm-ink);
  background: var(--bm-panel);
  text-decoration: none;
}

.bm-catbar__link.is-active {
  color: #fff;
  background: var(--bm-dark);
  border-color: var(--bm-dark);
}

/* --------------------------------------------------------------------------
   Category page heading
   -------------------------------------------------------------------------- */
.bm-listing-head {
  text-align: center;
  margin: 0 0 2.6rem;
}

.bm-listing-head__title {
  font-family: var(--bm-sans);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: clamp(3.2rem, 5vw, 4.2rem);
  color: var(--bm-ink);
  margin: 0 0 .6rem;
  line-height: 1.1;
}

.bm-listing-head__count {
  font-family: var(--bm-sans);
  font-size: 1.4rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bm-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Shared bits — tag pill + meta line
   -------------------------------------------------------------------------- */
.bm-tag {
  display: inline-block;
  font-family: var(--bm-sans);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bm-accent);
  margin: 0 0 .8rem;
}
.bm-tag:hover { color: var(--bm-dark); text-decoration: none; }

.bm-meta {
  font-family: var(--bm-sans);
  font-size: 1.5rem;
  color: var(--bm-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bm-meta__author { font-weight: 600; color: var(--bm-soft); }
.bm-meta__dot { opacity: .55; }

/* --------------------------------------------------------------------------
   Featured hero (newest post)
   -------------------------------------------------------------------------- */
.bm-hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 2.8rem;
  align-items: center;
  margin: 0 0 3.2rem;
  padding: 0 0 3.2rem;
  border-bottom: 1px solid var(--bm-line);
}

.bm-hero__media {
  display: block;
  overflow: hidden;
  border-radius: var(--bm-radius);
  aspect-ratio: 16 / 10;
  background: var(--bm-panel);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45);
}
.bm-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--bm-ease);
}
.bm-hero:hover .bm-hero__media img { transform: scale(1.045); }

.bm-hero__title {
  font-family: var(--bm-sans);
  font-weight: 700;
  letter-spacing: -.015em;
  font-size: clamp(3rem, 4.2vw, 4.2rem);
  line-height: 1.12;
  margin: .3rem 0 1.4rem;
}
.bm-hero__title a { color: var(--bm-ink); transition: color .2s var(--bm-ease); }
.bm-hero__title a:hover { color: var(--bm-accent); text-decoration: none; }

.bm-hero__excerpt {
  font-family: var(--bm-serif);
  font-size: 2rem;
  line-height: 1.6;
  color: var(--bm-soft);
  margin: 0 0 1.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Card grid
   -------------------------------------------------------------------------- */
.bm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.6rem 1.9rem;
}

.bm-card {
  display: flex;
  flex-direction: column;
  background: none;
}

.bm-card__media {
  display: block;
  overflow: hidden;
  border-radius: var(--bm-radius);
  aspect-ratio: 16 / 9;
  background: var(--bm-panel);
  margin: 0 0 1.05rem;
}
.bm-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--bm-ease);
}
.bm-card:hover .bm-card__media img { transform: scale(1.06); }

.bm-card__title {
  font-family: var(--bm-sans);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 2.4rem;
  line-height: 1.25;
  margin: .2rem 0 .9rem;
}
.bm-card__title a { color: var(--bm-ink); transition: color .2s var(--bm-ease); }
.bm-card__title a:hover { color: var(--bm-accent); text-decoration: none; }

.bm-card__excerpt {
  font-family: var(--bm-serif);
  font-size: 2rem;
  line-height: 1.55;
  color: var(--bm-soft);
  margin: 0 0 1.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}

.bm-card .bm-meta { margin-top: auto; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.bm-empty {
  text-align: center;
  font-family: var(--bm-sans);
  font-size: 1.7rem;
  color: var(--bm-muted);
  padding: 4rem 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .bm-hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-bottom: 2.4rem;
    padding-bottom: 2.4rem;
  }
  .bm-hero__media { aspect-ratio: 16 / 9; }
}

@media (max-width: 600px) {
  .bm-catbar { gap: .3rem; margin-bottom: 1.8rem; }
  .bm-catbar__link { padding: .7rem 1.1rem; font-size: 1.35rem; }
  .bm-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}
