/* --- Evil Ritual Variables --- */
:root {
    --void-black: #0c0c0e;
    --crypt-gray: #15161a;
    --stone-border: #3a3b41;
    --blood-red: #9c1c1c;
    --blood-hover: #bd2626;
    --sigil-purple: #3f2d54;
    --sigil-glow: #63438a;
    
    --parchment-dark: #1e1f24;
    --text-primary: #e2e4e9;
    --text-ghost: #8a8d98;
    
    --font-gothic: 'Cinzel', serif;
    --font-sigil: 'Metamorphous', serif;
    --font-ui: 'Inter', sans-serif;
}

/* --- Base Environmental Setup --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: var(--void-black);
    color: var(--text-primary);
    font-family: var(--font-ui);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

/* Cosmic purple background fog effects */
.void-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(63, 45, 84, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(156, 28, 28, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* --- Layout Architecture --- */
.obscura-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 960px) {
    .obscura-container {
        grid-template-columns: 1fr;
    }
}

/* --- Left Column Elements --- */
.image-frame-container {
    position: relative;
    padding-top: 25px; /* Spacing for overhanging banner */
    margin-bottom: 30px;
}

/* The Engraved Ribbon Heading */
.ribbon-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #5c1818 0%, #300a0a 100%);
    color: #e5c1c1;
    font-family: var(--font-gothic);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    padding: 8px 32px;
    border: 2px solid #802323;
    box-shadow: 0 8px 20px rgba(0,0,0,0.8);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    z-index: 5;
}
.ribbon-banner::before, .ribbon-banner::after {
    content: '';
    position: absolute;
    border-style: solid;
} /* Simple CSS swallow-tail notches */

/* Heavy Iron/Stone Frame around Asset picture */
.stone-frame {
    background: #111;
    border: 6px solid #4a4b51;
    outline: 2px solid #1a1b1f;
    box-shadow: inset 0 0 30px rgba(0,0,0,1), 0 15px 35px rgba(0,0,0,0.9);
    padding: 12px;
    border-radius: 4px;
}
.manor-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    filter: grayscale(40%) contrast(120%) brightness(70%);
    display: block;
    border: 1px solid #222;
}

.section-title {
    font-family: var(--font-gothic);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(156, 28, 28, 0.4);
}
.text-blood { color: #b82323; }

/* Sinister Terms Matrix Table */
.terms-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    background: rgba(13, 13, 16, 0.7);
    border: 1px solid var(--stone-border);
}
.terms-table th {
    background-color: #18191d;
    font-family: var(--font-gothic);
    color: var(--text-ghost);
    text-align: left;
    padding: 14px 20px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--stone-border);
}
.terms-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(58, 59, 65, 0.4);
    font-size: 1rem;
}
.font-accent {
    font-family: var(--font-gothic);
    font-weight: 700;
    color: var(--text-primary);
}
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #611731;
    border: 2px solid #b82323;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #b82323;
}
.muted-row { color: var(--text-ghost); }
.strikethrough { text-decoration: line-through; color: #573340; }
.highlight-row { background-color: rgba(25, 26, 31, 0.8); }
.text-glow-white { font-weight: 700; font-size: 1.15rem; color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.2); }


/* --- Right Column Structural Crypt Containers --- */
.crypt-card {
    background-color: var(--crypt-gray);
    border: 1px solid var(--stone-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    padding: 32px;
    margin-bottom: 30px;
    border-radius: 2px;
}
.card-title {
    font-family: var(--font-gothic);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #dedede;
    margin-bottom: 4px;
}
.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-ghost);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    text-align: center;
}
.text-center { text-align: center; margin-bottom: 20px;}

/* Custom Darkened Input Area */
.input-wrapper-dark {
    position: relative;
    background: #09090b;
    border: 2px solid var(--blood-red);
    box-shadow: inset 0 0 15px rgba(156,28,28,0.2);
    padding: 16px;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}
.currency-sigil {
    font-family: var(--font-gothic);
    font-size: 1.6rem;
    color: var(--text-ghost);
    margin-right: 15px;
}
.input-wrapper-dark input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: #cc2929;
    font-family: var(--font-gothic);
    font-weight: 900;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(204,41,41,0.3);
}

/* --- Demonic Styled Control Mechanisms (Buttons) --- */
.btn {
    width: 100%;
    padding: 18px;
    font-family: var(--font-sigil);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    margin-bottom: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: all 0.2s linear;
}
/* Purple Angled Sigil Button */
.btn-sigil-purple {
    background: linear-gradient(135deg, #2c1d3d 0%, #4c3763 50%, #2c1d3d 100%);
    color: #d8cfe3;
    border-top: 1px solid var(--sigil-glow);
    border-bottom: 1px solid #1c1129;
    clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
}
.btn-sigil-purple:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(99, 67, 138, 0.6);
}
/* Jagged Crimson Rejection Banner Button */
.btn-jagged-red {
    background: #000;
    color: #e33232;
    border-top: 2px solid var(--blood-red);
    border-bottom: 2px solid var(--blood-red);
    font-family: var(--font-gothic);
    font-weight: 900;
    letter-spacing: 0.1em;
    /* Custom CSS clip paths mimicking standard jagged vintage layout labels */
    clip-path: polygon(0% 15%, 4% 0%, 96% 0%, 100% 15%, 98% 50%, 100% 85%, 96% 100%, 4% 100%, 0% 85%, 2% 50%);
}
.btn-jagged-red:hover {
    background: #610f0f;
    color: #fff;
}

