/* ═══════════════════════════════════════════════════════
    simpleSoundbank — the plugins catalogue (/plugins/)
    Builds on home.css: the same paper, ink, type and plugin colours. Each
    plugin is a compact card in its own world (picture, name and price,
    one line, three facts, a button), three to a row. The whole card links
    to the plugin's page; its own page has the full details.

    A new plugin: copy a .pcard in plugins/index.html (data-product and its
    tokens in home.css) in place of the "more on the way" card.
    ═══════════════════════════════════════════════════════ */

/* A smaller head than the homepage's, so the cards arrive sooner. */
.catalogue .intro-title {
    grid-column: 1 / span 8;
    margin-top: 3rem;
    font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.75rem);
}

.catalogue .intro-side {
    grid-column: 9 / -1;
}

/* ═════ The cards ═════ */
.pgrid {
    width: var(--sheet-w);
    margin: 3.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
    scroll-margin-top: 4.5rem;
}

.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: var(--lift);
    overflow: hidden;
}

/* The picture runs edge to edge across the top of the card. */
.pcard-plate {
    margin: 0;
    aspect-ratio: 16 / 9;
    padding: 1rem 1.1rem 0;
    border-radius: 0;
}

.pcard-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.1rem 1.25rem 1.25rem;
}

.pcard-kind {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    color: var(--p-ink, var(--ink-quiet));
    font-size: 0.875rem;
    font-weight: 600;
}

.pcard-kind .entry-tag {
    padding: 0.12rem 0.5rem;
    font-size: 0.75rem;
}

.pcard-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.pcard-name svg {
    height: 26px;
}

.pcard-name.entry-name--text {
    font-size: 1.7rem;
}

/* The name's link covers the whole card; the buttons sit above it. */
.pcard-name a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.pcard-name a:focus-visible {
    outline: none;
}

.pcard:has(.pcard-name a:focus-visible) {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.pcard-price strong {
    font-size: 1.4rem;
}

.pcard-price s {
    font-size: 0.875rem;
}

.pcard-desc {
    margin-top: 0.6rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.pcard-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.pcard-facts li {
    padding: 0.18rem 0.55rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 560;
    white-space: nowrap;
}

.pcard-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: auto;
    padding-top: 1.1rem;
}

.pcard-actions .cta {
    min-height: 40px;
    padding-block: 0.45rem;
    font-size: 0.9rem;
}

.pcard-link {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 620;
    text-decoration: none;
}

.pcard-link span {
    display: inline-block;
    transition: transform 150ms ease-out;
}

.pcard-link:hover span {
    transform: translateX(3px);
}

/* The open slot: a quiet card that says what's next, drawn on the paper. */
.pcard--note {
    background: transparent;
    box-shadow: none;
    border: 1px dashed var(--rule-strong);
    border-color: color-mix(in oklch, var(--ink), transparent 70%);
}

.pcard--note .pcard-body {
    justify-content: center;
    padding: 1.5rem 1.4rem;
}

.pcard-name--note {
    margin-top: 0.4rem;
    font-family: var(--font-sheet);
    font-stretch: 108%;
    font-size: 1.5rem;
    font-weight: 720;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.pcard--note .pcard-actions {
    margin-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .pcard {
        transition: translate 250ms var(--ease-sheet), box-shadow 250ms var(--ease-sheet);
    }

    .pcard:not(.pcard--note):hover {
        translate: 0 -3px;
        box-shadow: 0 1px 2px oklch(0.3 0.04 55 / 0.08), 0 22px 40px -20px oklch(0.3 0.05 55 / 0.5);
    }

    .pcard-plate img {
        transition: transform 300ms var(--ease-sheet);
    }

    .pcard:hover .pcard-plate img {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* ═════ Narrower screens ═════ */
@media (max-width: 1040px) {
    .catalogue .intro-title,
    .catalogue .intro-side {
        grid-column: 1 / -1;
    }

    .catalogue .intro-side {
        display: block;
    }
}

@media (max-width: 760px) {
    .pgrid {
        margin-top: var(--u4);
        gap: 1rem;
    }
}
