@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@200;400;600&display=swap');

:root {
    --obsidian: #050608;
    --titanium: #1f2833;
    --titanium-light: #c5c6c7;
    --white-light: #ffffff;
    --prismatic: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--obsidian);
    color: var(--titanium-light);
    font-family: 'Montserrat', sans-serif;
    overflow: hidden; /* Prevent scrolling, true cinematic experience */
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#ui-layer {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 4rem;
    pointer-events: none; /* Let clicks pass through to 3D background */
    background: radial-gradient(circle at center, transparent 20%, rgba(5, 6, 8, 0.85) 100%);
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

#ui-layer.revealed {
    opacity: 1;
}

header {
    text-align: center;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    animation: fadeInDown 2s ease-out;
}

/* Header animations removed to rely on UI-layer reveal */

.vaults-container, footer {
    transition: opacity 0.5s ease;
}

.vaults-container.hidden, footer.hidden {
    opacity: 0;
    pointer-events: none;
}

.vaults-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin: 0 auto;
    pointer-events: auto; /* Re-enable clicks for vaults */
    animation: fadeInUp 2s ease-out;
}

.vault {
    background: rgba(31, 40, 51, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2.5rem;
    width: 31%;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.02);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: crosshair;
    position: relative;
    overflow: hidden;
}

/* Prismatic Light Sweep Effect */
.vault::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: left 0.7s ease;
}

.vault:hover::before {
    left: 150%;
}

.vault:hover {
    background: rgba(31, 40, 51, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(255, 255, 255, 0.05);
    transform: translateY(-10px);
}

.vault h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--white-light);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

.vault-details p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--titanium-light);
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.vault-details p::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: var(--white-light);
    margin-right: 10px;
    box-shadow: 0 0 10px var(--white-light);
    transform: rotate(45deg);
}

footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    font-family: 'Cinzel', serif;
    animation: fadeIn 3s ease-out;
}

/* Contact & Footer enhancements */
.contact-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.contact-section h3 {
    font-size: 1.5rem;
    color: var(--white-light);
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
}
.contact-section p {
    font-size: 0.9rem;
    color: var(--titanium-light);
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}
.email-link {
    display: inline-block;
    color: #4a90e2;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    margin-bottom: 2rem;
    transition: color 0.3s;
}
.email-link:hover { color: var(--white-light); }

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white-light);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.15rem;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}
.cta-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white-light);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
}

.statement {
    color: var(--titanium-light);
    letter-spacing: 0.15rem;
    line-height: 1.6;
}

.statement p:nth-child(1) { font-size: 1.2rem; color: var(--white-light); }
.statement p:nth-child(2) { font-size: 0.9rem; color: var(--white-light); opacity: 0.8; }
.statement p:nth-child(3) { font-size: 0.8rem; margin-top: 0.5rem; font-family: 'Montserrat', sans-serif; }
.statement p:nth-child(4) { font-size: 0.8rem; opacity: 0.5; margin-top: 0.5rem; }

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulseText {
    from { opacity: 0.6; }
    to { opacity: 1; text-shadow: 0 0 10px rgba(74, 144, 226, 0.8); }
}

/* --- Chambers & Terminals --- */
.chamber {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 85%;
    background: rgba(5, 6, 8, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.chamber.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -45%);
}

.back-btn {
    align-self: flex-start;
    background: transparent;
    color: var(--white-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    letter-spacing: 0.1rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white-light);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.chamber-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.chamber-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--white-light);
    letter-spacing: 0.2rem;
}

.chamber-header .status {
    color: #4a90e2; 
    font-size: 0.9rem;
    letter-spacing: 0.2rem;
    animation: pulseText 2s infinite alternate;
}

.terminal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    flex-grow: 1;
}

#chamber-digital .terminal-grid {
    grid-template-columns: 1fr 2fr; 
}

.panel {
    background: rgba(31, 40, 51, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.panel h3 {
    font-family: 'Cinzel', serif;
    color: var(--titanium-light);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1rem;
    font-size: 1.2rem;
}

.mt-2 { margin-top: 2rem; }

/* Blueprint viewer */
.blueprint-viewer {
    width: 100%;
    height: 300px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,0.03) 20px),
                repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,0.03) 20px);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.blueprint-text {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3rem;
}

