/* =====================================================================
   haskell.monster — Nocturnal Museum Catalog
   Mineral-archaeological earth-tones on dark.
   Palette:
     #0E0C0A Abyssal Black     | left col background
     #15110D Tabernacle Black  | right col background
     #3E2F1F Patinated Bronze  | mid-tones, rules
     #7A5230 Oxidized Copper   | seam, accents
     #B9A88E Bone              | left text
     #C4A878 Lamp Ochre        | right text
     #5C4A2E Umber Earth       | borders, hover
     #8A2A1F Oxblood           | scarce milestone accent
     #1F2A1E Nocturnal Verdigris | navigation patina
   ==================================================================== */

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

html {
    background: #0E0C0A;
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    color: #B9A88E;
    background: #0E0C0A;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
    position: relative;
    display: inline;
}

a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #5C4A2E;
    transition: width 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

a:hover::after {
    width: 100%;
}

/* ---------- The persistent left rail (vertical roman numerals) ------- */
.rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 100vh;
    background: #0E0C0A;
    border-right: 1px solid #3E2F1F;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 50;
}

.rail-numeral {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
    transition: opacity 220ms ease-out;
    opacity: 0.6;
}

.rail-numeral.active {
    opacity: 1;
}

.rail-roman {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 11px;
    color: #B9A88E;
    letter-spacing: 0.08em;
}

.rail-square {
    width: 4px;
    height: 4px;
    background: #7A5230;
    transition: background 320ms ease-out;
}

.rail-numeral.active .rail-square {
    background: #1F2A1E;
}

/* ---------- The central seam (1px hairline of oxidized bronze) ------- */
.seam {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    background: #7A5230;
    box-shadow: inset 0 0 0 0.5px #0E0C0A;
    z-index: 30;
    transform: translateX(-0.5px);
}

/* seam counter — fixed at top, centered on the seam */
.seam-counter {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #0E0C0A;
    padding: 6px 14px;
    border: 0.5px solid #3E2F1F;
}

.seam-counter-label {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 8.5px;
    letter-spacing: 0.28em;
    color: #7A5230;
    opacity: 0.85;
}

.seam-counter-value {
    font-family: 'Fira Code', monospace;
    font-weight: 450;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #C4A878;
}

.seam-counter-value.milestone {
    color: #8A2A1F;
}

/* the site's own name appears once, between PLATE I and PLATE II, on the seam */
.seam-title {
    position: absolute;
    top: 100vh;
    left: 50%;
    transform: translate(-50%, 60vh);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #B9A88E;
    background: #0E0C0A;
    padding: 6px 14px;
    z-index: 35;
    pointer-events: none;
    white-space: nowrap;
}

/* ---------- Catalog grid (split-screen) ------------------------------ */
.catalog {
    margin-left: 28px;       /* clear the rail */
    padding: 0;
    background: transparent;
}

/* ---------- Masthead (one of two seam-crossing moments) -------------- */
.masthead {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    min-height: 22vh;
    align-items: end;
    border-bottom: 1px solid #3E2F1F;
    padding-bottom: 28px;
}

.masthead-left {
    background: #0E0C0A;
    padding: 20vh 6vw 0 5vw;
    text-align: right;
}

.masthead::before {
    /* the seam through the masthead is provided by the central column gap;
       background fill ensures the right side reads as warmer */
}

.masthead-right {
    background: #15110D;
    grid-column: 3;
    padding: 20vh 5vw 0 6vw;
    text-align: left;
}

.masthead-eyebrow {
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(0.78rem, 1vw, 0.92rem);
    letter-spacing: 0.32em;
    color: #B9A88E;
    line-height: 1.2;
    margin-bottom: 6px;
}

.masthead-right .masthead-eyebrow {
    color: #C4A878;
}

.masthead-eyebrow.muted {
    color: #5C4A2E;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    margin-top: 4px;
}

/* ---------- Plate (each pair) ---------------------------------------- */
.plate {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    min-height: 100vh;
    position: relative;
    border-bottom: 1px solid #3E2F1F;
}

.plate:first-of-type {
    min-height: 100vh;
}

/* ---------- Plate sides ---------------------------------------------- */
.plate-side {
    padding: 18vh 5vw 18vh 5vw;
    position: relative;
}

