/* 
    Morpheus Tech Global Design System
    Tactical Aero-Modern UI Framework
    PREMIUM GLASS STANDARD: blur(40px)
*/

:root {
    --primary: #ffd700;
    --gold: #ffd700;
    --gold-dim: rgba(255, 215, 0, 0.15);
    --gold-glow: rgba(255, 215, 0, 0.25);
    --bg: #030303;
    --bg-black: #000000;
    --border: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(10, 10, 10, 0.35); /* Premium dark glassmorphism */
    --glass-blur: 20px;
    --tactical-clip: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.blur-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(180%) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%) !important;
    border: 1px solid var(--border) !important;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--border);
}

/* --- Base --- */
.material-symbols-outlined { 
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; 
}

/* --- Tactical Glass System (Centralized) --- */
.tactical-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--border);
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.tactical-glass:hover {
    background: rgba(22, 22, 22, 0.85);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

/* Tactical Corner Accents Helper */
.tactical-corners::before {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none; z-index: 10;
    background:
        linear-gradient(var(--gold), var(--gold)) top left / 22px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top left / 2px 22px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 22px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 2px 22px no-repeat;
    opacity: 0.8;
}

/* Folder Tab System */
.folder-card {
    position: relative;
    padding-top: 18px;
}

.folder-tab {
    position: absolute; top: 0; left: 0;
    width: 80px; height: 18px;
    background: var(--gold);
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
}

.folder-tab span {
    font-size: 7px; font-weight: 900;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: #000; font-family: 'Space Grotesk', sans-serif;
}

.folder-inner {
    border-radius: 0 16px 16px 16px;
    border-top: 2px solid var(--gold) !important;
}

/* --- Common Layout Utilities --- */
.clip-tactical-btn {
    clip-path: var(--tactical-clip);
}

/* --- Background Systems --- */
.tactical-honeycomb {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-color: #050505;
    background-image: 
        radial-gradient(circle at center, rgba(255, 215, 0, 0.08) 0%, transparent 70%),
        linear-gradient(30deg, #080808 12%, transparent 12.5%, transparent 87%, #080808 87.5%, #080808),
        linear-gradient(150deg, #080808 12%, transparent 12.5%, transparent 87%, #080808 87.5%, #080808),
        linear-gradient(30deg, #080808 12%, transparent 12.5%, transparent 87%, #080808 87.5%, #080808),
        linear-gradient(150deg, #080808 12%, transparent 12.5%, transparent 87%, #080808 87.5%, #080808),
        linear-gradient(60deg, rgba(255, 215, 0, 0.01) 25%, transparent 25.5%, transparent 75%, rgba(255, 215, 0, 0.01) 75%, rgba(255, 215, 0, 0.01)),
        linear-gradient(60deg, rgba(255, 215, 0, 0.01) 25%, transparent 25.5%, transparent 75%, rgba(255, 215, 0, 0.01) 75%, rgba(255, 215, 0, 0.01));
    background-size: 80px 140px;
    background-position: center, 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
    animation: grid-pulse 10s ease-in-out infinite;
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.02); }
}

/* --- Premium Glass Cards (Legacy Alias) --- */
.premium-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--border);
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
    border-radius: 2.5rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 9.5vw, 3.2rem) !important;
        line-height: 1.05 !important;
    }

    .section-title {
        font-size: 2.5rem !important;
    }

    section {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
}

/* --- Owner Profile Section --- */
#owner-profile {
    padding: 80px 2rem 0;
    border-top: 1px solid var(--border);
    position: relative;
}

.owner-profile-container {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 3.5rem;
    position: relative;
    border-radius: 12px;
    transition: all 0.5s var(--ease-out);
}

.owner-profile-container:hover {
    border-color: rgba(255, 215, 0, 0.3) !important;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.05);
}

.owner-profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    align-items: center;
}

.owner-telemetry {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-family: monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.owner-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--border);
    clip-path: var(--tactical-clip);
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.5s var(--ease-out);
}

/* scanline sweep animation */
.owner-photo-wrap::after {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 215, 0, 0.18) 50%,
        transparent 100%
    );
    animation: scanline 4.5s linear infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes scanline {
    0% { top: -100%; }
    100% { top: 100%; }
}

.owner-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s var(--ease-out);
}

.owner-profile-container:hover .owner-photo-wrap {
    border-color: var(--gold);
    box-shadow: 0 0 30px var(--gold-glow);
}

.owner-profile-container:hover .owner-photo-wrap img {
    transform: scale(1.04);
}

.owner-photo-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at center, transparent 20%, rgba(3, 3, 3, 0.8) 100%),
        linear-gradient(rgba(255, 215, 0, 0.03) 50%, transparent 50%),
        linear-gradient(90deg, rgba(255, 215, 0, 0.03) 50%, transparent 50%);
    background-size: 100% 100%, 4px 4px, 4px 4px;
    pointer-events: none;
    z-index: 2;
}

