:root {
    --core-black: #000000;
    --night-blue: #02020a;
    /* OVERRIDE: Cyber Cyan is now Silver for total conversion */
    --cyber-cyan: #E0E0E0;
    --plasma-white: #ffffff;
    --matrix-dark: rgba(224, 224, 224, 0.05);

    /* Metallic Silver Theme */
    --metal-silver: #E0E0E0;
    --metal-dark: #808080;
    --metal-glow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.2);

    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-tech: 'Share Tech Mono', monospace;

    /* Updated Glows to White/Silver */
    --glow-strong: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 50px rgba(255, 255, 255, 0.3);
    --glow-subtle: 0 0 10px rgba(224, 224, 224, 0.3);
}

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

body {
    background: var(--core-black);
    color: var(--plasma-white);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* BACKGROUND: Pure Black & Silver Grid */
.void-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #000000;
}

.grid-floor {
    position: fixed;
    inset: -50%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
    mask-image: linear-gradient(to bottom, transparent 0%, black 40%, black 80%, transparent 100%);
}

#app {
    width: 100%;
    max-width: 1600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
    padding-top: 80px;
    /* Space for fixed nav */
}

/* 0. NAVIGATION */
.nexus-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.5rem;
    color: var(--plasma-white);
    font-weight: bold;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--metal-silver);
}

.nav-cta {
    color: var(--metal-silver);
    border: 1px solid var(--metal-silver);
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-cta:hover {
    background: var(--metal-silver);
    color: #000;
    box-shadow: var(--metal-glow);
}

/* 1. HERO & SPHERE */
.power-zone {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-bottom: 5rem;
}

.spline-bg {
    position: relative;
    width: 100%;
    /* Full Front Page */
    height: 100dvh;
    z-index: 1;
    border: none;
    opacity: 1;
    flex-shrink: 0;
    margin-bottom: 0;
    display: block;
    /* Required for custom element */
}

.hero-content {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 0;
    margin-top: 0;
}

/* Removed old .nexus-sphere styles as it is replaced by Spline */

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-subtitle {
    font-size: 2rem;
    color: #ccc;
    margin-top: 1rem;
    font-weight: 300;
}

.hero-tagline {
    color: var(--metal-silver);
    letter-spacing: 5px;
    margin-top: 1rem;
    opacity: 0.8;
}


/* HUD Brackets */
.hud-bracket {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    border: 2px solid var(--metal-silver);
    opacity: 0.5;
    transition: all 0.5s ease;
}

.hud-bracket.left {
    left: 0;
    border-right: none;
}

.hud-bracket.right {
    right: 0;
    border-left: none;
}

.power-zone:hover .hud-bracket {
    width: 40px;
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Title Typography */
.brand-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(192, 192, 192, 0.8);
    position: relative;
    white-space: nowrap;
    filter: drop-shadow(0 0 15px rgba(224, 224, 224, 0.3));
}

.brand-title::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #FFFFFF 20%, #A0A0A0 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    width: 0%;
    overflow: hidden;
    border-right: 4px solid var(--metal-silver);
    animation: loadText 3s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    -webkit-text-stroke: 0;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    white-space: nowrap;
}

.brand-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--metal-silver);
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-top: 1rem;
    opacity: 0.8;
}

.pulse {
    animation: blink 2s infinite;
    color: var(--metal-silver);
}

.font-tech {
    font-family: var(--font-tech);
}

/* 2. MANIFESTO */
.manifesto-terminal {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 1rem 2rem;
    margin-bottom: 3rem;
    max-width: 600px;
    position: relative;
}

.manifesto-terminal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--cyber-cyan);
    box-shadow: var(--glow-strong);
}

