/* =====================================================================
   Blog pages — blog.html and blog/*.html, generated by admin/lib/render.php.
   Loaded after assets/site.css (the site's design system), so every colour,
   font and radius here is one of the site's own tokens and dark mode follows
   automatically.
   ===================================================================== */

nav.links a[aria-current] { color: var(--primary); font-weight: 600; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-family: var(--f-display); font-size: .86rem; color: var(--muted); margin-bottom: var(--s3);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ---------------- index ---------------- */
.blog-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.blog-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 150%; z-index: -1;
  background:
    radial-gradient(46% 44% at 10% 10%, color-mix(in srgb, var(--secondary) 22%, transparent) 0%, transparent 70%),
    radial-gradient(40% 40% at 92% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 68%);
}
.blog-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 18ch; }
.blog-list { padding-top: clamp(1rem, 3vw, 2rem); }

.post-thumb {
  display: block; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 16 / 10;
  background: var(--bg-2); border: 1px solid var(--line);
}
.post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.post-art {
  display: grid; place-items: center; width: 100%; height: 100%; color: var(--primary);
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--accent-soft) 90%, transparent) 0%, transparent 70%),
    linear-gradient(150deg, var(--primary-soft) 0%, var(--bg-2) 100%);
}
.post-art svg { width: 38%; max-width: 150px; height: auto; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; opacity: .85; }
.post-art svg path:nth-child(3) { opacity: .45; }
.post-art svg circle { fill: var(--accent); stroke: none; }

.post-tag {
  display: inline-block; font-family: var(--f-display); font-size: .74rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--primary-strong);
}
.post-kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin-right: .8rem;
  font-family: var(--f-display); font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
}
.post-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; font-size: .86rem; color: var(--muted); }
.post-meta a { color: var(--ink-2); }
.post-meta .dot { opacity: .7; }

.post-lead {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(1rem, 2vw, 1.4rem); box-shadow: var(--lift-2);
}
.post-lead .post-thumb { border-radius: var(--r-lg); border: 0; }
.post-lead-body { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: var(--s2) var(--s3) var(--s2) 0; }
.post-lead h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.15; }
.post-lead h2 a, .post-card h3 a { color: inherit; text-decoration: none; }
.post-lead h2 a:hover, .post-card h3 a:hover { color: var(--primary); }
.post-lead p { color: var(--ink-2); font-size: 1.05rem; }
.post-lead .btn { margin-top: .5rem; }
.post-lead:hover .post-thumb img, .post-card:hover .post-thumb img { transform: scale(1.035); }
@media (max-width: 860px) {
  .post-lead { grid-template-columns: 1fr; }
  .post-lead-body { padding: 0 var(--s2) var(--s2); }
}

.blog-subhead { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: clamp(3rem, 6vw, 4.5rem) 0 var(--s4); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.post-card { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.post-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.post-card h3 { font-size: 1.22rem; line-height: 1.3; }
.post-card p { color: var(--ink-2); font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.blog-empty {
  max-width: 560px; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s5) var(--s4); box-shadow: var(--lift-1);
}
.blog-empty .post-art { width: 120px; height: 84px; border-radius: var(--r); margin-bottom: var(--s1); }
.blog-empty .post-art svg { width: 64%; }
.blog-empty h2 { font-size: 1.6rem; }
.blog-empty p { color: var(--ink-2); }

/* ---------------- article ---------------- */
.post-narrow { max-width: calc(760px + 2 * var(--s4)); }
.post-head { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--s4); }
.post-head::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 150%; z-index: -1;
  background: radial-gradient(50% 50% at 20% 10%, color-mix(in srgb, var(--secondary) 18%, transparent) 0%, transparent 70%);
}
.post-head .eyebrow { margin-bottom: var(--s2); }
.post-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.1; }
.post-head .lede { font-size: 1.16rem; margin-top: var(--s2); }
.post-head .post-meta { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }

.post-hero { margin: 0 0 var(--s4); }
.post-hero img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--lift-2); }

.prose { font-size: 1.08rem; line-height: 1.8; color: var(--ink-2); padding-bottom: var(--s3); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.75rem); line-height: 1.25; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.7em; }
.prose h4 { font-size: 1.08rem; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose strong { color: var(--ink); }
.prose a { color: var(--primary); text-underline-offset: 3px; }
.prose a:hover { color: var(--primary-strong); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--primary); }
.prose blockquote {
  margin-inline: 0; padding: var(--s3) var(--s4); background: var(--bg-2);
  border-left: 4px solid var(--primary); border-radius: 0 var(--r) var(--r) 0;
}
.prose blockquote p { font-family: var(--f-display); font-size: 1.18rem; line-height: 1.55; color: var(--ink); font-style: italic; }
.prose figure { margin-inline: 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.2em; }
.prose code { font-size: .9em; background: var(--bg-2); padding: .1em .4em; border-radius: 6px; color: var(--ink); }

.post-note {
  font-size: .88rem; color: var(--muted); padding: var(--s2) var(--s3); margin-top: var(--s3);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
}

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-block: var(--s5) clamp(3rem, 7vw, 5rem); }
.pn {
  display: flex; flex-direction: column; gap: .3rem; padding: var(--s3); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--lift-1);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pn:hover { transform: translateY(-2px); box-shadow: var(--lift-2); border-color: var(--line-2); }
.pn span { font-family: var(--f-display); font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-strong); }
.pn strong { font-family: var(--f-display); font-weight: 600; color: var(--ink); line-height: 1.35; }
.pn-next { text-align: right; grid-column: 2; }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .pn-next { grid-column: auto; }
}
.post:not(:has(.post-nav)) .post-note { margin-bottom: clamp(3rem, 7vw, 5rem); }

.post-cta { text-align: center; }
.post-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.post-cta p { color: #BFE3EC; margin: var(--s2) auto 0; max-width: 46ch; }
.post-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s4); }
.post-cta .btn-ghost { background: transparent; color: var(--deep-ink); border-color: rgba(255,255,255,.35); }
.post-cta .btn-ghost:hover { color: #fff; border-color: #fff; }
@media (max-width: 460px) { .post-cta-actions .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .post-thumb img, .pn { transition: none; }
  .post-lead:hover .post-thumb img, .post-card:hover .post-thumb img { transform: none; }
}
