/* ===========================================================================
   mod-blog.css — the blog: an article in each of its four templates, the
   drawn tile that stands in for a missing picture, pictures inside the
   writing, and the "more from the blog" shelf. Loaded on every public page
   (render/layout.php) after site.css and before theme.css. The cards and
   the list grid themselves are in site.css (.post-card, .post-grid).
   Templates: lib/blog.php → vj_blog_post_html(). See docs/DESIGN.md.
   =========================================================================== */

/* ---------------------------------------------------------------- cards -- */
.post-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__title em { font-style: italic; }
.post-card__excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .link-arrow { margin-top: auto; }
.post-card__body { flex: 1; }

/* The tile for a post with no picture: a low sun over ruled lines. Never a letter. */
.post-ph { display: block; width: 100%; height: 100%; background: var(--lilac); }
.post-ph svg { display: block; width: 100%; height: 100%; }
.post-ph__sun { fill: var(--butter); opacity: .55; }
.post-ph__arc { fill: none; stroke: var(--ink); stroke-opacity: .16; stroke-width: 1.25; }
.post-ph__lines { fill: none; stroke: var(--ink); stroke-opacity: .34; stroke-width: 3; stroke-linecap: round; }
.post-ph--mint { background: var(--mint-soft); }
.post-ph--butter { background: var(--butter-soft); }
.post-ph--peach { background: var(--peach); }
.post-ph--mint .post-ph__sun { fill: var(--poppy); opacity: .28; }
.post-ph--peach .post-ph__sun { fill: var(--periwinkle); opacity: .38; }

/* -------------------------------------------------------------- article -- */
.s-post { padding-top: clamp(28px, 4vw, 48px); }
.post { max-width: 780px; }
.post__back { margin: 0 0 22px; font-size: 14.5px; }
.post__back a { color: var(--ink-mute); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.post__back a:hover { color: var(--poppy); border-color: var(--poppy); }
.post__title { font-size: clamp(34px, 5vw, 60px); line-height: 1.05; margin-bottom: .35em; }
.post__meta { color: var(--ink-mute); font-size: 15px; margin: 0 0 18px; }
.post__meta b { color: var(--ink); font-weight: 600; }
.post__lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; margin: 0; font-family: var(--display); font-weight: 400; }
.post__head { margin-bottom: 28px; }
/* Classic shows the WHOLE picture. It used to be cropped to 560 px, which cut
   the top off a portrait (the face). A wide photo still fills the column; a tall
   one sits centered on the paper tint. */
.post__frame { border-radius: var(--r-card); overflow: hidden; margin-bottom: 36px; background: var(--paper-deep); }
.post__cover { display: block; width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.post__body { max-width: 68ch; }
.post__body > :first-child { margin-top: 0; }
.post__body a { color: var(--poppy); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .16em; }
.post__body a:hover { color: var(--poppy-press); }
.post__body ul, .post__body ol { padding-left: 1.25em; }
.post__body li::marker { color: var(--butter); }
.post__body blockquote { font-family: var(--display); font-size: 1.18em; line-height: 1.45; font-style: italic; color: var(--ink); border-left: 2px solid var(--butter); padding: 2px 0 2px 22px; margin: 1.5em 0; }
.post-fig { margin: 2em 0; }
.post-fig img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: var(--r-card); background: var(--paper-deep); }
.post-fig--small { max-width: 320px; margin-inline: auto; }
.post-fig--medium { max-width: 500px; margin-inline: auto; }
.post-fig figcaption { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-mute); text-align: center; }

/* Words only (and every template when there is no picture): the title carries the opening. */
.post__head--text { padding-bottom: 28px; border-bottom: 1px solid var(--line-strong); margin-bottom: 36px; position: relative; }
.post__head--text::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--butter); }
.s-post--text .post__title { font-size: clamp(38px, 5.6vw, 68px); }

/* Big picture: the picture runs the width of the page, the title sits on it. */
.s-post--feature { padding-top: 0; }
.post-hero { position: relative; isolation: isolate; min-height: clamp(340px, 58vh, 620px); display: flex; align-items: flex-end; background: var(--ink); overflow: hidden; }
.post-hero--tall { min-height: clamp(420px, 82vh, 780px); }
.post-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: -2; }
.post-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(19, 48, 42, .08) 0%, rgba(19, 48, 42, .38) 42%, rgba(12, 30, 26, .86) 100%); }
.post-hero__in { padding-block: clamp(28px, 5vw, 56px); color: var(--paper); }
.post-hero .eyebrow { color: var(--paper); border-color: rgba(247, 244, 238, .5); }
.post-hero .post__title { color: var(--white); max-width: 20ch; margin-bottom: 0; text-shadow: 0 1px 24px rgba(12, 30, 26, .35); }
.post-hero .post__title em.hl { color: var(--white); text-decoration-color: var(--butter); }
.post--feature { padding-top: clamp(24px, 4vw, 40px); }
.post__head--under { margin-bottom: 28px; }
.post__head--under .post__meta { margin-bottom: 14px; }

/* Side by side: title left, picture right; the writing runs underneath. */
.post--split { max-width: var(--wrap); }
.post-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.post-split__pic { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; max-height: 620px; background: var(--paper-deep); justify-self: end; width: 100%; }
.post-split__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.post--split .post__title { font-size: clamp(32px, 4.2vw, 54px); }
.post--split .post__body { margin-inline: auto; }
@media (max-width: 860px) {
  .post-split { grid-template-columns: 1fr; }
  .post-split__pic { aspect-ratio: 16 / 10; max-height: none; }
}

/* ------------------------------------------------------------- the rest -- */
.s-posts--more .sec-head { margin-bottom: 24px; }
.s-posts--more .h2 { font-size: clamp(26px, 3vw, 36px); }
.post-more__all { margin: 28px 0 0; }
.post-preview-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-rule); color: var(--ink); padding: 12px var(--gutter); font-size: 15px; text-align: center; margin-bottom: clamp(20px, 3vw, 32px); }
.s-post--feature .post-preview-bar { margin-bottom: 0; }
.post-preview-bar a { color: var(--poppy); font-weight: 600; margin-left: 6px; }
@media (max-width: 600px) {
  .post-hero { min-height: 300px; }
  .post__lead { font-size: 18px; }
}
@media print {
  .post__back, .s-posts--more, .post-preview-bar { display: none; }
  .post-hero { min-height: 0; background: none; }
  .post-hero__img, .post-hero__shade { display: none; }
  .post-hero .post__title, .post-hero__in { color: #000; text-shadow: none; }
}
