/* ==========================================================================
   BEYOND - Premium Stylesheet
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    --color-bg-darkest: #0a0b0e;
    --color-bg-dark: #0f1115;
    --color-bg-panel: #14171d;
    --color-bg-input: #0e0f13;
    
    --color-border-subtle: #1e222b;
    --color-border-active: #2d3443;
    
    /* Beyond Branding Colors */
    --color-accent: #00cbd6;
    --color-accent-glow: rgba(0, 203, 214, 0.4);
    --color-accent-bg: rgba(0, 203, 214, 0.05);
    --color-accent-hover: rgba(0, 203, 214, 0.15);
    
    --color-danger: #ff4d52;
    --color-danger-glow: rgba(255, 77, 82, 0.4);
    --color-danger-bg: rgba(255, 77, 82, 0.05);
    --color-danger-hover: rgba(255, 77, 82, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #9aa0a6;
    --color-text-muted: #626875;
    
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 4px;
}

/* Base Reset & Styling */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg-darkest);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-darkest);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-subtle);
    border-radius: 5px;
    border: 2px solid var(--color-bg-darkest);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 11, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-subtle);
    padding: 15px 40px;
    display: flex;
    justify-content: center; /* dead center the links */
    align-items: center;
    transition: var(--transition-smooth);
    min-height: 73px;
}

.nav-brand {
    position: absolute;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

#nav-download-btn {
    position: absolute;
    right: 40px;
}

.nav-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--color-accent-glow));
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: var(--transition-smooth);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--color-accent-bg);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: #00f0ff;
    color: #ffffff;
    box-shadow: 0 0 15px var(--color-accent-glow);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--color-danger-bg);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

.btn-danger:hover {
    background-color: var(--color-danger-hover);
    border-color: #ff6b70;
    color: #ffffff;
    box-shadow: 0 0 15px var(--color-danger-glow);
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

/* Banner Container */
.banner-container {
    position: relative;
    width: 100%;
    margin-top: 73px; /* Offset for sticky navbar */
    height: 380px;
    overflow: hidden;
    background-color: #000;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    opacity: 0.8;
}

/* Smooth half-way fade out gradient overlay */
.banner-fade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 35%, var(--color-bg-darkest) 90%);
    pointer-events: none;
}

.hero-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 5;
}

.hero-tag {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(0, 203, 214, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-divider {
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 0 auto;
    border-radius: 1.5px;
}

/* Feature Grid styling */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    padding: 35px 30px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    border-color: var(--color-border-active);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: rgba(0, 203, 214, 0.08);
    border: 1px solid rgba(0, 203, 214, 0.2);
    color: var(--color-accent);
    margin-bottom: 25px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.feature-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* How it Works / Architecture diagram styles */
.architecture-section {
    background-color: var(--color-bg-dark);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}

.diagram-container {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border-subtle);
    border-radius: 6px;
    padding: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.diagram-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.diagram-node {
    flex: 1;
    min-width: 250px;
    background-color: var(--color-bg-darkest);
    border: 1px solid var(--color-border-active);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

.diagram-node.active-accent {
    border-left: 3px solid var(--color-accent);
}

.diagram-node.active-danger {
    border-left: 3px solid var(--color-danger);
}

.node-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-title span.mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.node-body {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.node-body ul {
    list-style: none;
    margin-top: 10px;
}

.node-body li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 5px;
}

.node-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.diagram-pipe {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    text-align: center;
    padding: 10px;
}

.pipe-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    position: relative;
    margin: 10px 0;
    box-shadow: 0 0 8px var(--color-accent);
}

.pipe-line::before, .pipe-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--color-accent);
    border-right: 2px solid var(--color-accent);
}

.pipe-line::before {
    left: 0;
    transform: rotate(225deg);
}

.pipe-line::after {
    right: 0;
    transform: rotate(45deg);
}

.pipe-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent);
    background-color: var(--color-bg-panel);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 203, 214, 0.2);
}

.pipe-sublabel {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Documentation Styling */
.docs-layout {
    display: flex;
    gap: 40px;
}

.docs-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.docs-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.docs-nav-link {
    display: block;
    padding: 10px 15px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-left: 2px solid var(--color-border-subtle);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.docs-nav-link:hover, .docs-nav-link.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    background-color: rgba(0, 203, 214, 0.02);
}

.docs-content {
    flex-grow: 1;
}

.doc-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.doc-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 1px solid var(--color-border-subtle);
    padding-bottom: 10px;
}

.doc-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.doc-text a {
    color: var(--color-accent);
    text-decoration: none;
}

.doc-text a:hover {
    text-decoration: underline;
}

.doc-list {
    margin-bottom: 20px;
    padding-left: 20px;
}

.doc-list li {
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.doc-list strong {
    color: #ffffff;
}

/* Code block styled like Beyond IDE / Console */
.code-container {
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    margin: 20px 0;
    overflow: hidden;
}

.code-header {
    background-color: rgba(30, 34, 43, 0.3);
    padding: 8px 16px;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-lang {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.code-copy-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.code-copy-btn:hover {
    color: var(--color-accent);
}

.code-content {
    padding: 16px;
    overflow-x: auto;
}

.code-content pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #d1d5db;
}

.code-content code {
    font-family: var(--font-mono);
}

/* Syntax Highlighting */
.code-comment { color: var(--color-text-muted); }
.code-keyword { color: #f47067; }
.code-string { color: #8ddb8c; }
.code-method { color: #b17cff; }
.code-variable { color: #f7a06d; }

/* Grid for Requirements */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.req-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.req-name {
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.req-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Disclaimer banner */
.disclaimer-banner {
    background-color: var(--color-danger-bg);
    border: 1px solid var(--color-danger);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.disclaimer-icon {
    color: var(--color-danger);
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.disclaimer-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--color-border-subtle);
    background-color: var(--color-bg-darkest);
    padding: 60px 40px;
}

.footer-top {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand-side {
    max-width: 320px;
}

.footer-brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-brand-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.footer-links-side {
    display: flex;
    gap: 60px;
}

.footer-link-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-link-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.footer-link-col a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-link-col a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--color-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.disclaimer-bottom {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    max-width: 600px;
    text-align: right;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .docs-layout {
        flex-direction: column;
    }
    .docs-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 40px;
    }
    .docs-nav-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .docs-nav-link {
        border-left: none;
        border-bottom: 2px solid var(--color-border-subtle);
        white-space: nowrap;
    }
    .docs-nav-link:hover, .docs-nav-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--color-accent);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        justify-content: space-between;
    }
    .nav-brand {
        position: static;
    }
    #nav-download-btn {
        position: static;
    }
    .nav-links {
        display: none; /* simple hidden links on mobile, or toggle could be implemented */
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .banner-container {
        height: 220px;
    }
    .hero-content-wrapper {
        padding: 40px 20px 10px 20px;
    }
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }
    .footer-links-side {
        flex-direction: column;
        gap: 30px;
    }
    .disclaimer-bottom {
        text-align: left;
    }
}