.plate-side.specimen {
    background: #0E0C0A;
    color: #B9A88E;
    grid-column: 1;
    text-align: right;       /* paragraphs hug the central seam */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.plate-side.proof {
    background: #15110D;
    color: #C4A878;
    grid-column: 3;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ---------- Plate mark (PLATE · I) at top of each side --------------- */
.plate-mark {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.32em;
    color: #5C4A2E;
    margin-bottom: 32px;
    text-transform: uppercase;
}

.plate-mark.right {
    color: #5C4A2E;
}

/* ---------- Specimen figure ------------------------------------------ */
.specimen-figure {
    width: 78%;
    margin: 0;
    margin-right: 0;            /* kiss the seam (right edge of left col) */
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.marble {
    width: 100%;
    height: auto;
    display: block;
    background: #0E0C0A;
    padding: 8px;
    border: 1px solid #5C4A2E;
    /* faint warm halo at edge — albumen-print effect */
    box-shadow:
        0 0 24px 0 rgba(122, 82, 48, 0.10),
        0 0 56px 6px rgba(62, 47, 31, 0.18);
}

.specimen-caption {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: right;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    line-height: 1.62;
    color: rgba(185, 168, 142, 0.86);
    font-size: clamp(0.92rem, 1.18vw, 1.04rem);
}

.specimen-title {
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(1.4rem, 3.6vw, 3.2rem);
    letter-spacing: 0.18em;
    line-height: 1.04;
    color: #B9A88E;
    border-bottom: 1px solid #3E2F1F;
    padding-bottom: 14px;
    text-transform: uppercase;
}

.specimen-sub em {
    font-style: italic;
    color: #C4A878;
}

.specimen-sub .bce {
    font-family: 'Cormorant SC', serif;
    font-style: normal;
    font-size: 0.78em;
    letter-spacing: 0.16em;
    color: #5C4A2E;
}

/* ---------- Proof body ------------------------------------------------ */
.proof-body {
    width: 88%;
    position: relative;
    align-self: flex-start;
    margin-left: 0;             /* hug seam (left edge of right col) */
}

.lambda-watermark {
    position: absolute;
    top: -28px;
    left: -38px;
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 280px;
    color: #C4A878;
    opacity: 0.18;
    line-height: 0.9;
    pointer-events: none;
    transform: rotate(var(--rot, 0deg));
    z-index: 0;
}

.proof-title {
    position: relative;
    z-index: 1;
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.4rem, 3.6vw, 3.2rem);
    letter-spacing: 0.18em;
    line-height: 1.04;
    color: #C4A878;
    border-bottom: 1px solid #3E2F1F;
    padding-bottom: 14px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.proof-sub {
    position: relative;
    z-index: 1;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: #B9A88E;
    margin-bottom: 28px;
    font-style: italic;
}

.signature-frame {
    position: relative;
    z-index: 1;
    border: 1px solid #5C4A2E;
    padding: 32px;
    margin-bottom: 28px;
    background: rgba(14, 12, 10, 0.35);
}

.signature {
    font-family: 'Fira Code', monospace;
    font-weight: 450;
    font-size: 1.04rem;
    line-height: 1.62;
    color: #C4A878;
    font-feature-settings: "calt" 1, "ss01" 1, "ss02" 1, "ss05" 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.laws {
    position: relative;
    z-index: 1;
    list-style: none;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.laws li {
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    font-size: 0.96rem;
    line-height: 1.5;
    color: #B9A88E;
}

.law-id {
    font-family: 'Fira Code', monospace;
    font-size: 0.84rem;
    color: #7A5230;
    letter-spacing: 0.04em;
    grid-column: 1;
    grid-row: 1;
}

.law-name {
    grid-column: 2;
    grid-row: 1;
    color: #B9A88E;
    font-weight: 400;
}

.laws code {
    grid-column: 2;
    grid-row: 2;
    font-family: 'Fira Code', monospace;
    font-size: 0.94rem;
    color: #C4A878;
    padding-left: 0;
    font-weight: 450;
    font-feature-settings: "calt" 1, "ss01" 1;
}

.proof-prose {
    position: relative;
    z-index: 1;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    font-size: 0.96rem;
    line-height: 1.62;
    color: #B9A88E;
    margin-bottom: 18px;
}

.proof-prose em {
    font-style: italic;
    color: #C4A878;
}

/* ---------- Fleuron (3 oxidized-copper squares) ---------------------- */
.fleuron {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.fleuron span {
    display: inline-block;
    width: 6px;
    height: 1px;
    background: #7A5230;
}

/* ---------- Acquisition band (museum publication footer) ------------- */
.acquisition-band {
    grid-column: 1 / -1;
    height: 64px;
    background: #0E0C0A;
    border-top: 1px solid #3E2F1F;
    border-bottom: 1px solid #3E2F1F;
    display: grid;
    grid-template-columns: 1fr 1fr 1px 1fr 1fr;
    align-items: center;
    padding: 0 5vw;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #7A5230;
    position: relative;
}

.acquisition-band::before {
    content: '';
    grid-column: 3;
    width: 1px;
    height: 64px;
    background: #7A5230;
    box-shadow: inset 0 0 0 0.5px #0E0C0A;
}

.acq-spec {
    grid-column: 1;
    text-align: left;
    color: #B9A88E;
}

.acq-year {
    grid-column: 2;
    text-align: right;
    padding-right: 24px;
    color: #C4A878;
}

.acq-year .counter {
    color: #B9A88E;
}

.acq-year.milestone .counter {
    color: #8A2A1F;
}

.acq-prov {
    grid-column: 4;
    text-align: left;
    padding-left: 24px;
    color: #5C4A2E;
}

.acq-hash {
    grid-column: 5;
    text-align: right;
    color: #5C4A2E;
}

/* ---------- Closing colophon (crosses seam) -------------------------- */
.colophon {
    background: #0E0C0A;
    padding: 20vh 12vw 16vh 12vw;
    border-top: 1px solid #3E2F1F;
    text-align: justify;
    position: relative;
}

.colophon::before {
    /* one of only two seam-crossing moments — but the seam is no longer split here */
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #7A5230 0%, transparent 100%);
    transform: translateX(-0.5px);
    opacity: 0.5;
    pointer-events: none;
}

.colophon-body {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.96rem, 1.2vw, 1.1rem);
    line-height: 1.78;
    color: #B9A88E;
    margin-bottom: 48px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.colophon-body em {
    font-family: 'Cormorant SC', serif;
    font-style: normal;
    letter-spacing: 0.08em;
    color: #C4A878;
}

.dropcap {
    font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
    font-style: normal;
    font-weight: 600;
    font-size: 96px;
    color: #8A2A1F;
    float: left;
    line-height: 0.86;
    padding: 6px 14px 0 0;
    letter-spacing: 0;
}

.colophon-mark {
    text-align: center;
}

.fleuron.seam-fleuron {
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.fleuron.seam-fleuron span {
    width: 6px;
    height: 1px;
    background: #7A5230;
}

/* ---------- Counters ------------------------------------------------- */
.counter {
    font-family: 'Fira Code', monospace;
    font-weight: 450;
    color: #B9A88E;
    transition: color 200ms;
}

.counter.milestone {
    color: #8A2A1F;
}

/* ---------- Below 720 — collapse to single column -------------------- */
@media (max-width: 720px) {
    .rail {
        display: none;
    }

    .seam {
        display: none;
    }

    .seam-counter {
        top: 8px;
        padding: 4px 10px;
    }

    .seam-title {
        display: none;
    }

    .catalog {
        margin-left: 0;
    }

    .masthead {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .masthead-left,
    .masthead-right {
        grid-column: 1;
        padding: 16vh 6vw 6vh 6vw;
        text-align: left;
    }

    .masthead-right {
        padding-top: 4vh;
        border-top: 1px solid #7A5230;
    }

    .plate {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .plate-side.specimen,
    .plate-side.proof {
        grid-column: 1;
        padding: 10vh 6vw 6vh 6vw;
        text-align: left;
        align-items: stretch;
    }

    /* preserve the conceptual division as a hairline seam */
    .plate-side.proof {
        border-top: 1px solid #7A5230;
        box-shadow: inset 0 0.5px 0 #0E0C0A;
    }

    .specimen-figure {
        width: 100%;
        align-self: stretch;
    }

    .specimen-caption {
        text-align: left;
    }

    .proof-body {
        width: 100%;
    }

    .lambda-watermark {
        font-size: 180px;
        top: -14px;
        left: -10px;
    }

    .acquisition-band {
        height: auto;
        grid-template-columns: 1fr 1fr;
        padding: 14px 6vw;
        gap: 8px;
    }

    .acquisition-band::before {
        display: none;
    }

    .acq-spec, .acq-year, .acq-prov, .acq-hash {
        grid-column: auto;
        text-align: left;
        padding: 0;
        font-size: 10px;
    }
}

/* ---------- Selection & misc ----------------------------------------- */
::selection {
    background: #5C4A2E;
    color: #B9A88E;
}

::-moz-selection {
    background: #5C4A2E;
    color: #B9A88E;
}
