/**
 * Dossier Core — sitewide motif primitives
 * ─────────────────────────────────────────
 * The reusable pieces of the "confidential case file" visual system
 * (file numbers, wax-seal stamps, paper grain, scroll reveal), extracted
 * from dossier-homepage.css so interior page templates can share them
 * without duplicating homepage-only section styles. Reuses existing
 * tokens only (--gold, --cream, --black, --red, etc. per template) —
 * no new colors introduced here.
 */

.dossier-mono {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============ FILE TAG ============ */
.dossier-file-tag {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted-d, rgba(250,247,242,.6));
    border: 1px solid var(--border-d, rgba(212,175,55,.2));
    padding: 4px 9px;
    margin-bottom: 18px;
}

/* ============ WAX-SEAL STAMP ============ */
.dossier-stamp {
    display: inline-flex;
    color: var(--gold, #D4AF37);
    opacity: .92;
}

/* ============ PAPER GRAIN — apply to light/cream sections ============ */
/* Multiply-blend is a no-op against near-black, so this is safe to apply
   broadly without touching dark sections. Not scoped to a parent class —
   opt in per-section via .dossier-grain on any container. */
.dossier-grain {
    position: relative;
}
.dossier-grain::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .14;
    mix-blend-mode: multiply;
    background-size: 210px 210px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 210 210'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0.55 0.55 0.55 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dossier-grain > * { position: relative; z-index: 2; }

/* ============ DOT-LEADER LEDGER ROW — reusable table-of-contents style row ============ */
.dossier-ledger-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
}
.dossier-ledger-row .dossier-ledger-fill {
    flex: 1;
    border-bottom: 1px dotted var(--border-d, rgba(212,175,55,.35));
    height: 0;
    transform: translateY(-4px);
}

/* ============ SCROLL REVEAL (opt-in via .dossier-reveal, JS-gated) ============ */
@media (prefers-reduced-motion: no-preference) {
    html.dossier-js-ready .dossier-reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1);
    }
    html.dossier-js-ready .dossier-reveal.in-view { opacity: 1; transform: translateY(0); }
}