.owner-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.owner-badge {
    align-self: flex-start;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 8px;
    font-weight: 900;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1px solid var(--gold);
    padding: 6px 14px;
    letter-spacing: 0.25em;
    clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
}

.owner-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}

.owner-subtitle {
    font-size: 0.95rem;
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
}

.owner-bio {
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.owner-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
}

.owner-meta-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    transition: all 0.3s var(--ease-out);
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.owner-meta-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 100%;
    background: var(--gold);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease-out);
}

.owner-meta-item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        linear-gradient(var(--gold), var(--gold)) top left / 12px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top left / 2px 12px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 12px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 2px 12px no-repeat;
    opacity: 0.8;
}

.owner-meta-item:hover::before {
    transform: scaleY(1);
}

.owner-meta-item:hover {
    background: rgba(22, 22, 22, 0.85);
    border-color: rgba(255, 215, 0, 0.2);
}

.meta-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 8px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.meta-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 992px) {
    .owner-profile-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .owner-photo-wrap {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .owner-profile-container {
        padding: 2.5rem 2rem;
    }
}

/* ── GLOBAL FOOTER STYLES ── */
.tactical-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem 120px;
    text-align: center;
    max-width: 1200px;
    margin: 3rem auto 0;
    position: relative;
    z-index: 10;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

.footer-copy {
    font-size: 11px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.gold-text {
    color: var(--gold);
    font-weight: 800;
}

main {
    position: relative;
    z-index: 10;
}

/* --- Scroll Reveal System (Optimized for Backdrop-Filter) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.visible {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
}

.reveal-staggered {
    transition-delay: calc(var(--stagger) * 0.1s);
}

/* ── Layered Server Blade / Data Folder Styling ── */
.proj-card {
    position: relative;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    overflow: visible !important; /* Ensure the fanned sheets are visible */
}

.folder-tab {
    z-index: 10 !important; /* Back Plate */
}

.proj-inner {
    z-index: 40 !important; /* Front Display Plate */
    position: relative;
}

.data-sheet {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 16px 16px 16px;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: 'Space Grotesk', monospace;
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 400ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0; /* Hidden initially */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.data-sheet.sheet-1 {
    z-index: 20;
    transform: translateY(0) rotate(0deg);
    transition-delay: 0ms;
}

.data-sheet.sheet-2 {
    z-index: 30;
    transform: translateY(0) rotate(0deg);
    transition-delay: 50ms;
}

/* Hover States: Parent triggers child transitions */
.proj-card:hover .data-sheet.sheet-1 {
    transform: translateY(-30px) rotate(-1.5deg);
    opacity: 0.85;
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 215, 0, 0.05);
}

.proj-card:hover .data-sheet.sheet-2 {
    transform: translateY(-15px) rotate(1.5deg);
    opacity: 0.95;
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.1);
}

/* Mobile responsive padding and position adjustments */
@media (max-width: 768px) {
    .proj-card {
        padding-top: 14px !important;
    }
    .data-sheet {
        top: 14px !important;
        padding: 1rem 1rem 0.5rem 1rem;
        border-radius: 0 16px 16px 16px;
    }
    /* Adjusted offsets and rotation for mobile viewports */
    .proj-card:hover .data-sheet.sheet-1 {
        transform: translateY(-20px) rotate(-1.2deg);
    }
    .proj-card:hover .data-sheet.sheet-2 {
        transform: translateY(-10px) rotate(1.2deg);
    }
}

/* Data Sheet Internal Layout */
.data-sheet .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.data-sheet .sheet-id {
    font-size: 8px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.data-sheet .sheet-status {
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.data-sheet.sheet-1 .sheet-status {
    color: #22c55e;
}

.data-sheet.sheet-2 .sheet-status {
    color: var(--gold);
}

.data-sheet .sheet-code {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.data-sheet .sheet-code code {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.25);
    font-family: monospace;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── SYSTEM HANDSHAKE SPLASH SCREEN ── */
body.handshake-active {
    overflow: hidden !important;
}

.handshake-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #050505;
    z-index: 99999; /* Ensure it stays above HUD and navigation dock */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.handshake-overlay.resolved {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.handshake-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
    padding: 2rem;
    max-width: 90%;
}

.branding-core {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.handshake-logo {
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    animation: handshake-logo-pulse 2s ease-in-out infinite;
}

@keyframes handshake-logo-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.7));
    }
}

.handshake-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.telemetry-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: min(280px, 80vw);
}

.telemetry-progress-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.telemetry-progress-bar {
    height: 100%;
    width: 0%;
    background: #ffd700; /* Gold loader */
    box-shadow: 0 0 8px #ffd700;
    border-radius: 99px;
    transition: width 150ms cubic-bezier(0.1, 0.9, 0.2, 1);
}

.telemetry-status {
    font-family: monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #22c55e; /* Neon Green Status */
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
    min-height: 1.5em;
}

/* Adjust layout for responsive columns on small devices */
@media (max-width: 480px) {
    .branding-core {
        flex-direction: column;
        gap: 1rem;
    }
    .handshake-title {
        font-size: 1.8rem;
    }
}
