/* ============================================================
   Blog pages — supplemental styles (index + post detail)
   Builds on the existing design tokens already used across the
   site (.eyebrow, .numeral, .hairline-grid, .container-page,
   --shadow-card, --shadow-cta — confirmed already in production).
   --ink/--accent/--card/--border/--muted-foreground were only
   inferred from Tailwind class names, so this file defines its
   own safe fallback for them below — harmless no-op if the real
   stylesheet already defines the same names/values.
   This file is independent from guide.css (no shared dependency),
   so either can be dropped onto a page on its own.
   ============================================================ */

:root {
    --ink: #0f1b2e;
    --accent: #2563eb;
    --card: #ffffff;
    --border: #e7e5df;
    --muted-foreground: #6b7280;
}

/* ---- Breadcrumb (same pattern as the guide pages) ---- */
.breadcrumb {
    font-size: 0.82rem;
    color: var(--muted-foreground);
    padding: 1.75rem 0 0;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--ink);
}

.breadcrumb .sep {
    margin: 0 0.4rem;
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--ink);
    font-weight: 500;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */

.blog-header {
    padding: 1.5rem 0 3rem;
    max-width: 40rem;
}

.blog-header h1 {
    margin: 0.9rem 0 0;
    font-size: 2.5rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.blog-header p {
    margin: 1.1rem 0 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

/* Category filter pills */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 2.5rem;
}

.blog-filter {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.blog-filter:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.blog-filter.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* Article card grid */
.article-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: 1fr;
    padding-bottom: 4rem;
}

@media (min-width: 640px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card {
    display: block;
    text-decoration: none;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

/* Branded placeholder visual — gradient + numeral watermark, no stock photography */
.article-visual {
    position: relative;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ink) 0%, #1b2c47 100%);
}

.article-visual .numeral {
    position: absolute;
    right: -0.5rem;
    bottom: -1.1rem;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: -0.03em;
    pointer-events: none;
}

.article-visual.variant-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
}

.article-card-body {
    padding: 1.35rem 1.4rem 1.5rem;
}

.article-category {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.article-card-body h2 {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ink);
}

.article-card-body p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--muted-foreground);
}

.article-meta {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--muted-foreground);
}

.article-meta .dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 0.5rem;
    border-radius: 999px;
    background: var(--border);
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding-bottom: 5rem;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted-foreground);
}

.blog-pagination a:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--ink);
}

.blog-pagination .is-current {
    background: var(--ink);
    color: #fff;
}

/* ============================================================
   BLOG POST DETAIL
   ============================================================ */

.post-header {
    padding: 1.5rem 0 0;
    max-width: 46rem;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.post-header h1 {
    margin: 1rem 0 0;
    font-size: 2.4rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.post-header .dek {
    margin: 1rem 0 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

.post-byline {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.75rem;
    padding-bottom: 2rem;
}

.post-byline img {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.post-byline-text {
    font-size: 0.82rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}

.post-byline-text strong {
    color: var(--ink);
    font-weight: 600;
}

.post-byline-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 0.45rem;
    border-radius: 999px;
    background: var(--border);
    vertical-align: middle;
}

/* Featured banner on the post itself */
.post-featured {
    position: relative;
    margin: 2rem 0 2.5rem;
    height: 220px;
    max-width: 46rem;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ink) 0%, #1b2c47 100%);
}

.post-featured .numeral {
    position: absolute;
    right: -1rem;
    bottom: -2rem;
    font-size: 9rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.07);
    letter-spacing: -0.03em;
    pointer-events: none;
}

/* Body typography — same recipe as guide.css .guide-body, kept
   independent here under .post-body so this file has no cross-file
   dependency on guide.css */
.post-body {
    max-width: 46rem;
}

.post-body h2 {
    margin-top: 2.75rem;
    margin-bottom: 0.9rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.post-body h2:first-child {
    margin-top: 0;
}

.post-body h3 {
    margin-top: 1.9rem;
    margin-bottom: 0.6rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ink);
}

.post-body p {
    margin-bottom: 1.1rem;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--muted-foreground);
    max-width: 62ch;
}

.post-body ul,
.post-body ol {
    margin: 1.1rem 0 1.4rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
    max-width: 62ch;
}

.post-body ul li,
.post-body ol li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

.post-body ul li::before {
    content: "";
    flex-shrink: 0;
    margin-top: 0.55rem;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--accent);
}

.post-body ol {
    counter-reset: post-ol;
}

.post-body ol li::before {
    counter-increment: post-ol;
    content: counter(post-ol);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
}

.post-body strong {
    color: var(--ink);
    font-weight: 600;
}

.post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body blockquote {
    margin: 1.75rem 0;
    padding: 0.2rem 0 0.2rem 1.25rem;
    border-left: 3px solid var(--accent);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--ink);
}

/* Callout — identical language to guide.css so both content types feel related */
.post-callout {
    margin: 2.25rem 0;
    max-width: 62ch;
    border-radius: 1rem;
    border: 2px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    padding: 1.35rem 1.5rem;
}

.post-callout p {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: none;
}

.post-callout p strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.post-callout a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.post-callout a:hover {
    text-decoration: underline;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 46rem;
    margin: 2.5rem 0 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-tag {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted-foreground);
    background: color-mix(in srgb, var(--ink) 4%, transparent);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
}

.post-tag:hover {
    color: var(--ink);
}

/* Author card */
.author-card {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    max-width: 46rem;
    margin: 2.5rem 0 0;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
}

.author-card img {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.author-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
}

.author-card-role {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.1rem;
}

.author-card-bio {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--muted-foreground);
}

/* Related posts on a post page reuse .article-grid / .article-card above */

@media (max-width: 640px) {
    .post-header h1,
    .blog-header h1 {
        font-size: 1.85rem;
    }
}
