/* Custom styles for The Becoming — poemsbysarah.com */

/* ── Poetry ─────────────────────────────────────────── */

.poem-body {
    width: 55%;
    font-size: 1.5rem;
    line-height: 2.2rem;
    letter-spacing: 0.01em;
}

.poem-body p {
    margin-top: 0;
    margin-bottom: 1.6em;
}

.section-break {
    text-align: center;
    margin: 2em 0;
    color: #c4b69c;
    letter-spacing: 0.6em;
    font-size: 1.1rem;
}

.epigraph {
    font-style: italic;
    color: #999;
    margin-bottom: 2.5em;
    padding-left: 1.5em;
    border-left: 2px solid #e0d8c8;
    font-size: 1.15rem;
    line-height: 1.7;
}

.subtitle {
    font-style: italic;
    font-size: 1.8rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
    color: #666;
}

/* ── Poem page ──────────────────────────────────────── */

.poem-page h1 {
    font-size: 3.6rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    color: #2a2a2a;
}

.poem-page .nav {
    margin-bottom: 4rem;
    width: 55%;
}

.poem-page .nav a {
    font-size: 1rem;
    color: #aaa;
    transition: color 0.15s ease;
}

.poem-page .nav a:hover {
    color: #8b7355;
}

.poem-page article {
    padding-top: 3rem;
}

.poem-page section {
    padding-top: 0.5rem;
}

.poem-page .marginnote,
.poem-page .sidenote {
    margin-right: -50%;
    width: 40%;
}

/* ── Navigation ─────────────────────────────────────── */

.nav {
    margin-bottom: 3rem;
}

.nav a {
    margin-right: 1.5rem;
    font-size: 1.2rem;
}

.poem-nav {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e8e4de;
    width: 55%;
    font-size: 1rem;
    line-height: 1.5;
}

.poem-nav a {
    font-size: 0.95rem;
    color: #999;
    transition: color 0.15s ease;
}

.poem-nav a:hover {
    color: #8b7355;
}

.poem-nav .prev { float: left; }
.poem-nav .next { float: right; }
.poem-nav::after { content: ""; display: table; clear: both; }

.poem-position {
    font-size: 0.85rem;
    color: #aaa;
    letter-spacing: 0.05em;
    float: right;
}

.keyboard-hint {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    color: #ccc;
    text-align: center;
    margin-top: 1.5rem;
    width: 55%;
    letter-spacing: 0.05em;
    font-variant: small-caps;
}

/* ── Act headers & lists ────────────────────────────── */

