:root {
    --bg: #08090a;
    --bg-card: #0f1114;
    --bg-card-hover: #141619;
    --bg-terminal: #0a0d11;
    --border: #1a1d23;
    --border-hover: #2a2d35;
    --border-accent: #f59e0b30;
    --text: #d4d4d8;
    --text-dim: #52525b;
    --text-muted: #71717a;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-glow: #f59e0b15;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
    --cyan: #06b6d4;
    --purple: #a78bfa;
    --bright: #fafafa;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', 'Space Grotesk', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #fb923c 50%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav */
.nav {
    position: fixed; top: 0; width: 100%;
    background: rgba(8, 9, 10, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100; padding: 0 2rem;
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; height: 52px;
}
.nav-logo {
    font-family: var(--mono); font-weight: 700; font-size: 1rem;
    color: var(--accent) !important; display: flex; align-items: center; gap: 0.5rem;
}
.dragonfly-icon, .dragonfly-icon-sm { color: var(--accent); }
.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 0.8rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-github {
    display: flex; align-items: center; gap: 0.35rem;
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 0.3rem 0.65rem; border-radius: 6px; font-size: 0.75rem !important;
}
.nav-github:hover { border-color: var(--border-hover); }

/* Hero */
.hero {
    position: relative; z-index: 1;
    text-align: center; padding: 9rem 2rem 4rem; max-width: 820px; margin: 0 auto;
}
.hero-badge {
    display: inline-block; font-family: var(--mono); font-size: 0.65rem;
    letter-spacing: 0.15em; color: var(--accent); border: 1px solid var(--accent);
    padding: 0.25rem 0.75rem; border-radius: 99px; margin-bottom: 1.75rem;
}
.hero h1 {
    font-size: 3.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem;
    color: var(--bright);
}
.hero-sub { font-family: var(--mono); font-size: 1rem; color: var(--accent); margin-bottom: 0.75rem; }
.hero-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.7; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }

.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600;
    font-size: 0.85rem; transition: all 0.2s; font-family: var(--sans); border: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); color: #000; transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-hover); color: var(--bright); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

.hero-stats {
    display: flex; justify-content: center; gap: 0; margin-bottom: 1.5rem;
    font-family: var(--mono);
}
.stat { display: flex; flex-direction: column; align-items: center; padding: 0 1.5rem; }
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--bright); }
.stat-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-divider { width: 1px; background: var(--border); margin: 0.25rem 0; }

.hero-providers { font-family: var(--mono); font-size: 0.7rem; color: var(--text-dim); }
.hero-providers span { color: var(--text-muted); }
.hero-providers .sep { color: var(--border); margin: 0 0.25rem; }

/* Sections */
.section { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 4.5rem 2rem; }
.section-title { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; color: var(--bright); }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; font-size: 0.95rem; }

/* Mode Cards */
.modes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.mode-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 2rem; transition: border-color 0.3s;
}
.mode-card:hover { border-color: var(--border-hover); }
.mode-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.mode-tag {
    font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.12em; color: var(--green); background: #22c55e15;
    padding: 0.2rem 0.5rem; border-radius: 4px; border: 1px solid #22c55e30;
}
.mode-tag.scenario { color: var(--purple); background: #a78bfa15; border-color: #a78bfa30; }
.mode-card h3 { font-size: 1.15rem; }
.mode-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.terminal-mini {
    background: var(--bg-terminal); border: 1px solid var(--border); border-radius: 8px;
    padding: 1rem; overflow-x: auto;
}
.terminal-mini pre { font-family: var(--mono); font-size: 0.72rem; line-height: 1.65; color: var(--text); }

/* Analysis Grid */
.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.analysis-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.5rem; transition: all 0.3s;
}
.analysis-card:hover { border-color: var(--accent); background: var(--bg-card-hover); transform: translateY(-2px); }
.analysis-icon {
    margin-bottom: 0.75rem; display: block;
    color: var(--accent);
}
.analysis-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--bright); }
.analysis-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.75rem; }
.analysis-card code {
    font-family: var(--mono); font-size: 0.7rem; display: block;
    background: #0a0d11; padding: 0.4rem 0.6rem; border-radius: 4px;
    color: var(--green); border: 1px solid #1a1d23;
}

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.5rem; transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-hover); }
.feature-icon { color: var(--accent); margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--bright); }
.feature-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Agents */
.agents-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 2rem; }
.agent-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 1rem; display: flex; flex-direction: column; gap: 0.3rem; transition: border-color 0.2s;
}
.agent-card:hover { border-color: var(--accent); }
.agent-icon { color: var(--accent); display: flex; align-items: center; }
.agent-card strong { font-size: 0.82rem; color: var(--bright); }
.agent-focus { font-size: 0.68rem; color: var(--text-dim); font-family: var(--mono); }

/* Data */
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.data-col {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem;
}
.data-col h4 {
    font-size: 0.85rem; font-weight: 600; margin-bottom: 0.6rem; color: var(--accent);
    display: flex; align-items: center; gap: 0.4rem;
}
.data-col ul { list-style: none; }
.data-col li {
    font-size: 0.75rem; color: var(--text-muted); padding: 0.2rem 0;
    border-bottom: 1px solid #111318; font-family: var(--mono);
}
.data-col li:last-child { border-bottom: none; }

/* References */
.references-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.ref-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.25rem; transition: border-color 0.2s;
}
.ref-card:hover { border-color: var(--accent); }
.ref-tag {
    font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.1em; color: var(--cyan); background: #06b6d415;
    padding: 0.15rem 0.45rem; border-radius: 3px; border: 1px solid #06b6d430;
    display: inline-block; margin-bottom: 0.5rem;
}
.ref-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* Terminal */
.terminal {
    background: var(--bg-terminal); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; max-width: 680px; margin: 1.5rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.terminal-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 0.85rem; background: #0f1218; border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.terminal-title { font-family: var(--mono); font-size: 0.65rem; color: var(--text-dim); }
.terminal-body { padding: 1rem; overflow-x: auto; }
.terminal-body pre { font-family: var(--mono); font-size: 0.75rem; line-height: 1.7; color: var(--text); }

.t-prompt { color: var(--green); } .t-cmd { color: var(--bright); font-weight: 600; }
.t-str { color: var(--accent); } .t-flag { color: var(--cyan); } .t-dim { color: var(--text-dim); }
.t-green { color: var(--green); } .t-red { color: var(--red); } .t-yellow { color: var(--yellow); }
.t-cyan { color: var(--cyan); } .t-bright { color: var(--bright); font-weight: 700; }
.t-comment { color: #3a3a3a; }

/* CTA */
.cta-section { text-align: center; padding: 4rem 2rem; border-top: 1px solid var(--border); }
.cta-section h2 { font-size: 1.8rem; margin-bottom: 0.5rem; color: var(--bright); }
.cta-section p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 1.25rem 2rem; position: relative; z-index: 1; }
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--text-dim); font-family: var(--mono);
}
.footer-logo { display: flex; align-items: center; gap: 0.4rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .modes-grid, .features-grid, .data-grid, .analysis-grid, .references-grid { grid-template-columns: 1fr; }
    .agents-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { flex-wrap: wrap; gap: 0.5rem; }
    .stat-divider { display: none; }
    .nav-links a:not(.nav-github) { display: none; }
    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .agents-grid { grid-template-columns: 1fr; }
}
