/* ═══════════════════════════════════════════════════
   SECTION: articles — source #articles (CONTENT-02-ARTICLES)
   One feature card, two secondary cards, three small cards.

   The three thumbnail rules come from placeholders.css; the .img-ph
   texture they sit on lives in components.css.
═══════════════════════════════════════════════════ */

#articles { background: var(--c-bg); padding: var(--sp-section) 0 }

.articles-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad) 56px;
}

.articles-body { max-width: var(--container); margin: 0 auto; padding: 0 var(--container-pad) }
.articles-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  align-items: stretch;
}

/* ── Category chip, shared by all three card sizes ── */
.art-cat {
  display: inline-flex;
  width: fit-content;
  padding: 5px var(--sp-3);
  border-radius: 6px;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  font-size: var(--fs-100);
  font-weight: var(--fw-semibold);
  color: var(--c-text-4);
  margin-bottom: var(--sp-5);
}

/* ── Feature card ── */
.art-feat {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.art-feat:hover { border-color: var(--c-border-hover); transform: translateY(-2px) }
.art-feat-title {
  font-family: var(--f-display);
  /* Between --fs-600 and --fs-700; neither max lands near 30px. */
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.04em;
  color: var(--c-text-1);
  line-height: 1.2;
  margin-bottom: 14px;
  flex: 1;
}
.art-feat-desc {
  font-size: var(--fs-300);
  color: var(--c-text-3);
  line-height: 1.75;
  margin-bottom: var(--sp-6);
}
.art-feat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--c-border);
  padding-top: 18px;
}
.art-time { font-size: var(--fs-200); color: var(--c-text-3); line-height: 1.7 }
.art-arr { font-size: var(--fs-400); color: var(--c-accent) }

/* ── Secondary cards ── */
.art-secondary { display: flex; flex-direction: column; gap: var(--sp-4) }
.art-card {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--dur-base);
}
.art-card:hover { border-color: var(--c-border-hover) }
.art-card-title {
  font-family: var(--f-display);
  font-size: var(--fs-500);
  font-weight: var(--fw-black);
  letter-spacing: -.03em;
  color: var(--c-text-1);
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--sp-3);
}
.art-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.art-card-meta { font-size: var(--fs-100); color: var(--c-text-4) }
/* The source colours and sizes this arrow with an inline style. */
.art-card-arr { font-size: var(--fs-200); color: var(--c-accent) }

/* ── Small cards ── */
.articles-bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4) }
.art-sm {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.art-sm:hover { border-color: var(--c-border-hover); transform: translateY(-2px) }
.art-sm-title {
  font-family: var(--f-display);
  font-size: var(--fs-500);
  font-weight: var(--fw-black);
  letter-spacing: -.03em;
  color: var(--c-text-1);
  line-height: 1.5;
  margin-bottom: 10px;
}
.art-sm-desc {
  font-size: var(--fs-200);
  color: var(--c-text-3);
  line-height: 1.7;
  margin-bottom: 14px;
}
.art-sm-footer { display: flex; align-items: center; justify-content: space-between }
.art-sm-time { font-size: var(--fs-200); color: var(--c-text-3); line-height: 1.7 }
.art-sm-arr { font-size: var(--fs-200); color: var(--c-accent) }

/* ── Thumbnails. Negative margins pull them to the card edge, so the
   width compensates for the padding on both sides. ── */
.art-img {
  width: calc(100% + 96px);
  height: 200px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin: calc(var(--sp-12) * -1) calc(var(--sp-12) * -1) var(--sp-6);
}
.art-card-img {
  width: calc(100% + 48px);
  height: 140px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) 18px;
}
.art-sm-img {
  width: calc(100% + 48px);
  height: 120px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) var(--sp-4);
}

/* A real featured image fills the slot the placeholder would occupy — same
   box, same rounding, cropped rather than resized, so a card never changes
   height because of the image it carries. */
.art-img, .art-card-img, .art-sm-img { overflow: hidden }
.art-thumb { width: 100%; height: 100%; object-fit: cover; display: block }

/* ── Archive heading and pagination.
   Only the blog index and its archives use these; the home page section has
   a "View all articles" link in place of the description and no pagination. ── */
.articles-desc {
  max-width: 420px;
  font-size: var(--fs-300);
  color: var(--c-text-3);
  line-height: 1.75;
}
.articles-desc p { margin: 0 }
.articles-desc p + p { margin-top: var(--sp-3) }

.articles-empty { font-size: var(--fs-300); color: var(--c-text-3) }

.articles-pag-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-12) var(--container-pad) 0;
}
.art-pag .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.art-pag .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-3);
  color: var(--c-text-3);
  font-size: var(--fs-200);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: border-color var(--dur-base), color var(--dur-base), background var(--dur-base);
}
.art-pag a.page-numbers:hover {
  border-color: rgba(var(--c-accent-rgb), .35);
  color: var(--c-accent);
}
.art-pag .page-numbers.current {
  background: rgba(var(--c-accent-rgb), .12);
  border-color: rgba(var(--c-accent-rgb), .35);
  color: var(--c-accent);
}
.art-pag .page-numbers.dots {
  border-color: transparent;
  background: none;
  color: var(--c-text-4);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .articles-top { grid-template-columns: 1fr }
  .articles-bottom { grid-template-columns: repeat(2, 1fr) }
}

@media (max-width: 640px) {
  .articles-hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: 0 var(--sp-6) var(--sp-10);
  }
  .articles-body { padding: 0 var(--sp-6) }
  .articles-bottom { grid-template-columns: 1fr }
}
