/* BUZZINGABOUT_BOOKSHELF_V2 */

:root {
    --shelf-ink: #26231f;
    --shelf-muted: #716b62;
    --shelf-paper: #f7f3eb;
    --shelf-paper-deep: #eee7db;
    --shelf-card: #fffdf8;
    --shelf-line: rgba(69, 57, 44, .13);
    --shelf-gold: #a66b32;
    --shelf-gold-deep: #75451f;
    --shelf-shadow:
        0 20px 50px rgba(54, 44, 32, .12);
}

/* ---------------------------------------------------------
   PAGE
--------------------------------------------------------- */

body {
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(183, 141, 88, .10),
            transparent 30rem
        ),
        linear-gradient(
            180deg,
            #fbf9f5 0%,
            var(--shelf-paper) 38%,
            #f3eee5 100%
        );
    color: var(--shelf-ink);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom:
        1px solid rgba(55, 46, 37, .08);
    background:
        rgba(251, 249, 245, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header-inner {
    width:
        min(
            1280px,
            calc(100% - 48px)
        );
}

.brand {
    letter-spacing: -.02em;
}

.nav a {
    border-radius: 999px;
    padding: 8px 13px;
    transition:
        background .15s ease,
        color .15s ease;
}

.nav a:hover {
    background:
        rgba(117, 69, 31, .07);
}

.nav a.active {
    background:
        rgba(117, 69, 31, .10);
}

/* ---------------------------------------------------------
   HERO
--------------------------------------------------------- */

.hero {
    position: relative;
    isolation: isolate;
    width:
        min(
            1280px,
            calc(100% - 48px)
        );
    margin:
        34px
        auto
        0;
    padding:
        72px
        clamp(28px, 6vw, 78px)
        64px;
    overflow: hidden;
    border:
        1px solid
        rgba(89, 69, 48, .11);
    border-radius: 28px;
    background:
        linear-gradient(
            125deg,
            rgba(255, 253, 248, .98),
            rgba(239, 229, 212, .94)
        );
    box-shadow:
        0 25px 70px
        rgba(71, 54, 35, .09);
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 460px;
    height: 460px;
    right: -130px;
    top: -190px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(166, 107, 50, .20),
            rgba(166, 107, 50, 0) 68%
        );
}

.hero::after {
    content: "BUZZINGABOUT";
    position: absolute;
    z-index: -1;
    right: 34px;
    bottom: -13px;
    color:
        rgba(97, 70, 42, .045);
    font:
        800 clamp(46px, 8vw, 112px)/1
        Arial,
        sans-serif;
    letter-spacing: -.05em;
    pointer-events: none;
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 16px;
    padding: 0 11px;
    border:
        1px solid
        rgba(117, 69, 31, .15);
    border-radius: 999px;
    background:
        rgba(255,255,255,.55);
    color: var(--shelf-gold-deep);
    font:
        800 11px/1
        Arial,
        sans-serif;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 800px;
    margin:
        0
        0
        18px;
    color: #28231e;
    font:
        500 clamp(52px, 7vw, 88px)/.98
        Georgia,
        "Times New Roman",
        serif;
    letter-spacing: -.045em;
}

.hero .intro {
    max-width: 750px;
    color: #635d55;
    font-size:
        clamp(
            17px,
            2vw,
            20px
        );
    line-height: 1.68;
}

/* ---------------------------------------------------------
   SEARCH
--------------------------------------------------------- */

.search-form {
    width:
        min(
            760px,
            100%
        );
    max-width: none;
    margin-top: 34px;
    gap: 8px;
    padding: 7px;
    border:
        1px solid
        rgba(66, 52, 38, .12);
    border-radius: 16px;
    background:
        rgba(255,255,255,.88);
    box-shadow:
        0 13px 35px
        rgba(65, 49, 33, .09);
}

.search-form input {
    min-height: 46px;
    border: 0 !important;
    border-radius: 11px !important;
    background:
        transparent !important;
    padding:
        10px
        14px !important;
    outline: none;
    box-shadow: none !important;
}

.search-form input:focus {
    background:
        rgba(246, 240, 230, .62)
        !important;
}

.search-form button,
.clear-search {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 11px !important;
    padding:
        10px
        18px !important;
    font-size: 14px;
    transition:
        transform .12s ease,
        box-shadow .12s ease,
        background .12s ease;
}

