/* ==========================================================================
   Story reading page (.book-page)
   The page mimics an old book / paper sheet experience.
   ========================================================================== */

.book-page {
    padding-block: var(--space-xl);
    position: relative;
    z-index: 2;
}

.book-page__content {
    background: url("../images/printart-mli32xW.webp") center / cover;
    border-radius: var(--radius-lg);
    box-shadow: 5px 5px 18px 5px rgba(0, 0, 0, 0.18);
    padding: clamp(var(--space-md), 4vw, var(--space-2xl));
    filter: brightness(0.97) sepia(20%) saturate(85%);
    margin-inline: auto;
    max-width: 920px;
}

.book-page__header {
    display: grid;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .book-page__header {
        grid-template-columns: 220px 1fr;
    }
}

.book-page__thumb {
    display: flex;
    justify-content: center;
}

.book-page__thumb img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-width: 200px;
}

.book-page__meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    color: #565046;
}

.book-page__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
}

.book-page h1 {
    /* Patrick Hand : la Sassy Frass calligraphique était illisible en titre */
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3rem);
    color: #26231e;
    mix-blend-mode: color-burn;
    margin-bottom: var(--space-md);
}

.book-page hr {
    border: 0;
    height: 1px;
    background: rgba(86, 80, 70, 0.3);
    margin-block: var(--space-md);
}

.book-page__body {
    color: #565046;
    text-shadow: 0.2px 0.2px 1.3px Sienna;
}

.book-page__body p {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.8;
    letter-spacing: 0.4px;
    word-spacing: 2px;
    text-align: justify;
    margin-bottom: var(--space-md);
}

.book-page__body p:first-of-type::first-letter {
    /* Lettrine en Patrick Hand : lisible, la calligraphique rendait un glyphe étrange */
    font-family: var(--font-heading);
    font-size: 4em;
    float: left;
    line-height: 0.9;
    margin-right: var(--space-xs);
    margin-top: var(--space-2xs);
    color: #6a4e3a;
}

.book-page__body h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #35312b;
    text-shadow: 0.3px 0.3px 2px Sienna;
}

.book-page__body h3 {
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-style: italic;
    color: #35312b;
    text-decoration: 1px dashed underline #888;
    letter-spacing: 1px;
    text-shadow: 0.6px 0.6px 1px Sienna;
}

.book-page__end {
    display: block;
    text-align: end;
    font-family: var(--font-fancy);
    font-size: 4rem;
    color: #565046;
    margin-top: var(--space-md);
}

/* Reading progress bar (top of page) */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    z-index: var(--z-toast);
    transition: width 80ms linear;
}

/* Custom scrollbar inside book page */
.book-page::-webkit-scrollbar { width: 12px; }
.book-page::-webkit-scrollbar-track { background: #ae9d72; }
.book-page::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: var(--radius-pill); }
