/* ──────────────────────────────────────────────────────────────────────────
   Blog post (article) — reading experience + WebGL gradient hero.
   Scoped via [data-page="static-blog-post"]; this stylesheet only loads on the
   article route, so `.prose` rules are effectively page-local.

   Reading typography is editorial (Stripe Press / docs bar): measured column,
   large comfortable body, confident heading hierarchy, pull-quotes WITHOUT a
   left rail (house rule: no border-left / ::before strips). Colours come from
   the global --theme-* tokens so dark mode "just works" — no html.dark hacks
   (the previous version used html.dark, which this site never sets; dark mode
   is [data-theme="dark"], so those overrides were dead).
   ────────────────────────────────────────────────────────────────────────── */

[data-page="static-blog-post"] {
    --prose-heading: var(--theme-text);
    --prose-text: var(--theme-text-secondary);
    --prose-link: var(--brand-primary);
    --prose-link-hover: var(--brand-primary-hover);
    --prose-code-bg: var(--theme-bg-secondary);
    --prose-code-text: var(--theme-text);
    /* Code blocks stay dark in both themes (Stripe-style). */
    --prose-pre-bg: #0f172a;
    --prose-pre-text: #e2e8f0;
}

/* ── WebGL gradient hero with overlaid title ─────────────────────────────── */
.blog-post-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(260px, 36vw, 420px);
    overflow: hidden;
    background: #0a1020; /* fallback before the canvas paints */
}
.blog-post-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
/* Scrim guarantees white-text legibility regardless of the per-category palette. */
.blog-post-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(6, 10, 25, 0.42) 0%,
        rgba(6, 10, 25, 0.10) 42%,
        rgba(6, 10, 25, 0.58) 100%);
}
.blog-post-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: var(--space-16);
    padding-bottom: var(--space-10);
}
.blog-post-crumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-family-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: var(--space-5);
}
.blog-post-crumb a { color: rgba(255, 255, 255, 0.82); transition: color var(--transition-fast); }
.blog-post-crumb a:hover { color: #fff; }
.blog-post-title {
    font-family: var(--font-family-heading);
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 680;
    letter-spacing: -0.03em;
    line-height: 1.06;
    color: #fff;
    margin: 0;
    max-width: 20ch;
}
.blog-post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-5);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}
.blog-post-meta-dot { opacity: 0.55; }

/* ── Article column ──────────────────────────────────────────────────────── */
.blog-post-article {
    max-width: 720px;
    padding-top: var(--space-12);
    padding-bottom: var(--space-16);
}

/* Lead / standfirst — sets the reading tone, then a hairline before the body. */
.blog-post-lead {
    font-size: clamp(19px, 2.2vw, 22px);
    line-height: 1.55;
    font-weight: 400;
    color: var(--theme-text);
    margin: 0 0 var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--border-divider);
}

/* ── Reading typography ──────────────────────────────────────────────────── */
.prose h1 { display: none; } /* title lives in the hero — suppress duplicate */
.prose h2 {
    font-family: var(--font-family-heading);
    font-size: clamp(1.5rem, 2.6vw, 1.75rem);
    font-weight: 640;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--prose-heading);
    margin: 2.75rem 0 0.9rem;
}
.prose h3 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 640;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--prose-heading);
    margin: 2rem 0 0.6rem;
}
.prose p {
    margin: 0 0 1.45rem;
    line-height: 1.75;
    font-size: 1.1875rem; /* ~19px reading body */
    color: var(--prose-text);
}
.prose ul, .prose ol { margin: 0 0 1.45rem; padding-left: 1.4rem; }
.prose li {
    margin-bottom: 0.55rem;
    line-height: 1.7;
    font-size: 1.1875rem;
    color: var(--prose-text);
}
.prose ul li { list-style-type: disc; }
.prose ol li { list-style-type: decimal; }
.prose li::marker { color: var(--theme-text-tertiary); }
.prose strong { font-weight: 650; color: var(--prose-heading); }
.prose a {
    color: var(--prose-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color var(--transition-fast);
}
.prose a:hover { color: var(--prose-link-hover); }

/* Pull-quote — confident, NO left rail / strip (house rule). */
.prose blockquote {
    margin: 2.25rem 0;
    padding: 0;
}
.prose blockquote p {
    margin: 0;
    font-family: var(--font-family-heading);
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    font-weight: 500;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--prose-heading);
}

.prose code {
    font-family: var(--font-family-mono);
    background: var(--prose-code-bg);
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-size: 0.86em;
    color: var(--prose-code-text);
}
.prose pre {
    background: var(--prose-pre-bg);
    color: var(--prose-pre-text);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 0 0 1.5rem;
    font-size: 0.9em;
    line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 1.75rem 0; }
.prose hr { border: none; border-top: 1px solid var(--border-divider); margin: 2.75rem 0; }

/* ── More articles — related posts (hairline cards, colour-only hover) ──────── */
.blog-related {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-12) 0;
}
.blog-related .mkt-container { max-width: 960px; }
.blog-related-h {
    font-family: var(--font-family-heading);
    font-size: 20px;
    font-weight: 640;
    letter-spacing: -0.02em;
    color: var(--theme-text);
    margin: 0 0 var(--space-6);
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: var(--space-4);
}
.blog-related-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--theme-card-bg);
    transition: border-color var(--transition-fast);
}
.blog-related-card:hover { border-color: var(--border-strong); }
.blog-related-cat {
    font-family: var(--font-family-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-text);
}
.blog-related-title {
    font-family: var(--font-family-heading);
    font-size: 15.5px;
    font-weight: 640;
    line-height: 1.35;
    color: var(--theme-text);
    margin: var(--space-2) 0 var(--space-3);
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-related-card:hover .blog-related-title { color: var(--brand-text); }
.blog-related-date {
    margin-top: auto;
    font-family: var(--font-family-mono);
    font-size: 12px;
    color: var(--theme-text-tertiary);
    font-variant-numeric: tabular-nums;
}
