:root {
    --as-books-ink: #171717;
    --as-books-muted: #686868;
    --as-books-line: #d8d6d1;
    --as-books-surface: #f3f2ef;
    --as-books-accent: #8f3f2f;
}

html:has(body.page-id-120),
body.page-id-120 {
    overflow-x: clip;
}

body.page-id-120 .entry-title {
    display: none;
}

.as-books {
    padding: 88px clamp(20px, 4vw, 64px) 112px;
    color: var(--as-books-ink);
    background: #fff;
    font-family: inherit;
}

.as-books__intro,
.as-books__grid {
    width: min(100%, 1360px);
    margin-inline: auto;
}

.as-books__intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--as-books-line);
}

.as-books__eyebrow {
    margin: 0;
    color: var(--as-books-accent);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
}

.as-books__intro h2 {
    margin: 0;
    color: var(--as-books-ink);
    font-family: inherit;
    font-size: clamp(34px, 4vw, 64px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0;
}

.as-books__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 64px 28px;
    margin-top: 48px;
}

.as-book-card {
    min-width: 0;
    margin: 0;
}

.as-book-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.as-book-card__cover {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    padding: clamp(18px, 2.6vw, 34px);
    border: 1px solid #ebe9e4;
    background: var(--as-books-surface);
    box-sizing: border-box;
}

.as-book-card__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 280ms ease-out, filter 280ms ease-out;
}

.as-book-card__number {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(17, 17, 17, 0.88);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.as-book-card__body,
.as-book-card__meta,
.as-book-card__title,
.as-book-card__subtitle,
.as-book-card__action {
    display: block;
}

.as-book-card__body {
    padding-top: 18px;
}

.as-book-card__meta {
    margin-bottom: 8px;
    color: var(--as-books-accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
}

.as-book-card__title {
    font-size: 23px;
    font-weight: 500;
    line-height: 1.2;
}

.as-book-card__subtitle {
    margin-top: 8px;
    min-height: 42px;
    color: var(--as-books-muted);
    font-size: 14px;
    line-height: 1.5;
}

.as-book-card__action {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
}

.as-book-card__link:hover .as-book-card__cover img,
.as-book-card__link:focus-visible .as-book-card__cover img {
    transform: scale(1.025);
    filter: contrast(1.03);
}

.as-book-card__link:focus-visible {
    outline: 3px solid var(--as-books-accent);
    outline-offset: 4px;
}

@media (max-width: 980px) {
    .as-books {
        padding-block: 64px 88px;
    }

    .as-books__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap-block: 52px;
    }
}

@media (max-width: 640px) {
    .as-books {
        padding: 48px 16px 72px;
    }

    .as-books__intro {
        display: block;
    }

    .as-books__intro h2 {
        margin-top: 10px;
        font-size: 36px;
    }

    .as-books__grid {
        grid-template-columns: 1fr;
        gap: 48px;
        margin-top: 36px;
    }

    .as-book-card__title {
        font-size: 22px;
    }

    .as-book-card__subtitle {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .as-book-card__cover img {
        transition: none;
    }
}
