:root {
    --bg: #faf6f0;
    --text: #2a2a2a;
    --muted: #6a6a6a;
    --accent: #7a2e3f;
    --accent-hover: #5e2330;
    --divider: #e8dfd3;
    --shadow: 0 4px 16px rgba(42, 42, 42, 0.12);
    --max-width: 820px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

p a {
    border-bottom-color: rgba(122, 46, 63, 0.3);
}

p a:hover {
    border-bottom-color: var(--accent);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Site header */
.site-header {
    text-align: center;
    padding: 56px 24px 40px;
}

.site-header img {
    margin: 0 auto;
    max-width: min(100%, 600px);
}

/* Featured strip */
.featured {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
    flex-wrap: wrap;
    padding: 0 24px 64px;
}

.featured a {
    display: block;
    border-bottom: none;
    transition: transform 0.2s ease;
}

.featured a:hover {
    transform: translateY(-4px);
}

.featured img {
    width: 180px;
    box-shadow: var(--shadow);
}

/* Intro */
.intro {
    margin: 0 0 56px;
    padding: 0;
    font-size: 18px;
    line-height: 1.7;
    text-align: center;
}

/* Book cards */
.books {
    display: flex;
    flex-direction: column;
}

.book {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 56px 0;
    border-top: 1px solid var(--divider);
}

.book.reverse {
    flex-direction: row-reverse;
}

.book-cover {
    flex: 0 0 220px;
}

.book-cover img {
    width: 100%;
    box-shadow: var(--shadow);
}

.book-cover a {
    display: block;
    border-bottom: none;
    transition: transform 0.2s ease;
}

.book-cover a:hover {
    transform: translateY(-4px);
}

.book-content {
    flex: 1;
    min-width: 0;
}

.book-title {
    margin: 0 0 20px;
}

.book-title img {
    max-width: min(100%, 480px);
}

.book-blurb {
    margin: 0 0 28px;
}

.book-blurb p {
    margin: 0 0 1em;
}

.book-blurb p:last-child {
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #faf6f0;
    padding: 12px 28px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    border-bottom: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--accent-hover);
    color: #faf6f0;
    border-bottom: none;
}

.btn-small {
    padding: 8px 20px;
    font-size: 12px;
    margin: 0 4px;
}

.btn-row {
    text-align: center;
}

/* See more */
.see-more {
    text-align: center;
    padding: 72px 24px 40px;
    border-top: 1px solid var(--divider);
    margin-top: 40px;
}

.see-more a {
    display: inline-block;
    border-bottom: none;
    transition: transform 0.2s ease;
}

.see-more a:hover {
    transform: translateY(-2px);
}

.see-more img {
    max-width: min(100%, 600px);
    margin: 0 auto;
}

.disclosure {
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: var(--muted);
    padding: 0 24px 56px;
    margin: 0;
}

/* Subscribers page */
.password-gate {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 24px;
}

.password-gate h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: normal;
    font-size: 22px;
    margin: 0 0 28px;
}

.password-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.password-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    border: 1px solid #c8bda9;
    background: #fff;
    color: var(--text);
    border-radius: 0;
    -webkit-appearance: none;
}

.password-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.password-error {
    color: var(--accent);
    margin-top: 20px;
    font-style: italic;
}

.unlocked-header {
    text-align: center;
    padding: 24px 24px 40px;
}

.unlocked-header img {
    max-width: min(100%, 600px);
    margin: 0 auto;
}

.downloads {
    text-align: center;
    margin-top: 8px;
}

.downloads-label {
    display: block;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 14px;
}

/* Mobile */
@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .site-header {
        padding: 32px 16px 24px;
    }

    .container {
        padding: 0 20px;
    }

    .featured {
        gap: 20px;
        padding: 0 20px 40px;
    }

    .featured img {
        width: 130px;
    }

    .intro {
        font-size: 17px;
        margin-bottom: 32px;
    }

    .book,
    .book.reverse {
        flex-direction: column;
        gap: 24px;
        padding: 40px 0;
        align-items: stretch;
    }

    .book-cover {
        flex: none;
        max-width: 240px;
        width: 100%;
        margin: 0 auto;
    }

    .book-title {
        text-align: center;
    }

    .book-title img {
        margin: 0 auto;
    }

    .see-more {
        padding: 48px 20px 32px;
    }
}
