/* ============================================================
   Frency Blog — styles for /blog index and /blog/:slug articles
   Reuses tokens from style.css (--bg, --wp, --f-serif, etc.)
   ============================================================ */

/* ---------- /blog index ---------- */

.blog-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 80px 24px 96px;
}

.blog-hero {
    text-align: center;
    margin-bottom: 56px;
}

.blog-hero__title {
    font-family: var(--f-serif);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 12px;
}

.blog-hero__sub {
    font-size: 17px;
    color: var(--text-sec);
    max-width: 540px;
    margin: 0 auto;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.blog-empty {
    text-align: center;
    color: var(--text-mut);
    font-size: 16px;
    padding: 80px 0;
}

/* Featured (most recent) — full-width hero card */

.featured {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
    color: inherit;
    text-decoration: none;
}

.featured:hover {
    border-color: var(--border-strong);
}

.featured__hero {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-subtle);
}

.featured__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured__hero--blank {
    background: linear-gradient(135deg, var(--wp-soft), var(--bg-subtle));
}

.featured__body {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured__category {
    display: inline-block;
    font-family: var(--f-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-dark);
    background: var(--wp-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.featured__title {
    font-family: var(--f-serif);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
}

.featured__excerpt {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-sec);
    margin-bottom: 16px;
}

.featured__meta {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--text-mut);
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (min-width: 720px) {
    .featured {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .featured__hero {
        aspect-ratio: auto;
        height: 100%;
        min-height: 320px;
    }

    .featured__body {
        padding: 40px 44px;
    }
}

/* Grid of remaining articles */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 600px) {
    .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
    .blog-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.card--article {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.card--article:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.card__hero {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-subtle);
}

.card__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card__hero--blank {
    background: linear-gradient(135deg, var(--wp-soft), var(--bg-subtle));
}

.card__body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card__category {
    font-family: var(--f-sans);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-dark);
}

.card__title {
    font-family: var(--f-serif);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0;
}

.card__excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-sec);
    margin: 0;
    flex: 1;
}

.card__meta {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-mut);
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

/* ---------- /blog/:slug single article ---------- */

.article-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

.article {
    max-width: 720px;
    margin: 0 auto;
}

.article__header {
    margin-bottom: 32px;
}

.article__category {
    display: inline-block;
    font-family: var(--f-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp-dark);
    background: var(--wp-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.article__title {
    font-family: var(--f-serif);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 16px;
}

.article__excerpt {
    font-size: 19px;
    line-height: 1.5;
    color: var(--text-sec);
    margin-bottom: 22px;
}

.article__meta {
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--text-mut);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.article__author {
    color: var(--text-sec);
    font-weight: 500;
}

.article__sep {
    color: var(--text-mut);
}

.article__hero {
    margin: 32px 0 40px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: var(--bg-subtle);
}

.article__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body — markdown-rendered content */

.article__body {
    font-family: var(--f-sans);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
}

.article__body > * + * { margin-top: 1.2em; }

.article__body h2 {
    font-family: var(--f-serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 2em;
    color: var(--text);
}

.article__body h3 {
    font-family: var(--f-serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-top: 1.6em;
    color: var(--text);
}

.article__body p { color: var(--text); }

.article__body a {
    color: var(--wp-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article__body a:hover { color: var(--wp); }

.article__body ul, .article__body ol {
    padding-left: 1.4em;
}

.article__body li + li { margin-top: 0.4em; }

.article__body blockquote {
    border-left: 3px solid var(--wp);
    padding: 6px 0 6px 20px;
    margin: 1.6em 0;
    color: var(--text-sec);
    font-style: italic;
}

.article__body code {
    font-family: var(--f-mono);
    font-size: 0.88em;
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
}

.article__body pre {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    font-family: var(--f-mono);
    font-size: 14px;
    line-height: 1.55;
    margin: 1.6em 0;
}

.article__body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.article__body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.6em 0;
    display: block;
}

.article__body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.2em 0;
}

/* Related */

.article__related {
    max-width: 1080px;
    margin: 80px auto 0;
}

.article__related-title {
    font-family: var(--f-serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 24px;
}

.blog-grid--related {
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .blog-grid--related { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
    .blog-grid--related { grid-template-columns: 1fr 1fr 1fr; }
}

/* CTA at end of article */

.article__cta {
    margin-top: 80px;
    padding: 48px 24px;
    background: linear-gradient(135deg, var(--wp-soft), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.article__cta-inner {
    max-width: 540px;
    margin: 0 auto;
}

.article__cta-title {
    font-family: var(--f-serif);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
}

.article__cta-sub {
    font-size: 16px;
    color: var(--text-sec);
    margin-bottom: 24px;
}
