/* Fonts */
@font-face {
    font-family: 'Helvetica Neue';
    src: url('helvetica-neue-5/HelveticaNeueLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Helvetica Neue';
    src: url('helvetica-neue-5/HelveticaNeueRoman.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Helvetica Neue';
    src: url('helvetica-neue-5/HelveticaNeueMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Helvetica Neue';
    src: url('helvetica-neue-5/HelveticaNeueBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Adelle';
    src: url('Adelle-Font/Adelle_Reg.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Adelle';
    src: url('Adelle-Font/Adelle_Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Adelle';
    src: url('Adelle-Font/Adelle_Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* Variables */
:root {
    --bg: #fff;
    --bg-secondary: #f2f2f2;
    --text: #1a1a1a;
    --text-light: #616161;
    --border: #e5e5e5;
    --accent: #0067b8;
    --red: #e81123;
    --card-bg: #fff;
    --code-bg: #f5f5f5;
    --nav-bg: #fff;
    --footer-bg: #f2f2f2;
}
body.dark {
    --bg: #1b1b1b;
    --bg-secondary: #2d2d2d;
    --text: #e8e8e8;
    --text-light: #999;
    --border: #3a3a3a;
    --accent: #4cc2ff;
    --card-bg: #2d2d2d;
    --code-bg: #333;
    --nav-bg: #1b1b1b;
    --footer-bg: #111;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.2s, color 0.2s;
}

/* NAV */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 24px;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}
.logo-svg {
    flex-shrink: 0;
}
.red-i { color: var(--red); }
.blue-db { color: var(--accent); }
.nav-sep {
    color: var(--border);
    font-weight: 300;
    font-size: 18px;
}
.nav-product {
    font-family: 'Adelle', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
}
.nav-tagline {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}
.nav-links {
    display: flex;
    gap: 24px;
}
.nav-link {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s;
}
.nav-link:hover, .nav-link.active {
    color: var(--text);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.btn-github {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.15s;
}
.btn-github:hover {
    color: var(--text);
}
.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: 12px;
    padding: 4px 12px;
    cursor: pointer;
    font-family: inherit;
}

/* MAIN */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 70vh;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* HERO */
.hero {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--border);
}
.hero-label {
    font-family: 'Adelle', 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-weight: 500;
}
.hero h1 {
    font-family: 'Adelle', 'Helvetica Neue', Arial, sans-serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    min-height: 55px;
}
/* Typewriter */
.typewriter-txt {}
.typewriter-cursor {
    color: var(--accent);
    animation: blink 0.9s infinite step-end;
    font-weight: 300;
}
@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}
.hero-sub {
    font-size: 16px;
    color: var(--text-light);
    max-width: 560px;
    margin-bottom: 32px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
    display: inline-block;
    background: none;
    color: var(--text);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
}
.btn-outline:hover { border-color: var(--text-light); }

/* Cards */
.cards-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    margin-top: 0;
}
.card {
    background: var(--card-bg);
    padding: 40px 32px;
}
.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}
.card code, .terminal-mini code {
    display: inline-block;
    background: var(--code-bg);
    padding: 6px 12px;
    font-size: 13px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
}

/* Split schema section */
.split-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}
.split-section h2, .multi-db-section h2, .benchmarks-section h2,
.ai-section h2, .why-section h2, .install-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.section-desc {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 600px;
    line-height: 1.6;
}
.section-desc code {
    background: var(--code-bg);
    padding: 2px 6px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
}
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

/* Terminal windows */
.terminal-window {
    background: var(--code-bg);
    border: 1px solid var(--border);
    overflow: hidden;
}
.terminal-window.wide {
    margin-top: 0;
}
.terminal-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    align-items: center;
}
.window-title {
    font-size: 12px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    color: var(--text-light);
}
.terminal-body {
    padding: 16px 20px;
    font-size: 13px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.55;
    overflow-x: auto;
}
.terminal-body pre {
    margin: 0;
}
.terminal-body code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
}

