/* ============================================================
   BLOG PAGE — Editorial, text-forward Medium-style layout
   ============================================================ */

/* Section spacing */
section { padding: 100px 0; }

/* Toolbar heading row (eyebrow + h2) */
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.toolbar h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-h2-xs); line-height: .82; letter-spacing: -.045em; margin: 14px 0 0; }
.toolbar p { max-width: 330px; color: var(--color-text-muted); font-size: 12px; line-height: 1.7; margin: 0; }

/* Categories (filter buttons) */
.categories { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 40px; }
.category { border: 1px solid var(--color-border); background: transparent; color: var(--color-text-soft); padding: 9px 13px; font: inherit; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.category:hover, .category.active { border-color: var(--color-text); color: var(--color-text); }

/* Featured grid — 3 compact cards in a row */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.featured-card { border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .3s; position: relative; }
.featured-card:hover { border-color: var(--color-border-strong); }
.featured-card-link { position: absolute; inset: 0; z-index: 2; }
.featured-card-image { aspect-ratio: 4/3; overflow: hidden; display: block; position: relative; z-index: 1; }
.featured-card-image img { height: 100%; width: 100%; object-fit: cover; filter: brightness(.78); transition: .6s; }
.featured-card:hover .featured-card-image img { transform: scale(1.03); filter: brightness(.88); }
.featured-card-copy { padding: 20px; }
.featured-card-tag { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-accent-strong); }
.featured-card-date { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-text-muted); }
.featured-card-tag + .featured-card-date::before { content: "\00b7"; margin: 0 8px; color: var(--color-text-muted); }
.featured-card-copy h3 { font-family: var(--font-display); font-size: var(--text-h3-sm); line-height: 1.12; font-weight: 400; margin: 12px 0 0; }

/* Post list — Medium-style text-forward with small thumbnails */
.posts { display: flex; flex-direction: column; gap: 0; }
.post { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; padding: 32px 0; border-bottom: 1px solid var(--color-border); transition: border-color .3s; position: relative; }
/* .post's display:grid overrides the hidden attribute — re-apply it so the category filter can hide cards */
.post[hidden], .featured-card[hidden] { display: none; }
.post:first-child { border-top: 1px solid var(--color-border); }
.post:hover { border-color: var(--color-border-strong); }
.post-link { position: absolute; inset: 0; z-index: 2; }
.post-image { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-sm); position: relative; z-index: 1; }
.post-image img { height: 100%; object-fit: cover; filter: brightness(.78); transition: .6s; }
.post:hover .post-image img { transform: scale(1.03); filter: brightness(.9); }
.post-body { padding: 0; }
.post-tag { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-accent-strong); }
.post h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.08; font-weight: 400; margin: 14px 0 10px; }
.post p { font-size: 13px; line-height: 1.7; color: var(--color-text-soft); margin: 0 0 16px; max-width: 540px; }
.post-footer { display: flex; justify-content: space-between; color: var(--color-text-muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; padding-top: 0; border-top: none; }

/* Newsletter CTA band */
.newsletter { background: var(--color-surface-band); color: var(--color-on-surface-band); padding: 100px 0; }
.newsletter .eyebrow { color: var(--color-on-surface-band-subtle); }
.newsletter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: end; }
.newsletter h2 { font-family: var(--font-display); font-size: var(--text-h2-sm); line-height: .82; letter-spacing: -.045em; font-weight: 400; margin: 18px 0 0; }
.newsletter h2 em { color: var(--color-accent); font-style: italic; }
.newsletter-copy { border-top: 1px solid var(--color-border-subtle); padding-top: 22px; }
.newsletter-copy p { max-width: 520px; font-size: 15px; line-height: 1.8; margin: 0 0 28px; color: var(--color-on-surface-band-subtle); }
.newsletter-copy a { display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--color-on-surface-band); padding-bottom: 9px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-on-surface-band); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 850px) {
  section { padding: 70px 0; }
  .toolbar { display: block; }
  .toolbar h2 { font-size: 48px; margin-bottom: 20px; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .featured-card-image { aspect-ratio: 4/3; }
  .featured-card-copy { padding: 13px; }
  .featured-card-copy h3 { font-size: 17px; line-height: 1.15; margin: 10px 0 0; }
  /* Odd trailing card (7th) spans full width so the grid ends cleanly */
  .featured-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .post { grid-template-columns: 120px 1fr; gap: 20px; padding: 24px 0; }
  .post h3 { font-size: 20px; }
  .newsletter-grid { grid-template-columns: 1fr; gap: 40px; }
  .newsletter { padding: 75px 0; }
  .newsletter h2 { font-size: 52px; }
}