.terminal-header {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.typewriter {
    font-size: 1.5rem;
}

.cyan {
    color: var(--metal-silver);
    font-weight: bold;
    text-shadow: var(--glow-subtle);
}

/* 3. SECTOR GRID (Horizontal Scroll) */
.sector-grid {
    display: flex;
    gap: 2rem;
    width: 100%;
    justify-content: flex-start;
    /* Align start to allow scroll */
    overflow-x: auto;
    padding: 2rem 5%;
    /* Add breathing room on sides */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for cleaner look but keep functionality */
    scrollbar-width: none;
    /* Firefox */
}

.sector-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.sector-card {
    position: relative;
    width: 280px;
    /* Fixed width for consistent columns */
    height: 380px;
    /* Increased height for descriptions */
    flex: 0 0 auto;
    /* Don't shrink */
    scroll-snap-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    text-align: center;
}



.sector-card:hover {
    transform: scale(1.05);
    border-color: var(--metal-silver);
    box-shadow: 0 0 15px rgba(224, 224, 224, 0.2);
    z-index: 10;
}

.sector-card h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.sector-card p {
    color: var(--metal-silver);
    font-size: 0.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    z-index: 2;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.sector-desc {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
    opacity: 0.8;
    z-index: 2;
    font-family: var(--font-body);
    font-weight: 300;
    transition: color 0.3s;
}

.sector-card:hover .sector-desc {
    color: #fff;
}

.sector-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
}

/* Animations */
@keyframes gridMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100px;
    }
}

@keyframes loadText {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* SUB-PAGE STYLES */
#sub-app {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    text-align: center;
}

.sector-header {
    margin-bottom: 3rem;
}

.sector-id {
    color: var(--metal-silver);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.sector-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 8rem);
    color: white;
    text-transform: uppercase;
    text-shadow: var(--glow-strong);
    margin-bottom: 1rem;
}

.sector-tagline {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.sector-content {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 3rem;
    width: 80%;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.back-btn {
    color: var(--metal-silver);
    text-decoration: none;
    font-size: 1.2rem;
    border: 1px solid var(--cyber-cyan);
    padding: 1rem 2rem;
    transition: all 0.3s;
    background: rgba(0, 243, 255, 0.05);
}

.back-btn:hover {
    background: var(--cyber-cyan);
    color: black;
    box-shadow: var(--glow-strong);
}

/* FOOTER / COMMUNICATIONS ARRAY */
.comm-array {
    margin-top: 5rem;
    width: 100%;
    max-width: 1000px;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    padding-top: 3rem;
    padding-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    text-align: left;
    position: relative;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.comm-array::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 30%;
    height: 1px;
    background: var(--cyber-cyan);
    box-shadow: var(--glow-strong);
}

.newsletter-section p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.cyber-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1rem;
    color: var(--metal-silver);
    flex-grow: 1;
    outline: none;
    transition: all 0.3s;
}

.cyber-input:focus {
    border-color: var(--cyber-cyan);
    box-shadow: var(--glow-subtle);
}

.cyber-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--cyber-cyan);
    color: var(--metal-silver);
    padding: 0 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cyber-btn:hover {
    background: var(--cyber-cyan);
    color: black;
    box-shadow: var(--glow-strong);
}

.channel-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.channel-link {
    color: #888;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.channel-link:hover {
    color: var(--metal-silver);
    padding-left: 10px;
    text-shadow: 0 0 5px var(--cyber-cyan);
}

.footer-meta {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: #444;
}

/* Mobile Optimization */
@media (max-width: 768px) {

    /* Navigation: Stack vertically */
    .nexus-nav {
        height: auto;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.95);
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Hero Section */
    .spline-bg {
        height: 80vh;
        /* Slightly less than full screen on mobile to show hint of content */
    }

    .power-zone {
        height: auto;
        min-height: 100vh;
    }

    .hero-subtitle {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .hero-tagline {
        font-size: 0.9rem;
        letter-spacing: 2px;
        /* Reduce spacing to prevent overflow */
    }

    /* Sector Grid */
    .sector-grid {
        padding: 2rem 1rem;
    }

    .manifesto-terminal {
        margin: 0 1rem 3rem 1rem;
    }

    /* Global Text */
    body {
        font-size: 14px;
    }
}

/* AI AGENT WIDGET */
.ai-agent-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid var(--cyber-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2000;
    box-shadow: var(--glow-subtle);
    transition: all 0.3s;
}

.ai-agent-widget:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-strong);
}

.agent-core {
    width: 30px;
    height: 30px;
    background: var(--cyber-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.section-title {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    color: var(--cyber-cyan);
    margin-top: 2rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}