/* Blog pages only. Colours, type and the header and footer come from styles.css. */
.blog-main { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem); padding-right: var(--gutter-r); }
.blog-wrap { max-width: var(--wrap); margin-inline: auto; }
.nav a[aria-current="page"] { color: var(--heading); font-weight: 500; }
.blog-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.blog-head h1 { font-size: var(--step-4); margin-top: .5rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: clamp(1.25rem, 2.4vw, 2rem); }
.blog-card { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--fg); transition: transform .3s ease, box-shadow .3s ease; }
a.blog-card:hover, a.blog-card:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 36px -24px var(--page-shadow); }
.blog-card img, .blog-slot-photo { display: block; flex: none; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.blog-card-text { display: flex; flex-direction: column; flex: 1; gap: .75rem; padding: 1.4rem 1.5rem 1.5rem; }
.blog-card h2, .blog-card h3 { font-size: var(--step-2); }
.blog-card p { margin: 0; font-size: 1rem; line-height: 1.55; }
.blog-card-go { margin-top: auto; padding-top: .35rem; font: 500 .75rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.blog-slot-photo { background: color-mix(in srgb, var(--heading) 8%, transparent); }

.post-back { display: inline-block; padding-block: .6rem; margin-block: -.6rem; font-size: .9rem; color: var(--fg-muted); text-decoration: none; }
.post-back:hover { color: var(--heading); }
.post-head, .post-body { max-width: 44rem; margin-inline: auto; }
.post-head h1 { font-size: var(--step-4); margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.post-photo { display: block; width: 100%; max-width: 44rem; height: auto; margin: clamp(1.75rem, 4vw, 3rem) auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }
.post-body { font-size: 1.15rem; line-height: 1.7; }
.post-body p { margin: 0 0 1.25em; }
.post-body h2 { font-size: var(--step-2); margin: 2em 0 .6em; }
.post-body strong { font-weight: 500; color: var(--heading); }
.post-cta { margin-top: 2rem; }
.post-more { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); }
.post-more > h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
/* previous and next: beside the post, following the reader down it; under it on narrow screens */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 44rem) minmax(0, 1fr); column-gap: clamp(2.5rem, 6vw, 5.5rem); }
.post-layout > article { grid-column: 2; grid-row: 1; min-width: 0; }
.post-nav { display: grid; place-items: center; grid-row: 1; position: sticky; top: calc(50vh - 26px); align-self: start; width: 52px; height: 52px; border-radius: 50%; background: transparent; border: 1px solid color-mix(in srgb, var(--heading) 55%, transparent); color: var(--heading); text-decoration: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.post-nav:hover, .post-nav:focus-visible { border-color: var(--heading); background: color-mix(in srgb, var(--heading) 7%, transparent); }
.post-nav svg { width: 20px; height: 20px; flex: none; }
.post-nav span { display: none; }
.post-prev { grid-column: 1; justify-self: end; }
.post-next { grid-column: 3; justify-self: start; }
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr 1fr; column-gap: .75rem; row-gap: 2rem; }
  .post-layout > article { grid-column: 1 / -1; }
  .post-nav { grid-row: 2; position: static; width: auto; height: 48px; display: flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; font: 500 .75rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; }
  .post-nav span { display: inline; }
  .post-prev { grid-column: 1; justify-self: stretch; }
  .post-next { grid-column: 2; justify-self: stretch; }
}
/* phones: the title, then the photo edge to edge, with the copy rising in below it on the first screen */
@media (max-width: 760px) {
  .post-main { padding-top: .75rem; }
  .post-head h1 { font-size: clamp(1.8rem, 7.6vw, 2.2rem); line-height: 1.12; margin-top: .55rem; }
  .post-photo { width: 100vw; max-width: none; margin: .9rem calc(50% - 50vw) 1.1rem; border-radius: 0; }
  .post-body { font-size: 1.0625rem; line-height: 1.6; animation: post-rise .7s ease .15s both; }
  .post-body h2 { margin-top: 1.7em; }
}
@keyframes post-rise { from { opacity: 0; transform: translateY(18px); } }
