/* Blog pages (blogi/). Builds on legal.css: same colours, fonts and theme. */
.blog .top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.blog .top-inner, .blog .foot-inner, .blog main.wide { max-width: 1120px; }
.blog .top-links { align-items: center; gap: 22px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.blog .top-links a { color: var(--muted); font-weight: 600; }
.blog .top-links a:hover, .blog .top-links a.is-current { color: var(--text); text-decoration: none; }
.blog .btn {
  display: inline-block; background: #2563eb; color: #fff !important; font-weight: 700; text-decoration: none;
  padding: 9px 14px; border-radius: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .3); transition: background-color .2s; white-space: nowrap;
}
.blog .btn:hover { background: #3b82f6; }
.blog .btn-lg { padding: 13px 20px; }
.blog .foot-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.blog .foot a { color: var(--text); font-weight: 600; }

.blog h1 { font-size: clamp(30px, 5vw, 46px); text-wrap: balance; }
.blog main.wide .lead { max-width: 640px; margin-bottom: 40px; }

.post-meta {
  display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 10px; color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}
.post-meta > * + *::before { content: '\b7 '; margin: 0 8px; }
.post-meta time { color: var(--accent); }

.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card-post {
  display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card-post:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px -18px rgba(37, 99, 235, .55); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card-post h2 { font-size: 21px; margin: 0 0 10px; text-wrap: balance; }
.card-post h2 a { color: var(--text); text-decoration: none; }
.card-post h2 a:hover { color: var(--accent); }
.excerpt { color: var(--muted); font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
.more { margin-top: auto; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.more:hover { text-decoration: underline; }
.thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-post.is-featured { grid-column: 1 / -1; background: var(--surface); }
.card-post.is-featured .card-body { padding: 32px; }
.card-post.is-featured h2 { font-size: clamp(24px, 3.4vw, 34px); max-width: 22ch; }
.card-post.is-featured .excerpt { font-size: 16px; max-width: 70ch; }
.card-post.is-featured.has-image { flex-direction: row; }
.card-post.is-featured.has-image .thumb { flex: 0 0 44%; }
.card-post.is-featured.has-image .thumb img { height: 100%; min-height: 300px; aspect-ratio: auto; }

.back { display: inline-block; margin-bottom: 28px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.back:hover { text-decoration: underline; }
.post h1 { margin-bottom: 28px; }
.hero-img { display: block; width: 100%; border-radius: 16px; margin: 0 0 32px; aspect-ratio: 16 / 9; object-fit: cover; }
.prose { font-size: 17px; line-height: 1.75; }
.prose > p:first-child { font-size: 19px; line-height: 1.65; color: var(--muted); }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose h2 { font-size: 23px; margin: 40px 0 12px; text-wrap: balance; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 28px auto; }
.prose img.logo-img { max-width: 340px; width: 70%; margin: 36px 0 0; padding: 14px 18px; background: #fff; }
.thumb { display: block; border-bottom: 1px solid var(--border); }
.card-post.is-featured.has-image .thumb { border-bottom: 0; border-right: 1px solid var(--border); }
.prose .sign { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); }
.prose .sign strong { color: var(--text); }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin-top: 56px; padding: 26px 28px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
}
.cta h2 { font-size: 21px; margin: 0 0 4px; }
.cta p { margin: 0; color: var(--muted); font-size: 15px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); transition: border-color .2s; }
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.pager a strong { font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 600; line-height: 1.3; display: block; }
.pager .next { text-align: right; }

@media (max-width: 720px) {
  .posts, .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .card-post.is-featured.has-image { flex-direction: column; }
  .card-post.is-featured.has-image .thumb { border-right: 0; border-bottom: 1px solid var(--border); }
  .card-post.is-featured.has-image .thumb img { min-height: 0; aspect-ratio: 16 / 9; }
  .card-post.is-featured .card-body, .card-body { padding: 22px; }
  .blog .top-links { gap: 14px; }
  .cta .btn { width: 100%; text-align: center; }
}
@media (max-width: 420px) {
  .blog .top-links a.btn { display: none; }
}
