@import url('https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400;1,700&display=swap');

*, html{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #2b2b2b #e8e3d8;
    color: #333;
}

body {
background: url('background.png');
    background-size: auto;
  font-family: "Cardo", "Garamond", "Times New Roman", serif;
  background-size: cover;
}

.book {
    max-width: 950px;
    margin: 60px auto 20px;
}

.spread {
    display: flex;
    background: #fffcf4;
    box-shadow:
        0 0 0 1px #b5b0a6,
        0 15px 40px rgba(0,0,0,0.4);
}

.page {
    width: 50%;
    padding: 30px 25px;
    height: 700px;
    overflow: auto;
    box-sizing: border-box;
    position: relative;
}

.page.left {
    border-right: 1px solid #c5c0b6;
}

.page.right {
    border-left: 1px solid #f2eee6;
}

/* Poetry styling */
.poem h1 {
    font-size: 1.8em;
    margin-bottom: 2rem;
        color: #630000!important;
        font-style: italic!important;
        font-weight: bold!important;;
        text-shadow: none!important;

}

.poem p {
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.9em;
}

.sig {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.75em!important;
}

/* Cover */
.cover {
    text-align: center;
    padding-top: 150px;
}

.cover h1 {
    font-size: 2.5em;
    text-transform: lowercase;
    font-style: italic;
    color: #630000!important;
}

.cover h2 {
    margin-top: 1rem;
    font-weight: normal;
}

.year {
    margin-top: 4rem;
    font-size: 0.9rem;
}

.back{
    font-size: 0.9em;
    position: absolute;
    bottom: 10px;
    text-align: right;
    padding-right: 10px;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav-btn {
    color: #e8e3d8;
    text-decoration: none;
    font-size: 0.9rem;
}

.spread {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-btn {
    background: none;
    border: none;
    color: #e8e3d8;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-btn:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

footer img:hover{
    background-color: #e8e3d8;
    border-radius: 30px;
}

@media (min-width: 1400px) {
    .book {
        max-width: 1100px;
    }

    .page {
        height: 750px;
        padding: 40px 35px;
    }

    .poem p {
        font-size: 1em;
        line-height: 1.6;
    }
}

@media (max-width: 1399px) and (min-width: 1024px) {
    .book {
        max-width: 900px;
    }

    .page {
        height: 680px;
    }
}

@media (max-width: 1023px) {

    .book {
        max-width: 650px;
        margin: 40px auto;
    }

    .spread {
        flex-direction: column;
        box-shadow:
            0 0 0 1px #b5b0a6,
            0 10px 25px rgba(0,0,0,0.35);
    }

    .page {
        width: 100%;
        height: auto;
        min-height: 70vh;
        padding: 40px 35px;
        border: none;
    }

    .page.left,
    .page.right {
        border: none;
    }

    .poem h1 {
        font-size: 1.3rem;
        margin-bottom: 2.5rem;
        text-align: center;
    }

    .poem p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .sig {
        font-size: 0.85em !important;
    }

    .back {
        position: static;
        margin-top: 3rem;
        text-align: center;
        font-size: 0.85em;
    }
}

@media (max-width: 767px) {
    .book {
        max-width: 90%;
        margin: 30px auto;
    }

    .spread {
        box-shadow:
            0 0 0 1px #b5b0a6,
            0 8px 18px rgba(0,0,0,0.3);
    }

    .page {
        padding: 35px 25px;
    }

    .poem h1 {
        font-size: 1.25rem;
    }

    .poem p {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 1.75rem;
    }

    .cover {
        padding-top: 120px;
    }

    .cover h1 {
        font-size: 1.7rem;
        letter-spacing: 0.06em;
    }

    .cover h2 {
        font-size: 1rem;
    }

    .year {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .book {
        max-width: 95%;
        margin: 20px auto;
    }

    .page {
        padding: 30px 20px;
    }

    .poem h1 {
        font-size: 1.15rem;
        margin-bottom: 2rem;
    }

    .poem p {
        font-size: 0.9em;
        line-height: 1.75;
    }

    .sig {
        font-size: 0.9em !important;
        margin-top: 2.5rem;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-top: 30px;
    }

    .nav-btn {
        font-size: 0.95rem;
    }

    footer {
        margin-top: 30px;
        font-size: 0.85rem;
    }
}


