/* 04. Livro aberto — páginas que crescem com o texto */
.reader {
    max-width: 1640px;
    width: 96%;
    margin: 0 auto;
    padding: 22px 24px 26px;
}
.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.reader-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-align: center;
}
.book-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    position: relative;
    perspective: 1800px;
    border: 1px solid #1a1410;
    box-shadow:
        0 25px 60px #0009,
        0 5px 0 #a79c8c,
        0 8px 0 #28262a;
    border-radius: 4px;
}
.page {
    color-scheme: light;
    color: var(--ink);
    background: linear-gradient(90deg, #ded5c5, var(--paper) 8%, #efe9de 88%, #d1c6b4);
    padding: 30px clamp(36px, 4vw, 68px) 32px;
    min-height: clamp(680px, 76vh, 900px);
    display: flex;
    flex-direction: column;
    font-family: Georgia, 'Times New Roman', serif;
    position: relative;
    outline: none;
}
.page:nth-child(even) {
    background: linear-gradient(90deg, #c7bba8, #e7dfd1 7%, #efe9de 22%, var(--paper) 92%, #d5caba);
}
.page-running-head {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.13em;
    text-align: center;
    color: var(--paper-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid #3f342222;
}
.page-body {
    padding: 36px 0 28px;
}
.chapter-label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem !important;
    letter-spacing: 0.12em;
    color: #833340;
    margin: 0 0 20px !important;
    line-height: 1.6 !important;
}
.page h2 {
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(2.4rem, 3.4vw, 3.3rem);
    line-height: 1.16;
    margin: 0 0 24px;
}
.page p {
    font-size: 1.125rem;
    line-height: 1.85;
    margin: 0 0 18px;
}
.page p:last-child {
    margin-bottom: 0;
}
.opening-line {
    font-style: italic;
}
.drop-cap::first-letter {
    float: left;
    font-size: 3.3rem;
    line-height: 1;
    padding: 4px 7px 0 0;
    color: #82333d;
}
.ink-rule {
    display: block;
    width: 42px;
    height: 1px;
    background: #82333d;
    margin: 0 0 24px;
}
.author-signature {
    display: block;
    font-family: var(--script);
    font-size: 2rem;
    line-height: 1.3;
    margin-top: 30px;
    color: #74303b;
}
.page-number {
    margin-top: auto;
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: var(--paper-muted);
    padding-top: 16px;
    border-top: 1px solid #3f342222;
}

/* Metadados discretos dos projetos: conteúdo, não controles do livro. */
.project-technologies {
    list-style: none;
    padding: 0;
    margin: 22px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.project-technologies li {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;
    padding: 4px 10px;
    border: 1px solid #655b5240;
    color: #655b52;
}
.project-link {
    display: inline-block;
    padding: 10px 0;
    border-bottom: 1px solid #833340;
    color: #74303b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;
}
.project-link:hover {
    color: #292622;
}

/* Folha complementar com um convite em forma de carimbo. */
.blank-page-invitation {
    display: grid;
    place-items: center;
    padding: 48px;
    background: linear-gradient(90deg, #c7bba8, #e7dfd1 7%, #efe9de 22%, var(--paper) 92%, #d5caba);
}

.story-stamp {
    max-width: 380px;
    padding: 28px 32px;
    border: 4px double #833340;
    color: #833340;
    text-align: center;
    transform: rotate(-8deg);
    opacity: 0.75;
}

.story-stamp p {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.1rem, 1.7vw, 1.6rem);
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