.act-header {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.act-header h2 {
    margin-bottom: 0.3rem;
}

.act-epigraph {
    font-style: italic;
    color: #888;
    font-size: 1.1rem;
}

.act-header + .poem-list {
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.poem-list {
    list-style: none;
    padding: 0;
    width: 55%;
}

.poem-list li {
    margin: 0.5rem 0;
}

.poem-list a {
    font-size: 1.2rem;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.poem-list a:hover {
    color: #8b7355;
    padding-left: 0.3rem;
}

/* ── Act landing pages ──────────────────────────────── */

.act-subtitle {
    font-style: italic;
    font-size: 1.6rem;
    margin-top: -0.8rem;
    margin-bottom: 0.5rem;
    color: #8b7355;
}

.act-epigraph-large {
    font-style: italic;
    color: #888;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.act-description {
    width: 55%;
    font-size: 1.4rem;
    line-height: 2rem;
    margin-bottom: 2.5rem;
    color: #333;
}

.act-poem-count {
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.act-nav {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
    width: 55%;
}

.act-nav a { font-size: 1.1rem; }
.act-nav .prev { float: left; }
.act-nav .next { float: right; }
.act-nav::after { content: ""; display: table; clear: both; }

/* ── Footer ─────────────────────────────────────────── */

footer.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8e4de;
    width: 55%;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #aaa;
}

footer.site-footer p {
    font-size: inherit;
    line-height: inherit;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}

/* ── Book buttons ───────────────────────────────────── */

.book-buttons {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border-left: 3px solid #8b7355;
    width: 55%;
}

.book-buttons .label {
    font-variant: small-caps;
    letter-spacing: 0.15em;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: block;
}

.book-buttons a.button {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 2px solid #8b7355;
    text-decoration: none;
    color: #5c4a32;
    margin-right: 1rem;
    background: #fffff8;
    text-shadow: none;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.book-buttons a.button:hover {
    background: #8b7355;
    color: #fffff8;
    border-color: #8b7355;
}

.book-buttons a.button.primary {
    background: #8b7355;
    color: #fffff8;
}

.book-buttons a.button.primary:hover {
    background: #5c4a32;
    border-color: #5c4a32;
}

/* ── Flourish ───────────────────────────────────────── */

.flourish {
    width: 200px;
    max-width: 200px;
    height: auto;
    opacity: 0.35;
    margin: -0.5rem 0 2rem -1rem;
}

/* ── Poem context (below poem body) ─────────────────── */

.poem-context {
    margin-top: 3rem;
    padding-top: 0;
    width: 55%;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
}

.poem-context p {
    font-size: inherit;
    line-height: inherit;
}

.poem-context .asterism {
    font-size: 1rem;
    color: #d4c9b8;
    letter-spacing: 0.4em;
    margin-bottom: 2rem;
    margin-top: 0;
    line-height: 1.2;
}

.poem-context .context-act {
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 1.1rem;
    color: #8b7355;
    margin-bottom: 0.2rem;
    margin-top: 0;
}

.poem-context .context-collection {
    font-style: italic;
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 1.8rem;
    margin-top: 0.3rem;
}

.poem-context .context-buttons .label {
    font-variant: small-caps;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 0.6rem;
    display: block;
}

.poem-context .context-buttons a.button {
    display: inline-block;
    padding: 0.55rem 1.8rem;
    border: 1px solid #d4c9b8;
    text-decoration: none;
    color: #8b7355;
    margin: 0 0.4rem;
    background: transparent;
    text-shadow: none;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.poem-context .context-buttons a.button:hover {
    background: #8b7355;
    color: #fffff8;
    border-color: #8b7355;
}

/* ── Homepage ───────────────────────────────────────── */

.homepage h1 {
    font-size: 4rem;
    margin-top: 5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.homepage .subtitle {
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: #888;
}

.homepage .flourish {
    width: 240px;
    max-width: 240px;
    opacity: 0.3;
    margin: -0.5rem 0 1.5rem -1rem;
}

.homepage .intro {
    font-size: 1.35rem;
    line-height: 2.1rem;
    color: #333;
}

.homepage .act-header {
    margin-top: 3.5rem;
    margin-bottom: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid #ece8e0;
}

.homepage .act-header:first-of-type {
    margin-top: 2rem;
}

.homepage .act-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.homepage .act-header h2 a {
    color: #2a2a2a;
    transition: color 0.15s ease;
}

.homepage .act-header h2 a:hover {
    color: #8b7355;
}

.homepage .act-epigraph {
    font-size: 1rem;
    color: #aaa;
}

.homepage .poem-list {
    margin-top: 0.8rem;
    margin-bottom: 0;
}

.homepage .poem-list li {
    margin: 0.4rem 0;
}

.homepage .act-poem-count {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    color: #bbb;
    margin-top: 0.3rem;
}

.homepage .book-buttons {
    margin: 2.5rem 0 3rem;
}

.homepage footer.site-footer {
    margin-top: 5rem;
}

/* ── Search ─────────────────────────────────────────── */

.search-box {
    margin: 2rem 0 1rem;
    width: 55%;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #e0d8c8;
    background: #fffff8;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box input::placeholder {
    color: #ccc;
    font-style: italic;
}

.search-box input:focus {
    border-color: #8b7355;
}

/* ── Print ──────────────────────────────────────────── */

@media print {
    body {
        width: 100%;
        padding: 0;
        max-width: none;
        animation: none;
    }

    .nav, .poem-nav, .keyboard-hint, .poem-context,
    footer.site-footer, .marginnote, .sidenote {
        display: none !important;
    }

    .poem-body { width: 100%; }
    h1 { margin-top: 1rem; }
    article { padding: 0; }
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 760px) {
    body {
        width: 84%;
        padding-left: 8%;
        padding-right: 8%;
    }

    section > p,
    section > footer,
    section > table,
    .poem-body,
    .poem-list,
    .poem-nav,
    footer.site-footer {
        width: 100%;
    }

    .sidenote,
    .marginnote {
        display: block;
        float: none;
        clear: both;
        width: 100%;
        margin: 1.5rem 0;
        padding: 1rem 0;
        border-top: 1px solid #e8e4de;
        border-bottom: 1px solid #e8e4de;
        font-style: italic;
        color: #888;
    }

    .book-buttons {
        width: 100%;
    }

    .book-buttons a.button {
        display: block;
        text-align: center;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .keyboard-hint {
        display: none;
    }

    .poem-context,
    .poem-nav, .keyboard-hint {
        width: 100%;
    }

    .poem-context .context-buttons a.button {
        display: block;
        text-align: center;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .act-description,
    .act-nav {
        width: 100%;
    }

    .homepage h1 {
        font-size: 2.8rem;
        margin-top: 3rem;
    }

    .homepage .flourish {
        width: 160px;
        max-width: 160px;
    }

    .search-box {
        width: 100%;
    }

    label.margin-toggle:not(.sidenote-number) {
        display: none;
    }
}