.search-form button {
    background:
        #302a24 !important;
    color: #fff !important;
    box-shadow:
        0 6px 16px
        rgba(40, 34, 28, .14);
}

.search-form button:hover {
    transform:
        translateY(-1px);
    background:
        #1e1a17 !important;
}

.clear-search {
    background:
        transparent !important;
    color:
        var(--shelf-gold-deep)
        !important;
}

/* ---------------------------------------------------------
   SHELVES
--------------------------------------------------------- */

main {
    width:
        min(
            1280px,
            calc(100% - 48px)
        );
    padding-bottom: 100px;
}

.bookshelf-section {
    margin-top: 64px;
}

.section-heading {
    align-items: center;
    margin-bottom: 26px;
    padding-bottom: 14px;
    border-bottom:
        1px solid
        var(--shelf-line);
}

.section-heading h2 {
    position: relative;
    margin: 0;
    color: #302921;
    font:
        500 clamp(30px, 4vw, 42px)/1.08
        Georgia,
        "Times New Roman",
        serif;
    letter-spacing: -.025em;
}

.section-heading span {
    color: var(--shelf-muted);
    font-size: 13px;
}

/* ---------------------------------------------------------
   NORMAL BOOK GRID
--------------------------------------------------------- */

.book-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(205px, 1fr)
        );
    gap:
        42px
        28px;
}

.book-card {
    min-width: 0;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        transparent !important;
    box-shadow: none !important;
}

.book-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border:
        1px solid
        rgba(37, 30, 23, .12);
    border-radius:
        7px
        11px
        11px
        7px;
    background:
        linear-gradient(
            145deg,
            #d8c2a1,
            #b99362
        );
    box-shadow:
        0 22px 38px
        rgba(49, 38, 27, .16),
        0 5px 12px
        rgba(49, 38, 27, .13);
    transform:
        translateY(0);
    transition:
        transform .20s ease,
        box-shadow .20s ease;
}

.book-card-cover::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 1px;
    background:
        rgba(0,0,0,.13);
    box-shadow:
        2px 0 5px
        rgba(255,255,255,.12);
    pointer-events: none;
}

.book-card-cover::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.16),
            transparent 24%,
            transparent 72%,
            rgba(0,0,0,.06)
        );
    pointer-events: none;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform .32s ease,
        filter .32s ease;
}

.book-card:hover
.book-card-cover {
    transform:
        translateY(-7px);
    box-shadow:
        0 30px 55px
        rgba(48, 36, 24, .20),
        0 8px 16px
        rgba(48, 36, 24, .12);
}

.book-card:hover
.book-card-cover img {
    transform:
        scale(1.018);
}

.book-card-cover-placeholder {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background:
        linear-gradient(
            145deg,
            #7d5435,
            #3c2c25
        );
    color: #fff5e6 !important;
    text-align: center;
    text-shadow:
        0 2px 8px
        rgba(0,0,0,.22);
    font:
        500 24px/1.2
        Georgia,
        serif;
}

.book-card-body {
    padding:
        19px
        4px
        0 !important;
}

.book-card h3 {
    margin: 0 !important;
    color: #2b251f;
    font:
        500 23px/1.15
        Georgia,
        "Times New Roman",
        serif !important;
    letter-spacing: -.015em;
}

.book-card h3 a {
    color: inherit;
    text-decoration: none;
    transition:
        color .14s ease;
}

.book-card:hover h3 a {
    color:
        var(--shelf-gold-deep);
}

/*
 * Existing subtitle / author / description elements
 * remain intact; these broad rules improve them without
 * requiring publishing-data changes.
 */
.book-card-body > div,
.book-card-body > p {
    color: var(--shelf-muted);
}

.book-card-body p {
    margin:
        12px
        0
        0;
    font-size: 14px;
    line-height: 1.62;
}

.book-card-body a:not(h3 a) {
    color:
        var(--shelf-gold-deep);
}

/* ---------------------------------------------------------
   FEATURED SHELF
--------------------------------------------------------- */

.bookshelf-featured {
    margin-top: 62px;
    padding:
        30px
        32px
        36px;
    border:
        1px solid
        rgba(98, 71, 43, .10);
    border-radius: 26px;
    background:
        linear-gradient(
            145deg,
            rgba(239, 231, 217, .76),
            rgba(255, 253, 248, .94)
        );
    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.75);
}

.bookshelf-featured
.section-heading {
    margin-bottom: 30px;
}

