/* ============================================================
   ESSAY.CSS - Shared across all essay-*.html files
   All essay layout, typography, and component styles
   ============================================================ */

/* Top Bar Navigation */
.essay-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    z-index: 100;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
}

.essay-top-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.essay-top-bar a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
}

.essay-top-bar a:hover {
    color: var(--accent);
}

.essay-top-bar .back-link {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.04em;
}

/* Essay Container Layout */
.essay-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 100px 1.5rem 80px;
}

/* Essay Header Section */
.essay-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.essay-header h1 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.essay-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.5;
}

/* Essay Meta Information (badges, tags, dates) */
.essay-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.essay-date {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.04em;
}

.essay-context {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.04em;
    font-style: italic;
}

/* Author Badges */
.author-badge {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
}

.author-badge-ai {
    background: #e8e4f0;
    color: var(--tag-fiction);
}

.author-badge-human {
    background: #e4ecf0;
    color: #2e4a5c;
}

/* Tag Styles (fact, fiction, faction) */
.tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
}

.tag-fact {
    background: #e8f0eb;
    color: var(--tag-fact);
}

.tag-fiction {
    background: #ece8f0;
    color: var(--tag-fiction);
}

.tag-faction {
    background: #f0e4e8;
    color: var(--tag-faction);
}

/* Series Badge */
.series-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 3px;
    background: var(--bg-alt);
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Essay Body Text */
.essay-body p {
    margin-bottom: 1.5rem;
    text-align: left;
    hyphens: auto;
}

.essay-body .section-break {
    text-align: center;
    margin: 2.5rem 0;
    color: var(--text-light);
    letter-spacing: 0.5em;
    font-size: 14px;
}

.essay-body h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
}

/* Blockquotes and Epigraphs */
.essay-body blockquote {
    margin: 2rem 0 2rem 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border);
    color: var(--text-light);
    font-style: italic;
}

.essay-body .epigraph {
    margin: 0 0 3rem 0;
    padding: 0;
    border: none;
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    font-size: 1.05rem;
}

.essay-body .epigraph .attribution {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* Letter and Dialogue Specific Styles */
.essay-body .salutation {
    font-style: italic;
    margin-bottom: 2rem;
}

.essay-body .signature {
    margin-top: 2.5rem;
    text-align: right;
    font-style: italic;
}

.essay-body .signature .name {
    font-style: normal;
    font-weight: 600;
}

/* Founder Dialogue Styles (essay-the-cowards.html) */
.essay-body .notice-header {
    text-align: center;
    margin-bottom: 2.5rem;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.essay-body .founder-heading {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

.essay-body .founder-subtitle {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.essay-body .founder-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Essay Footer Section */
.essay-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.essay-footer .author-note {
    background: var(--bg-alt);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.essay-footer .author-note h4 {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.essay-footer .author-note p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.essay-footer .source-note {
    background: white;
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.essay-footer .source-note h4 {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tag-fact);
    margin-bottom: 0.75rem;
}

.essay-footer .source-note p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.essay-footer .source-note strong {
    color: var(--text);
    font-weight: 600;
}

/* Call-to-Action Links */
.essay-cta {
    text-align: center;
    margin-top: 3rem;
}

.essay-cta a {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 2px;
}

.essay-cta a:hover {
    color: var(--text);
    border-color: var(--text);
}

/* Editorial Frame (faction/fiction disclaimers) */
.essay-body .editorial-frame {
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2.5rem 0;
    border-radius: 0 4px 4px 0;
}

.essay-body .editorial-frame h4 {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.essay-body .editorial-frame p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.essay-body .editorial-frame p:last-child {
    margin-bottom: 0;
}

/* Trust Terms (formal mandate display) */
.essay-body .trust-terms {
    background: white;
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 4px;
    text-align: center;
}

.essay-body .trust-terms .term-header {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.essay-body .trust-terms p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Read Next Links (related essay navigation in footer) */
.read-next {
    display: block;
    background: var(--bg-alt);
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.read-next:hover {
    border-color: var(--border);
}

.read-next h4 {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.read-next p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    color: var(--accent);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .essay-header h1 {
        font-size: 2.2rem;
    }

    .essay-container {
        padding: 90px 1.25rem 60px;
    }

    .essay-top-bar {
        padding: 0 1.25rem;
    }

    .essay-body blockquote {
        margin-left: 0.5rem;
        padding-left: 1rem;
    }

    .essay-footer .author-note,
    .essay-footer .source-note {
        padding: 1.25rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .essay-header h1 {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .essay-subtitle {
        font-size: 1rem;
        line-height: 1.45;
    }

    .essay-container {
        padding: 76px 1rem 48px;
    }

    .essay-top-bar {
        padding: 0 1rem;
    }

    .essay-top-bar a {
        font-size: 13px;
    }

    .essay-top-bar .back-link {
        font-size: 11px;
    }

    body {
        font-size: 17px;
    }

    .essay-meta {
        gap: 0.5rem 0.75rem;
    }

    .essay-body blockquote {
        margin-left: 0;
        padding-left: 0.75rem;
    }

    .essay-body .epigraph {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .essay-body .epigraph .attribution {
        font-size: 0.82rem;
    }

    .essay-body .signature {
        text-align: left;
        margin-top: 2rem;
    }

    .essay-body .notice-header {
        font-size: 0.88rem;
    }

    .essay-body .founder-heading {
        margin-top: 2rem;
    }

    .essay-footer .author-note,
    .essay-footer .source-note {
        padding: 1rem;
    }

    .essay-footer .source-note p {
        font-size: 0.85rem;
    }

    .series-badge {
        font-size: 9px;
        padding: 3px 10px;
    }

    .essay-context {
        display: block;
        margin-top: 0.25rem;
    }

    .essay-cta {
        margin-top: 2rem;
    }
}
