/* ============================================
   political.quest — Dark-Academia Archive
   Palette: Navy-Metallic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #0D1B2A;
    color: #E8DCC8;
    font-family: 'EB Garamond', 'Georgia', serif;
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Running Header --- */
#running-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(13, 27, 42, 0.92);
    border-bottom: 1px solid rgba(142, 154, 175, 0.2);
    padding: 0.6rem 18vw;
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #8E9AAF;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.4s ease;
}

.running-header-label {
    color: #C9A84C;
}

.running-header-divider {
    color: #415A77;
}

#current-chapter {
    color: #8E9AAF;
}

/* --- Hero --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0D1B2A;
    position: relative;
}

/* Subtle radial gradient for depth */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 38.2%, rgba(65, 90, 119, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    text-align: center;
    position: relative;
    z-index: 1;
    /* Golden ratio positioning: push content up to ~38.2% from top */
    margin-top: -12vh;
}

.hero-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(2.6rem, 5.5vw, 5rem);
    font-weight: 600;
    color: #E8DCC8;
    letter-spacing: 0.04em;
    margin: 1rem 0 0.5rem;
}

.hero-subtitle {
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #8E9AAF;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-ornament {
    display: flex;
    justify-content: center;
}

.ornament-svg {
    width: 160px;
    height: 20px;
    opacity: 0.7;
}

/* --- Main Content --- */
#content {
    max-width: 100vw;
    padding-top: 4rem;
    padding-bottom: 6rem;
}

/* --- Chapter Sections --- */
.chapter {
    position: relative;
    margin-left: 18vw;
    max-width: 55ch;
    margin-bottom: 6rem;
    padding-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Overlapping depth between chapters */
.chapter:nth-child(even) {
    margin-top: -3rem;
}

/* --- Chapter Marker --- */
.chapter-marker {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.roman-numeral {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #C9A84C;
    line-height: 1;
    flex-shrink: 0;
}

.ornamental-rule {
    flex: 1;
    overflow: hidden;
}

.divider-svg {
    width: 100%;
    height: 12px;
    display: block;
}

/* --- Chapter Title --- */
.chapter-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    color: #E8DCC8;
    margin-bottom: 1.8rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* --- Chapter Body (text + annotations) --- */
.chapter-body {
    position: relative;
}

.text-column {
    max-width: 55ch;
}

.text-column p {
    margin-bottom: 1.4rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.text-column p:last-child {
    margin-bottom: 0;
}

/* Footnote superscripts */
.footnote-ref {
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.7rem;
    color: #C9A84C;
    vertical-align: super;
    line-height: 0;
    cursor: default;
}

/* --- Margin Annotations --- */
.margin-annotation {
    position: absolute;
    right: -18vw;
    width: 14vw;
    top: 0;
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #8E9AAF;
    line-height: 1.5;
    border-left: 2px solid #415A77;
    padding-left: 0.8rem;
    transition: border-color 0.4s ease;
}

.margin-annotation:hover {
    border-color: #C9A84C;
}

.margin-annotation-lower {
    top: auto;
    bottom: 2rem;
}

.annotation-text {
    margin: 0;
}

.annotation-text em {
    color: #C9A84C;
    font-style: italic;
}

/* --- Footnotes --- */
.footnotes {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(142, 154, 175, 0.2);
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.78rem;
    color: #8E9AAF;
    line-height: 1.6;
}

.footnotes p {
    margin-bottom: 0.3rem;
}

.footnotes sup {
    color: #C9A84C;
    margin-right: 0.3em;
}

.footnotes em {
    color: #E8DCC8;
    font-style: italic;
}

/* --- Colophon / Footer --- */
#colophon {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-top: 1px solid rgba(142, 154, 175, 0.15);
}

.colophon-ornament {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.colophon-svg {
    width: 100px;
    height: 30px;
    opacity: 0.6;
}

.colophon-text {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #E8DCC8;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.colophon-meta {
    font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    color: #8E9AAF;
    letter-spacing: 0.05em;
}

/* --- Ornamental Border Blocks --- */
.chapter-body {
    border: 1px solid #8E9AAF;
    border-radius: 2px;
    padding: 2rem 2rem 2rem 2rem;
    transition: border-color 0.5s ease;
}

.chapter-body:hover {
    border-color: #C9A84C;
}

/* --- Selection Color --- */
::selection {
    background-color: #8B2F3A;
    color: #E8DCC8;
}

::-moz-selection {
    background-color: #8B2F3A;
    color: #E8DCC8;
}

/* --- Links (within text) --- */
a {
    color: #C9A84C;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    transition: border-color 0.3s ease;
}

a:hover {
    border-bottom-color: #C9A84C;
}

/* --- Emphasis within text --- */
em {
    color: #C9A84C;
    font-style: italic;
}

/* --- Scrollbar (WebKit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0D1B2A;
}

::-webkit-scrollbar-thumb {
    background: #415A77;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8E9AAF;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .margin-annotation {
        position: relative;
        right: auto;
        width: 100%;
        margin-top: 1.5rem;
        border-left: 2px solid #415A77;
        padding-left: 1rem;
    }

    .margin-annotation-lower {
        bottom: auto;
    }

    .chapter {
        margin-left: 8vw;
        margin-right: 8vw;
        max-width: none;
    }

    #running-header {
        padding: 0.6rem 8vw;
    }
}

@media (max-width: 700px) {
    .chapter {
        margin-left: 5vw;
        margin-right: 5vw;
    }

    #running-header {
        padding: 0.6rem 5vw;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .chapter-body {
        padding: 1.2rem;
    }

    .margin-annotation {
        padding-left: 0.8rem;
    }
}
