@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --ink: #1d2724;
    --muted: #718079;
    --green: #2e5b4b;
    --green-dark: #20483a;
    --mint: #dcebe1;
    --paper: #f7f7f2;
    --line: #d9e0d8;
    --coral: #ed765d;
    --cream: #eff1e8;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "DM Sans", sans-serif;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.page-shell {
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
}

.site-header {
    height: 86px;
    padding: 0 6.6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -.04em;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50% 50% 50% 4px;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 18px;
}

.main-nav {
    display: flex;
    gap: 32px;
    height: 100%;
    align-items: center;
    margin-left: 6%;
}

.nav-link {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.nav-link.active {
    color: var(--ink);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    height: 2px;
    bottom: -1px;
    left: 0;
    right: 0;
    background: var(--coral);
}

.nav-count {
    margin-left: 7px;
    min-width: 20px;
    padding: 2px 5px;
    border-radius: 10px;
    color: var(--green);
    background: var(--mint);
    text-align: center;
    font-size: 10px;
}

.header-note {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .02em;
}

.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 50%;
    background: #75a98c;
}

.hero {
    min-height: 510px;
    padding: 67px 11% 55px;
    display: flex;
    position: relative;
    background: var(--cream);
}

.hero-copy {
    width: 55%;
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker {
    margin: 0 0 17px;
    color: var(--coral);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 22px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(50px, 5.2vw, 76px);
    line-height: .98;
    letter-spacing: -.05em;
}

h1 em {
    color: var(--coral);
    font-style: italic;
    font-weight: 600;
}

.hero-text {
    max-width: 405px;
    margin-bottom: 28px;
    color: #64746d;
    font-size: 14px;
    line-height: 1.7;
}

.search-form {
    max-width: 510px;
    height: 55px;
    display: flex;
    align-items: center;
    border: 1px solid #cdd7ce;
    background: #fff;
}

.search-icon {
    padding: 0 2px 2px 17px;
    color: var(--green);
    font-size: 29px;
    line-height: 1;
    transform: rotate(-20deg);
}

.search-form input {
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 13px;
}

.search-form input::placeholder {
    color: #9ca9a2;
}

.search-button {
    height: 100%;
    padding: 0 20px;
    border: 0;
    color: #fff;
    background: var(--green);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s;
}

.search-button:hover {
    background: var(--green-dark);
}

.search-button span {
    margin-left: 14px;
    font-size: 17px;
}

.quick-searches {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    color: #96a09a;
    font-size: 11px;
}

.quick-search {
    padding: 0;
    border: 0;
    color: var(--green);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-art {
    width: 45%;
    min-width: 340px;
    position: relative;
}

.book-stack {
    width: 340px;
    height: 290px;
    position: absolute;
    top: 12px;
    right: 3%;
    transform: rotate(-7deg);
}

.book {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 14px 14px 25px rgba(43, 71, 57, .14);
    font-family: Georgia, serif;
    font-weight: bold;
    line-height: 1.03;
    letter-spacing: .08em;
    text-align: center;
}

.book-back {
    width: 178px;
    height: 256px;
    right: 20px;
    top: 3px;
    background: #d77a63;
    transform: rotate(20deg);
    font-size: 17px;
}

.book-middle {
    width: 182px;
    height: 270px;
    left: 43px;
    top: 9px;
    background: #628b72;
    transform: rotate(-6deg);
    font-size: 16px;
}

.book-front {
    width: 190px;
    height: 280px;
    left: 6px;
    top: 18px;
    background: #e8a673;
    transform: rotate(-20deg);
    font-size: 21px;
}

.book-front i {
    width: 70px;
    height: 9px;
    position: absolute;
    bottom: 28px;
    border-top: 2px solid #9b6043;
    border-bottom: 2px solid #9b6043;
}

.art-caption {
    position: absolute;
    right: 12%;
    bottom: 1px;
    color: var(--green);
    font-family: Georgia, serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.1;
    transform: rotate(-6deg);
}

.content-section {
    padding: 69px 11% 78px;
}

.list-section {
    border-top: 1px solid var(--line);
    background: #f3f4ed;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 29px;
}

.section-kicker {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 9px;
}

h2 {
    margin-bottom: 0;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.04em;
}

.heading-count {
    padding-left: 9px;
    color: var(--coral);
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    vertical-align: middle;
}

.result-count,
.shelf-note {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 11px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 22px;
}

.book-card {
    min-width: 0;
    animation: rise .45s both;
}

.cover-wrap {
    aspect-ratio: .69;
    position: relative;
    overflow: hidden;
    background: #dce7de;
}

.cover-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s;
}

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

.book-year {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 6px;
    color: #fff;
    background: rgba(27, 47, 39, .7);
    font-size: 9px;
}

.cover-placeholder {
    height: 100%;
    display: grid;
    place-content: center;
    gap: 22px;
    color: var(--green);
    background: #dbe8da;
    text-align: center;
}

.cover-placeholder span {
    font-family: Georgia, serif;
    font-size: 72px;
    font-style: italic;
}

.cover-placeholder small {
    font-size: 8px;
    letter-spacing: .18em;
}

.book-info {
    padding-top: 15px;
}

.book-info h3 {
    overflow: hidden;
    margin-bottom: 5px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 18px;
    line-height: 1.14;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-author {
    overflow: hidden;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-meta {
    display: flex;
    gap: 7px;
    color: #98a29c;
    font-size: 9px;
}

.meta-dot {
    color: var(--coral);
}

.list-action {
    margin-top: 14px;
    padding: 0;
    border: 0;
    color: var(--green);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.list-action span {
    display: inline-grid;
    width: 17px;
    height: 17px;
    margin-right: 4px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 13px;
    vertical-align: middle;
}

.list-action.saved {
    color: var(--coral);
}

.empty-list {
    padding: 46px 20px;
    border: 1px dashed #c9d3c9;
    text-align: center;
}

.empty-list[hidden] {
    display: none;
}

.empty-icon {
    margin-bottom: 12px;
    color: var(--coral);
    font-size: 24px;
}

.empty-list h3 {
    margin-bottom: 8px;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
}

.empty-list p {
    max-width: 340px;
    margin: auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.message {
    min-height: 20px;
    margin: -9px 0 18px;
    color: var(--muted);
    font-size: 12px;
}

.message.error {
    color: #bd5847;
}

.loading-state,
.no-results {
    grid-column: 1 / -1;
    padding: 45px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.no-results span {
    display: block;
    color: var(--coral);
    font-size: 30px;
}

.no-results h3 {
    margin: 8px 0;
    color: var(--green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
}

.no-results p {
    margin: 0;
}

.spinner {
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-right: 8px;
    border: 2px solid #cddbd1;
    border-top-color: var(--green);
    border-radius: 50%;
    vertical-align: -3px;
    animation: spin .7s linear infinite;
}

.site-footer {
    padding: 25px 11%;
    display: flex;
    justify-content: space-between;
    color: #87948d;
    border-top: 1px solid var(--line);
    font-size: 10px;
}

.site-footer a {
    color: var(--green);
    font-weight: 700;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    .site-header {
        height: 70px;
        padding: 0 6%;
    }

    .main-nav {
        gap: 18px;
        margin-left: auto;
        margin-right: 18px;
    }

    .header-note {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 50px 8% 30px;
    }

    .hero-copy {
        width: 100%;
    }

    .hero-art {
        display: none;
    }

    h1 {
        font-size: 53px;
    }

    .search-form {
        height: 51px;
    }

    .search-button {
        padding: 0 13px;
    }

    .quick-searches {
        flex-wrap: wrap;
    }

    .content-section {
        padding: 52px 8% 60px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 13px;
    }

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

    .book-info h3 {
        font-size: 16px;
    }

    .site-footer {
        padding: 22px 8%;
    }
}