@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --bg: #09090b;
    --bg-card: #111113;
    --bg-elevated: #18181b;
    --bg-subtle: #27272a;
    --border: #27272a;
    --border-accent: #3f3f46;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-subtle: #71717a;
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --accent: #38bdf8;
    --accent-dark: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.12);
    --success: #4ade80;
    --warning: #fb923c;
    --gradient: linear-gradient(135deg, #818cf8 0%, #38bdf8 100%);
    --gradient-text: linear-gradient(135deg, #c7d2fe 0%, #7dd3fc 100%);
    --gradient-border: linear-gradient(135deg, #6366f1, #38bdf8);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── LAYOUT ─────────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    position: relative;
}

/* ─── HEADER & NAV ───────────────────────────────────── */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    background: var(--gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-mark svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo-version {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-subtle);
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: var(--font-mono);
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--bg-elevated) !important;
    color: var(--text) !important;
    border: 1px solid var(--border-accent) !important;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.8rem !important;
    transition: border-color 0.2s, background 0.2s !important;
}

.nav-cta:hover {
    border-color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--text) !important;
}

/* ─── HERO ───────────────────────────────────────────── */

.hero {
    padding: 5rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.hero h1 {
    font-size: clamp(2.75rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero h1 .gradient-word {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* ─── BUTTONS ────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
}

.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-color: var(--border-accent);
}

.btn-secondary:hover {
    color: var(--text);
    border-color: var(--text-subtle);
    background: var(--bg-subtle);
}

.btn-lg {
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
}

/* ─── HERO TERMINAL ──────────────────────────────────── */

.hero-terminal {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

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

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.9;
}

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-output { color: var(--text-subtle); }
.t-success { color: var(--success); }
.t-key { color: var(--primary); }
.t-val { color: var(--accent); }

/* ─── STATS BAR ──────────────────────────────────────── */

.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    padding: 2rem 0;
}

.stats-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 0.75rem 3rem;
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ─── SECTION HEADERS ────────────────────────────────── */

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.7;
}

/* ─── FEATURES ───────────────────────────────────────── */

.features {
    padding: 6rem 0;
}

.features-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.features-header .section-desc {
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.75rem;
    transition: background 0.2s;
    position: relative;
}

.feature-card:hover {
    background: var(--bg-elevated);
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-accent);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── HOW IT WORKS ───────────────────────────────────── */

.how-it-works {
    padding: 6rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.how-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.how-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.how-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 2px;
}

.how-step-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.how-step-content p {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── INSTALL TERMINAL ───────────────────────────────── */

.install-terminal {
    background: var(--bg);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

/* ─── MODULES ────────────────────────────────────────── */

.modules-section {
    padding: 6rem 0;
}

.modules-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modules-header .section-desc {
    margin: 0 auto;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s, background 0.2s;
}

.module-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-elevated);
}

.module-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
}

.module-card-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.module-card h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.module-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
}

/* ─── COMPARISON ─────────────────────────────────────── */

.comparison {
    padding: 6rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.comparison-header {
    text-align: center;
    margin-bottom: 3rem;
}

.comparison-table {
    max-width: 780px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    gap: 1rem;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-thead {
    background: var(--bg-elevated);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.comparison-thead .col-cogos {
    color: var(--primary);
}

.col-feature {
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
}

.col-cogos {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.col-llm {
    font-size: 0.8rem;
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ─── CTA ────────────────────────────────────────────── */

.cta-section {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── FOOTER ─────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    background: var(--bg-card);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-subtle);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-muted);
}

/* ─── GRADIENT DIVIDERS ──────────────────────────────── */

.gradient-line {
    height: 1px;
    background: var(--gradient);
    opacity: 0.3;
}

/* ─── INLINE CODE / COMMAND ──────────────────────────── */

.inline-cmd {
    font-family: var(--font-mono);
    font-size: 0.8em;
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    color: var(--accent);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .how-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3.5rem 0 4rem;
    }
    .feature-grid {
        grid-template-columns: 1fr;
        border-radius: var(--radius-lg);
    }
    .module-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-item {
        padding: 0.75rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 50%;
    }
    .stat-item:last-child,
    .stat-item:nth-last-child(2):nth-child(odd) {
        border-bottom: none;
    }
    .stats-inner {
        flex-wrap: wrap;
    }
    .nav-links .nav-hide {
        display: none;
    }
    .comparison-row {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        justify-content: center;
    }
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .comparison-thead {
        display: none;
    }
    .col-cogos::before {
        content: 'CogOS: ';
        color: var(--text-subtle);
        font-size: 0.7rem;
    }
    .col-llm::before {
        content: 'Single LLM: ';
        color: var(--text-subtle);
        font-size: 0.7rem;
    }
}
