/* ── Reset & design tokens ────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0d1117;
    --bg-surface: #161b22;
    --bg-card: #1c2128;
    --bg-card-alt: #21262d;
    --border: #30363d;
    --border-mute: #21262d;
    --text: #f5f9ff;
    --text-muted: #c2cdd8;
    --text-dim: #a4b0bb;
    --accent: #58c4dc;
    --accent-dim: #1f4f5c;
    --accent-glow: rgba(88, 196, 220, 0.15);
    --green: #3fb950;
    --green-dim: rgba(63, 185, 80, 0.12);
    --purple: #bc8cff;
    --purple-dim: rgba(188, 140, 255, 0.12);
    --orange: #ffa657;
    --orange-dim: rgba(255, 166, 87, 0.12);
    --red: #f85149;
    --red-dim: rgba(248, 81, 73, 0.12);
    --yellow: #e3b341;
    --yellow-dim: rgba(227, 179, 65, 0.12);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-w: 1160px;
    --nav-h: 64px;
}

html {
    scroll-behavior: smooth;
}

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

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

a:hover {
    text-decoration: underline;
}

/* ── Navigation ───────────────────────────────────────────────────────── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(13, 17, 23, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-logo {
    height: 40px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.hero-logo {
    height: 96px;
    width: auto;
    margin-bottom: 1.75rem;
    display: block;
}

.footer-logo {
    height: 28px;
    width: auto;
    display: block;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-card);
    text-decoration: none;
}

.nav-cta {
    background: var(--accent) !important;
    color: #0d1117 !important;
    font-weight: 600 !important;
    padding: 0.4rem 1rem !important;
    border-radius: var(--radius-sm);
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
}

.nav-icon-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    transition: color 0.15s;
    padding: 0.25rem;
}

.nav-icon-link:hover {
    color: var(--text);
    text-decoration: none;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-cta:hover {
    background: #7dd6e8 !important;
    color: #0d1117 !important;
}

/* ── Layout utils ─────────────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent);
    color: #0d1117;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.btn-primary:hover {
    background: #7dd6e8;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.15s, background 0.15s;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    text-decoration: none;
}

/* ── Install block ────────────────────────────────────────────────────── */
.install-block {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.install-block .prompt {
    color: var(--accent);
    user-select: none;
}

.install-block .cmd {
    color: var(--text);
}

.install-block button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
    transition: color 0.15s;
}

.install-block button:hover {
    color: var(--accent);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 50%, rgba(88, 196, 220, 0.09), transparent),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(188, 140, 255, 0.07), transparent),
        radial-gradient(ellipse 40% 40% at 90% 85%, rgba(63, 185, 80, 0.05), transparent);
    pointer-events: none;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-inner .hero-copy {
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-dim);
    border: 1px solid rgba(88, 196, 220, 0.3);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1.75rem;
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.hero h1 .accent,
.accent {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 620px;
}

.hero-list {
    list-style: none;
    margin: 0 auto 2.5rem auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    width: fit-content;
}

.hero-list li {
    font-size: 1.05rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-list li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 800;
}

.hero-list li strong {
    color: var(--text);
    font-weight: 600;
}

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

/* ── Scan demo section ───────────────────────────────────────────────── */
.scan-demo {
    padding: 4rem 0 5rem;
    border-bottom: 1px solid var(--border);
}

.scan-demo-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1.75rem;
    justify-content: center;
}

.scan-demo-label::before,
.scan-demo-label::after {
    content: '';
    height: 1px;
    flex: 1;
    max-width: 120px;
    background: linear-gradient(to right, transparent, rgba(88, 196, 220, 0.35));
}

.scan-demo-label::after {
    background: linear-gradient(to left, transparent, rgba(88, 196, 220, 0.35));
}

.scan-demo-terminal {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.scan-demo-terminal .glow-ring {
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg, rgba(88, 196, 220, 0.22) 0%, rgba(188, 140, 255, 0.13) 50%, transparent 100%);
    z-index: 0;
    filter: blur(1px);
}

.scan-demo-terminal .code-window {
    position: relative;
    z-index: 1;
}