/* Data Bars & Consoles */
.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.data-row .highlight { color: var(--white-light); font-weight: bold; }

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}
.progress-bar .fill {
    height: 100%;
    background: var(--white-light);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.console-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #a0aab5;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

/* Biometrics & Tables */
.biometric-module {
    text-align: center;
    padding: 2rem 0;
}
.fingerprint-scan {
    width: 120px;
    height: 160px;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    position: relative;
    overflow: hidden;
    background: repeating-radial-gradient(circle at center, transparent, transparent 4px, rgba(255,255,255,0.05) 5px, rgba(255,255,255,0.05) 6px);
}
.scanner-bar {
    width: 100%;
    height: 5px;
    background: var(--white-light);
    box-shadow: 0 0 15px var(--white-light);
    position: absolute;
    top: -5px;
    animation: bioScan 2.5s ease-in-out infinite;
}
@keyframes bioScan {
    0% { top: -5px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.inventory-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.inventory-matrix th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white-light);
    font-family: 'Cinzel', serif;
}
.inventory-matrix td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.inventory-matrix tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}
.status-active { color: #4CAF50; }
.status-sync { color: #4a90e2; animation: pulseText 1.5s infinite alternate; }

/* Real Estate & Impact */
.property-list { display: flex; flex-direction: column; gap: 1rem; }
.property-card {
    background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
    padding: 1.5rem;
    border-left: 3px solid var(--white-light);
}
.property-card h4 { color: var(--white-light); margin-bottom: 0.5rem; font-family: 'Cinzel', serif; }
.property-card p { font-size: 0.85rem; letter-spacing: 0.1rem; }

.impact-metrics {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}
.metric-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--white-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    animation: spinSlow 10s linear infinite;
}
.metric-circle span { animation: spinSlow 10s linear infinite reverse; }
.metric-circle .value { font-size: 2.5rem; color: var(--white-light); font-weight: bold; }
.metric-circle .label { font-size: 0.7rem; letter-spacing: 0.1rem; margin-top: 0.5rem; }

@keyframes spinSlow { 100% { transform: rotate(360deg); } }

/* --- Sub-Navigation & Layout --- */
.chamber-layout {
    display: flex;
    gap: 2rem;
    flex-grow: 1;
    height: calc(100% - 120px);
}

.chamber-sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 2rem;
}

.sub-nav {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--titanium-light);
    padding: 1rem;
    text-align: left;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.1rem;
    font-size: 0.9rem;
}

.sub-nav:hover, .sub-nav.active {
    background: rgba(255,255,255,0.1);
    border-color: var(--white-light);
    color: var(--white-light);
    box-shadow: inset 5px 0 0 var(--white-light);
}

.chamber-content {
    flex-grow: 1;
    position: relative;
}

.sub-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.sub-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- New Module Specifics --- */
.dyno-ring {
    width: 150px; height: 150px;
    border-radius: 50%;
    border: 6px solid #4a90e2;
    border-right-color: transparent;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    animation: dynoSpin 2s linear infinite;
    margin: 0 auto;
}
.dyno-ring span { animation: dynoSpin 2s linear infinite reverse; }
@keyframes dynoSpin { 100% { transform: rotate(360deg); } }
.dyno-ring .value { font-size: 2rem; color: #fff; font-weight: bold; }
.dyno-ring .label { font-size: 0.6rem; letter-spacing: 0.1rem; }

.ai-network { display: flex; gap: 1rem; justify-content: space-between; margin-top: 2rem;}
.ai-node { 
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); 
    padding: 2rem 1rem; text-align: center; flex: 1;
    box-shadow: inset 0 0 15px rgba(68, 255, 170, 0.1);
    transition: all 0.3s;
}
.ai-node:hover { box-shadow: inset 0 0 25px rgba(68, 255, 170, 0.4); border-color: #44ffaa; }
.ai-node h4 { color: var(--white-light); font-family: 'Cinzel', serif; margin-bottom: 0.5rem;}
.ai-node p { font-size: 0.8rem; letter-spacing: 0.1rem;}

.royalty-graph {
    display: flex; gap: 1rem; align-items: flex-end; height: 180px;
    border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 10px;
}
.royalty-graph .bar {
    flex: 1; background: linear-gradient(to top, rgba(255,170,68,0.1), #ffaa44);
    box-shadow: 0 0 10px rgba(255,170,68,0.5);
    transition: height 1s ease;
}

.fabrication-grid { display: flex; flex-direction: column; gap: 1rem; }
.fab-item { border: 1px dashed rgba(255,255,255,0.3); padding: 1.5rem; color: var(--white-light); letter-spacing: 0.1rem; text-align: center;}
