.home-book {
    background: transparent;
    color: #292925;
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 2.3fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    padding: 28px clamp(20px, 2vw, 36px) 60px clamp(24px, 4vw, 76px);
    gap: 16px clamp(24px, 3vw, 56px);
    font-family: Arial, sans-serif;
}
.home-book__heading { grid-column: 1; grid-row: 1 / 3; text-align: left; font-family: 'Space', Arial, sans-serif; font-weight: 700; }
.home-book__heading p { margin: 0 0 22px; font-size: clamp(14px, 1.15vw, 21px); letter-spacing: .12em; line-height: 1.4; }
.home-book__heading h2 { margin: 0; font-family: inherit; font-size: clamp(48px, 5.2vw, 98px); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; }
.home-book__reader { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: clamp(10px, 1.2vw, 22px); width: 100%; min-height: 0; min-width: 0; }
.folio {
    position: relative;
    width: min(100%, 1240px, calc((100svh - var(--homepage-story-header-height, 0px) - 130px) * 1.5));
    aspect-ratio: 3 / 2;
    flex: 0 1 auto;
    perspective: 2400px;
    isolation: isolate;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    border-radius: 2px 6px 6px 2px;
    background: #ded6c9;
    box-shadow: 0 2px 0 #d2c8b9, 0 4px 0 #f9f4ea, 0 6px 0 #c7bbaa, 0 8px 0 #f2eadc, 0 11px 0 2px #4c443d, 0 24px 28px -12px #31281966, 0 45px 65px -25px #31281944;
}
.folio:focus-visible, .home-book__arrow:focus-visible { outline: 2px solid #b52932; outline-offset: 8px; }
.folio:active { cursor: grabbing; }
/* Use the existing CAD cursor layer so the hand stays visible during page replacement. */
.cad-cursor.is-book .cad-cursor-axis { opacity: 0; }
.cad-cursor.is-book .cad-cursor-center {
    width: 34px;
    height: 38px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 38'%3E%3Cpath d='M10 20V8a2.5 2.5 0 0 1 5 0v10V5a2.5 2.5 0 0 1 5 0v13V7a2.5 2.5 0 0 1 5 0v13V12a2.5 2.5 0 0 1 5 0v12c0 6-3 9-5 11H13c-2-4-4-6-7-9l-3-4c-2-3 1-6 4-3l3 3' fill='%23fff' stroke='%23252525' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    filter: drop-shadow(0 2px 2px #0003);
}
.cad-cursor.is-book-grabbing .cad-cursor-center {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 38'%3E%3Cpath d='M9 18v-5a3 3 0 0 1 6 0v4-6a3 3 0 0 1 6 0v6-4a3 3 0 0 1 6 0v5-2a2.5 2.5 0 0 1 5 0v8c0 5-4 8-6 11H13c-1-4-4-6-6-9l-3-5c-2-4 2-6 4-3l5 5' fill='%23fff' stroke='%23252525' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.folio__base { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; }
.folio__base--left { left: 0; border-radius: 3px 0 0 3px; }
.folio__base--right { right: 0; border-radius: 0 3px 3px 0; }
.folio__base::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.folio__base--left::after { background: linear-gradient(90deg, #00000004 80%, #0000000d 95%, #00000038); }
.folio__base--right::after { background: linear-gradient(90deg, #00000032, #0000000a 5%, transparent 22%); }
.folio__spine { position: absolute; left: calc(50% - 1px); top: 0; height: 100%; width: 2px; background: #3c302b66; pointer-events: none; }
.folio__turn { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.folio__cast-shadow { position: absolute; top: 1%; width: 50%; height: 98%; background: #201a14; filter: blur(9px); opacity: 0; pointer-events: none; }
.folio__strip { position: absolute; top: 0; left: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; }
.folio__face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #eee6d9; }
.folio__face--back { transform: rotateY(180deg) translateZ(.02px); }
.folio__face > .folio-page { position: absolute; top: 0; height: 100%; }
.folio__face::after { content: ''; position: absolute; inset: 0; background: #302216; opacity: var(--fold-shade, 0); pointer-events: none; }
.folio__face::before { content: ''; position: absolute; inset: 0; z-index: 1; background: #fff; opacity: var(--fold-light, 0); pointer-events: none; }
.folio-page { position: relative; width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; background: var(--folio-paper); color: var(--folio-ink); container-type: inline-size; }
.folio-page__masthead, .folio-page__footer { position: absolute; left: 5%; right: 5%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: clamp(5px, 2.2cqw, 11px); letter-spacing: .1em; line-height: 1.2; }
.folio-page__masthead { top: 4%; padding-bottom: 2%; border-bottom: 1px solid currentColor; }
.folio-page__masthead span:first-child { font-weight: 700; letter-spacing: .04em; }
.folio-page__solid { position: absolute; inset: 13% 5% 10%; background: var(--folio-ink); }
.folio-page__footer { bottom: 4%; font-size: clamp(5px, 1.8cqw, 9px); }
.folio-page__footer span:last-child { font-size: 3cqw; }
.folio-page__image { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.home-book__arrow { width: 46px; height: 46px; padding: 12px; flex: none; border-radius: 50%; border: 1px solid #80796c60; color: #39352d; background: transparent; cursor: pointer; transition: background .2s, opacity .2s; }
.home-book__arrow svg { display: block; width: 100%; height: 100%; }
.home-book__arrow:hover:not(:disabled) { background: #ffffff8c; }
.home-book__arrow:disabled { opacity: .22; cursor: default; }
.home-book__footer { grid-column: 2; grid-row: 2; justify-self: center; display: flex; align-items: center; justify-content: space-between; width: calc(100% - 136px); gap: 16px; font-size: 11px; color: #6a655d; }
.home-book__pagination { color: #343029; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.home-book__message {
    position: absolute;
    top: calc(44% - 170px);
    right: calc(clamp(24px, 6vw, 110px) + 35px);
    width: min(40vw, 540px);
    margin: 0;
    color: rgba(95, 95, 95, .8);
    font: 700 clamp(36px, 4.5vw, 72px)/1.08 Arial, sans-serif;
    -webkit-text-stroke: .5px rgba(0, 0, 0, .16);
    animation: home-book-message-drift 8s ease-in-out infinite alternate;
}
.home-book__message span { white-space: nowrap; }
@keyframes home-book-message-drift {
    from { transform: translate3d(0, -5px, 0); }
    to { transform: translate3d(0, 5px, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .home-book__message { animation: none; }
}
@media (max-width: 900px) {
    .home-book { display: flex; flex-direction: column; justify-content: center; padding: 18px 12px 70px; gap: 24px; }
    .home-book__heading { width: calc(100% - 78px); }
    .home-book__heading p { font-size: 12px; margin-bottom: 10px; }
    .home-book__heading h2 { font-size: clamp(36px, 7vw, 60px); }
    .folio { width: min(100%, calc((100svh - var(--homepage-story-header-height, 0px) - 240px) * 1.5)); }
    .home-book__reader { gap: 9px; justify-content: center; }
    .home-book__arrow { width: 30px; height: 36px; padding: 6px; border: 0; }
    .home-book__footer { width: 100%; justify-content: center; flex-wrap: wrap; font-size: 10px; }
    .home-book__message { position: static; width: 100%; text-align: center; font-size: clamp(20px, 7vw, 42px); }
}
@media (max-height: 550px) and (min-width: 601px) {
    .home-book { padding-top: 10px; padding-bottom: 48px; gap: 10px; }
    .home-book__heading p { font-size: 10px; margin-bottom: 6px; }
    .home-book__heading h2 { font-size: 32px; }
    .folio { width: min(100%, 900px, calc((100svh - var(--homepage-story-header-height, 0px) - 135px) * 1.5)); }
    .home-book .home-scroll-cue { bottom: 8px; }
}

.folio__surface { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; pointer-events: none; }

/* The final viewport includes the global footer and the return-to-start cue. */
.homepage-story .home-book { padding-bottom: calc(78px + var(--home-book-footer-height, 37px)); }
.home-book > .site-footer { position: absolute; bottom: 0; left: 0; right: 0; }
.home-book .folio { width: min(100%, 1240px, calc((100svh - var(--homepage-story-header-height, 0px) - var(--home-book-footer-height, 37px) - 150px) * 1.5)); }
.site-back-to-top-label { display: none; position: absolute; right: calc(100% + 12px); white-space: nowrap; color: #bc1116; font: 600 11px Arial,sans-serif; letter-spacing: .1em; text-shadow: 0 1px 3px white; }
.is-last-home-section .site-back-to-top-label { display: block; }
.is-last-home-section .site-back-to-top { bottom: calc(var(--home-book-footer-height, 37px) + 16px); }
@media (max-width: 900px) {
    .home-book .folio { width: min(100%, calc((100svh - var(--homepage-story-header-height, 0px) - var(--home-book-footer-height, 100px) - 285px) * 1.5)); }
}

.home-book { grid-template-columns: minmax(0,1fr); padding-left: clamp(18px,2vw,36px); padding-right: clamp(18px,3vw,56px); }
.home-book__reader { grid-column: 1; justify-content: center; }
.home-book__footer { grid-column: 1; width: min(1100px,calc(100% - 136px)); }
.folio-page__image { object-fit: contain; }
@media (max-width: 900px) { .home-book__footer { width: 100%; } }
@media (min-width: 901px) {
    .home-book__reader { justify-content: flex-start; }
    .home-book__footer {
        justify-self: start;
        margin-left: calc(46px + clamp(10px, 1.2vw, 22px));
        width: min(
            1240px,
            calc((100svh - var(--homepage-story-header-height, 0px) - var(--home-book-footer-height, 37px) - 150px) * 1.5),
            calc(100% - 2 * (46px + clamp(10px, 1.2vw, 22px)))
        );
    }
}

/* Keep artwork inside the original catalogue masthead and footer. */
.folio-page__image { position: absolute; left: 5%; top: 13%; width: 90%; height: 77%; object-fit: contain; }
