/**
 * =============================================================================
 *  Project:        Enterramon
 *  Filename:       assets/css/articles.css
 *  Description:    The articles index and the long-read pages.
 *  Copyright :     (c) 2026 InlineBlack. All rights reserved.
 * =============================================================================
 *
 *  WHY THIS FILE EXISTS
 *  --------------------
 *  /articles/ listed four long reads as four paragraphs in one card, with a Read
 *  button on each — the same shape as a knowledge-base row, in a section where
 *  the writing is the product. The cards give each piece a face, a category, a
 *  date and a length, which is what tells a reader whether to spend fifteen
 *  minutes on it.
 *
 *  Loaded only by /articles/ and the four long reads ($extraStyles), so the other
 *  72 pages pay nothing for it.
 */

/* ---------- the index ---------- */

.art-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.art-count {
    font-size: .9rem;
    opacity: .65;
    margin: 0;
}

.art-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.art-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 32px;
    min-height: 300px;
    overflow: hidden;
    border-radius: var(--radius-md, 18px);
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease;
}

.art-card:hover {
    transform: translateY(-4px);
}

.art-card:focus-visible {
    outline: 2px solid var(--color-primary, #f04e23);
    outline-offset: 3px;
}

/* The decal is texture, not illustration: same treatment as the tool cards. */
.art-decal {
    position: absolute;
    top: -22%;
    right: -18%;
    width: 62%;
    aspect-ratio: 1;
    background-image: var(--bg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: .09;
    transform: rotate(16deg);
    pointer-events: none;
}

.art-card--feature {
    grid-column: span 2;
}

@media (max-width: 860px) {
    .art-card--feature { grid-column: span 1; }
}

.art-chip {
    position: relative;
    align-self: flex-start;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(240, 78, 35, .10);
    color: var(--color-primary, #f04e23);
}

.art-card-title {
    position: relative;
    font-family: var(--font-headline, inherit);
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.16;
    margin: 0;
}

.art-card--feature .art-card-title {
    font-size: 1.85rem;
}

.art-card-excerpt {
    position: relative;
    font-size: .95rem;
    line-height: 1.55;
    opacity: .78;
    margin: 0;
}

.art-card-foot {
    position: relative;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .82rem;
    opacity: .7;
}

.art-arrow {
    margin-left: auto;
    transition: transform .2s ease;
}

.art-card:hover .art-arrow {
    transform: translateX(4px);
}

/* ---------- the long-read pages ---------- */

.art-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: .7;
    margin: 0 0 14px 0;
}

.art-kicker .sep { opacity: .45; }

.art-toc {
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 14px;
    padding: 22px 26px;
    margin: 34px 0;
    background: rgba(0, 0, 0, .02);
}

.art-toc-title {
    font-size: .72rem !important;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: .6;
    margin: 0 0 14px 0 !important;
}

.art-toc ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 9px;
    font-size: .95rem;
}

.art-toc a {
    text-decoration: none;
}

.art-toc a:hover {
    text-decoration: underline;
}

.art-more {
    margin-top: 72px;
}

.art-more-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 20px;
}

.art-more-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, .08);
    transition: border-color .2s ease, transform .2s ease;
}

.art-more-card:hover {
    transform: translateY(-2px);
    border-color: rgba(240, 78, 35, .45);
}

.art-more-card strong {
    font-family: var(--font-headline, inherit);
    font-weight: 800;
    line-height: 1.2;
}

.art-more-card span {
    font-size: .85rem;
    opacity: .7;
}

/* The date line under the byline. Separated from .art-kicker so the byline can
   wrap independently on a narrow screen. */
.art-dates {
    font-size: .85rem;
    opacity: .62;
    margin: -4px 0 28px 0;
}

.art-dates .sep {
    padding: 0 6px;
    opacity: .6;
}

.art-kicker a {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}

/* The long reads were ported with `my-40` on every h2, which is a section gap
   designed for a landing page. On a 3,000 word piece it opens a hole between
   the heading and the paragraph that belongs to it. */
.content-wrapper h2[id],
.content-wrapper h2.wp-block-heading {
    margin-top: 2.75rem !important;
    margin-bottom: 1rem !important;
}
