/* Ventura website - landing page and guide. Dark by default, light via the toggle (data-theme on <html>). */

:root,
[data-theme="dark"] {
    --bg: #1b1b1f;
    --bg-soft: #202127;
    --bg-card: #232429;
    --bg-code: rgba(255, 255, 255, 0.07);
    --border: #2e2f35;
    --text: #e6e6e9;
    --text-2: #a4a5ac;
    --text-3: #75767d;
    --accent: #ff8c00;
    --accent-text: #ffa53d;
    --accent-soft: rgba(255, 140, 0, 0.12);
    --accent-border: rgba(255, 140, 0, 0.35);
    --on-accent: #1d1206;
    --button: #2d2e34;
    --button-hover: #37383f;
    --glow: rgba(255, 140, 0, 0.28);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-soft: #f6f6f7;
    --bg-card: #f6f6f7;
    --bg-code: rgba(0, 0, 0, 0.05);
    --border: #e2e2e5;
    --text: #1b1b1f;
    --text-2: #5c5d65;
    --text-3: #8a8b92;
    --accent: #ff8c00;
    --accent-text: #c25f00;
    --accent-soft: rgba(255, 140, 0, 0.1);
    --accent-border: rgba(214, 110, 0, 0.35);
    --on-accent: #1d1206;
    --button: #ebebee;
    --button-hover: #e0e0e4;
    --glow: rgba(255, 140, 0, 0.22);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

/* --- Top bar --- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 64px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.docs .topbar {
    border-bottom-color: var(--border);
}

.topbar-inner {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    width: 28px;
    height: 28px;
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.nav a.active,
.nav a:hover {
    color: var(--accent-text);
    text-decoration: none;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.theme-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--button);
    cursor: pointer;
}

.theme-toggle .knob {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    display: grid;
    place-items: center;
    transition: transform 0.2s ease;
}

[data-theme="dark"] .theme-toggle .knob {
    transform: translateX(18px);
}

.theme-toggle svg {
    width: 12px;
    height: 12px;
    fill: var(--text-2);
}

.theme-toggle .sun,
[data-theme="dark"] .theme-toggle .moon {
    display: block;
}

.theme-toggle .moon,
[data-theme="dark"] .theme-toggle .sun {
    display: none;
}

.icon-link {
    display: flex;
    color: var(--text-2);
}

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

.icon-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.menu-button {
    display: none;
    border: 1px solid var(--border);
    background: var(--button);
    color: var(--text);
    border-radius: 8px;
    padding: 4px 10px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

/* --- Buttons --- */

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    background: var(--button);
    color: var(--text);
    border: 1px solid transparent;
    transition: background 0.15s ease;
}

.button:hover {
    background: var(--button-hover);
    text-decoration: none;
}

.button.primary {
    background: var(--accent);
    color: var(--on-accent);
}

.button.primary:hover {
    background: #ff9c24;
}

.button.small {
    padding: 6px 14px;
    font-size: 13px;
}

/* --- Landing page --- */

.hero {
    max-width: 1152px;
    margin: 0 auto;
    padding: 96px 32px 72px;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    align-items: center;
    gap: 48px;
}

.hero h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.hero h1 .name {
    display: block;
    background: linear-gradient(120deg, #ffb13d, #ff8c00 45%, #f05a00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .tagline {
    margin: 20px 0 32px;
    font-size: 21px;
    line-height: 1.6;
    color: var(--text-2);
    max-width: 560px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-logo {
    position: relative;
    display: grid;
    place-items: center;
}

.hero-logo::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
    filter: blur(16px);
}

.hero-logo img {
    position: relative;
    width: 300px;
    height: 300px;
    filter: drop-shadow(0 12px 32px rgba(255, 110, 0, 0.35));
}

.section {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 32px 72px;
}

.section h2 {
    font-size: 28px;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.section .lead {
    color: var(--text-2);
    margin: 0 0 28px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.card .icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    font-size: 24px;
    border-radius: 8px;
    background: var(--bg-code);
    margin-bottom: 20px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
}

.card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    counter-reset: step;
}

.steps .card h3::before {
    counter-increment: step;
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 13px;
}

.footer {
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 13px;
}

.footer-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
}

