/* Custom Premium Stylesheet for Numen Engine Website */

:root {
    --bg-main: #07090e;
    --bg-darker: #040508;
    --bg-card: rgba(15, 18, 28, 0.55);
    --bg-card-hover: rgba(22, 27, 41, 0.75);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-active: rgba(168, 85, 247, 0.3);
    
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.35);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.35);
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-bright: #ffffff;
    
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-pink: #ec4899;
    --accent-pink-glow: rgba(236, 72, 153, 0.2);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Reset & Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Dynamic Glow Blobs */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -2;
    pointer-events: none;
    opacity: 0.45;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    top: 500px;
    right: -200px;
}

.blob-3 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    bottom: 200px;
    left: 20%;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(7, 9, 14, 0.65);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.nav-container {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text {
    color: var(--text-bright);
}

.accent-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse-node {
    animation: nodePulse 2s infinite ease-in-out;
}

@keyframes nodePulse {
    0%, 100% { r: 10; opacity: 1; fill: var(--primary); }
    50% { r: 14; opacity: 0.8; fill: var(--secondary); }
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 6px 0;
}

.nav-links a:hover {
    color: var(--text-bright);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-bright);
    font-size: 22px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-bright);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-bright);
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    border-color: var(--secondary);
    background-color: rgba(6, 182, 212, 0.05);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    display: flex;
    align-items: center;
    min-height: 85vh;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.35;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 720px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--text-bright);
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #c084fc, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 19px;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 650px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 90px 0;
    position: relative;
}

.section-dark {
    background-color: var(--bg-darker);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-bright);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid & Cards */
.grid {
    display: grid;
    gap: 24px;
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 32px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
}

.card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-glow:hover {
    box-shadow: 0 10px 30px -5px var(--card-glow-color, rgba(168, 85, 247, 0.12));
}

.card:has(.card-icon.cyan) { --card-glow-color: rgba(6, 182, 212, 0.15); }
.card:has(.card-icon.purple) { --card-glow-color: rgba(168, 85, 247, 0.15); }
.card:has(.card-icon.emerald) { --card-glow-color: rgba(16, 185, 129, 0.15); }
.card:has(.card-icon.pink) { --card-glow-color: rgba(236, 72, 153, 0.15); }

.glass {
    backdrop-filter: blur(12px);
    background-color: rgba(15, 18, 28, 0.45);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
}

.card-icon.cyan { background-color: rgba(6, 182, 212, 0.12); color: var(--secondary); }
.card-icon.purple { background-color: rgba(168, 85, 247, 0.12); color: var(--primary); }
.card-icon.emerald { background-color: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.card-icon.pink { background-color: rgba(236, 72, 153, 0.12); color: var(--accent-pink); }

.card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.card-list {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-glass);
    padding-top: 16px;
}

.card-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-list li::before {
    content: '→';
    color: var(--primary);
    font-weight: bold;
}

/* Architecture Layout */
.architecture-layout {
    display: flex;
    gap: 40px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 40px;
}

.arch-visual {
    flex: 1.2;
    min-width: 320px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arch-node {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 16px 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.arch-node h4 {
    color: var(--text-bright);
    font-size: 16px;
    margin-bottom: 4px;
}

.arch-node span {
    color: var(--text-muted);
    font-size: 12px;
}

.arch-node:hover {
    border-color: var(--secondary);
    background-color: rgba(6, 182, 212, 0.08);
}

.arch-node.active {
    border-color: var(--primary);
    background-color: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 20px var(--primary-glow);
}

.arch-connector-vertical {
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, var(--secondary), var(--primary));
}

.arch-split-container {
    display: flex;
    width: 100%;
    max-width: 500px;
    justify-content: space-between;
    margin: 15px 0;
}

.arch-split-left, .arch-split-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.arch-connector-left-diagonal, .arch-connector-right-diagonal {
    width: 2px;
    height: 25px;
    background-color: var(--border-glass);
}

.arch-connector-bottom {
    width: 2px;
    height: 30px;
    background-color: var(--border-glass);
}

.arch-info-panel {
    flex: 0.8;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.arch-info-panel .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.arch-info-panel h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-bright);
}

.arch-info-panel p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.arch-detail-tags {
    display: flex;
    gap: 10px;
}

.tag {
    padding: 4px 12px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    font-size: 12px;
    color: var(--text-muted);
}

