/* Artizy, direction F "Atelier": blog archive (blog.html) and single (article.html).
   Loaded after site.css. Page layout only: az-feature, az-posts, az-article,
   az-toc, az-prose, az-cta, az-related. Shared parts come from site.css:
   az-pagehead, az-filter, az-post (--image), az-pagination, az-meta, az-tbc,
   az-journal, az-cta-band. */

/* ---------- Featured post ---------- */
.az-feature { padding-bottom: var(--s-6); }

.az-feature__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-4) var(--gap);
  align-items: end;
}

.az-feature__media { grid-column: 1 / 9; }
.az-feature__img { aspect-ratio: 3 / 2; object-fit: cover; }

.az-feature__text { grid-column: 9 / 13; padding-bottom: var(--s-1); }
.az-feature__title {
  font-size: var(--t-2xl);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.az-feature__excerpt { margin-top: var(--s-3); color: var(--c-ink-soft); }
.az-feature__more { display: inline-block; margin-top: var(--s-4); }

/* ---------- Posts grid ---------- */
.az-posts { padding-bottom: var(--s-6); }

.az-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: var(--s-5) var(--s-4);
}

/* ---------- Article: head, meta, featured image ---------- */
/* Three tracks: table of contents, reading column, air. The reading column is a
   grid track, not a max-width on text: every body element fills it. */
.az-article__grid {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(0, 36rem) minmax(0, 1fr);
  column-gap: var(--s-5);
}

.az-article__head { padding-block: var(--s-6) var(--s-5); }
.az-article__headtext { grid-column: 2 / 4; }

.az-article__title {
  font-size: var(--t-3xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.az-article__hero { margin-bottom: var(--s-6); }
.az-article__hero img { aspect-ratio: 2 / 1; object-fit: cover; }

.az-article__aside { grid-column: 1; }
.az-article__body { grid-column: 2; }

/* ---------- Table of contents (Elementor Pro: Table of Contents, H2 only, sticky) ---------- */
.az-toc {
  position: sticky;
  top: var(--s-4);
  padding-top: 0.4rem;
}
.az-toc__title {
  margin-bottom: var(--s-1);
  font-size: var(--t-small);
  color: var(--c-ink-soft);
}
.az-toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--c-line); }
.az-toc__link {
  display: block;
  margin-left: -1px;
  padding: 0.55rem 0 0.55rem var(--s-2);
  border-left: 1px solid transparent;
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--c-ink-soft);
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease);
}
.az-toc__link:hover { color: var(--c-ink); }
.az-toc__link[aria-current="true"] { color: var(--c-ink); border-left-color: var(--c-ink); }

/* ---------- Prose: plain WordPress editor content (Post Content widget) ---------- */
.az-prose {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--c-ink);
  text-wrap: pretty;
}

.az-prose > * + * { margin-top: 1.25rem; }

/* First paragraph becomes the standfirst, no extra field to fill in */
.az-prose > p:first-child {
  font-family: var(--f-serif);
  font-size: clamp(1.3125rem, 1.15rem + 0.5vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.az-prose > p:first-child + * { margin-top: var(--s-3); }

.az-prose h2 {
  font-size: clamp(1.75rem, 1.45rem + 0.9vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  scroll-margin-top: var(--s-4);
}
.az-prose h3 {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.25;
}
.az-prose > h2 { margin-top: var(--s-5); }
.az-prose > h3 { margin-top: var(--s-4); }
.az-prose > h2 + * { margin-top: var(--s-2); }
.az-prose > h3 + * { margin-top: 0.75rem; }

.az-prose strong { font-weight: 500; }
.az-prose a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--c-clay);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.az-prose a:not([class]):hover { text-decoration-color: currentColor; }

.az-prose ul,
.az-prose ol { padding-left: 1.25em; }
.az-prose ul { list-style: disc; }
.az-prose ol { list-style: decimal; }
.az-prose li { padding-left: 0.35em; }
.az-prose li + li { margin-top: 0.4rem; }
.az-prose li::marker { color: var(--c-clay); }

/* Images and tables: WordPress wraps both in a figure */
.az-prose > figure,
.az-prose > blockquote { margin-block: var(--s-5) 0; }
.az-prose > figure + *,
.az-prose > blockquote + * { margin-top: var(--s-5); }

.az-prose figure img { width: 100%; border-radius: var(--radius); }
.az-prose figcaption {
  margin-top: 0.75rem;
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--c-ink-soft);
}

/* Pull quote and quote (WordPress Pullquote / Quote blocks) */
.az-prose blockquote { margin: 0; }
.az-prose blockquote p {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.az-prose blockquote cite {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--t-small);
  font-style: normal;
  color: var(--c-ink-soft);
}
.az-prose .wp-block-pullquote { margin-inline: 0; padding: 0; }

/* Table (WordPress Table block) */
.az-prose .wp-block-table { overflow-x: auto; }
.az-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}
.az-prose th,
.az-prose td {
  padding: 0.85rem var(--s-3) 0.85rem 0;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.az-prose th:last-child,
.az-prose td:last-child { padding-right: 0; }
.az-prose thead th {
  border-bottom-color: var(--c-ink);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--c-ink-soft);
}
.az-prose td:last-child { color: var(--c-ink-soft); white-space: nowrap; }

/* ---------- End-of-article quote call to action (fixed in the template) ---------- */
.az-cta {
  margin-top: var(--s-6);
  padding: var(--s-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.az-cta__title {
  font-size: var(--t-xl);
  line-height: 1.2;
}
.az-cta__text { margin-top: var(--s-1); color: var(--c-ink-soft); }
.az-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin-top: var(--s-3);
}

/* Related posts reuse .az-journal from site.css */
.az-related { padding-top: var(--s-7); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .az-feature__media,
  .az-feature__text { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .az-article__grid { grid-template-columns: minmax(0, 1fr); }
  .az-article__headtext,
  .az-article__body { grid-column: 1; }
  .az-article__aside { display: none; }
}

@media (max-width: 767px) {
  .az-feature { padding-bottom: var(--s-5); }
  .az-feature__grid { row-gap: var(--s-3); }
  .az-feature__title { font-size: var(--t-3xl-sm); }
  .az-feature__more { margin-top: var(--s-3); }

  .az-posts__grid { row-gap: var(--s-5); }

  .az-article__head { padding-block: var(--s-4) var(--s-4); }
  .az-article__title { font-size: 2.125rem; line-height: 1.12; }
  .az-article__hero { margin-bottom: var(--s-4); }
  .az-article__hero img { aspect-ratio: 4 / 3; }

  .az-cta { padding: var(--s-3); }
  .az-related { padding-top: var(--s-6); }
}
