/* monopole.one - Dark Academia Manuscript */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #D4C8B0;
    background: #141828;
    overflow-x: hidden;
}

/* ===== Manuscript Grid ===== */
.manuscript-grid {
    display: grid;
    grid-template-columns: 1fr 100px 600px 100px 1fr;
    padding: 0 1rem;
}

.main-column {
    grid-column: 3;
}

.margin-inner-left {
    grid-column: 2;
    padding-right: 1.5rem;
}

.margin-inner-right {
    grid-column: 4;
    padding-left: 1.5rem;
}

/* ===== Margin Notes ===== */
.margin-note {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.6;
    font-style: italic;
    color: #8B7B60;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.margin-note.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Folios ===== */
.folio {
    padding: 8vh 0;
    position: relative;
}

#folio-1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #0C0E18;
}

#folio-2 {
    background: #141828;
}

#folio-3 {
    background: #1C2840;
}

#folio-4 {
    background: #0C0E18;
    padding-bottom: 15vh;
}

/* ===== Chapter Numbers ===== */
.chapter-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: #C4A050;
    margin-bottom: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.chapter-number.revealed,
[data-reveal].revealed .chapter-number {
    opacity: 1;
}

/* ===== Hero Title ===== */
.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: 0.01em;
    font-style: italic;
    color: #C4A050;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.title-ornament {
    overflow: hidden;
}

.title-ornament svg {
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.title-ornament.animate-active svg {
    opacity: 1;
}

/* ===== Section Rules ===== */
.section-rule {
    height: 1px;
    background: #C4A050;
    margin-bottom: 2rem;
    background-size: 0% 1px;
    background-image: linear-gradient(to right, #C4A050, #C4A050);
    background-repeat: no-repeat;
    background-position: center;
    transition: background-size 0.8s ease;
}

.section-rule.animate-active {
    background-size: 100% 1px;
}

/* ===== Chapter Headings ===== */
.chapter-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    color: #E8DCC0;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.chapter-heading.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Body Text ===== */
.body-text {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.body-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.body-text p {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #D4C8B0;
    margin-bottom: 1.25rem;
}

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

/* ===== Drop Capitals ===== */
.drop-cap {
    float: left;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 3.5rem;
    line-height: 0.8;
    color: #C4A050;
    padding-right: 0.15em;
    padding-top: 0.1em;
}

/* ===== Fleuron Dividers ===== */
.fleuron-divider {
    text-align: center;
    font-size: 1.5rem;
    color: #C4A050;
    padding: 4vh 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fleuron-divider.revealed {
    opacity: 0.6;
}

/* ===== Horizontal Rules ===== */
.folio::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: #8B7B60;
    opacity: 0.2;
    margin: 0 auto;
}

#folio-4::after {
    display: none;
}

/* ===== Colophon ===== */
.colophon-content {
    text-align: center;
    padding-top: 4vh;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.colophon-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.colophon-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.85;
    color: #D4C8B0;
    text-align: left;
    margin-bottom: 3rem;
}

.colophon-ornament {
    font-size: 1.5rem;
    color: #C4A050;
    opacity: 0.5;
    margin-bottom: 2rem;
}

.colophon-note {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 0.8125rem;
    color: #8B7B60;
    letter-spacing: 0.02em;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .manuscript-grid {
        grid-template-columns: 1fr 0 minmax(0, 600px) 0 1fr;
        padding: 0 1.5rem;
    }

    .margin-inner-left,
    .margin-inner-right {
        display: none;
    }

    .margin-note {
        display: none;
    }
}

@media (max-width: 640px) {
    .manuscript-grid {
        display: block;
        padding: 0 1.25rem;
    }

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