.collection {
    padding-block: clamp(38px, 4.8vw, 74px) clamp(52px, 7vw, 100px);
    border-top: 1px solid var(--line);
}

.collection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(22px, 2.5vw, 36px);
}

.collection-heading h2,
.author-copy h2,
.series-copy h2 {
    margin: 10px 0 0;
    font-weight: 600;
    line-height: 1.26;
}

.collection-heading h2 {
    font-size: clamp(2rem, 3.2vw, 3.15rem);
}

.collection-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 1px 4px 0;
    color: var(--muted);
    font-size: .9rem;
    white-space: nowrap;
}

.collection-count .icon {
    width: 17px;
    height: 17px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.book-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.book-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    aspect-ratio: 1.09;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(150deg, var(--stage-light), var(--stage-base));
}

.stage-peach {
    --stage-light: #f9e9d9;
    --stage-base: #f0cfb2;
}

.stage-yellow {
    --stage-light: #f8f1d2;
    --stage-base: #ede2a7;
}

.stage-pink {
    --stage-light: #f8e7e9;
    --stage-base: #e9cbd0;
}

.stage-blue {
    --stage-light: #e4edf5;
    --stage-base: #c6dce9;
}

.book-stage::before {
    position: absolute;
    bottom: 19%;
    left: 30%;
    width: 49%;
    height: 6%;
    background: rgba(58, 37, 23, .19);
    border-radius: 50%;
    filter: blur(9px);
    transform: rotate(-6deg);
    content: "";
}

.book-stage .book-object {
    width: 52%;
    transform: perspective(700px) rotateY(-13deg) rotateZ(-6deg);
    transition: transform .24s ease;
}

.book-stage .book-badge {
    position: absolute;
    z-index: 1;
    inset: 13px auto auto 13px;
}

.book-card h3 {
    margin: 18px 0 2px;
    color: var(--ink);
    font-size: clamp(1.03rem, 1.42vw, 1.32rem);
    font-weight: 500;
    line-height: 1.45;
}

.card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 14px;
    margin-top: auto;
}

.card-action,
.card-preview {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: .91rem;
    text-decoration: none;
}

.card-action {
    color: var(--teal);
    font-weight: 500;
}

.card-action span,
.back-to-top span {
    font-family: Arial, sans-serif;
    font-size: 1.12em;
}

.card-preview {
    color: var(--muted);
    font-weight: 400;
}

.card-actions :is(a, button):hover,
.back-to-top:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.reading-notes {
    border-top: 1px solid var(--line);
    background: #f0f3eb;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(30px, 6vw, 88px);
    padding-block: clamp(35px, 4vw, 62px);
}

.author-copy {
    border-left: 1px solid var(--line);
    padding-left: clamp(26px, 4.5vw, 64px);
}

.notes-grid h2 {
    margin: 15px 0 12px;
    font-size: clamp(1.35rem, 1.8vw, 1.68rem);
    line-height: 1.45;
    text-wrap: pretty;
}

.notes-grid p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.author-socials {
    display: flex;
    gap: 9px;
    margin-top: 21px;
}

.author-socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--teal);
}

.author-socials a:hover {
    border-color: var(--teal);
    background: #e9f1e7;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.footer-row,
.footer-name,
.back-to-top {
    display: flex;
    align-items: center;
}

.footer-row {
    justify-content: space-between;
    gap: 20px;
    min-height: 91px;
}

.footer-name,
.back-to-top {
    min-height: 44px;
    gap: 9px;
    color: var(--teal);
    text-decoration: none;
}

.footer-name {
    font-size: 1.15rem;
    font-weight: 600;
}

.back-to-top {
    font-size: .9rem;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .book-card:hover .book-object {
        transform: perspective(700px) translateY(-4px) rotateY(-7deg) rotateZ(-4deg);
    }
}

@media (max-width: 992px) {
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 26px;
    }

    .book-stage {
        aspect-ratio: 1.27;
    }

    .book-stage .book-object {
        width: 44%;
    }

    .book-card h3 {
        font-size: 1.16rem;
    }
}

@media (max-width: 650px) {
    .books-grid {
        column-gap: 13px;
    }

    .book-stage {
        aspect-ratio: .95;
        border-radius: 9px;
    }

    .book-stage .book-object {
        width: 54%;
    }

    .book-stage .book-badge {
        inset: 7px auto auto 7px;
        font-size: .67rem;
    }

    .book-card h3 {
        margin-top: 12px;
        font-size: 1.02rem;
    }

    .card-actions {
        gap: 0 10px;
    }

    .card-action,
    .card-preview {
        font-size: .84rem;
    }

    .notes-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .author-copy {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 24px 0 0;
    }

    .footer-row {
        min-height: 76px;
    }
}
