/* ==========================================================================
   Blog (/blog, /blog/{slug}; Trello #201): a reading column like the legal pages,
   the list of posts as cards and, at the end of a post, the invitation to try its app
   in the colours of that app ([data-app], site.css).
   ========================================================================== */

.blog { padding: clamp(96px, 12vw, 128px) 16px 72px; }
.blog__inner { max-width: 760px; margin: 0 auto; }

.blog__head { margin: 0 0 28px; }
.blog__title { margin: 6px 0 10px; font-size: clamp(32px, 6vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.blog__lead { margin: 0 0 14px; max-width: 60ch; font-size: 18px; line-height: 1.55; color: var(--bv-text-muted); }
.blog__feed { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }

.blog__empty {
    display: grid; gap: 14px; justify-items: start;
    padding: 28px; border-radius: 24px;
    background: var(--bv-surface); border: 1px solid var(--s-hairline);
    color: var(--bv-text-muted);
}
.blog__empty p { margin: 0; }

.blog__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card {
    padding: 22px clamp(20px, 4vw, 28px);
    background: var(--bv-surface); border: 1px solid var(--s-hairline); border-radius: 24px;
    transition: border-color .15s var(--bv-ease, ease), transform .15s var(--bv-ease, ease);
}
.post-card:hover { border-color: var(--bv-primary); }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 13.5px; color: var(--bv-text-subtle); }
.post-card__category {
    padding: 3px 10px; border-radius: 999px;
    background: var(--bv-primary-soft); color: var(--bv-on-primary-soft);
    font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.post-card__title { margin: 0 0 6px; font-size: clamp(20px, 3vw, 24px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.post-card__title a { color: var(--bv-text); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card__description { margin: 0; color: var(--bv-text-muted); line-height: 1.55; }

/* A post */
.blog__inner--post {
    padding: 28px clamp(20px, 5vw, 48px) 36px;
    background: var(--bv-surface); border: 1px solid var(--s-hairline); border-radius: 32px;
}
.blog__back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px; font-size: 14px; font-weight: 700; }
.post__head { margin: 0 0 24px; }
.post__title { margin: 4px 0 12px; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.post__lead { margin: 0 0 14px; font-size: 19px; line-height: 1.5; color: var(--bv-text-muted); }
.post__byline { margin: 0; font-size: 14px; color: var(--bv-text-subtle); }
.post__byline a { font-weight: 700; }

.prose { font-size: 17px; line-height: 1.7; color: var(--bv-text-muted); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 34px 0 10px; font-size: 23px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; color: var(--bv-text); }
.prose h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 800; color: var(--bv-text); }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--bv-text); }
.prose a { font-weight: 600; }
.prose blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--bv-primary); font-style: italic; }
.prose code { font-size: 15px; padding: 1px 6px; border-radius: 6px; background: var(--bv-surface-2); color: var(--bv-text); overflow-wrap: normal; }
.prose hr { margin: 28px 0; border: 0; border-top: 1px solid var(--bv-border); }
.prose img { max-width: 100%; height: auto; border-radius: 16px; }

.post__cta {
    display: grid; gap: 8px; justify-items: start;
    margin: 32px 0 0; padding: 24px;
    border-radius: 24px; background: var(--bv-primary-soft); color: var(--bv-on-primary-soft);
}
.post__cta-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.post__cta-text { margin: 0 0 6px; line-height: 1.5; }

.post__related { margin: 32px 0 0; padding: 22px 0 0; border-top: 1px solid var(--bv-border); }
.post__related h2 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.post__related ul { margin: 0; padding-left: 20px; }
.post__related li { margin: 6px 0; }

@media (prefers-reduced-motion: reduce) {
    .post-card { transition: none; }
}
