/**
 * Step cards: the steps of a process as a row of cards with a large number
 * and a slot mark in the corner that fills when the step is done. The base
 * theme's process block draws a path with round markers; this is the brand's
 * own form of the same content. Project block (PPL Logistiikka).
 *
 * globalClass: step-cards
 *
 * Variants:
 *   step-cards--parcels   the slot marks hold a parcel, not a pallet
 *                         (pages about e-commerce logistics)
 *
 * Structure:
 *   .step-cards.gb-container
 *     .step-card.gb-container  x2-4
 *       p.step-card-number
 *       .step-card-body.gb-container > h3.step-card-title + p.step-card-text
 *
 * States (js/blocks/step-cards.js, or warehouse-scene.js inside a scene):
 *   .step-card.is-done     the slot mark is filled (css/blocks/slot-mark.css)
 *   .step-card.is-active   the running step: focus corners
 *                          (css/blocks/focus-corners.css) and number in the
 *                          color of action
 * Without the script every mark is filled.
 *
 * Chain animations: one member per card, after the section heading.
 */

.step-cards {
    display: grid;
    gap: 20px;
}

.step-cards > .block-editor-inner-blocks,
.step-cards > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: contents;
}

.step-cards .step-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-content: start;
    padding: 24px;
    border: 1px solid var(--border-clr);
    background-color: var(--neutral-clr);
}

/* The slot mark in the card's corner (drawn by css/blocks/slot-mark.css) */
.step-card::before {
    content: "";
    position: absolute;
    top: 24px;
    right: 24px;
}

.step-card-number {
    margin: 0;
    font-family: var(--title-font);
    font-size: 2.6em;
    font-weight: var(--heading-weight-large);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--heading-clr);
    transition: color 0.3s;
}

.step-card.is-active .step-card-number {
    color: var(--link-clr);
}

.step-card-title {
    margin: 0;
    padding-right: 46px;
    font-size: 1.1em;
}

.step-card-text {
    margin: 8px 0 0;
    font-size: 0.9em;
}

@media (min-width: 990px) {
    .step-cards {
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    }

    .step-cards .step-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-card-title {
        padding-right: 0;
    }
}