/* ── Stats row ────────────────────────────────────────────────────────── */
.stats-band {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 2.25rem 0;
    gap: 2rem;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* ── What is Xelo ─────────────────────────────────────────────────────── */
.what-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.what-text p {
    margin-bottom: 1.1rem;
}

.what-text .lead {
    font-size: 1.12rem;
    color: var(--text);
    font-weight: 400;
}

.pipeline-steps {
    display: flex;
    flex-direction: column;
}

.pipeline-step {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-mute);
}

.pipeline-step:last-child {
    border-bottom: none;
}

.step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid rgba(88, 196, 220, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 0.1rem;
}

.step-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.step-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Component cards ──────────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card {
    background: var(--bg-card);
    padding: 1.5rem;
    transition: background 0.15s;
}

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

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── Vulnerability section ────────────────────────────────────────────── */
.vuln-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.vuln-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.vuln-header-text {
    flex: 1;
    min-width: 260px;
}

.vuln-header-text h2 {
    margin-bottom: 0.6rem;
}

.vuln-header-text p {
    max-width: 480px;
}

.vuln-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.vuln-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.vuln-stat-pill strong {
    color: var(--text);
}

.rule-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.rule-cat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    transition: border-color 0.15s, background 0.15s;
    cursor: default;
}

.rule-cat:hover {
    background: var(--bg-card-alt);
    border-color: var(--accent);
}

.rule-cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rule-cat-icon {
    font-size: 1.15rem;
}

.rule-count-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.sev-critical {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.sev-high {
    background: rgba(255, 166, 87, 0.15);
    color: #ffa657;
}

.sev-medium {
    background: rgba(227, 179, 65, 0.15);
    color: #e3b341;
}

.sev-low {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.rule-cat h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.rule-cat p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.45;
}

.vuln-framework-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.vuln-framework-note strong {
    color: var(--text);
}

/* ── For whom ─────────────────────────────────────────────────────────── */
.personas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

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

.persona-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.persona-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.persona-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.persona-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.persona-card ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.persona-card ul li::before {
    content: '›';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Code window ──────────────────────────────────────────────────────── */
.code-window {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

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

.dot-red {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
}

.dot-yellow {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffbd2e;
}

.dot-green {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28c841;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.83rem;
    line-height: 1.75;
    white-space: pre;
}

.hl-comment {
    color: var(--text-dim);
}

.hl-cmd {
    color: var(--text);
}

.hl-flag {
    color: var(--accent);
}

.hl-string {
    color: var(--green);
}

.hl-prompt {
    color: var(--text-dim);
    user-select: none;
}

.hl-kw {
    color: var(--purple);
}

.hl-num {
    color: var(--orange);
}

.hl-ok {
    color: var(--green);
    font-weight: 600;
}

.hl-warn {
    color: var(--orange);
}

.hl-crit {
    color: var(--red);
    font-weight: 600;
}

/* ── Quickstart tabs ──────────────────────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 1rem;
    font-family: var(--font);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-btn:hover {
    color: var(--text-muted);
}

.tab-btn.active:hover {
    color: var(--accent);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ── Plugins grid ─────────────────────────────────────────────────────── */
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

.plugin-chip {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    transition: border-color 0.15s;
}

.plugin-chip:hover {
    border-color: var(--accent);
}

.plugin-name {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 500;
}

.plugin-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.plugin-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-top: 0.2rem;
    width: fit-content;
}

.badge-offline {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
}

.badge-network {
    background: rgba(255, 166, 87, 0.15);
    color: var(--orange);
}

/* ── Frameworks ───────────────────────────────────────────────────────── */
.fw-section {
    margin-bottom: 2rem;
}

.fw-section h3 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.fw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fw-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
}

.fw-chip:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ── CTA section ──────────────────────────────────────────────────────── */
.cta-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-inner h2 {
    margin-bottom: 0.75rem;
}

.cta-inner p {
    margin-bottom: 2rem;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

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

.footer-links a {
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: color 0.15s;
}

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

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

/* ── Band helpers ─────────────────────────────────────────────────────── */
.band-surface {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ── Quickstart split ─────────────────────────────────────────────────── */
.qs-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-inner {
        gap: 2rem;
    }

    .what-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .qs-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .vuln-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .vuln-meta {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .stats-row {
        gap: 1.5rem;
    }

    .hero {
        padding: 4.5rem 0 3.5rem;
    }
}