/* --- Real Estate Parchment Activity Log Stack --- */
.parchment-ledger {
    background-color: var(--parchment-dark);
    border: 1px solid #282a30;
    display: flex;
    flex-direction: column;
}
.ledger-row {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(58, 59, 65, 0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ledger-identity {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}
.ledger-identity .role {
    color: var(--text-ghost);
    font-weight: 600;
}
.ledger-identity .value {
    font-family: var(--font-gothic);
    font-weight: 700;
}
.ledger-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-ghost);
}

/* Active Pending Glow State Specific adjustments */
.pending-state {
    background: linear-gradient(90deg, rgba(63, 45, 84, 0.25) 0%, transparent 100%);
    border-left: 3px solid var(--sigil-glow);
}
.alert-tag {
    color: var(--sigil-glow);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-row {
    background-color: #15161a;
    border-bottom: none;
}
.role-static {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-ghost);
}
.summary-text {
    font-size: 0.85rem;
}

/* --- Description Module Layout --- */
.description-container {
    margin-top: 30px;
    background: rgba(21, 22, 26, 0.6);
    border: 1px solid rgba(58, 59, 65, 0.5);
    padding: 24px;
    border-radius: 2px;
}

.sub-title {
    font-family: var(--font-gothic);
    font-size: 1.1rem;
    color: var(--text-ghost);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    border-left: 2px solid var(--blood-red);
    padding-left: 10px;
}

/* --- Sub 1: The Razor Thin Scroll Box --- */
.thin-scroll-box {
    max-height: 240px; /* Forces overflow containment */
    overflow-y: scroll;
    padding-right: 16px;
}

/* Custom Webkit scrollbar engine - thinnest rendering possible */
.thin-scroll-box::-webkit-scrollbar {
    width: 2px;
}
.thin-scroll-box::-webkit-scrollbar-track {
    background: #09090b;
}
.thin-scroll-box::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--blood-red) 0%, var(--sigil-purple) 100%);
    border-radius: 10px;
}

/* Manifest Custom Bullet Stacking */
.manifest-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.manifest-points li {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #b1b3bc;
    position: relative;
    padding-left: 18px;
}
/* Sharp diamond sigil bullets */
.manifest-points li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--blood-red);
    font-size: 0.75rem;
}
.manifest-points strong {
    color: var(--text-primary);
    font-family: var(--font-gothic);
    letter-spacing: 0.02em;
}

/* --- Sub 2: Collapsible Relic Accordion --- */
.desc-sub2 {
    margin-top: 24px;
    border-top: 1px solid rgba(58, 59, 65, 0.3);
    padding-top: 20px;
}

.gallery-accordion {
    background: #0d0e11;
    border: 1px solid var(--stone-border);
}

.accordion-header {
    padding: 16px 20px;
    font-family: var(--font-gothic);
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Strips default marker browser styles */
}
.accordion-header::-webkit-details-marker {
    display: none; /* Safari fallback */
}

/* Ominous Arrow Engine using native unicode shapes */
.accordion-icon::before {
    content: '▼';
    font-size: 0.75rem;
    color: var(--text-ghost);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* When details element opens, invert arrow up ▲ and shift accent coloring */
.gallery-accordion[open] .accordion-header {
    border-bottom: 1px solid rgba(156, 28, 28, 0.4);
    color: #fff;
}
.gallery-accordion[open] .accordion-icon::before {
    content: '▲';
    color: var(--blood-red);
    text-shadow: 0 0 5px var(--blood-red);
}

/* Internal Card Layout Structure */
.accordion-content {
    padding: 20px;
    background: #09090b;
}

.relic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .relic-grid {
        grid-template-columns: 1fr;
    }
}

.relic-card {
    background: var(--crypt-gray);
    border: 1px solid #23242a;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.relic-card:hover {
    transform: translateY(-2px);
    border-color: var(--sigil-purple);
}
.relic-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    filter: grayscale(30%) brightness(75%);
    border: 1px solid #111;
    display: block;
}
.relic-meta {
    font-size: 0.75rem;
    color: var(--text-ghost);
    margin-top: 8px;
    text-align: center;
    font-family: var(--font-gothic);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Cinematic Void Lightbox Frame --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 6, 8, 0.95); /* Deep shadows obscuring the background layout */
    backdrop-filter: blur(8px); /* Soft demonic lens blur effect */
    z-index: 1000; /* Stays fixed above all architectural elements */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Open Toggle Layer State */
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* The Enlarged Focus Image Frame */
#lightbox-target-img {
    max-width: 85%;
    max-height: 75vh;
    border: 4px solid var(--stone-border);
    outline: 1px solid rgba(156, 28, 28, 0.4);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(156, 28, 28, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.active #lightbox-target-img {
    transform: scale(1);
}

/* Subtext Display Label */
#lightbox-caption {
    margin-top: 20px;
    font-family: var(--font-gothic);
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

/* Sharp, Elegant Close Icon */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-ghost);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s linear;
}
.lightbox-close:hover {
    color: var(--blood-red);
}

/* Hover Enhancement to notify the user images are interactive */
.relic-card img {
    cursor: zoom-in;
}