.footer a {
    color: var(--text-2);
}

/* --- Guide --- */

/* Full width, so the sidebar's background reaches the left edge - the content stays within 1440px. */
.docs-layout {
    --gutter: max(0px, (100vw - 1440px) / 2);
    display: grid;
    grid-template-columns: calc(var(--gutter) + 272px) minmax(0, 1fr) calc(var(--gutter) + 224px);
}

.sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 24px 24px 48px calc(var(--gutter) + 32px);
    border-right: 1px solid var(--border);
    background: var(--bg-soft);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar .group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar .group:last-child {
    border-bottom: none;
}

.sidebar .group-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    color: var(--text-2);
}

.sidebar a:hover {
    color: var(--text);
    text-decoration: none;
}

.sidebar a.active {
    color: var(--accent-text);
    font-weight: 500;
}

.content {
    padding: 48px 64px 96px;
    min-width: 0;
}

.content article {
    max-width: 760px;
    margin: 0 auto;
}

.content h1 {
    font-size: 34px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}

.content h2,
.content h3 {
    margin: 48px 0 16px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.content h4 {
    margin: 32px 0 12px;
    font-size: 18px;
}

.content .anchor {
    margin-left: 8px;
    color: var(--text-3);
    opacity: 0;
    font-weight: 400;
}

.content h3:hover .anchor,
.content h4:hover .anchor {
    opacity: 1;
    text-decoration: none;
}

.content p,
.content li {
    color: var(--text);
}

.content ul,
.content ol {
    padding-left: 22px;
}

.content li {
    margin: 6px 0;
}

.content li > ul,
.content li > ol {
    margin: 6px 0;
}

.content strong {
    font-weight: 650;
}

code {
    font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 0.86em;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--bg-code);
    color: var(--accent-text);
}

pre {
    padding: 16px 20px;
    border-radius: 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    padding: 0;
    background: none;
    color: var(--text);
    font-size: 13.5px;
}

.table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    line-height: 1.6;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-soft);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

td code {
    white-space: nowrap;
}

.callout {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
}

.callout p:first-child {
    margin-top: 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

.pager {
    max-width: 760px;
    margin: 64px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pager a {
    display: block;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.pager a:hover {
    border-color: var(--accent-border);
    text-decoration: none;
}

.pager .label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
}

.pager .title {
    font-weight: 600;
    font-size: 15px;
}

.pager .next {
    grid-column: 2;
    text-align: right;
}

.toc {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 48px calc(var(--gutter) + 32px) 48px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.toc-inner {
    border-left: 1px solid var(--border);
    padding-left: 16px;
}

.toc .toc-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.toc a {
    display: block;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.toc a:hover {
    color: var(--text);
    text-decoration: none;
}

.toc a.active {
    color: var(--accent-text);
}

/* --- Small screens --- */

@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .sidebar {
        padding-left: 32px;
    }

    .toc {
        display: none;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 56px;
        text-align: left;
    }

    .hero-logo {
        order: -1;
        justify-items: start;
    }

    .hero-logo img {
        width: 160px;
        height: 160px;
    }

    .hero-logo::before {
        width: 200px;
        height: 200px;
        left: -20px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .features,
    .steps {
        grid-template-columns: 1fr;
    }

    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 15;
        top: 64px;
        left: 0;
        width: 290px;
        padding-left: 24px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    }

    body.menu-open .sidebar {
        display: block;
    }

    .menu-button {
        display: inline-block;
    }

    .content {
        padding: 32px 20px 64px;
    }

    .topbar-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .nav {
        gap: 14px;
    }

    /* Too little room next to the menu - the landing page and the quickstart have the invite anyway. */
    .nav-invite {
        display: none;
    }
}
