/* Narravue blog. Loaded after site.css and built only from its tokens and fluid rem scale. */

/* site.js darkens the body after the home hero; blog pages have no hero and stay light. */
body.blog, body.blog.is-dark { background: var(--sand-2); }

/* Index header band */
.bloghead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; max-width: 1520px; margin-inline: auto; padding: 11rem var(--pad) 6rem; }
body:has(.bloghead) { background: var(--sand) linear-gradient(118deg, transparent 0 38%, var(--white-70) 38% 46%, transparent 46% 58%, var(--white-50) 58% 70%, var(--warm-glow) 70% 100%) no-repeat top / 100% 62rem; }
.bloghead__art { margin: 0; border-radius: 1.25rem; overflow: hidden; transform: rotate(-2deg); box-shadow: 0 2rem 4rem var(--black-13); }
.bloghead__art img { width: 100%; height: auto; display: block; }
.bloghead__title { max-width: 62rem; font-size: 9.125rem; line-height: .9; }
.bloghead__lead { max-width: 34rem; margin-top: 2.5rem; font-size: 1.25rem; line-height: 1.5; }

/* Cards: the whole card is one link */
.bloglist { padding-block: 5rem 9rem; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 1.875rem; }
.pcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: .5rem; }
.pcard:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
.pcard__pic { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: .5rem; background: var(--ink); }
.pcard__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard__pic img, .pcard:focus-visible .pcard__pic img { transform: scale(1.04); }
.pcard__title { display: block; margin-top: 1.4rem; font-size: 2.2rem; line-height: 1; }
.pcard__sum { display: block; margin-top: .8rem; max-width: 30rem; }
.pcard__meta { display: block; margin-top: auto; padding-top: 1rem; font-size: .875rem; opacity: .7; }
.pcard:hover .pcard__title { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .12em; }

.pcard--lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: center; height: auto; margin-bottom: 6rem; padding: 1.25rem; border-radius: 1.25rem; background: var(--sand); }
.pcard--lead .pcard__text { display: flex; flex-direction: column; align-items: flex-start; padding-right: 2rem; }
.pcard--lead .pcard__title { margin-top: 1.5rem; font-size: 4.5rem; line-height: .95; }
.pcard--lead .pcard__sum { margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.6; }
.pcard--lead .pcard__meta { margin-top: 1.5rem; padding-top: 0; }
.pcard__flag { padding: .45rem 1rem; border-radius: 31.25rem; background: var(--lime); font-size: .875rem; line-height: 1; }

/* Article */
.post { padding: 11rem var(--pad) 7rem; }
.post__head, .post__cover { max-width: 68rem; margin-inline: auto; }
.post__back { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 1.1rem; border-radius: 31.25rem; box-shadow: inset 0 0 0 1px var(--ink); font-size: .875rem; text-decoration: none; }
.post__back:hover { background: var(--ink); color: var(--sand); }
.post__title { max-width: 60rem; margin-top: 1.75rem; font-size: 5.6rem; line-height: .95; text-wrap: balance; }
.post__meta { margin-top: 1.75rem; font-size: .875rem; }
.post__cover { margin-top: 3rem; aspect-ratio: 3 / 2; overflow: hidden; border-radius: .5rem; background: var(--ink); }
.post__cover img { width: 100%; height: 100%; object-fit: cover; }

.post__body { max-width: 44rem; margin: 4.5rem auto 0; font-size: 1.125rem; line-height: 1.7; }
.post__body > * + * { margin-top: 1.5rem; }
.post__body h2 { margin-top: 4rem; font-size: 3rem; line-height: 1; text-wrap: balance; }
.post__body h3 { margin-top: 2.5rem; font-size: 1.9rem; }
.post__body h2 + *, .post__body h3 + * { margin-top: 1.25rem; }
.post__body strong { font-weight: 500; }
.post__body a { text-decoration: underline; text-decoration-thickness: .1em; text-underline-offset: .2em; text-decoration-color: var(--lav); }
.post__body a:hover { background: var(--lime); text-decoration-color: var(--ink); }
.post__body ul, .post__body ol { display: grid; gap: .7rem; padding: 0; list-style: none; }
.post__body li { position: relative; padding-left: 2rem; }
.post__body ul > li::before { content: ""; position: absolute; left: .25rem; top: .68em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--lav); }
.post__body ol { counter-reset: step; }
.post__body ol > li { counter-increment: step; padding-left: 2.6rem; }
.post__body ol > li::before { content: counter(step); position: absolute; left: 0; top: .18em; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--sand); font-size: .8rem; line-height: 1; }
.post__body blockquote { margin: 3rem 0; padding: .4rem 0 0 1.75rem; border-left: .5rem solid var(--lav); }
.post__body blockquote p { font: 400 2.4rem/1.05 var(--display); text-transform: uppercase; text-wrap: balance; }
/* The closing checklist: a sheet with boxes to tick by hand */
.post__body ul.check { margin-top: 1.5rem; padding: 2rem; border-radius: 1.25rem; background: var(--white); gap: 1rem; }
.post__body ul.check > li { padding-left: 2.4rem; }
.post__body ul.check > li::before { left: 0; top: .32em; width: 1.15rem; height: 1.15rem; border-radius: .25rem; background: var(--lime-2); box-shadow: inset 0 0 0 2px var(--ink); }

/* Closing band and further reading */
.blogcta { padding: 7rem var(--pad); background: var(--lime); text-align: center; }
.blogcta h2 { max-width: 52rem; margin-inline: auto; font-size: 4.5rem; text-wrap: balance; }
.blogcta .btn { margin-top: 2.5rem; }
.more { padding-block: 7rem 11rem; }
.more > h2 { margin-bottom: 3rem; font-size: 3.5rem; }
.more .pcard__title { font-size: 2.2rem; }

@media (max-width: 991px) {
  .bloghead { grid-template-columns: minmax(0, 1fr); padding: 9rem var(--pad) 4rem; }
  .bloghead__title { font-size: 4.6rem; }
  .bloghead__lead { margin-top: 1.5rem; font-size: 1.125rem; }
  .bloglist { padding-block: 3rem 6rem; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 1.25rem; }
  .pcard--lead { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 4rem; padding: .75rem .75rem 1.5rem; }
  .pcard--lead .pcard__text { padding: 0 .5rem; }
  .pcard--lead .pcard__title { font-size: 3rem; }
  .post { padding: 8rem var(--pad) 5rem; }
  .post__title { font-size: 3.4rem; }
  .post__cover { margin-top: 2rem; }
  .post__body { margin-top: 3rem; }
  .post__body h2 { margin-top: 3rem; font-size: 2.5rem; }
  .post__body blockquote p { font-size: 2rem; }
  .blogcta { padding-block: 5rem; }
  .blogcta h2 { font-size: 3rem; }
  .more { padding-block: 5rem 8rem; }
}
@media (max-width: 767px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .post__body ul.check { padding: 1.5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard:hover .pcard__pic img, .pcard:focus-visible .pcard__pic img { transform: none; }
}
