* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #FFF8F0;
    font-family: 'Lora', serif;
    color: #4A4038;
    overflow-x: hidden;
}

/* Running header */
#running-header {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 12px;
    color: #8A7A6A;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#running-header.visible {
    opacity: 1;
}

/* Main content */
#content {
    max-width: 640px;
    margin: 0 auto;
    padding: 80px 24px 120px;
}

/* Hero */
#hero {
    margin-bottom: 80px;
}

.display-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 48px;
    color: #3A3028;
    line-height: 1.1;
    margin-bottom: 8px;
}

.handwritten-subtitle {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 18px;
    color: #8A7A6A;
}

/* Section headings */
.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 36px;
    color: #3A3028;
    margin-bottom: 24px;
}

/* Body text */
.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: #4A4038;
    margin-bottom: 48px;
}

.body-text.indent {
    text-indent: 1.5em;
}

/* Pull quotes */
.pull-quote {
    width: 80%;
    margin: 0 auto 80px;
    background-color: #E8E0D8;
    padding: 16px;
}

.pull-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 22px;
    color: #3A3028;
    line-height: 1.5;
}

/* Chapters */
.chapter {
    margin-bottom: 80px;
}

/* Footnotes */
.footnote-ref {
    font-family: 'Lora', serif;
    font-size: 12px;
    color: #C8A888;
    text-decoration: none;
    vertical-align: super;
}

.footnote {
    margin-top: -24px;
    margin-bottom: 48px;
}

.footnote-rule {
    border: none;
    border-top: 1px solid rgba(138, 122, 106, 0.4);
    width: 40%;
    margin-bottom: 12px;
}

.footnote p {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #8A7A6A;
    line-height: 1.5;
}

.footnote sup {
    color: #C8A888;
    font-size: 10px;
}

/* Margin blobs */
.margin-blob {
    position: absolute;
    z-index: 0;
    animation: blob-drift 12s infinite ease-in-out;
}

.left-blob {
    left: calc(50% - 380px);
}

.right-blob {
    right: calc(50% - 380px);
}

.margin-blob svg {
    transform: rotate(4deg);
}

@keyframes blob-drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

/* Section divider blobs */
.divider-blob {
    text-align: center;
    margin: 0 auto 48px;
}

/* Page markers */
.page-marker {
    position: absolute;
    right: calc(50% - 360px);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 11px;
    color: #8A7A6A;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page-marker.visible {
    opacity: 0.5;
}

/* Fade in */
.fade-in {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* Links */
a {
    color: #C8A888;
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
    .display-heading {
        font-size: 36px;
    }

    .section-heading {
        font-size: 26px;
    }

    .margin-blob {
        display: none;
    }

    .page-marker {
        display: none;
    }

    .pull-quote {
        width: 100%;
    }

    #content {
        padding: 60px 20px 80px;
    }
}
