/*
|--------------------------------------------------------------------------
| Word Intelligence Books page
|--------------------------------------------------------------------------
|
| Header and footer are intentionally untouched.
|
*/

/* Desktop/Web view scale */
@media (min-width: 981px) {
    .wi-books-page {
        transform: scale(0.9);
        transform-origin: top center;
        width: calc(100% / 0.9);
    }

    .wi-books-library {
        margin-bottom: -10rem;
    }


}

html {
    scroll-behavior: smooth;
}

.wi-books-page,
.wi-books-page * {
    box-sizing: border-box;
}

.wi-books-page {
    --wi-books-bg: #ffffff;
    --wi-books-text: #111111;
    --wi-books-muted: #727272;
    --wi-books-line: #e8e8e8;
    --wi-books-panel: #f4f4f4;
    --wi-books-button: #111111;
    --wi-books-button-text: #ffffff;
    --wi-books-disabled: #d6d6d6;
    --wi-books-disabled-text: #7c7c7c;
    --wi-books-amber: #ffb534;

    width: 100%;
    min-height: 100vh;

    margin: 0 !important;
    padding: 0;

    overflow: hidden;

    background: var(--wi-books-bg);
    color: var(--wi-books-text);

    font-family: "Inter", sans-serif;
}

body.dark-mode .wi-books-page {
    --wi-books-bg: #111111;
    --wi-books-text: #f4f4f4;
    --wi-books-muted: #b1b1b1;
    --wi-books-line: #303030;
    --wi-books-panel: #202020;
    --wi-books-button: #f4f4f4;
    --wi-books-button-text: #111111;
    --wi-books-disabled: #343434;
    --wi-books-disabled-text: #888888;
}

.wi-books-shell {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.wi-books-hero {
    padding:
        clamp(50px, 6vw, 110px)
        0
        clamp(68px, 8vw, 118px);
}

.wi-books-hero__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.94fr)
        minmax(380px, 0.86fr);

    align-items: center;

    gap:
        clamp(48px, 8vw, 118px);
}

.wi-books-hero__copy {
    max-width: 610px;
}

.wi-books-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 0 0 20px;

    color: var(--wi-books-text);

    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    line-height: 1.2;
    text-transform: uppercase;
}

.wi-books-eyebrow i {
    display: inline-block;
    width: 36px;
    height: 1px;

    background: var(--wi-books-amber);
}

.wi-books-hero h1 {
    margin: 0;

    color: var(--wi-books-text);

    font-family: "PT Serif", Georgia, serif;
    font-size: clamp(5.25rem, 10vw, 9.5rem);
    font-weight: 400;
    letter-spacing: -0.075em;
    line-height: 0.76;
}

.wi-books-hero__description {
    max-width: 560px;

    margin:
        clamp(35px, 4vw, 50px)
        0
        0;

    color: var(--wi-books-muted);

    font-size: clamp(1rem, 1.55vw, 1.34rem);
    font-weight: 400;
    line-height: 1.26;
}