/* Roadmap */
.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-glass);
}

.roadmap-item {
    position: relative;
    margin-bottom: 40px;
}

.roadmap-marker {
    position: absolute;
    left: -40px;
    top: 20px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    z-index: 2;
    transition: var(--transition-smooth);
}

.roadmap-item.completed .roadmap-marker {
    border-color: var(--accent-emerald);
    background-color: var(--accent-emerald);
    color: var(--bg-main);
    box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.roadmap-item.in-progress .roadmap-marker {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.roadmap-content {
    padding: 24px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-badge.in-progress {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--secondary);
}

.status-badge.planned {
    background-color: rgba(168, 85, 247, 0.15);
    color: var(--primary);
}

.roadmap-content h3 {
    margin-bottom: 8px;
}

/* Documentation Workspace Layout */
.docs-container {
    max-width: 1300px;
}

.docs-workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-top: 40px;
    align-items: start;
}

.docs-sidebar {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 100px;
}

.docs-search {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 20px;
}

.docs-search i {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 10px;
}

.docs-search input {
    background: none;
    border: none;
    color: var(--text-bright);
    outline: none;
    font-family: var(--font-sans);
    font-size: 14px;
    width: 100%;
}

.docs-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.docs-menu li {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-menu li:hover {
    color: var(--text-bright);
    background-color: rgba(255, 255, 255, 0.03);
}

.docs-menu li.active {
    color: var(--text-bright);
    background-color: rgba(168, 85, 247, 0.12);
    border-left: 3px solid var(--primary);
    padding-left: 11px;
}

.loading-item {
    font-style: italic;
    cursor: default !important;
}

.docs-reader-area {
    padding: 40px;
    min-height: 60vh;
}

.docs-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
}

/* Markdown Styling inside Reader */
.markdown-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3, 
.markdown-body h4 {
    color: var(--text-bright);
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
}

.markdown-body h1 { font-size: 30px; border-bottom: 1px solid var(--border-glass); padding-bottom: 8px; margin-top: 0; }
.markdown-body h2 { font-size: 22px; border-bottom: 1px solid var(--border-glass); padding-bottom: 6px; }
.markdown-body h3 { font-size: 18px; }

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 3px 6px;
    border-radius: 4px;
    color: #f43f5e;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.markdown-body pre {
    background-color: #0b0c10 !important;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    overflow-x: auto;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 16px;
    padding-left: 20px;
}

.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    background-color: rgba(168, 85, 247, 0.05);
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.markdown-body blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Alert blocks parsing helper inside Markdown */
.markdown-body blockquote:has(strong:contains("IMPORTANT")),
.markdown-body blockquote:has(p:first-child:contains("[!IMPORTANT]")) {
    border-left-color: var(--primary);
    background-color: rgba(168, 85, 247, 0.05);
}

.markdown-body blockquote:has(strong:contains("WARNING")),
.markdown-body blockquote:has(p:first-child:contains("[!WARNING]")) {
    border-left-color: var(--accent-pink);
    background-color: rgba(236, 72, 153, 0.05);
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--border-glass);
    padding: 10px 14px;
    text-align: left;
}

.markdown-body th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-bright);
    font-weight: 600;
}

.markdown-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.01);
}

.doc-placeholder-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--text-muted);
    gap: 16px;
}

/* Setup / Getting Started Steps */
.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.step-num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.step-detail {
    flex: 1;
}

.step-detail h3 {
    margin-bottom: 6px;
}

.step-detail p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Code block with copy button */
.code-block-container {
    position: relative;
}

.code-block-container pre {
    background-color: #0b0c10 !important;
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 14px;
    overflow-x: auto;
}

.code-block-container code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #e2e8f0;
}

.btn-copy-code {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy-code:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
}

.btn-copy-code.copied {
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-glass);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info {
    max-width: 380px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 16px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.link-group h4 {
    color: var(--text-bright);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-group a {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.link-group a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* Responsive adjustments */
@media(max-width: 992px) {
    .nav-links {
        display: none; /* Mobile menu can be animated via JS */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .docs-workspace {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: relative;
        top: 0;
        max-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
}

@media(max-width: 768px) {
    .architecture-layout {
        flex-direction: column;
    }
    
    .arch-info-panel {
        order: -1;
    }
    
    .section-header h2 {
        font-size: 30px;
    }
}
