/* The journal (11.3.10): a row of posts as cards on their pictures, the designer's direction B, "From the journal.".
 * One component (includes/dmm/blocks/class-aieo-journal.php), printed by aieo/latest-posts-overlay (its default card
 * style, 1.1.0) and aieo/taxonomy-related-articles (layout "overlay", the category page's foot); AIEO_Journal::section()
 * enqueues this sheet wherever it prints the journal. Moved here from latest-posts-overlay/style.css unchanged. */

/* ---------- 1.1.0, the journal (the default): the designer's direction B, "From the journal." ----------
 * The head: the title at the start, "All stories" at the end (under the row as a button below 48rem). The row: up to
 * three columns from 64rem, a row that swipes below it (46 %, 78 % on a phone) with the next card in view, snapping
 * to each. A card: one link, its picture at 4:5 cut to fill, the theme's photo scrim over it, the category in small
 * capitals and the title in the headings' face in the photo's text colour, a slow zoom under the pointer (none with
 * reduced motion). Colours: the theme's photo tokens, else derived from its contrast colour; no colour of the
 * block's own. */
.aieo-journal {
    --aieo-journal-scrim: var(--wp--custom--rooster--photo--scrim, linear-gradient(to top, color-mix(in srgb, var(--wp--preset--color--contrast) 82%, transparent) 0%, color-mix(in srgb, var(--wp--preset--color--contrast) 30%, transparent) 42%, transparent 64%));
    --aieo-journal-ink: var(--wp--custom--rooster--photo--text, oklch(from var(--wp--preset--color--contrast) clamp(0, (0.62 - l) * 999, 1) 0 0));
    width: 100%;
}
.aieo-journal__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--4) var(--wp--preset--spacing--5);
    margin-block-end: var(--wp--preset--spacing--5);
}
.aieo-journal .aieo-journal__title {
    margin: 0;
    font-size: var(--wp--preset--font-size--2-xl);
}
.aieo-journal__all {
    font-weight: 600;
    white-space: nowrap;
}
.aieo-journal__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--3);
}
.aieo-journal .aieo-journal__card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--wp--custom--rooster--shape--card, 0);
    background: var(--wp--preset--color--subtle);
    color: var(--aieo-journal-ink);
    text-decoration: none;
}
.aieo-journal__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--aieo-journal-scrim);
    pointer-events: none;
}
.aieo-journal__card .aieo-journal__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aieo-journal__text {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    display: grid;
    gap: var(--wp--preset--spacing--2);
    padding: var(--wp--preset--spacing--5);
}
.aieo-journal__kicker {
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: var(--wp--custom--rooster--tracking--wide, 0.06em);
    text-transform: uppercase;
}
.aieo-journal .aieo-journal__name {
    margin: 0;
    color: inherit;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.6rem);
    font-stretch: var(--wp--custom--rooster--stretch--heading, normal);
    line-height: 1.15;
}
.aieo-journal__card:focus-visible {
    outline: 2px solid var(--wp--preset--color--fg);
    outline-offset: 2px;
}
.aieo-journal__more {
    display: none;
    margin: var(--wp--preset--spacing--5) 0 0;
}
.aieo-journal .aieo-journal__button {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: var(--wp--custom--rooster--field--height, 2.75rem);
    border: 1px solid var(--wp--preset--color--fg);
    border-radius: var(--wp--custom--rooster--shape--button, 0);
    color: var(--wp--preset--color--fg);
    font-weight: 600;
    text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
    .aieo-journal__card .aieo-journal__image {
        transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
    }
    .aieo-journal__card:hover .aieo-journal__image {
        transform: scale(1.03);
    }
}
@media (max-width: 63.999rem) {
    .aieo-journal__row {
        grid-auto-flow: column;
        grid-auto-columns: 46%;
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding-block-end: 8px;
    }
    .aieo-journal__card {
        scroll-snap-align: start;
    }
}
@media (max-width: 47.999rem) {
    .aieo-journal__row {
        grid-auto-columns: 78%;
    }
    .aieo-journal__head .aieo-journal__all {
        display: none;
    }
    .aieo-journal__more {
        display: block;
    }
}
