/* ============================================
   nonri.org - Scholarly Street / Ma-Negative-Space
   ============================================ */
:root {
    --aged-parchment: #F5EDE0;
    --terracotta-mist: #A0816C;
    --burnt-sienna: #8B4513;
    --lampblack-ink: #2C2418;
    --marble-dust: #E8DFD1;
    --oxidized-bronze: #6B7B5E;
    --kiln-red: #C4553A;
    --deep-alcove: #1E1812;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--aged-parchment);
    color: var(--lampblack-ink);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* ==============================
   GRAIN OVERLAY
   ============================== */
.grain-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    mix-blend-mode: multiply;
}

/* ==============================
   NAVIGATION
   ============================== */
.nav-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--terracotta-mist);
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: clamp(80px, 15vw, 200px);
    padding-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.nav-line.visible {
    opacity: 1;
}
.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-mist);
    text-decoration: none;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--burnt-sienna);
}

/* ==============================
   SECTIONS
   ============================== */
.section {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}

/* ==============================
   NARROW COLUMN
   ============================== */
.narrow-column {
    max-width: 540px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* ==============================
   I. EPIGRAPH
   ============================== */
.section--epigraph {
    min-height: 100vh;
}
.hero-word {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--lampblack-ink);
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 2s ease;
}
.hero-word.visible {
    opacity: 1;
}
.wavy-rule {
    width: clamp(200px, 30vw, 400px);
    height: 6px;
    margin-top: 2rem;
}
.wavy-path {
    fill: none;
    stroke: var(--terracotta-mist);
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.5s ease;
}
.wavy-path.drawn {
    stroke-dashoffset: 0;
}
.wavy-path--light {
    stroke: var(--aged-parchment);
    opacity: 0.5;
}

/* ==============================
   II. THESIS
   ============================== */
.section--thesis {
    min-height: 90vh;
}

/* ==============================
   BODY TEXT
   ============================== */
.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    letter-spacing: 0.02em;
    color: var(--lampblack-ink);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0), transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.body-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   III. EVIDENCE
   ============================== */
.section--evidence {
    min-height: 85vh;
}
.section-watermark {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 8rem;
    color: var(--lampblack-ink);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.evidence-line {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--lampblack-ink);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0), transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.evidence-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   IV. COUNTERPOINT
   ============================== */
.section--counterpoint {
    min-height: 90vh;
}
.pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.15em;
    line-height: 1.4;
    color: var(--burnt-sienna);
    max-width: 80vw;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.1, 0.25, 1.0), transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.pull-quote.visible {
    opacity: 1;
    transform: translateY(0);
}
.pull-quote-attr {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--terracotta-mist);
    margin-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}
.pull-quote-attr.visible {
    opacity: 0.6;
}

/* ==============================
   V. SYNTHESIS
   ============================== */
.section--synthesis {
    min-height: 85vh;
}
.marble-texture-underlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, var(--marble-dust) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(212, 196, 168, 0.15) 0%, transparent 50%);
    opacity: 0.08;
    pointer-events: none;
}

/* ==============================
   VI. CODA
   ============================== */
.section--coda {
    min-height: 90vh;
}
.coda-image {
    width: clamp(300px, 70vw, 800px);
    height: clamp(200px, 40vh, 400px);
    background: var(--marble-dust);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 20px,
            rgba(160, 129, 108, 0.06) 20px,
            rgba(160, 129, 108, 0.06) 21px
        ),
        radial-gradient(ellipse at 40% 50%, rgba(212, 196, 168, 0.3) 0%, transparent 70%);
    filter: grayscale(0.7) sepia(0.25) contrast(1.1);
    position: relative;
    clip-path: polygon(0% 0%, 98% 0%, 100% 3%, 99% 8%, 100% 100%, 2% 100%, 0% 97%);
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.coda-image.visible {
    opacity: 1;
    transform: scale(1);
}
.coda-overlay-text {
    position: absolute;
    bottom: 1.5rem;
    left: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--lampblack-ink);
    letter-spacing: 0.08em;
    opacity: 0.6;
}
.rubber-stamp {
    width: 120px;
    height: 120px;
    border: 3px solid var(--kiln-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(12deg);
    margin-top: 3rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.rubber-stamp.visible {
    opacity: 1;
}
.stamp-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kiln-red);
}

/* ==============================
   VII. COLOPHON
   ============================== */
.section--colophon {
    min-height: 50vh;
    background: var(--deep-alcove);
}
.wavy-rule--colophon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}
.colophon-content {
    display: flex;
    gap: clamp(60px, 12vw, 200px);
    margin-bottom: 3rem;
}
.colophon-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--aged-parchment);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.colophon-link:hover {
    opacity: 0.9;
}
.colophon-domain {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.12em;
    color: var(--aged-parchment);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}
.colophon-note {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--terracotta-mist);
    opacity: 0.4;
}

/* ==============================
   MARBLE FRAGMENTS
   ============================== */
.marble-fragment {
    position: absolute;
    width: clamp(150px, 25vw, 300px);
    height: clamp(200px, 35vh, 400px);
    background: var(--marble-dust);
    background-image:
        repeating-linear-gradient(
            -30deg,
            transparent 0px,
            transparent 15px,
            rgba(160, 129, 108, 0.04) 15px,
            rgba(160, 129, 108, 0.04) 16px
        ),
        radial-gradient(circle at 50% 50%, rgba(212, 196, 168, 0.2) 0%, transparent 70%);
    filter: grayscale(0.7) sepia(0.25) contrast(1.1);
    clip-path: polygon(5% 0%, 95% 2%, 100% 98%, 3% 100%);
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.9s ease, transform 0.9s ease;
    z-index: 0;
}
.marble-fragment.visible {
    opacity: 0.6;
    transform: scale(1);
}
.marble-fragment--right {
    right: -5vw;
    top: 15%;
}
.marble-fragment--left {
    left: -5vw;
    top: 20%;
}

/* ==============================
   ANNOTATIONS
   ============================== */
.annotation {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--oxidized-bronze);
    opacity: 0;
    transform: rotate(-4deg);
    transition: opacity 0.3s ease, transform 0.4s ease;
    z-index: 3;
    pointer-events: none;
}
.annotation.visible {
    opacity: 0.7;
    transform: rotate(-2deg);
}
.annotation--left {
    left: clamp(1rem, 5vw, 3rem);
    top: 40%;
}
.annotation--right {
    right: clamp(1rem, 5vw, 3rem);
    top: 35%;
}
.annotation--lower {
    top: 65%;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .narrow-column {
        max-width: 90vw;
    }
    .annotation {
        display: none;
    }
    .marble-fragment {
        width: 120px;
        height: 160px;
        opacity: 0.3;
    }
    .pull-quote {
        font-size: clamp(1.5rem, 5vw, 2rem);
        max-width: 90vw;
    }
    .nav-line {
        gap: 40px;
    }
}
