/* www/public/css/blog.css — blog index (www/scripts/lib/blog-index.mjs): editorial hero with the blog banner,
   category chips, featured card, 3/2/1-column card grid with hero thumbnails and hover lift. Loaded after
   styles.css. RTL-safe: logical properties only. */

/* Hero: warm cream → orange band, wide banner, centred copy. */
.blog-hero {
  padding: 28px 0 8px;
  background: linear-gradient(180deg, #fff6ea 0%, #fde9d8 70%, var(--color-bg-canvas) 100%);
  border-bottom: 2px solid var(--color-border);
}
.blog-hero-art {
  margin: 0 0 22px;
  aspect-ratio: 8 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow: 0 6px 0 var(--color-border);
}
.blog-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-hero-copy {
  text-align: center;
  padding-bottom: 28px;
}
.blog-hero-copy .crumbs ol {
  justify-content: center;
}
.blog-hero-copy h1 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--color-brand-lip);
}
.blog-hero-copy .lead {
  margin: 0 auto;
  max-width: 60ch;
}

/* Category chips (js/blog-filter.js toggles the cards; without JS every card shows). */
.blog-list {
  padding: 28px 0 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--color-brand);
  color: var(--color-text);
}
.chip.is-on {
  background: var(--color-brand);
  border-color: var(--color-brand-lip);
  color: #fff;
}
.chip-cat {
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
  background: #fee4c3;
  border-color: #f3cf9d;
  color: var(--color-brand-lip);
  cursor: default;
}

/* Cards: the whole card is one link; the thumbnail keeps a fixed 16:9 box (no layout shift). */
.post-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 4px 0 var(--color-border);
  overflow: hidden;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--color-border);
}
.post-card[hidden] {
  display: none;
}
.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.post-card-link:hover {
  text-decoration: none;
}
.post-card-link:focus-visible {
  outline: 3px solid var(--color-info);
  outline-offset: -3px;
}
.post-thumb {
  margin: 0;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2f2fb 0%, #fffdf9 55%, #dcf5d6 100%);
  border-bottom: 2px solid var(--color-border);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-body {
  padding: 16px 18px 20px;
}
.post-body h2,
.post-body h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}
.post-dek {
  margin: 0 0 10px;
  color: var(--color-text-2);
  font-size: 15px;
}
.post-card .post-meta {
  margin: 0;
  font-size: 13px;
}

/* "Start here" kicker on the featured pillar card, and the cluster group headings. */
.post-kicker {
  display: block;
  margin-top: 8px;
  color: var(--color-brand-lip);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-group {
  margin-top: 36px;
}
.post-group[hidden] {
  display: none;
}
.post-group-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 900;
}

/* Featured: banner beside the copy on wide screens. */
.post-featured {
  margin-bottom: 20px;
}
.post-card-featured .post-body h2 {
  font-size: clamp(24px, 3vw, 32px);
}
@media (min-width: 880px) {
  .post-card-featured .post-card-link {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
  }
  .post-card-featured .post-thumb {
    border-bottom: 0;
    border-inline-end: 2px solid var(--color-border);
    height: 100%;
  }
  .post-card-featured .post-body {
    padding: 28px 30px;
  }
}

/* Grid: 3 / 2 / 1 columns. */
.post-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-card {
    transition: none;
  }
  .post-card:hover {
    transform: none;
  }
}
