/*
Theme Name: The Obsidian Scriptorium
Author: E. Hughes Wordpress Themes
Description: A formal, high-contrast Gothic Library theme featuring a mouse-reactive candle-dust particle canvas, dynamic unsealable Dossier column, and formal academic serif typography.
Version: 1.6
*/

/* 1. Reset & Global Background Systems */
body {
    font-family: 'Inter', sans-serif;
    background-color: #050508;
    color: #f1f5f9;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* INTERACTIVE BACKGROUND CANVAS back-layer */
#libraryCanvas {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    z-index: -1 !important; /* Forces canvas strictly behind everything */
    pointer-events: none;
}

/* Content wrapper overlaying the background canvas */
.theme-main-wrapper {
    position: relative;
    z-index: 1;
}

/* 2. Formal Typography Configuration (Standard Book-Style Serif) */
h1, h2, h3, h4, h5, h6, .formal-serif {
    font-family: 'EB Garamond', 'Garamond', 'Georgia', serif;
    color: #d4af37;
    letter-spacing: 0.02em;
    font-weight: normal;
}

/* Luminous High-Contrast Gold Links */
a {
    color: #d4af37 !important;
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover {
    color: #fef08a !important;
    text-shadow: 0 0 10px rgba(254, 240, 138, 0.6);
}

/* 3. Superimposed Dynamic Hero Banner */
.scriptorium-hero-header {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    background-size: cover;
    background-position: center;
}

.hero-text-container {
    max-width: 900px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-award-logo {
    width: 110px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.95;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.7));
}

.site-title-formal {
    color: #ffffff !important;
    font-size: 2.5rem; /* Restrained to match Umbra & Lumen precisely */
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.95);
    line-height: 1.1;
    font-weight: 700;
}

.site-title-formal a {
    color: #ffffff !important;
}

.site-tagline-formal {
    color: #cbd5e1 !important;
    font-size: 0.9rem;
    margin-top: 12px;
    margin-bottom: 0;
    font-style: normal;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    font-weight: 300;
    opacity: 0.9;
}

/* 4. Horizontal Menu Navigation Console */
.navigation-console-sticky {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(4, 4, 6, 0.94);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
}

.navigation-inner-wrapper {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-navigation a {
    white-space: nowrap;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.site-navigation a:hover {
    color: #d4af37 !important;
}

/* 5. Three-Column Grid Setup */
.awards-grid-container {
    display: grid;
    grid-template-columns: 290px 1fr 290px;
    gap: 2.5rem;
    max-width: 1350px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    box-sizing: border-box;
}

/* Dynamic handling for empty sidebar setups */
.awards-grid-container.no-right-sidebar {
    grid-template-columns: 290px 1fr;
}

.main-content-column {
    background: rgba(4, 4, 6, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 2.5rem;
    box-sizing: border-box;
    height: fit-content;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: fit-content;
}

/* 6. Scriptorium Panels & Chest Boxes */
.gothic-panel {
    background: rgba(4, 4, 6, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    box-sizing: border-box;
}

/* Left Sidebar Dossier Chest Box styling */
.dossier-box-container {
    background: rgba(4, 4, 6, 0.85);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 1.75rem;
    box-sizing: border-box;
    text-align: center;
}

.wax-seal {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #b91c1c 0%, #7f1d1d 100%);
    box-shadow: 0 0 15px rgba(185, 28, 28, 0.6), inset 0 0 8px rgba(0,0,0,0.8);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wax-seal:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(185, 28, 28, 0.9), inset 0 0 8px rgba(0,0,0,0.8);
}

/* Sliding Widgets Cabinet Drawer inside Left column */
.drawer-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
    opacity: 0;
}

.drawer-container.drawer-open {
    max-height: 3000px !important; /* Uncapped height threshold to prevent cuts */
    opacity: 1;
}

/* Ambient Flash Flash Layer */
#ambientFlash {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #f59e0b;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.1s ease-out;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* 7. Classic Gutenberg Prose Formatting & Alignments */
.prose {
    color: #e4dcd3 !important;
    max-width: 100%;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    font-weight: normal;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}

.prose p {
    margin-bottom: 1.5em;
    line-height: 1.85;
}

.prose img {
    border-radius: 6px;
    max-width: 100%;
    height: auto;
}

.prose .alignleft {
    float: left;
    margin: 0.5rem 2rem 1.5rem 0 !important;
    max-width: 48%;
}

.prose .alignright {
    float: right;
    margin: 0.5rem 0 1.5rem 2rem !important;
    max-width: 48%;
}

.prose .aligncenter {
    display: block;
    margin: 0 auto 2.5rem auto !important;
    clear: both;
}

.prose::after {
    content: "";
    display: table;
    clear: both;
}

/* 8. Responsive Media Adjustments */
@media (max-width: 1024px) {
    .awards-grid-container {
        grid-template-columns: 1fr !important;
        padding: 2rem 1rem;
        gap: 2rem;
    }
}