/* =========================================
   THE VESTIGIAL INSTITUTE
   Style: Archival Brutalism / Modern Vintage
   File: static/css/custom.css
   ========================================= */

/* --- 1. TYPOGRAPHY IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Lora:ital,wght@0,400;0,600;1,400&family=Playfair+Display:wght@500;900&display=swap');

/* --- 2. VARIABLES & ROOT --- */
:root {
    /* Palette: Serious, Expensive, Dusty */
    --bg-color: #F9F7F1;     /* Archival Cream */
    --ink-color: #1a1a1a;    /* Near Black */
    --accent-red: #A62626;   /* Corrections Ink */
    --product-bg: #F2F0E6;   /* Slightly darker paper for products */
    
    /* Structure */
    --grid-gap: 2px;         /* The thickness of the "Grid Lines" */
    --pad: 2rem;             /* Standard spacing unit */
    --sidebar-width: 280px;
}

/* --- 3. GLOBAL RESET & GRID --- */
* { box-sizing: border-box; }

body {
    background-color: var(--ink-color); /* This color creates the lines between grid items */
    color: var(--ink-color);
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    
    /* The Master Grid Layout */
    display: grid;
    gap: var(--grid-gap); 
    grid-template-columns: var(--sidebar-width) 1fr; /* Sidebar | Content */
    min-height: 100vh;
}

/* --- 4. SIDEBAR (NAVIGATION) --- */
aside {
    background: var(--bg-color);
    padding: var(--pad);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.8rem;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.brand span { 
    display: block; 
    font-size: 0.85rem; 
    font-weight: 500; 
    font-family: 'JetBrains Mono', monospace; 
    margin-top: 1rem; 
    color: var(--accent-red); 
}

nav a {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    text-decoration: none;
    color: var(--ink-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    transition: 0.2s;
}

nav a:hover { 
    color: var(--accent-red); 
    padding-left: 0.5rem; 
}

.status-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: auto;
}

/* --- 5. MAIN CONTENT AREA --- */
main {
    background: var(--bg-color);
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header for the Daily Brief */
header.daily-brief {
    padding: 4rem var(--pad);
    border-bottom: 2px solid var(--ink-color);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin: 0;
    line-height: 1;
    max-width: 900px;
}

.date-stamp {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--accent-red);
}

/* --- 6. THE EXHIBIT CARDS (Phrases) --- */
article.phrase-card {
    padding: 3rem var(--pad);
    max-width: 800px;
    margin: 0 auto;
}

.phrase-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.definition {
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-red);
    padding-left: 1.5rem;
    color: #444;
}

.origin-story {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.meta-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: 1px solid var(--ink-color);
    display: inline-block;
    padding: 0.2rem 0.5rem;
    margin-bottom: 1rem;
}

/* --- 7. THE PRODUCT CARDS (Specs) --- */
article.product-card {
    background-color: var(--product-bg);
    padding: 3rem var(--pad);
    border-top: 1px solid var(--ink-color);
    border-bottom: 1px solid var(--ink-color);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--ink-color);
    padding-bottom: 0.5rem;
}

.product-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    margin: 0;
    text-transform: uppercase;
}

.danger-badge {
    background: var(--accent-red);
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 4px 8px;
    font-weight: bold;
}

/* Images */
.woodcut-image, .technical-drawing {
    width: 100%;
    height: auto;
    border: 1px solid var(--ink-color);
    filter: grayscale(100%) contrast(1.1);
    mix-blend-mode: multiply; /* Makes white backgrounds transparent-ish */
    margin-bottom: 1rem;
}

/* Spec Tables */
.specs-table {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.specs-table td {
    border-bottom: 1px dashed rgba(0,0,0,0.2);
    padding: 0.5rem 0;
}

.specs-table td:first-child { 
    color: #666; 
    width: 40%; 
}

/* --- 8. NAVIGATION ARROWS (The Tile System) --- */
nav.exhibit-nav {
    display: flex;
    justify-content: space-between;
    padding: 2rem var(--pad);
    border-top: 2px solid var(--ink-color);
    background: var(--bg-color);
    margin-top: auto; /* Push to bottom */
}

.nav-arrow {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-color);
    font-weight: bold;
}
.nav-arrow:hover { color: var(--accent-red); }
.nav-arrow.disabled { opacity: 0.3; pointer-events: none; }

/* --- 9. MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    body { 
        grid-template-columns: 1fr; 
        gap: 0;
    }
    aside { 
        height: auto; 
        position: relative; 
        border-bottom: 2px solid var(--ink-color);
        padding: 1.5rem;
    }
    h1 { font-size: 2.5rem; }
    .product-grid { grid-template-columns: 1fr; }
    article.phrase-card, article.product-card { padding: 1.5rem; }
}
