/* Journal (spec 5.10) */
@layer pages {
/* Hero: forest + teal glow + topo (w-section--forest), under the transparent header */
.j-hero { padding: calc(var(--w-header-h) + 40px) 0 var(--w-section-y); }
@media (min-width: 768px) { .j-hero { padding-top: calc(var(--w-header-h) + 56px); } }
.j-hero--nav { padding-bottom: 88px; }
.j-hero__title { max-width: 16ch; }
.j-hero__lead { margin-top: 16px; color: var(--w-on-dark-muted); }

/* Category chip nav: white panel overlapping the hero bottom */
.j-nav { position: relative; z-index: 1; margin-top: -28px; }
/* the panel hugs its chips (a 1280 px white bar holding 3 chips looked empty); it scrolls inside when too wide */
.j-nav__panel { width: fit-content; max-width: 100%; padding: 12px; background: var(--w-white); border-radius: var(--w-r-card); box-shadow: var(--w-sh-3); }
.j-nav .w-chipnav { margin: -6px; padding: 6px; }

/* "À la une": horizontal card from 1024 */
.j-feat {
  position: relative; display: grid; overflow: hidden; background: var(--w-white); border: var(--w-border);
  border-radius: var(--w-r-panel); box-shadow: var(--w-sh-2); color: var(--w-ink);
  transition: transform var(--w-dur-base) var(--w-ease), box-shadow var(--w-dur-base) var(--w-ease), border-color var(--w-dur-base) var(--w-ease);
}
.j-feat__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--w-placeholder-bg); }
.j-feat__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--w-dur-image) var(--w-ease-expo); }
.j-feat__badge { position: absolute; top: 16px; left: 16px; z-index: var(--w-z-raised); }
.j-feat__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 22px 20px 24px; }
.j-feat__cat { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-teal-ink); }
/* 4 lines at most (a long title would push the card to 6+ lines); the whole title is on the article */
.j-feat__title { max-width: 20ch; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.j-feat__link { color: inherit; text-decoration: none; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: color var(--w-dur-fast) var(--w-ease); }
.j-feat__link::after { content: ""; position: absolute; inset: 0; z-index: var(--w-z-card-link); border-radius: inherit; }
.j-feat__link:focus-visible { outline: none; box-shadow: none; }
.j-feat:has(.j-feat__link:focus-visible) { outline: var(--_ring); outline-offset: 3px; box-shadow: var(--_halo); }
.j-feat__excerpt {
  font-size: 16px; line-height: 1.6; color: var(--w-muted); max-width: 52ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 1024px) { .j-feat__excerpt { -webkit-line-clamp: 4; } }
.j-feat__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--w-muted); }
.j-feat__meta li { display: inline-flex; align-items: center; gap: 6px; }
.j-feat__meta .w-icon { width: 16px; height: 16px; color: var(--w-faint); }
.j-feat__more { min-height: 32px; margin-top: 2px; }
.j-feat.is-hover, .j-feat:focus-within { transform: translateY(-2px); box-shadow: var(--w-sh-3); border-color: var(--w-line-hover); }
.j-feat.is-hover .j-feat__media > img, .j-feat:focus-within .j-feat__media > img { transform: scale(1.03); }
@media (hover: hover) and (pointer: fine) {
  .j-feat:hover { transform: translateY(-2px); box-shadow: var(--w-sh-3); border-color: var(--w-line-hover); }
  .j-feat:hover .j-feat__media > img { transform: scale(1.03); }
  .j-feat:hover .j-feat__link { color: var(--w-teal-ink); }
  .j-feat:hover .j-feat__more { text-decoration-line: underline; }
  .j-feat:hover .j-feat__more > .w-icon { transform: translateX(3px); }
}
@media (min-width: 600px) and (max-width: 1023px) { .j-feat__media { aspect-ratio: 16 / 10; } }
@media (min-width: 768px) { .j-feat__body { padding: 32px; gap: 16px; } }
@media (min-width: 1024px) {
  .j-feat { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  /* about 4:3 of the media column, and never shorter than the text column (the photo fills the card height) */
  .j-feat__media { aspect-ratio: auto; min-height: clamp(400px, 38vw, 560px); }
  .j-feat__body { justify-content: center; padding: 40px; }
}

/* Other posts: 3 columns from 768 (left-aligned when fewer) */
.j-grid-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 24px; }
.j-grid-head--after { margin-top: 56px; }
.j-grid { display: grid; gap: var(--w-grid-gap); }
@media (min-width: 768px) { .j-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Pagination (4.23) */
.j-more { margin-top: 40px; }
.j-more__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 599px) { .j-more__row .w-btn { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) {
  .j-feat, .j-feat:hover, .j-feat:focus-within, .j-feat__media > img, .j-feat__more > .w-icon { transform: none !important; }
}
}
