/* ─── Reset & base ──────────────────────────────────────────────────────────── */

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

:root {
    --bg: #0b0d13;
    --surface: #11141c;
    --surface-2: #181c27;
    --surface-3: #1e2333;
    --border: #252c3e;
    --border-light: #2e3650;

    --text: #e0e6f0;
    --text-dim: #8c97b0;
    --text-faint: #50597a;

    --accent: #f5a623;
    --accent-dim: rgba(245, 166, 35, 0.12);
    --accent-glow: rgba(245, 166, 35, 0.25);

    --green: #3ec97e;
    --blue: #5b8dee;
    --red: #f06a6a;

    --code-bg: #080a10;
    --code-border: #1e2333;

    --font-sans:
        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
        Arial, sans-serif;
    --font-mono:
        "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", "Menlo",
        monospace;

    --nav-h: 60px;
    --radius: 10px;
    --radius-lg: 16px;

    --section-py: clamp(4rem, 9vw, 8rem);
    --inner-w: 1120px;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--border) var(--bg);
    scrollbar-width: thin;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

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

code,
kbd {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-3);
    border: 1px solid var(--border);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    color: var(--text);
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ─── Layout helpers ────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--inner-w);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

section {
    padding: var(--section-py) 0;
}

section:nth-child(odd) {
    background: var(--surface);
}

/* ─── Nav ───────────────────────────────────────────────────────────────────── */

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(11, 13, 19, 0.85);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
    max-width: var(--inner-w);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.nav-logo:hover {
    text-decoration: none;
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    transition:
        color 0.15s,
        background 0.15s;
}
.nav-links a:hover {
    color: var(--text);
    background: var(--surface-2);
    text-decoration: none;
}

.nav-gh {
    color: var(--text) !important;
    background: var(--surface-3) !important;
    border: 1px solid var(--border-light) !important;
    font-weight: 500;
}
.nav-gh:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: var(--accent-dim) !important;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */

#hero {
    padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 9vw, 7rem);
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: "";
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(
        ellipse at center,
        rgba(245, 166, 35, 0.07) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.hero-text {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    border-radius: 100px;
    padding: 0.3em 0.9em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 600px;
    margin: 0 auto 2.25rem;
}

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

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none !important;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #ffc04a;
    border-color: #ffc04a;
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-light);
}
.btn-secondary:hover {
    border-color: var(--text-dim);
    background: var(--surface-2);
}

/* ─── Hero demo ─────────────────────────────────────────────────────────────── */

.hero-demo {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 860px;
    margin: 0 auto;
}

.demo-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 300;
}

/* ─── Code window ───────────────────────────────────────────────────────────── */

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
}

.code-window-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--code-border);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-red {
    background: #ff5f56;
}
.dot-yellow {
    background: #ffbd2e;
}
.dot-green {
    background: #27c93f;
}

.code-window-title {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-left: 0.25rem;
    letter-spacing: 0.02em;
}

.code-window pre {
    padding: 1rem 1.25rem;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
}

.code-window code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
}

/* ─── Syntax colours (used in code-window) ─────────────────────────────────── */

.tok-comment {
    color: var(--text-faint);
    font-style: italic;
}
.tok-directive {
    color: var(--accent);
}
.tok-key {
    color: var(--blue);
}
.tok-string {
    color: var(--green);
}
.tok-prompt {
    color: var(--accent);
    user-select: none;
}
.tok-muted {
    color: var(--text-dim);
}
.tok-success {
    color: var(--green);
}
.tok-output {
    color: var(--text);
}

/* ─── Section headings ──────────────────────────────────────────────────────── */

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text);
    margin-bottom: 0.75rem;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 580px;
}

.section-header {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ─── How it works ──────────────────────────────────────────────────────────── */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 3rem;
}

.step {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

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

.step p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.step-connector {
    display: none;
}

/* ─── Install / get-started ─────────────────────────────────────────────────── */

.start-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 720px;
}

.start-step {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 1.25rem;
    align-items: start;
}

.start-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border-light);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.start-step h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.start-step .note {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}
.start-step .note code {
    font-size: 0.82rem;
}

/* ─── Inline code block ─────────────────────────────────────────────────────── */

.cb {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.7;
    overflow: hidden;
}

.cb pre {
    padding: 0.9rem 1.2rem;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
}

.cb code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
}

/* ─── Language / file format ────────────────────────────────────────────────── */

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.lang-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lang-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-ext {
    font-size: 2.25rem;
    line-height: 1;
}

.lang-card-head h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.lang-card-head p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.format-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.format-tag {
    font-family: var(--font-mono);
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-comment {
    background: var(--surface-3);
    color: var(--text-faint);
    border: 1px solid var(--border);
}
.tag-directive {
    background: rgba(245, 166, 35, 0.12);
    color: var(--accent);
    border: 1px solid rgba(245, 166, 35, 0.25);
}
.tag-instruction {
    background: rgba(62, 201, 126, 0.1);
    color: var(--green);
    border: 1px solid rgba(62, 201, 126, 0.25);
}

.format-desc {
    color: var(--text-dim);
}

/* ─── Examples / tabs ───────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    margin-bottom: 2rem;
}

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

.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

.example-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
}

.example-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    padding-top: 2.5rem;
    text-align: center;
}

.file-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

/* ─── CLI reference ─────────────────────────────────────────────────────────── */

.cli-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.cli-table tr {
    border-bottom: 1px solid var(--border);
}
.cli-table tr:last-child {
    border-bottom: none;
}

.cli-table td {
    padding: 0.9rem 1rem;
    vertical-align: top;
}

.cli-table td:first-child {
    white-space: nowrap;
    width: 1%;
}

.cli-table td code {
    font-size: 0.85rem;
    white-space: nowrap;
}

.cli-table td:last-child {
    color: var(--text-dim);
    font-size: 0.92rem;
    padding-left: 2rem;
}
.cli-table td:last-child code {
    font-size: 0.82rem;
}

.cli-table tr:hover td {
    background: var(--surface-2);
}

/* ─── Providers ─────────────────────────────────────────────────────────────── */

.providers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.provider-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s;
}
.provider-card:hover {
    border-color: var(--border-light);
}

.provider-card h3 {
    font-size: 1rem;
}

.provider-card .sub {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: -0.6rem;
}

/* ─── Yolo callout ──────────────────────────────────────────────────────────── */

.yolo-card {
    background: linear-gradient(
        135deg,
        var(--surface-2) 0%,
        rgba(245, 166, 35, 0.05) 100%
    );
    border: 1px solid var(--accent-glow);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.yolo-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.yolo-text p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-dim);
}

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

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

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .steps {
        grid-template-columns: 1fr;
    }
    .lang-grid {
        grid-template-columns: 1fr;
    }
    .providers-grid {
        grid-template-columns: 1fr;
    }
    .example-split {
        grid-template-columns: 1fr;
    }
    .example-arrow {
        padding-top: 0;
        transform: rotate(90deg);
        display: none;
    }
    .hero-demo {
        grid-template-columns: 1fr;
    }
    .demo-arrow {
        display: none;
    }
    .yolo-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .cli-table td:last-child {
        padding-left: 1rem;
    }
    .start-step {
        grid-template-columns: 1fr;
    }
    .start-num {
        display: none;
    }
}
