/* Blog: contents page and posts. Loaded only on /blog/ pages, after styles.css,
   and built from its tokens so the section reads as part of the same site.
   Pages are generated by tools/blog/build.py; edit the template there. */

/* ---------- Contents page ---------- */
.blog-hero { padding-top: 30px; padding-bottom: 22px; }
.blog-hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); max-width: 16ch; margin-bottom: 18px; }
.blog-lead { max-width: 56ch; font-size: 1.12rem; line-height: 1.55; color: var(--ink-70); margin: 0; }

.post-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.post-filters button {
  font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--white); color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.post-filters button:hover { border-color: var(--purple); }
.post-filters button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: var(--cream); }

.post-kind {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal-deep); margin: 0;
}
.post-kind--case-study { color: var(--purple); }
.post-meta { font-size: 0.8rem; font-weight: 600; color: var(--ink-40); }

/* Featured (latest) post */
.post-feature {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: stretch;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-feature:hover { border-color: var(--purple); transform: translateY(-2px); }
.post-feature-text { display: flex; flex-direction: column; gap: 14px; padding: 40px 44px; }
.post-feature-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.18; }
.post-feature-text p { margin: 0; color: var(--ink-70); font-size: 1.04rem; line-height: 1.55; max-width: 46ch; }
.post-feature-text .tlink { align-self: flex-start; margin-top: 6px; }
.post-feature-art { background: var(--cream-2); display: flex; align-items: center; justify-content: center; padding: 28px; }
.post-feature-art img { width: 100%; height: 100%; max-height: 340px; object-fit: contain; border-radius: 12px; }
.post-feature-art--num { background: var(--purple-deep); }
.post-feature-art--num .post-num { position: static; font-size: 9rem; color: transparent; -webkit-text-stroke: 2px var(--teal); opacity: 1; }

/* Grid of earlier posts */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 18px;
  padding: 26px 26px 24px; box-shadow: var(--shadow-sm); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-card:hover { border-color: var(--purple); transform: translateY(-2px); }
.post-card h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.3; padding-right: 54px; }
.post-card p { margin: 0; font-size: 0.95rem; color: var(--ink-70); line-height: 1.5; }
.post-card .post-meta { margin-top: auto; padding-top: 6px; }
.post-num {
  position: absolute; top: 14px; right: 18px; font-size: 2.6rem; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--teal); opacity: 0.85; letter-spacing: -0.02em;
}
.post-card--case-study { background: var(--purple-deep); border-color: var(--purple-deep); color: var(--cream); }
.post-card--case-study h3 { color: var(--cream); padding-right: 0; }
.post-card--case-study p { color: rgba(255, 248, 237, 0.78); }
.post-card--case-study .post-kind { color: #7FD4C8; }
.post-card--case-study .post-meta { color: rgba(255, 248, 237, 0.55); }
.post-thumb { margin: -26px -26px 6px; aspect-ratio: 16 / 10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Post pages ---------- */
.article-hero .post-kind { margin-bottom: 12px; }
.article-hero .post-kind--newsletter::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); margin-right: 9px; vertical-align: 1px;
}

.post-figure { margin: 30px 0; }
.post-figure img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--hairline); background: var(--white); }
.post-figure figcaption { margin-top: 10px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-55); }
.post-figure--film { max-width: 380px; margin: 8px auto 34px; }
.post-figure--film video { display: block; width: 100%; height: auto; border-radius: 18px; background: var(--purple-deep); box-shadow: var(--shadow); }

.prompt-box { margin: 26px 0; background: var(--purple-deep); border-radius: 18px; padding: 22px 26px 24px; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.prompt-head span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #7FD4C8; }
.prompt-copy {
  font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 7px 14px;
  border-radius: 999px; border: 1px solid rgba(255, 248, 237, 0.3); background: transparent; color: var(--cream);
}
.prompt-copy:hover { background: rgba(255, 248, 237, 0.1); }
.article-body .prompt-text { margin: 0; color: var(--cream); font-size: 0.98rem; line-height: 1.65; }
.prompt-input { color: #7FD4C8; font-weight: 700; }

.case-facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 30px;
  background: var(--hairline); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden;
}
.case-facts div { background: var(--white); padding: 16px 20px; }
.case-facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 4px; }
.case-facts dd { margin: 0; font-size: 0.96rem; font-weight: 600; color: var(--ink); line-height: 1.4; }

.desk-note { margin: 40px 0 0; background: var(--cream-2); border-radius: 18px; padding: 24px 28px; }
.desk-label {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--teal); color: var(--purple-deep); border-radius: 999px; padding: 4px 11px; margin-bottom: 12px;
}
.article-body .desk-note h3 { margin: 0 0 8px; }
.article-body .desk-note p { margin: 0; color: var(--ink); }

.issue-brief { margin-top: 46px; padding-top: 6px; }
.article-body .issue-brief h2 { margin-top: 0; }
.issue-brief-note { font-size: 0.92rem; }
.article-body .issue-brief ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.article-body .issue-brief li { background: var(--white); border: 1px solid var(--hairline); border-radius: 14px; padding: 16px 20px; margin: 0; }
.brief-label { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 4px; }
.article-body .issue-brief li a { border-bottom: 0; color: var(--purple); font-weight: 800; }
.article-body .issue-brief li a::after { content: " \2197"; color: var(--teal-deep); }
.article-body .issue-brief li p { margin: 6px 0 0; font-size: 0.94rem; line-height: 1.55; }

.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; margin: 6px auto 0; }
.post-pager a {
  display: block; background: var(--white); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 16px 20px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.95rem; line-height: 1.35;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s ease;
}
.post-pager a:hover { border-color: var(--purple); }
.post-pager span { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 4px; }
.post-pager .pager-newer { grid-column: 2; text-align: right; }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .post-feature { grid-template-columns: 1fr; }
  .post-feature-art { order: -1; padding: 20px; }
  .post-feature-art img { max-height: 220px; }
  .post-feature-art--num .post-num { font-size: 6rem; }
  .post-feature-text { padding: 26px 24px 28px; }
  .post-grid { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: 1fr; }
  .post-pager { grid-template-columns: 1fr; }
  .post-pager .pager-newer { grid-column: auto; text-align: left; }
}

/* Hero with artwork on the right */
.blog-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.blog-hero-art img { display: block; width: 100%; height: auto; max-width: 460px; margin-left: auto; }
@media (max-width: 860px) {
  .blog-hero { grid-template-columns: 1fr; gap: 8px; }
  .blog-hero-art { order: -1; }
  .blog-hero-art img { max-width: 260px; margin: 0; }
}
