/* ============================================================
   Aloysius Q. Snodgrass, III — Interior Page Styles
   Shared across all interior section pages.
   Typewriter font (Courier Prime) throughout.
   Warm parchment theme.
   ============================================================ */

/* --- Shared Nav (sticky, all pages) --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    background: rgba(253, 246, 227, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(200, 169, 81, 0.2);
    font-family: 'Courier Prime', monospace;
}

.site-nav .nav-brand {
    text-decoration: none;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 700;
}

.site-nav .nav-links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.site-nav .nav-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-light);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
    color: var(--gold);
}

/* --- Page Layout: sidebar + content --- */
.page-layout {
    display: flex;
    min-height: calc(100vh - 52px);
}

.page-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--parchment-dark);
    border-right: 1px solid rgba(200, 169, 81, 0.15);
    padding: 2rem 1.2rem;
    overflow-y: auto;
    position: sticky;
    top: 52px;
    height: calc(100vh - 52px);
}

.page-sidebar h3 {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    margin-bottom: 1rem;
}

.sidebar-item {
    display: block;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.3rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--ink-light);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background: rgba(200, 169, 81, 0.1);
    color: var(--ink);
}

.sidebar-item.active {
    background: rgba(200, 169, 81, 0.15);
    color: var(--ink);
    border-color: var(--gold);
    font-weight: 700;
}

.sidebar-item.disabled {
    color: var(--ink-faint);
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.sidebar-item .item-number {
    display: inline-block;
    width: 2.2em;
    color: var(--gold);
    font-weight: 700;
}

/* --- Main Content Area --- */
.page-content {
    flex: 1;
    padding: 2.5rem 3rem;
    max-width: 900px;
}

.page-content h1 {
    font-family: 'Courier Prime', monospace;
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 0.3rem;
}

.page-content h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    color: var(--ink);
    margin: 2rem 0 0.8rem;
}

.page-content .subtitle {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--ink-faint);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

/* --- Story Text --- */
.story-text {
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink-light);
}

.story-text p {
    margin-bottom: 1.2rem;
    text-indent: 2rem;
}

.story-text p:first-of-type {
    text-indent: 0;
}

.story-text p:first-of-type::first-letter {
    font-size: 2.8rem;
    float: left;
    line-height: 1;
    margin-right: 0.1rem;
    margin-top: 0.05rem;
    color: var(--gold);
    font-weight: 700;
}

/* --- Audio Player Section (Complete Not Compete pattern) --- */
.audio-section {
    background: rgba(61, 43, 31, 0.04);
    border: 1px solid rgba(200, 169, 81, 0.2);
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
}

.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.audio-title {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
}

.audio-duration {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--ink-faint);
}

.audio-section audio {
    width: 100%;
    height: 40px;
    border-radius: 4px;
}

/* --- Content Container (slide-based, syncs with audio) --- */
.content-stage {
    background: rgba(200, 169, 81, 0.06);
    border: 1px solid rgba(200, 169, 81, 0.15);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    min-height: 300px;
    margin-bottom: 2rem;
    position: relative;
}

.content-slide {
    display: none;
    animation: slideFade 0.5s ease;
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink-light);
}

.content-slide.active {
    display: block;
}

.content-slide p {
    margin-bottom: 1rem;
}

.chapter-container {
    display: none;
}

.chapter-container.active {
    display: block;
}

@keyframes slideFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Chapter Markers (clickable, sync with audio) --- */
.chapter-markers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.chapter-marker {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: rgba(200, 169, 81, 0.04);
    border: 1px solid rgba(200, 169, 81, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier Prime', monospace;
}

.chapter-marker:hover {
    background: rgba(200, 169, 81, 0.12);
    border-color: var(--gold);
}

.chapter-marker.active {
    background: rgba(200, 169, 81, 0.18);
    border-color: var(--gold);
}

.marker-time {
    font-size: 0.7rem;
    color: var(--gold);
    min-width: 3.5em;
}

.marker-title {
    font-size: 0.8rem;
    color: var(--ink);
}

/* --- Pagination (book-style page turns) --- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(200, 169, 81, 0.2);
    font-family: 'Courier Prime', monospace;
}

.page-btn {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
    background: rgba(200, 169, 81, 0.08);
    border: 1px solid var(--gold);
    color: var(--ink);
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--gold);
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.page-indicator {
    font-size: 0.8rem;
    color: var(--ink-faint);
}

/* --- Full-width content (no sidebar) --- */
.page-full {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page-full h1 {
    font-family: 'Courier Prime', monospace;
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 0.3rem;
}

/* --- Character/About Cards --- */
.about-block {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.about-block img {
    width: 320px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(61, 43, 31, 0.12);
    flex-shrink: 0;
}

.about-block .about-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink-light);
}

.about-block .about-text h2 {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
}

.about-block .about-text h3 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 0.2rem;
}

.about-block .about-text .aka {
    font-style: italic;
    color: var(--ink-faint);
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
}

.about-block .about-text p {
    margin-bottom: 0.8rem;
}

.dedication {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(200, 169, 81, 0.08);
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--ink);
}

/* --- Placeholder state --- */
.placeholder-message {
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'Courier Prime', monospace;
    color: var(--ink-faint);
}

.placeholder-message h2 {
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.placeholder-message p {
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto;
}

/* --- Footer (all interior pages) --- */
.site-footer {
    text-align: center;
    padding: 2rem;
    background: var(--ink);
    color: rgba(253, 246, 227, 0.5);
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
}

.site-footer .tagline {
    color: var(--gold);
    font-size: 1rem;
    margin-top: 0.3rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-nav {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .site-nav .nav-links {
        gap: 0.8rem;
    }

    .page-layout {
        flex-direction: column;
    }

    .page-sidebar {
        width: 100%;
        position: static;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(200, 169, 81, 0.15);
        padding: 1rem;
    }

    .page-content {
        padding: 1.5rem 1.2rem;
    }

    .about-block {
        flex-direction: column;
    }

    .about-block img {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}
