/*
 * Journal styles for database-backed posts.
 *
 * The two hand-written posts in public/blog/ carry their own inline <style>
 * blocks; these rules mirror them so a post rendered from the database by
 * lib/blog.ts is visually indistinguishable from the originals. Loaded only by
 * generated post pages and the journal index.
 */

/* ---------- Article hero ---------- */

.article-hero {
    background: var(--bg-cream);
    padding: 4rem 0 0;
    border-bottom: 1px solid var(--border-color);
}

.article-hero .container {
    max-width: 780px;
}

.article-breadcrumb {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-lighter);
    margin-bottom: 2rem;
}

.article-breadcrumb a {
    color: var(--text-lighter);
    transition: color 0.2s;
}

.article-breadcrumb a:hover {
    color: var(--accent-leather);
}

.article-breadcrumb span {
    margin: 0 0.5rem;
}

.article-tag {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-leather);
    font-weight: 500;
    margin-bottom: 1rem;
}

.article-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.article-standfirst {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-lighter);
    padding-bottom: 2.5rem;
}

/* ---------- Cover image ---------- */

.article-cover {
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--bg-light);
}

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

/* ---------- Article body ---------- */

.article-body {
    padding: 4rem 0 5rem;
}

.article-body .container {
    max-width: 780px;
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-color);
    margin: 3rem 0 1.25rem;
}

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

.article-body h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-color);
    margin: 2rem 0 0.75rem;
}

.article-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 1.5rem 0 0.5rem;
}

.article-body p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-body ul li {
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

.article-body a {
    color: var(--accent-leather);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body strong {
    color: var(--text-color);
    font-weight: 600;
}

.article-body blockquote {
    border-left: 3px solid var(--accent-warm);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

.article-body figure {
    margin: 2.5rem 0;
}

.article-body figure img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body figcaption {
    font-size: 0.8rem;
    color: var(--text-lighter);
    margin-top: 0.75rem;
    text-align: center;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0.5rem;
    text-align: left;
    color: var(--text-light);
}

.article-body th {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-color);
    font-weight: 600;
}

/* ---------- Closing call to action ---------- */

.article-cta {
    background: var(--bg-cream);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    text-align: center;
}

.article-cta .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-leather);
    margin-bottom: 1rem;
}

.article-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.article-cta p {
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ---------- Journal index states ---------- */

.journal-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: var(--text-lighter);
    font-size: 0.95rem;
}

.journal-card-skeleton {
    display: flex;
    flex-direction: column;
}

.journal-card-skeleton .skeleton-image {
    aspect-ratio: 4 / 3;
    background: var(--bg-light);
    margin-bottom: 1.75rem;
}

.journal-card-skeleton .skeleton-line {
    height: 0.85rem;
    background: var(--bg-light);
    margin-bottom: 0.75rem;
}

.journal-card-skeleton .skeleton-line.short {
    width: 40%;
}

.journal-card-skeleton .skeleton-line.long {
    width: 85%;
}

@media (prefers-reduced-motion: no-preference) {
    .journal-card-skeleton .skeleton-image,
    .journal-card-skeleton .skeleton-line {
        animation: journal-skeleton-pulse 1.4s ease-in-out infinite;
    }
}

@keyframes journal-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (max-width: 768px) {
    .article-cover {
        aspect-ratio: 4 / 3;
    }

    .article-body {
        padding: 3rem 0 4rem;
    }
}

/* Card titles rendered by js/journal.js are links; style.css already makes
   anchors inherit colour, so only the hover affordance is needed. */
.blog-card h2 a:hover {
    color: var(--accent-leather);
}