.bookshelf-featured
.section-heading h2::after {
    content: "Editor’s shelf";
    display: inline-flex;
    margin-left: 13px;
    vertical-align: middle;
    border-radius: 999px;
    padding:
        6px
        9px;
    background:
        rgba(117, 69, 31, .09);
    color:
        var(--shelf-gold-deep);
    font:
        800 9px/1
        Arial,
        sans-serif;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.bookshelf-featured
.book-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(350px, 1fr)
        );
    gap: 30px;
}

.bookshelf-featured
.book-card {
    display: grid;
    grid-template-columns:
        minmax(135px, .68fr)
        minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.bookshelf-featured
.book-card-cover {
    width: 100%;
}

.bookshelf-featured
.book-card-body {
    align-self: center;
    padding:
        12px
        0
        !important;
}

.bookshelf-featured
.book-card h3 {
    font-size:
        clamp(
            25px,
            3vw,
            34px
        ) !important;
}

/* ---------------------------------------------------------
   SEARCH RESULTS
--------------------------------------------------------- */

.bookshelf-search
.book-grid {
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(205px, 1fr)
        );
}

/* ---------------------------------------------------------
   EMPTY STATE
--------------------------------------------------------- */

.empty-state {
    border:
        1px dashed
        rgba(87, 66, 44, .20);
    border-radius: 18px;
    padding:
        38px
        34px;
    background:
        rgba(255,255,255,.48);
    color: var(--shelf-muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: #332c25;
    font:
        500 25px/1.25
        Georgia,
        serif;
}

/* ---------------------------------------------------------
   SMALL LAPTOP / TABLET
--------------------------------------------------------- */

@media (max-width: 980px) {
    .hero,
    main,
    .site-header-inner {
        width:
            min(
                calc(100% - 32px),
                1280px
            );
    }

    .hero {
        padding:
            55px
            38px
            50px;
    }

    .book-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(185px, 1fr)
            );
        gap:
            36px
            22px;
    }

    .bookshelf-featured
    .book-grid {
        grid-template-columns:
            1fr;
    }

    .bookshelf-featured
    .book-card {
        grid-template-columns:
            160px
            minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 650px) {
    .site-header {
        position: relative;
    }

    .hero,
    main,
    .site-header-inner {
        width:
            calc(100% - 24px);
    }

    .hero {
        margin-top: 14px;
        padding:
            40px
            22px
            34px;
        border-radius: 20px;
    }

    .hero::after {
        display: none;
    }

    .hero h1 {
        font-size:
            clamp(
                46px,
                16vw,
                68px
            );
    }

    .search-form {
        display: grid;
        grid-template-columns:
            1fr
            auto;
        gap: 7px;
        padding: 6px;
    }

    .search-form input {
        grid-column:
            1 / -1;
        width: 100%;
    }

    .bookshelf-section {
        margin-top: 44px;
    }

    .section-heading {
        align-items: flex-end;
    }

    .book-grid,
    .bookshelf-search
    .book-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
        gap:
            32px
            16px;
    }

    .book-card h3 {
        font-size:
            19px !important;
    }

    .book-card-body {
        padding-top:
            14px !important;
    }

    .book-card-body p {
        font-size: 13px;
    }

    .bookshelf-featured {
        padding:
            22px
            18px
            26px;
        border-radius: 20px;
    }

    .bookshelf-featured
    .book-card {
        grid-template-columns:
            1fr;
        gap: 0;
    }

    .bookshelf-featured
    .book-card-cover {
        width:
            min(
                230px,
                78%
            );
        margin: 0 auto;
    }

    .bookshelf-featured
    .book-card-body {
        padding-top:
            20px !important;
        text-align: center;
    }

    .bookshelf-featured
    .section-heading h2::after {
        display: none;
    }
}

@media (max-width: 400px) {
    .book-grid,
    .bookshelf-search
    .book-grid {
        grid-template-columns:
            1fr;
    }

    .book-card-cover {
        width:
            min(
                250px,
                78vw
            );
        margin:
            0
            auto;
    }

    .book-card-body {
        text-align: center;
    }
}

/* BOOKSHELF LIVE SEARCH */

main {
    transition:
        opacity .12s ease;
}

main.bookshelf-searching {
    opacity: .48;
    pointer-events: none;
}

.search-form .clear-search[hidden] {
    display: none !important;
}

.search-form button.clear-search {
    cursor: pointer;
}
