/* =====================================================================
   NASTY VOYEUR 2 ARCHIVES — shared chrome
   The common "void / starfield" vocabulary for every layer.
   Pages keep small local <style> blocks for per-page overrides and
   for bespoke, single-purpose artifacts (aged ledger, graph paper, etc).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --void: #0a0a0f;
    --nebula: #1f1438;
    --star: #e0d4ff;
    --accent: #c026d3;
    --warning: #ff4d94;
}

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

body {
    background: var(--void);
    color: var(--star);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Starfield ----------------------------------------------------- */
.stars {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.09) 1px, transparent 2px),
        radial-gradient(circle at 45% 65%, rgba(255,255,255,0.07) 2px, transparent 3px),
        radial-gradient(circle at 85% 35%, rgba(255,255,255,0.08) 1px, transparent 2px);
    background-size: 180px 180px;
    pointer-events: none;
    animation: drift 90s linear infinite;
    z-index: 1;
}

/* End on a whole-tile multiple (180px tile) so the loop is seamless with
   no snap-back; 90s gives a gentle-but-perceptible ambient drift. */
@keyframes drift {
    0%   { background-position: 0 0; }
    100% { background-position: 360px 360px; }
}

/* --- Header -------------------------------------------------------- */
/* Default header is 65vh. Use .tall (full viewport hub) or .short
   (compact artifact header) modifiers to adjust per page. */
header {
    position: relative;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid rgba(192, 38, 211, 0.25);
    z-index: 2;
}

header.tall  { height: 100vh; }
header.short { height: 48vh; }

.header-content {
    max-width: 820px;
    padding: 2rem;
}

/* --- Classification stamps ---------------------------------------- */
.classification {
    color: var(--warning);
    font-size: 0.95rem;
    letter-spacing: 3px;
    border: 1px solid var(--warning);
    padding: 6px 20px;
    display: inline-block;
    margin-bottom: 1.5rem;
    transform: rotate(-2deg);
}

.mission-stamp {
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 1rem;
    border: 1px solid var(--accent);
    display: inline-block;
    padding: 4px 16px;
    transform: rotate(-3deg);
}

/* --- Typographic chrome ------------------------------------------- */
h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.8rem;
    line-height: 1.05;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #e0d4ff, #c026d3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-id,
.myth-number {
    font-size: 1.1rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.35rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.probe {
    font-size: 1rem;
    color: #888;
    margin-top: 2rem;
}

/* --- Main column --------------------------------------------------- */
main {
    position: relative;
    z-index: 2;
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* --- Layer navigation (top-of-page links) ------------------------- */
.layer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.layer-nav a,
.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.layer-nav a:hover,
.back-link:hover { color: var(--star); }

.back-link {
    display: inline-block;
    margin-bottom: 3rem;
}

/* --- Transmission / document headers ------------------------------ */
.transmission-header {
    background: rgba(42, 27, 74, 0.6);
    border-left: 4px solid var(--accent);
    padding: 1.5rem 2rem;
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

section { margin-bottom: 4.5rem; }

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    margin-bottom: 1.5rem;
    color: #d8b4fe;
    border-bottom: 1px solid rgba(192, 38, 211, 0.2);
    padding-bottom: 0.75rem;
}

p { margin-bottom: 1.4rem; font-size: 1.05rem; }

.highlight {
    background: rgba(192, 38, 211, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
}

/* --- Log entries --------------------------------------------------- */
.log-entry {
    background: #111118;
    border: 1px solid rgba(192, 38, 211, 0.2);
    padding: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.log-date {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 0.85rem;
    color: #888;
}

/* --- Evidence list ------------------------------------------------- */
.evidence-list { list-style: none; }

.evidence-list li {
    padding: 1rem 1.5rem;
    background: rgba(26, 20, 48, 0.6);
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
}

/* --- Cross-layer artifact links ----------------------------------- */
.artifact-link {
    display: block;
    padding: 1.2rem 1.5rem;
    background: rgba(26, 20, 48, 0.6);
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
    color: var(--star);
    text-decoration: none;
    transition: all 0.25s ease;
}

.artifact-link:hover {
    background: rgba(42, 27, 74, 0.8);
    border-left-color: var(--star);
    transform: translateX(6px);
}

.artifact-link .artifact-id {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: #9a86c4;
    margin-bottom: 0.3rem;
}

.referenced-by {
    font-size: 0.9rem;
    color: #9a86c4;
    margin-bottom: 2rem;
}

.referenced-by a { color: var(--accent); text-decoration: none; }
.referenced-by a:hover { color: var(--star); }

/* --- Final transmission & warning --------------------------------- */
.final-transmission {
    font-style: italic;
    background: #0f0b1a;
    padding: 2.5rem;
    border: 1px dashed rgba(192, 38, 211, 0.4);
    text-align: center;
    margin: 4rem 0;
}

.warning {
    color: var(--warning);
    font-size: 0.9rem;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--warning);
    margin: 3rem 0;
}

/* --- Myth grid (Layer 1 hub) -------------------------------------- */
.myths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.myth-card {
    background: rgba(42, 27, 74, 0.4);
    border: 1px solid rgba(192, 38, 211, 0.3);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.myth-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(192, 38, 211, 0.2);
}

.myth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(192,38,211,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.4s;
}

.myth-card:hover::before { opacity: 1; top: 20%; left: 30%; }

.card-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    opacity: 0.1;
    font-weight: 700;
}

.myth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #e0d4ff;
}

.myth-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.myth-desc {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.read-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-link:hover { gap: 16px; }

/* --- Footer -------------------------------------------------------- */
footer {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-top: 1px solid rgba(192, 38, 211, 0.15);
    font-size: 0.9rem;
    color: #666;
}

/* =====================================================================
   Layer 2 — internal case files (DOC#X-ORIG-NN)
   Shared "case jacket" chrome: a buff institutional folder typed on a
   carbon form. Cooler, greyer, and more procedural than Layer 3's warm
   1928 ledger — these are working originals, not antique evidence.
   Pages requiring this load the Special Elite + Caveat fonts in <head>
   and add per-file stamps/dates in a small local <style>.
   ===================================================================== */
.case-file {
    --paper: #d7d4c2;
    --ink: #211e12;
    --rule: #b1ab92;
    --folder: #2b281c;
    --redbar: #7c1f2b;
    font-family: 'Special Elite', monospace;
    color: var(--ink);
    background: var(--paper);
    max-width: 860px;
    margin: 3rem auto;
    border: 12px solid var(--folder);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8),
                inset 0 0 120px rgba(60, 55, 20, 0.12);
    position: relative;
    overflow: hidden;
}

.case-file::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 20%, rgba(90, 70, 25, 0.10) 0%, transparent 60%),
        radial-gradient(circle at 82% 82%, rgba(70, 75, 55, 0.10) 0%, transparent 65%);
}

