/* ============================================================================
   supremacy.pub - Modernist-Authoritative Publishing Design
   Typography-driven, monochromatic, classical serif aesthetic
   ============================================================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    background-color: #f8f8f8;
    color: #2c2c2c;
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 400;
    overflow-x: hidden;
}

/* Color Palette */
:root {
    --publication-white: #f8f8f8;
    --publication-black: #1a1a1a;
    --publication-gray: #2c2c2c;
    --scholarly-gray: #4a4a4a;
    --ink-black: #0a0a0a;
    --typeface-gray: #b8b8b8;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--publication-black);
    margin-bottom: 1em;
    line-height: 1.2;
}

p {
    margin-bottom: 1.5em;
    max-width: 45em;
}

blockquote {
    font-style: italic;
}

/* ============================================================================
   Navigation
   ============================================================================ */
.site-nav {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

body.scrolled .site-nav {
    opacity: 1;
}

.nav-link {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--publication-black);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.nav-link.active {
    border-bottom-color: var(--publication-black);
}

.nav-link:hover {
    border-bottom-color: var(--publication-black);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .site-nav {
        top: auto;
        bottom: 1rem;
        right: auto;
        left: 1rem;
        flex-direction: row;
        gap: 0.75rem;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ============================================================================
   Sections and Layout
   ============================================================================ */
.publishing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: 3rem 2rem;
}

.hero-section {
    background-color: var(--publication-white);
    padding: 0 2rem;
}

.spread-section {
    background-color: var(--publication-white);
}

.backmatter-section {
    background-color: var(--publication-white);
    min-height: 85vh;
}

/* ============================================================================
   Hero Section
   ============================================================================ */
.hero-content {
    text-align: center;
    max-width: 100%;
}

.domain-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 12vw, 8rem);
    font-weight: 900;
    color: var(--publication-black);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-rule {
    height: 2px;
    width: 100%;
    background-color: var(--publication-black);
    margin: 1.5rem auto 2rem;
    animation: expandWidth 0.8s 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    font-style: italic;
    color: var(--publication-gray);
    letter-spacing: 0.05em;
    animation: fadeIn 0.8s 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) both;
    margin-bottom: 0;
}

/* Hero Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ============================================================================
   Spread Sections
   ============================================================================ */
.spread-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.content-column {
    flex: 0 1 45em;
}

.spine-rule {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80vh;
    background-color: var(--publication-black);
    opacity: 0.2;
    transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.spread-container:hover .spine-rule {
    opacity: 0.35;
}

.section-heading {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--publication-black);
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 1px;
    background-color: var(--publication-black);
}

.section-text {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--publication-gray);
    line-height: 1.8;
    margin-bottom: 1.5em;
}

/* ============================================================================
   Ornamental Elements
   ============================================================================ */
.ornament {
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--publication-black);
    opacity: 0.6;
}

/* ============================================================================
   Pull Quote
   ============================================================================ */
.pull-quote {
    font-family: 'EB Garamond', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--scholarly-gray);
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--typeface-gray);
    border-bottom: 1px solid var(--typeface-gray);
    line-height: 1.8;
}

.quote-text {
    display: block;
    margin-bottom: 0.5rem;
}

.quote-attribution {
    display: block;
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--publication-gray);
}

/* ============================================================================
   Back Matter Section
   ============================================================================ */
.backmatter-content {
    max-width: 45em;
    text-align: center;
    margin: 0 auto;
}

.backmatter-heading {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--publication-black);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.backmatter-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 1px;
    background-color: var(--publication-black);
}

.colophon {
    margin-top: 2rem;
}

.colophon-text {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    color: var(--publication-gray);
    line-height: 1.9;
    margin-bottom: 1.5em;
    max-width: 45em;
    margin-left: auto;
    margin-right: auto;
}

.small-caps {
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.publication-mark {
    font-size: 1.5rem;
    color: var(--publication-black);
    margin: 2rem 0 1.5rem;
    opacity: 0.6;
}

.colophon-date {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    color: var(--scholarly-gray);
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* ============================================================================
   Mobile Responsiveness
   ============================================================================ */
@media (max-width: 768px) {
    .publishing-section {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .hero-section {
        min-height: 100vh;
        justify-content: center;
    }

    .spread-container {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
    }

    .content-column {
        flex: 1;
        max-width: 100%;
    }

    .spine-rule {
        position: static;
        width: 2px;
        height: 0;
        background-color: var(--publication-black);
        opacity: 1;
        margin: 1.5rem 0;
        transform: none;
        order: -1;
    }

    .publishing-section {
        border-top: 2px solid var(--publication-black);
    }

    .publishing-section:first-of-type {
        border-top: none;
    }

    .ornament {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }

    .section-heading::after {
        left: 0;
    }
}

/* ============================================================================
   Link Styling
   ============================================================================ */
a {
    color: var(--publication-black);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

a:hover {
    border-bottom-color: var(--publication-black);
}

/* ============================================================================
   Print Styles (if needed)
   ============================================================================ */
@media print {
    .site-nav {
        display: none;
    }

    .publishing-section {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   Scrollbar Styling (Custom)
   ============================================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--publication-white);
}

::-webkit-scrollbar-thumb {
    background: var(--publication-black);
    opacity: 0.3;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--publication-black);
    opacity: 0.5;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */
.scrolled {
    /* Added by JavaScript for scroll-triggered navigation visibility */
}
