/* ------------------------------
   Basic page settings
------------------------------ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: #111111;
    color: #f4f1ea;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.7;
}

a {
    color: inherit;
}


/* ------------------------------
   Header and navigation
------------------------------ */

.site-header {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #343434;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.site-navigation {
    display: flex;
    gap: 28px;
}

.site-navigation a {
    color: #c9c6bf;
    text-decoration: none;
}

.site-navigation a:hover {
    color: #ffffff;
}


/* ------------------------------
   Main page
------------------------------ */

main {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    padding: 72px 0 64px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.eyebrow {
    margin: 0 0 14px;

    color: #aaa69e;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2 {
    line-height: 1.1;
}

h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(3rem, 8vw, 6.5rem);
}

.hero-text {
    max-width: 650px;
    margin: 28px 0 36px;

    color: #c9c6bf;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.button {
    display: inline-block;
    padding: 14px 22px;

    border: 1px solid #f4f1ea;

    text-decoration: none;
}

.button:hover {
    background-color: #f4f1ea;
    color: #111111;
}


/* ------------------------------
   Current serial
------------------------------ */

.current-serial {
    max-width: 800px;
    padding: 90px 0;

    border-top: 1px solid #343434;
}

.current-serial h2 {
    margin: 0 0 28px;
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.current-serial p {
    max-width: 680px;
    color: #c9c6bf;
    font-size: 1.1rem;
}

.release-note {
    font-style: italic;
}

.text-link {
    display: inline-block;
    margin-top: 12px;

    font-weight: bold;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}


/* ------------------------------
   Lower homepage links
------------------------------ */

.homepage-links {
    padding: 80px 0;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 70px;

    border-top: 1px solid #343434;
}

.homepage-links h2 {
    margin-top: 0;
    font-size: 2rem;
}

.homepage-links p {
    color: #c9c6bf;
}


/* ------------------------------
   Footer
------------------------------ */

.site-footer {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0;

    color: #8e8b85;
    border-top: 1px solid #343434;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
}


/* ------------------------------
   Phones and small screens
------------------------------ */

@media (max-width: 650px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .site-navigation {
        gap: 20px;
    }

    .hero {
        padding: 56px 0 48px;
    }

    .homepage-links {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}
/* ------------------------------
   Standard page introduction
------------------------------ */

.page-introduction {
    max-width: 850px;
    padding: 64px 0 56px;
}

.page-introduction h1 {
    margin: 0;
}

.page-introduction-text {
    max-width: 650px;
    margin-top: 24px;

    color: #c9c6bf;
    font-size: 1.25rem;
}

@media (max-width: 650px) {
    .page-introduction {
        padding: 52px 0 44px;
    }
}


/* ------------------------------
   Books page
------------------------------ */

.book-list {
    border-top: 1px solid #343434;
}

.book-card {
    padding: 80px 0;

    display: grid;
    grid-template-columns: minmax(190px, 280px) 1fr;
    gap: 70px;
    align-items: start;

    border-bottom: 1px solid #343434;
}

.book-cover-placeholder {
    aspect-ratio: 2 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #1b1b1b;
    border: 1px solid #3d3d3d;
    color: #77736c;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.book-information {
    max-width: 680px;
}

.book-information h2 {
    margin: 0 0 24px;
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.book-information p {
    color: #c9c6bf;
    font-size: 1.05rem;
}

.book-status {
    font-style: italic;
}

.unavailable-link {
    display: inline-block;
    margin-top: 16px;

    color: #77736c;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* ------------------------------
   Books page on small screens
------------------------------ */

@media (max-width: 700px) {
    .book-card {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .book-cover-placeholder {
        width: min(260px, 100%);
    }
}
/* ------------------------------
   Individual book page
------------------------------ */

.book-hero {
    padding: 100px 0;

    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 80px;
    align-items: center;
}

.large-cover {
    width: 100%;
}

.book-hero-information {
    max-width: 700px;
}

.book-hero-information h1 {
    margin: 0 0 30px;

    font-size: clamp(3rem, 7vw, 6rem);
}

.book-tagline {
    margin-bottom: 26px;

    color: #f4f1ea;
    font-size: 1.35rem;
    font-style: italic;
}

.book-summary {
    color: #c9c6bf;
    font-size: 1.1rem;
}

.chapter-section {
    padding: 90px 0;

    border-top: 1px solid #343434;
}

.chapter-section h2 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.chapter-list {
    margin: 50px 0 0;
    padding: 0;

    list-style: none;

    border-top: 1px solid #343434;
}

.chapter-list li {
    border-bottom: 1px solid #343434;
}

.chapter-list a {
    padding: 24px 0;

    display: flex;
    justify-content: space-between;
    gap: 30px;

    color: #f4f1ea;
    text-decoration: none;
}

.chapter-list a:hover {
    color: #ffffff;
    padding-left: 10px;
}

.chapter-list span:last-child {
    color: #8e8b85;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
}


/* ------------------------------
   Individual book page on phones
------------------------------ */

@media (max-width: 750px) {
    .book-hero {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .large-cover {
        width: min(300px, 100%);
    }

    .chapter-list a {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}
/* ------------------------------
   About page
------------------------------ */

.about-section {
    padding: 80px 0 100px;

    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 80px;
    align-items: start;

    border-top: 1px solid #343434;
}

.author-photo-placeholder {
    aspect-ratio: 4 / 5;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #1b1b1b;
    border: 1px solid #3d3d3d;
    color: #77736c;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.about-copy {
    max-width: 700px;
}

.about-copy h2 {
    margin-top: 0;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.about-copy p {
    color: #c9c6bf;
    font-size: 1.1rem;
}

@media (max-width: 750px) {
    .about-section {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .author-photo-placeholder {
        width: min(300px, 100%);
    }
}
/* ------------------------------
   Chapter reading page
------------------------------ */

.reading-page {
    width: min(100% - 40px, 1100px);
}

.chapter {
    max-width: 760px;
    margin: 0 auto;
    padding: 100px 0;
}

.chapter-header {
    margin-bottom: 70px;
    text-align: center;
}

.chapter-header h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 5.5rem);
}

.chapter-pov {
    margin: 1.25rem 0 0;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-style: italic;
    line-height: 1.3;
}

.chapter-date {
    margin: 0.35rem 0 0;
    color: #aaa69e;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-style: italic;
    line-height: 1.3;
}

.chapter-title {
    margin-top: 18px;
    color: #aaa69e;
    font-size: 1.25rem;
    font-style: italic;
}

.chapter-body {
    color: #e2ded6;
    font-size: 1.2rem;
    line-height: 1.8;
}

.chapter-body p {
    margin: 0;
}

.chapter-body p + p {
    margin-top: 1.1em;
    text-indent: 1.5em;
}

.chapter-body p:first-child::first-letter {
    float: left;
    margin: 0.1em 0.12em 0 0;
    color: #f4f1ea;
    font-size: 4.5rem;
    line-height: 0.8;
}

.chapter-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;

    margin-top: 4rem;
    padding-top: 2rem;

    border-top: 1px solid #343434;
}

.chapter-navigation-previous,
.chapter-navigation-next {
    min-width: 0;
}

.chapter-navigation-next {
    text-align: right;
}

.chapter-navigation-link,
.chapter-navigation-disabled {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 4rem;
}

.chapter-navigation-link {
    color: #f4f1ea;
    font-weight: bold;
    text-decoration: none;
}

.chapter-navigation-link:hover .chapter-navigation-title,
.chapter-navigation-link:focus-visible .chapter-navigation-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.chapter-navigation-direction {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chapter-navigation-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.chapter-navigation-disabled {
    color: #66625c;
    opacity: 0.45;
}

@media (max-width: 650px) {
    .chapter {
        padding: 70px 0;
    }

    .chapter-header {
        margin-bottom: 55px;
    }

    .chapter-body {
        font-size: 1.08rem;
    }

    .chapter-navigation {
        grid-template-columns: 1fr;
    }

    .chapter-navigation-next {
        text-align: left;
    }
}