.wi-books-explore {
    display: inline-flex;
    min-width: 150px;
    min-height: 45px;
    align-items: center;
    justify-content: center;

    margin-top: 22px;
    padding: 11px 26px;

    border: 1px solid var(--wi-books-button);
    border-radius: 999px;

    background: var(--wi-books-button);
    color: var(--wi-books-button-text);

    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;

    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.wi-books-explore:hover {
    border-color: var(--wi-books-amber);
    background: var(--wi-books-amber);
    color: #111111;

    transform: translateY(-2px);
}

.wi-books-explore:focus-visible {
    outline: 3px solid rgba(255, 181, 52, 0.42);
    outline-offset: 4px;
}

.wi-books-hero__visual {
    display: grid;
    min-width: 0;
    place-items: center;
}

.wi-books-hero__visual img {
    display: block;
    width: min(100%, 540px);
    height: auto;

    filter:
        drop-shadow(
            0 24px 24px
            rgba(0, 0, 0, 0.1)
        );
}

body.dark-mode .wi-books-hero__visual img {
    filter:
        brightness(0.88)
        drop-shadow(
            0 28px 28px
            rgba(0, 0, 0, 0.38)
        );
}

/*
|--------------------------------------------------------------------------
| Featured book
|--------------------------------------------------------------------------
*/

.wi-books-featured {
    padding:
        clamp(30px, 4vw, 58px)
        0
        0;
}

.wi-books-featured__grid {
    display: grid;
    grid-template-columns:
        minmax(280px, 0.82fr)
        minmax(0, 1.18fr);

    align-items: center;

    gap:
        clamp(54px, 9vw, 132px);
}

.wi-books-featured__cover {
    display: grid;
    place-items: center;
}

.wi-books-featured__cover img {
    display: block;
    width: min(100%, 345px);
    height: auto;

    transform: rotate(-3deg);

    filter:
        drop-shadow(
            16px 22px 15px
            rgba(0, 0, 0, 0.18)
        );
}

body.dark-mode
.wi-books-featured__cover img {
    filter:
        brightness(0.92)
        drop-shadow(
            18px 25px 19px
            rgba(0, 0, 0, 0.48)
        );
}

.wi-books-featured__eyebrow {
    margin: 0 0 8px;

    color: var(--wi-books-amber);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

.wi-books-featured h2 {
    margin: 0;

    color: var(--wi-books-text);

    font-family: "PT Serif", Georgia, serif;
    font-size: clamp(3rem, 5vw, 5.25rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.96;
}

.wi-books-featured__author {
    margin: 12px 0 0;

    color: var(--wi-books-text);

    font-size: clamp(1rem, 1.45vw, 1.25rem);
    font-weight: 700;
}

.wi-books-featured__description {
    max-width: 610px;

    margin: 34px 0 0;

    color: var(--wi-books-muted);

    font-size: clamp(1rem, 1.45vw, 1.24rem);
    line-height: 1.25;
}

.wi-books-featured__action {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 18px;
}

.wi-books-preorder {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 10px 22px;

    border: 0;
    border-radius: 999px;

    background: var(--wi-books-disabled);
    color: var(--wi-books-disabled-text);

    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;

    cursor: not-allowed;
}

.wi-books-preorder i {
    position: static;
    width: auto;

    font-size: 0.82rem;
}

.wi-books-preorder-note {
    color: var(--wi-books-muted);

    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/*
|--------------------------------------------------------------------------
| Supplied shelf asset
|--------------------------------------------------------------------------
*/

.wi-books-shelf {
    width: min(1450px, calc(100% - 28px));

    margin:
        clamp(55px, 7vw, 95px)
        auto
        0;
}

.wi-books-shelf img {
    display: block;
    width: 100%;
    height: auto;
}

body.dark-mode .wi-books-shelf img {
    filter:
        brightness(0.73)
        contrast(1.05);
}

/*
|--------------------------------------------------------------------------
| More titles
|--------------------------------------------------------------------------
*/

.wi-books-library {
    padding:
        clamp(74px, 9vw, 120px)
        0
        clamp(86px, 10vw, 138px);

    text-align: center;
}

.wi-books-library__eyebrow {
    margin: 0 0 12px;

    color: var(--wi-books-text);

    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.wi-books-library h2 {
    margin: 0;

    color: var(--wi-books-text);

    font-family: "PT Serif", Georgia, serif;
    font-size: clamp(2.45rem, 4vw, 4.4rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 1;
}

.wi-books-library p:last-child {
    max-width: 920px;

    margin: 18px auto 0;

    color: var(--wi-books-muted);

    font-size: clamp(0.98rem, 1.35vw, 1.18rem);
    line-height: 1.35;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 980px) {
    .wi-books-hero__grid,
    .wi-books-featured__grid {
        grid-template-columns: 1fr;
    }

    .wi-books-hero__copy {
        max-width: 720px;
    }

    .wi-books-hero__visual {
        margin-top: 22px;
    }

    .wi-books-hero__visual img {
        width: min(78vw, 540px);
    }

    .wi-books-featured__grid {
        text-align: center;
    }

    .wi-books-featured__copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .wi-books-featured__description {
        max-width: 680px;
    }

    .wi-books-featured__cover img {
        width: min(62vw, 330px);
    }
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 640px) {
    .wi-books-shell {
        width: min(100% - 30px, 1180px);
    }

    .wi-books-hero {
        padding:
            58px
            0
            60px;
    }

    .wi-books-hero__grid {
        gap: 42px;
        margin: 0 1.5rem ;
    }

    .wi-books-eyebrow {
        font-size: 0.59rem;
        letter-spacing: 0.27em;
    }

    .wi-books-eyebrow i {
        width: 26px;
    }

    .wi-books-hero h1 {
        font-size: clamp(4.3rem, 24vw, 6.6rem);
        line-height: 0.82;
    }

    .wi-books-hero__description {
        margin-top: 29px;

        font-size: 1rem;
        line-height: 1.42;
    }

    .wi-books-explore {
        min-width: 136px;
        min-height: 42px;

        font-size: 0.86rem;
    }

    .wi-books-hero__visual img {
        width: min(96%, 460px);
    }

    .wi-books-featured {
        padding-top: 24px;
    }

    .wi-books-featured__grid {
        gap: 42px;
    }

    .wi-books-featured__copy {
    order: 1;
}

.wi-books-featured__cover {
    order: 2;
}

    .wi-books-featured__cover img {
        width: max(20vw, 150px);
    }

    .wi-books-featured h2 {
        font-size: clamp(2.75rem, 14vw, 4.15rem);
    }

    .wi-books-featured__description {
        margin-top: 25px;

        font-size: 1rem;
        line-height: 1.45;
    }

    .wi-books-featured__action {
        justify-content: center;
    }

    .wi-books-shelf {
        width: calc(100% + 10px);

        margin-top: 30px;
    }

    .wi-books-library {
        padding:
            68px
            0
            88px;
    }

    .wi-books-library__eyebrow {
        font-size: 0.58rem;
        letter-spacing: 0.27em;
    }

    .wi-books-library h2 {
        font-size: clamp(2.25rem, 12vw, 3.5rem);
    }

    .wi-books-library p:last-child {
        font-size: 0.94rem;
        line-height: 1.5;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .wi-books-page *,
    .wi-books-page *::before,
    .wi-books-page *::after {
        transition: none !important;
    }
}
