:root {
    --bg-main: #0a0a0f;
    --bg-secondary: #14141c;
    --bg-tertiary: #1f1f2e;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --accent-color: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.4);
    
    --border-color: #2a2a3e;
    
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

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

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

.highlight {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--accent-glow);
    z-index: -1;
    border-radius: 4px;
}

#hero-word {
    display: inline-block;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

#hero-word.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.logo .dot {
    color: var(--accent-color);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 5%;
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-glow);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Terminal Simulator */
.terminal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    font-family: var(--font-mono);
}

.terminal-header {
    background-color: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.circle.red { background-color: #ff5f56; }
.circle.yellow { background-color: #ffbd2e; }
.circle.green { background-color: #27c93f; }

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.terminal-body {
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #a8b2c1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-line {
    animation: fadeIn 0.3s forwards;
}

.log-info { color: #61dafb; }
.log-user { color: #e2e8f0; }
.log-route { color: #27c93f; font-weight: bold; }
.log-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--text-primary);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

/* Features Section */
.features {
    padding: 6rem 5%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Architecture Section */
.architecture {
    padding: 6rem 5%;
    background-color: var(--bg-main);
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.diagram-node {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    min-width: 250px;
    position: relative;
    transition: all 0.3s ease;
}

.node-title {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.user-node { border-color: #3b82f6; }
.router-node { 
    border-color: var(--accent-color); 
    box-shadow: 0 0 20px var(--accent-glow);
}

.arrow {
    width: 2px;
    height: 40px;
    background-color: var(--border-color);
    position: relative;
}

.arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--border-color);
}

.diagram-split {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    border-top: 2px solid var(--border-color);
    padding-top: 40px;
    position: relative;
}

.diagram-branch {
    position: relative;
}

.diagram-branch::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    width: 2px;
    height: 40px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.endpoint-node {
    opacity: 0.6;
}

.active-node {
    opacity: 1;
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    transform: translateY(-5px);
}

/* Footer */
footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .diagram-split {
        flex-direction: column;
        border-top: none;
        padding-top: 0;
        gap: 1rem;
    }

    .diagram-branch::before {
        display: none;
    }
}

/* Features Page Specific Styles */
.features-hero {
    text-align: center;
    padding: 6rem 5% 2rem;
}

.features-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 5%;
    align-items: center;
    min-height: 60vh;
}

.feature-detail.reverse {
    direction: rtl;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.feature-detail.reverse .feature-text {
    direction: ltr;
}

.feature-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.feature-visual {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
    direction: ltr; /* Reset direction for reverse class */
}

/* 1. Router Animation */
.router-anim {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}
.prompt-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-mono);
    color: #e2e8f0;
}
.vector-lines {
    display: flex;
    justify-content: center;
    gap: 2rem;
}
.vline {
    width: 2px;
    height: 40px;
    background: var(--accent-glow);
    animation: flowDown 1s infinite linear;
}
.vline.v2 { animation-delay: 0.2s; }
.vline.v3 { animation-delay: 0.4s; }
.expert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.expert-item .name { width: 140px; text-align: right; }
.bar-bg {
    flex-grow: 1;
    background: var(--bg-tertiary);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: var(--border-color);
    transition: width 0.5s ease, background 0.5s ease;
}
.exp-1 .bar-fill { animation: winBar 2s infinite alternate; background: var(--accent-color); box-shadow: 0 0 10px var(--accent-glow); }
.exp-2 .bar-fill { width: 12%; }
.exp-3 .bar-fill { width: 8%; }

@keyframes flowDown {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}
@keyframes winBar {
    0% { width: 10%; }
    100% { width: 95%; }
}

/* 2. Backend Animation */
.backend-anim {
    width: 100%;
    height: 100%;
    position: relative;
}
.router-center {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    z-index: 10;
}
.server-rack {
    position: absolute;
    right: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    width: 150px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
}
.api-rack { top: 30px; }
.onnx-rack { top: 50%; transform: translateY(-50%); }
.ollama-rack { bottom: 30px; }

.server-rack.active-rack {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}
.onnx-rack.active-rack { transform: translateY(-50%) scale(1.05); }

.data-pulse {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    top: 50%;
    left: 100px;
    opacity: 0;
}

@keyframes shootPulseTop {
    0% { left: 100px; top: 50%; opacity: 1; }
    100% { left: calc(100% - 180px); top: 50px; opacity: 0; }
}
@keyframes shootPulseMid {
    0% { left: 100px; top: 50%; opacity: 1; }
    100% { left: calc(100% - 180px); top: 50%; opacity: 0; }
}
@keyframes shootPulseBot {
    0% { left: 100px; top: 50%; opacity: 1; }
    100% { left: calc(100% - 180px); top: calc(100% - 50px); opacity: 0; }
}

/* 3. Security Animation */
.security-anim {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    position: relative;
}
.firewall {
    width: 100%;
    height: 40px;
    border-top: 3px dashed #3b82f6;
    border-bottom: 3px dashed #3b82f6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: #3b82f6;
    letter-spacing: 2px;
}
.packet {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    position: absolute;
    opacity: 0;
}
.safe-packet {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
    top: 10px;
    animation: dropSafe 4s infinite linear;
}
.attack-packet {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    top: 10px;
    animation: dropAttack 4s infinite linear;
    animation-delay: 2s;
}
.block-effect {
    position: absolute;
    color: #ef4444;
    font-weight: 800;
    font-size: 1.5rem;
    opacity: 0;
    animation: showBlock 4s infinite;
    animation-delay: 2s;
}

@keyframes dropSafe {
    0% { top: 10px; opacity: 1; }
    40% { top: 130px; opacity: 1; }
    60% { top: 170px; opacity: 1; }
    100% { top: 300px; opacity: 0; }
}
@keyframes dropAttack {
    0% { top: 10px; opacity: 1; }
    40% { top: 110px; opacity: 1; }
    45% { top: 110px; opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; }
}
@keyframes showBlock {
    0%, 39% { opacity: 0; transform: scale(0.5); }
    40%, 50% { opacity: 1; transform: scale(1.2); text-shadow: 0 0 20px #ef4444; }
    60%, 100% { opacity: 0; transform: scale(1); }
}

/* 4. Compatibility Animation */
.compat-anim {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.client-box, .lemoe-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}
.lemoe-box {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}
.api-bridge {
    flex-grow: 1;
    height: 2px;
    background: var(--border-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bridge-url {
    position: absolute;
    top: -30px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.bridge-pulse {
    width: 60px;
    height: 4px;
    background: #10b981;
    position: absolute;
    box-shadow: 0 0 10px #10b981;
    border-radius: 2px;
    animation: flowRight 2s infinite linear;
}

@keyframes flowRight {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@media (max-width: 900px) {
    .feature-detail {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Usecases Page Specific Styles */
.usecases-page .features-hero {
    padding-bottom: 4rem;
}

/* 1. Switchboard Animation */
.switchboard-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}
.user-chat {
    background: var(--bg-tertiary);
    border: 1px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 20px 20px 20px 0;
    color: #f8fafc;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
}
.user-chat::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--accent-color);
}
.switch-router {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    position: relative;
    box-shadow: 0 0 15px var(--accent-glow);
}
.switch-router::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--accent-color);
}
.dept-boxes {
    display: flex;
    gap: 1rem;
    border-top: 2px solid var(--accent-color);
    padding-top: 15px;
    position: relative;
    width: 280px;
    justify-content: space-between;
}
.dept {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    position: relative;
}
.dept::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--accent-color);
}
.active-dept {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    animation: bounceDept 2s infinite;
}

@keyframes bounceDept {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 2. Privacy Animation */
.privacy-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}
.data-file {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
    width: 150px;
    text-align: center;
}
.sensitive {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: floatLeft 4s infinite alternate ease-in-out;
}
.public {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    animation: floatRight 4s infinite alternate ease-in-out;
}
.lemoe-shield {
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 800;
    color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}
.destinations {
    display: flex;
    gap: 2rem;
}
.dest {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px dashed var(--border-color);
}
.dest.local { border-color: #10b981; }
.dest.cloud { border-color: #f59e0b; opacity: 0.5; }

@keyframes floatLeft {
    0% { transform: translate(-20px, 0); }
    100% { transform: translate(10px, 10px); }
}
@keyframes floatRight {
    0% { transform: translate(20px, 0); }
    100% { transform: translate(-10px, 10px); }
}

/* 3. Cost Animation */
.cost-anim {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
}
.cost-node {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    position: relative;
    width: 160px;
}
.cheap-node {
    border-color: #10b981;
    animation: pulseCheap 2s infinite;
}
.expensive-node {
    opacity: 0.4;
}
.cost-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
@keyframes pulseCheap {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 4. Scale Animation */
.scale-anim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.uis {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.ui-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    position: relative;
}
.ui-box::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--border-color);
}
.central-lemoe {
    background: var(--accent-color);
    color: white;
    padding: 2rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 0 20px var(--accent-glow);
    position: relative;
}
.central-lemoe::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 50%;
    width: 40px;
    height: 2px;
    background: var(--border-color);
}
.model-pool {
    background: var(--bg-tertiary);
    border: 2px dashed var(--accent-color);
    padding: 2rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    color: var(--accent-color);
}

/* Benchmarks Page Styles */
.benchmarks-page .features-hero {
    padding-bottom: 2rem;
}
.benchmark-section {
    padding: 5rem 5%;
    max-width: 900px;
    margin: 0 auto;
}
.benchmark-section.reverse-bg {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
    margin-bottom: 4rem;
}
.chart-container {
    margin-top: 3rem;
}
.chart-item {
    margin-bottom: 2rem;
}
.mt-4 {
    margin-top: 3rem;
}
.chart-label {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.chart-value {
    font-family: var(--font-mono);
    color: #ef4444;
}
.highlight-value {
    color: #10b981;
    font-size: 1.3rem;
}
.chart-bar-bg {
    width: 100%;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.chart-bar {
    height: 100%;
    border-radius: 15px;
    transform-origin: left;
    animation: scaleX 1.5s ease-out forwards;
}
.fill-mixtral { background: #ef4444; }
.fill-lemoe { background: #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }

.chart-footnote {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}
.chart-footnote a {
    color: var(--accent-color);
    text-decoration: none;
}

@keyframes scaleX {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* Latency CSS */
.latency-circle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}
.latency-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 30px var(--accent-glow);
    animation: pulseCircle 2s infinite alternate;
}
.time-value {
    font-size: 3rem;
    font-weight: 900;
    font-family: var(--font-mono);
    color: white;
}
.time-value small {
    font-size: 1.2rem;
    color: var(--text-secondary);
}
.time-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}
.latency-breakdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.breakdown-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-align: center;
}
.b-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.b-time {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: var(--font-mono);
    color: #3b82f6;
}

@keyframes pulseCircle {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* FAQ Styles */
.faq-section {
    padding: 6rem 5%;
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}
.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    user-select: none;
    transition: background 0.3s;
}
.faq-question:hover {
    background: var(--bg-tertiary);
}
.faq-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background: var(--bg-main);
}
.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
}
.faq-item.active .faq-answer {
    max-height: 300px;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
/* Configurator Styles */
.expert-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.expert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.expert-card-header h4 {
    margin: 0;
    color: var(--accent-color);
}
.btn-remove-expert {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
}
.btn-remove-expert:hover {
    color: #f87171;
}

.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px;
    font-family: var(--font-main);
}
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-glow);
}
.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.radio-label input[type="radio"] {
    accent-color: var(--accent-color);
}

.backend-specific-fields {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    border-left: 3px solid var(--accent-color);
}
/* Architecture Page Specific Styles */
.architecture-page .features-hero {
    padding-bottom: 4rem;
}

/* Phase 1: Pipeline Animation */
.pipeline-anim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.pipe-node {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    min-width: 120px;
}
.pipe-node .code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.5rem;
}
.filter-node {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}
.clean-node {
    border-color: #10b981;
}
.pipe-line {
    flex-grow: 1;
    height: 2px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}
.flow-particle {
    position: absolute;
    top: -2px;
    left: -10px;
    width: 20px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: flowRightFast 1.5s infinite linear;
}
.flow-particle.p2 {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation-delay: 0.75s;
}

@keyframes flowRightFast {
    0% { left: -20px; opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Phase 2: Math Animation */
.math-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}
.math-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.math-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}
.math-box small {
    display: block;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: normal;
}
.math-op {
    font-size: 2rem;
    color: var(--accent-color);
}
.math-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent-color);
    font-weight: 800;
}
.math-arrow span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.softmax-gauge {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    width: 250px;
    box-shadow: 0 0 20px var(--accent-glow);
}
.winner-label {
    font-family: var(--font-mono);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.gauge-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-main);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}
