/* =========================================================
   THE GREAT LIBRARY — BOOKSHELVES
   pages/library/books/index.html
========================================================= */


/* =========================================================
   BOOKSHELVES HERO
========================================================= */

.books-hero {
    padding: 5.5rem 1.5rem 4.5rem;
}

.books-hero__inner {
    width: min(900px, 100%);
    margin: 0 auto;
    text-align: center;
}

.books-hero__eyebrow,
.books-section-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.books-hero h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.books-hero__tagline {
    max-width: 680px;
    margin: 1.5rem auto 0;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.4;
}

.books-hero__intro {
    max-width: 720px;
    margin: 1.25rem auto 0;
    font-size: 1.05rem;
    line-height: 1.8;
}


/* =========================================================
   WELCOME
========================================================= */

.books-welcome {
    padding: 0 1.5rem 5rem;
}

.books-welcome__inner {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.books-welcome h2 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.15;
}

.books-welcome p {
    margin: 1rem 0 0;
    line-height: 1.75;
}

.books-welcome__note {
    font-weight: 700;
}


/* =========================================================
   BOOK COLLECTION
========================================================= */

.library-books {
    padding: 5rem 1.5rem 6rem;
}

.library-books__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.library-books__heading {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
}

.library-books__heading h2 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
}

.library-books__heading > p:last-child {
    margin: 1.25rem auto 0;
    line-height: 1.7;
}


/* =========================================================
   BOOK GRID
========================================================= */

.library-books__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}


/* =========================================================
   INDIVIDUAL BOOK
========================================================= */

.library-book {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 470px;
    flex-direction: column;
    padding: 2.25rem 2rem;
    overflow: hidden;

    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px 26px 26px 10px;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.06) 0,
            rgba(0, 0, 0, 0.015) 14px,
            transparent 15px
        ),
        rgba(255, 255, 255, 0.72);

    box-shadow:
        -7px 8px 0 rgba(0, 0, 0, 0.035),
        0 20px 45px rgba(0, 0, 0, 0.08);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}


/* subtle book spine */

.library-book::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 14px;
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
}


/* little page edge */

.library-book::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 8px;
    bottom: 10px;
    width: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.65);
}

.library-book:hover {
    transform: translateY(-6px) rotate(-0.25deg);

    box-shadow:
        -7px 10px 0 rgba(0, 0, 0, 0.035),
        0 28px 55px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   BOOK CONTENT
========================================================= */

.library-book__symbol {
    margin-bottom: 1.5rem;
    font-size: 2.6rem;
    line-height: 1;
}

.library-book__label {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.library-book h3 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.05;
}

.library-book__tagline {
    margin: 1rem 0 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
}

.library-book__description {
    margin: 1rem 0 2rem;
    line-height: 1.7;
}


/* =========================================================
   OPEN BOOK LINK
========================================================= */

.library-book__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin-top: auto;
    padding: 0.9rem 1.1rem;

    border: 1px solid currentColor;
    border-radius: 999px;

    color: inherit;
    font-weight: 700;
    text-decoration: none;

    transition:
        transform 160ms ease,
        background-color 160ms ease;
}

.library-book__link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.65);
}

.library-book__link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}


/* =========================================================
   SLIGHT INDIVIDUAL BOOK PERSONALITY

   These stay intentionally subtle.
   We can develop actual book-cover personalities later.
========================================================= */

.library-book--rock {
    transform: rotate(-0.5deg);
}

.library-book--sunny-spots {
    transform: translateY(8px);
}

.library-book--sunny-seats {
    transform: rotate(0.5deg);
}

.library-book--rock:hover,
.library-book--sunny-spots:hover,
.library-book--sunny-seats:hover {
    transform: translateY(-6px);
}


/* =========================================================
   GROWING LIBRARY
========================================================= */

.books-growing {
    padding: 1rem 1.5rem 6rem;
}

.books-growing__inner {
    width: min(760px, 100%);
    margin: 0 auto;
    text-align: center;
}

.books-growing__symbol {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.books-growing h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
}

.books-growing p {
    margin: 1.25rem auto 0;
    line-height: 1.75;
}

.books-back-link {
    display: inline-flex;
    margin-top: 2rem;
    font-weight: 700;
}


/* =========================================================
   BREADCRUMBS

   These are intentionally quiet.
   They are wayfinding, not another navigation bar.
========================================================= */

.library-breadcrumbs {
    width: min(1180px, calc(100% - 3rem));
    margin: 1.25rem auto 0;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;

    font-size: 0.82rem;
}

.library-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.library-breadcrumbs a:hover {
    text-decoration: underline;
}

.library-breadcrumbs span[aria-current="page"] {
    font-weight: 700;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .library-books__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .library-book--sunny-spots {
        transform: none;
    }

}


/* =========================================================
   PHONE
========================================================= */

@media (max-width: 640px) {

    .books-hero {
        padding: 4rem 1.1rem 3rem;
    }

    .books-welcome,
    .library-books,
    .books-growing {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .books-welcome {
        padding-bottom: 3.5rem;
    }

    .books-welcome__inner {
        padding: 1.75rem 1.35rem;
        border-radius: 22px;
    }

    .library-books {
        padding-top: 3.5rem;
        padding-bottom: 4rem;
    }

    .library-books__grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .library-book {
        min-height: 0;
        padding: 2rem 1.6rem;
    }

    .library-book--rock,
    .library-book--sunny-spots,
    .library-book--sunny-seats {
        transform: none;
    }

    .library-breadcrumbs {
        width: calc(100% - 2rem);
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .library-book,
    .library-book__link {
        transition: none;
    }

    .library-book:hover,
    .library-book__link:hover {
        transform: none;
    }

}

/* =========================================================
   INDIVIDUAL BOOK COVER COLORS

   Each book keeps the shared Sassiverse book structure
   while carrying its own soft visual personality.
========================================================= */

.library-book--rock {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.07) 0,
            rgba(0, 0, 0, 0.02) 14px,
            transparent 15px
        ),
        linear-gradient(
            145deg,
            rgba(244, 239, 233, 0.98),
            rgba(218, 204, 190, 0.92)
        );
}


.library-book--parachute {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.055) 0,
            rgba(0, 0, 0, 0.015) 14px,
            transparent 15px
        ),
        linear-gradient(
            145deg,
            rgba(231, 247, 255, 0.98),
            rgba(200, 230, 247, 0.9)
        );
}


.library-book--sunny-spots {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.055) 0,
            rgba(0, 0, 0, 0.015) 14px,
            transparent 15px
        ),
        linear-gradient(
            145deg,
            rgba(255, 250, 218, 0.98),
            rgba(255, 226, 137, 0.9)
        );
}


.library-book--sunny-seats {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.055) 0,
            rgba(0, 0, 0, 0.015) 14px,
            transparent 15px
        ),
        linear-gradient(
            145deg,
            rgba(247, 239, 255, 0.98),
            rgba(221, 204, 242, 0.9)
        );
}


.library-book--boundaries {
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.055) 0,
            rgba(0, 0, 0, 0.015) 14px,
            transparent 15px
        ),
        linear-gradient(
            145deg,
            rgba(239, 247, 232, 0.98),
            rgba(255, 230, 160, 0.88)
        );
}