/* Syntax */
.kw { color: var(--accent); }
.ent { color: #e81123; }
.tp { color: #16a34a; }
body.dark .tp { color: #4ade80; }
.vl { color: #d97706; }
body.dark .vl { color: #fbbf24; }
.cm { color: var(--text-light); }
.ok { color: #16a34a; }
body.dark .ok { color: #4ade80; }
.pr { color: var(--accent); font-weight: 700; }

/* Showcase */
.showcase {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 80px;
}
.showcase-item {
    display: flex;
    align-items: center;
    gap: 60px;
}
.showcase-item.reverse {
    flex-direction: row-reverse;
}
.showcase-text {
    flex: 1;
}
.showcase-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.showcase-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}
.showcase-text code {
    background: var(--code-bg);
    padding: 2px 8px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
}
.showcase-img {
    flex: 1;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--code-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.showcase-img img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Multi-DB */
.multi-db-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}

/* Benchmarks */
.benchmarks-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}
.benchmarks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}
.bench-card {
    background: var(--card-bg);
    padding: 32px;
}
.bench-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}
.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.bar-row:last-child {
    margin-bottom: 0;
}
.bar-name {
    font-size: 13px;
    width: 70px;
    flex-shrink: 0;
    color: var(--text-light);
}
.bar-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    overflow: hidden;
}
body.dark .bar-track {
    background: #222;
}
.benchmark-bar {
    height: 100%;
    width: 0%;
    transition: width 1s ease-out;
}
.bar-kairo {
    background: var(--accent);
}
.bar-grey {
    background: #888;
}
body.dark .bar-grey {
    background: #666;
}
.bar-val {
    font-size: 12px;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
    color: var(--text-light);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}
.bar-val.accent {
    color: var(--accent);
    font-weight: 700;
}

/* AI section */
.ai-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}
.ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.ai-item {
    background: var(--card-bg);
    padding: 32px;
}
.ai-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}
.ai-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.55;
}
.ai-item code {
    background: var(--code-bg);
    padding: 2px 6px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
}

/* Why */
.why-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.why-item {
    background: var(--card-bg);
    padding: 32px;
}
.why-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}
.why-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.55;
}

/* Install */
.install-section {
    padding: 60px 0;
}
.install-section h2 {
    margin-bottom: 32px;
}
.install-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.install-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--text-light);
}
.step-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.step-desc {
    font-size: 14px;
    color: var(--text-light);
}
.step-desc a {
    color: var(--accent);
    text-decoration: none;
}
.step-desc a:hover {
    text-decoration: underline;
}
.step-desc code {
    background: var(--code-bg);
    padding: 2px 8px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
}

/* Portal (Wiki) */
.portal {
    padding: 40px 0;
}
.portal-search {
    margin-bottom: 24px;
}
.portal-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.portal-search input:focus {
    border-color: var(--accent);
}
.portal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    min-height: 400px;
}
.portal-sidebar {
    border-right: 1px solid var(--border);
    padding-right: 24px;
}
.sidebar-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 16px;
    font-weight: 600;
}
.sidebar-item {
    list-style: none;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: color 0.1s, border-color 0.1s;
}
.sidebar-item:hover {
    color: var(--text);
}
.sidebar-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}
.portal-body {
    max-width: 720px;
}
.portal-body h1 { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.portal-body h2 { font-size: 20px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.portal-body h3 { font-size: 16px; font-weight: 600; margin-top: 24px; margin-bottom: 8px; }
.portal-body p { margin-bottom: 16px; color: var(--text); font-size: 15px; line-height: 1.7; }
.portal-body ul, .portal-body ol { margin-bottom: 16px; padding-left: 24px; }
.portal-body li { margin-bottom: 6px; font-size: 14px; color: var(--text); }
.portal-body code { background: var(--code-bg); padding: 2px 6px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px; }
.portal-body pre { background: var(--code-bg); padding: 16px 20px; overflow-x: auto; margin-bottom: 20px; font-size: 13px; line-height: 1.5; font-family: 'Helvetica Neue', Arial, sans-serif; }
.portal-body pre code { background: none; padding: 0; }
.portal-placeholder { color: var(--text-light); font-size: 14px; }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    padding: 24px 0;
    margin-top: 60px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
}
.footer-right a {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
}
.footer-right a:hover { color: var(--text); }
.footer-copy {
    font-size: 12px;
    color: var(--text-light);
}

/* Mobile */
@media (max-width: 768px) {
    nav { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .nav-links { gap: 16px; }
    .nav-tagline { display: none; }
    .hero h1 { font-size: 28px; min-height: auto; }
    .hero { padding: 40px 0 32px; }
    .cards-section { grid-template-columns: 1fr; }
    .split-layout { grid-template-columns: 1fr; }
    .benchmarks-grid { grid-template-columns: 1fr; }
    .ai-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .portal-layout { grid-template-columns: 1fr; }
    .portal-sidebar { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 16px; }
    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
    .showcase-item, .showcase-item.reverse { flex-direction: column; gap: 32px; }
    .install-section h2 { text-align: left; }
}