.gauge-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    animation: fillGauge 2s forwards ease-out;
}
.gauge-pct {
    position: absolute;
    top: -2px;
    right: 5px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
    opacity: 0;
    animation: showPct 2s forwards ease-out;
}

@keyframes fillGauge {
    0% { width: 0%; }
    100% { width: 98.5%; }
}
@keyframes showPct {
    0%, 50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Phase 3: RAM Animation */
.ram-anim {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
}
.ram-controller {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-color);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}
.ram-slots {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}
.ram-slot {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.slot-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.model-name {
    font-family: var(--font-mono);
    font-weight: bold;
}
.empty-slot {
    opacity: 0.5;
    border-style: dashed;
}
.loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
}
.loading-fill {
    height: 100%;
    background: #10b981;
    width: 0%;
}
.active-slot {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.active-slot .loading-fill {
    animation: loadingRam 3s infinite;
}

@keyframes loadingRam {
    0% { width: 0%; }
    50%, 100% { width: 100%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        position: static !important;
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
    .nav-links {
        margin-top: 0.75rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem;
        width: 100%;
    }
    .nav-links::-webkit-scrollbar {
        height: 3px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
        border: none;
    }
    .nav-links a:not(.btn-primary) {
        font-size: 0.95rem;
        padding: 0;
        background: transparent;
        border: none;
        white-space: nowrap;
    }
    .nav-links .btn-primary {
        display: none;
    }
    h1 {
        font-size: 2.2rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    .hero {
        padding-top: 8rem;
    }
    .configurator-section {
        flex-direction: column;
    }
    .config-controls, .config-preview {
        min-width: 100% !important;
    }
    .benchmark-section {
        flex-direction: column;
        gap: 2rem;
    }
    .benchmark-content {
        padding-right: 0;
    }
    .diagram-container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: -60px; /* Hidden by default */
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.2s, background-color 0.2s;
    z-index: 999;
}
.btn-back-to-top:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}
.btn-back-to-top.visible {
    bottom: 30px;
}

/* CSS Tooltips */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.tooltip-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #000;
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1000;
    pointer-events: none;
}
/* Triangle for tooltip */
.tooltip-wrapper::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 1001;
    pointer-events: none;
}
.tooltip-wrapper:hover::after,
.tooltip-wrapper:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}
.tooltip-wrapper:focus-within::after,
.tooltip-wrapper:focus-within::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Fade-In Animations on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered delay for elements that appear together */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