/* Folder tab strip: file number left, classification right */
.cf-tab {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--folder);
    color: #cfc8a8;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 3px;
    font-size: 0.78rem;
    text-transform: uppercase;
    padding: 0.7rem 1.4rem;
    position: relative;
}

.cf-tab .cf-no { color: #e7dfbf; font-weight: 700; }

.cf-sheet { padding: 42px 44px 60px; position: relative; }

.cf-sheet h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: #3a2f17;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--rule);
    padding-bottom: 0.5rem;
    margin: 2.8rem 0 1.4rem;
}

.cf-sheet p {
    font-size: 1rem;
    line-height: 1.95;
    color: var(--ink);
    margin-bottom: 1.3rem;
}

/* Intake / classification grid (definition list rendered as a form) */
.cf-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.4rem;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1.6rem 0;
    padding: 1.2rem 0;
    border-top: 2px solid var(--rule);
    border-bottom: 2px solid var(--rule);
}

.cf-grid dt {
    color: #5a4a22;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.76rem;
    padding-top: 0.15rem;
}

.cf-grid dd { margin: 0; }

/* Internal memo block — labels itself via data-label */
.cf-memo {
    background: rgba(255, 250, 225, 0.55);
    border-left: 6px solid #6d5a2c;
    padding: 16px 22px;
    margin: 2.4rem 0;
    font-size: 0.95rem;
    position: relative;
}

.cf-memo::before {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    left: 18px;
    background: var(--paper);
    padding: 0 9px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #6d5a2c;
}

.cf-memo p:last-child { margin-bottom: 0; }

/* Routing history / ledger tables */
.cf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    font-size: 0.86rem;
}

.cf-table th,
.cf-table td {
    border: 1px solid var(--rule);
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
}

.cf-table th {
    background: rgba(60, 55, 20, 0.10);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    color: #5a4a22;
}

/* Rubber stamp */
.cf-stamp {
    display: inline-block;
    color: var(--redbar);
    border: 4px double var(--redbar);
    padding: 6px 22px;
    letter-spacing: 4px;
    font-size: 1rem;
    text-transform: uppercase;
    transform: rotate(-7deg);
    opacity: 0.72;
    margin: 1.2rem 0;
}

.cf-redacted {
    background: #211e12;
    color: #211e12;
    padding: 2px 6px;
    user-select: none;
}

/* Cross-layer reference, styled to live on the paper */
.cf-xref {
    display: block;
    background: rgba(60, 55, 20, 0.08);
    border-left: 3px solid #6d5a2c;
    padding: 0.9rem 1.2rem;
    margin: 0.8rem 0;
    color: #2a2412;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.cf-xref:hover { background: rgba(60, 55, 20, 0.16); }

.cf-xref .cf-xid {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: #6d5a2c;
    margin-bottom: 0.2rem;
}

.cf-sign {
    text-align: right;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: #3a2f17;
    margin-top: 1rem;
}
