/* books.css — Books section page, Apple Books library look, this page only.
   A shelf grid of book covers with a 3D book treatment (spine + shelf
   shadow) and a status pill under each cover. The story text styles live
   in volume.css (.story-*); this file only lays out the entries. */

/* Shelf: the books side by side, like the Apple Books library grid. */
.books-shelf{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px 36px;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px 60px;
    align-items: start;
}

@media (max-width: 719px){
    .books-shelf{
        grid-template-columns: 1fr;
        gap: 64px 0;
        max-width: 520px;
    }
}

.book{
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* The book: the author's cover, rendered as a 3D book — spine on the
   left, page edge on the right, shelf shadow below. */
.book-cover{
    position: relative;
    margin: 0 0 14px;
}

.book-cover img{
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px 4px 4px 2px;
    box-shadow: 0 24px 44px rgba(0, 0, 0, .30), 0 6px 14px rgba(0, 0, 0, .18);
}

/* Spine: a darker strip down the left edge, with a hinge highlight. */
.book-cover::before{
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .14) 45%, rgba(255, 255, 255, .30) 55%, rgba(0, 0, 0, 0) 68%);
    border-radius: 2px 0 0 2px;
    pointer-events: none;
}

/* Fore-edge: the block of pages along the right edge. */
.book-cover::after{
    content: "";
    position: absolute;
    top: 2px;
    bottom: 2px;
    right: 0;
    width: 7px;
    background: repeating-linear-gradient(0deg, #f8f5ee 0 2px, #d9d2c2 2px 3px);
    border-radius: 0 4px 4px 0;
    box-shadow: inset 1px 0 1px rgba(0, 0, 0, .14);
    pointer-events: none;
}

/* Tapping a cover lifts it off the shelf, like picking up a book. */
.book-cover-link{
    display: block;
}

@media (hover: hover){
    .book-cover-link{
        transition: transform .3s ease;
    }
    .book-cover-link:hover{
        transform: translateY(-4px);
    }
    .book-cover-link:hover .book-cover img{
        box-shadow: 0 30px 56px rgba(0, 0, 0, .34), 0 10px 18px rgba(0, 0, 0, .20);
    }
}

/* Status pill under the cover, Apple Books style. */
.book-status{
    margin: 0 0 12px;
}

.status-pill{
    display: inline-block;
    font-family: Poppins, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.status-out{
    background: #1c2224;
    color: #fff;
}

.status-soon{
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
}

/* The [hidden] attribute loses to .status-pill's display rule, so
   restore it: only one language's pill shows at a time. */
.status-pill[hidden]{
    display: none;
}

/* The story block is a pull title and blurb under the cover, not a full
   story section: drop volume.css's 100px top margin and the wide
   subtitle gap. */
body.page-books .story{
    margin-top: 0;
}

body.page-books .story-subtitle{
    margin-bottom: 20px;
}

/* Safari-style header, this page only: the header slides away while
   scrolling down and returns on scrolling up, with a frosted back so
   it stays readable when it reappears over the covers. */
body.page-books header{
    transition: transform .45s ease, background-color .45s ease, backdrop-filter .45s ease;
}

body.page-books header.header-hidden{
    transform: translateY(-110%);
}

body.page-books header.header-scrolled{
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@media (prefers-color-scheme: dark){
    body.page-books header.header-scrolled{
        background: rgba(0, 0, 0, .72);
    }
}

/* Link to the Shop page, below the shelf. */
.shop-link{
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
