/*
  Palette and shapes deliberately match the installer itself: flat surfaces, one accent,
  no gradients. Both themes follow the visitor's system setting.
*/

:root {
    color-scheme: dark;

    --bg: #17181c;
    --bg-raised: #1e1f24;
    --surface: #212228;
    --surface-hover: #31333b;
    --stroke: #2e3037;
    --stroke-strong: #42454f;

    --text: #f3f4f6;
    --text-dim: #afb2bc;
    --text-muted: #7e828d;

    --accent: #4c8dff;
    --accent-hover: #6ba1ff;
    --on-accent: #ffffff;

    --success: #4fc98a;

    --radius-lg: 14px;
    --radius: 8px;
    --radius-sm: 6px;

    --wrap: 1080px;
}

@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;

        --bg: #fcfcfd;
        --bg-raised: #f2f3f5;
        --surface: #ffffff;
        --surface-hover: #edeef1;
        --stroke: #e2e3e8;
        --stroke-strong: #c4c7d0;

        --text: #1a1b1f;
        --text-dim: #585b65;
        --text-muted: #8a8d97;

        --accent: #2563eb;
        --accent-hover: #1d4fd8;
        --on-accent: #ffffff;

        --success: #1e9e62;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    font-family: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", Inter, system-ui, sans-serif;
    line-height: 1.2;
    margin: 0;
}

code, pre {
    font-family: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, monospace;
    font-size: 13.5px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------------------------------------------------------------ header */

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

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 62px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.nav-links {
    display: flex;
    gap: 24px;
    margin-left: auto;
    color: var(--text-dim);
    font-size: 14.5px;
}

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

.nav .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    border-color: var(--stroke-strong);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-hover);
}

/* ------------------------------------------------------------------ hero */

.hero {
    padding: 84px 0 56px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-dim);
    font-size: 13px;
}

.badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.hero h1 {
    margin: 22px 0 0;
    font-size: clamp(38px, 6vw, 60px);
    letter-spacing: -0.025em;
}

.hero p.lead {
    margin: 20px 0 0;
    max-width: 660px;
    font-size: 18px;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    align-items: center;
}

.hero-note {
    color: var(--text-muted);
    font-size: 13.5px;
}

.shot {
    margin-top: 52px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-raised);
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
}

.shot-caption {
    padding: 12px 18px;
    border-top: 1px solid var(--stroke);
    color: var(--text-muted);
    font-size: 13px;
}

/* ------------------------------------------------------------------ sections */

section {
    padding: 72px 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 40px;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-head h2 {
    margin-top: 10px;
    font-size: clamp(26px, 3.4vw, 34px);
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 14px 0 0;
    color: var(--text-dim);
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.card h3 {
    font-size: 17px;
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    color: var(--text-dim);
    font-size: 14.5px;
}

.card .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
}

.card .icon svg {
    width: 19px;
    height: 19px;
}

/* ------------------------------------------------------------------ steps */

.steps {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.step {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.step:last-child {
    margin-bottom: 0;
}

.step .num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.step p {
    margin: 0;
    color: var(--text-dim);
    font-size: 14.5px;
}

/* ------------------------------------------------------------------ downloads */

.downloads {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.download {
    display: flex;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--surface);
}

.download.primary {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--stroke));
}

.download h3 {
    font-size: 18px;
}

.download p {
    margin: 10px 0 0;
    color: var(--text-dim);
    font-size: 14.5px;
    flex: 1;
}

.download .meta {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 13px;
}

.download .btn {
    margin-top: 18px;
    width: 100%;
}

.hint {
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* ------------------------------------------------------------------ code */

pre {
    margin: 0;
    padding: 18px 20px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--bg-raised);
    color: var(--text-dim);
    overflow-x: auto;
    line-height: 1.7;
}

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

pre .comment {
    color: var(--text-muted);
}

/* ------------------------------------------------------------------ table */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

th, td {
    text-align: left;
    padding: 12px 18px;
    border-bottom: 1px solid var(--stroke);
}

th {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

td code {
    color: var(--accent);
}

/* ------------------------------------------------------------------ gallery */

.gallery {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.gallery figure {
    margin: 0;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-raised);
}

.gallery img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery figcaption {
    padding: 11px 16px;
    border-top: 1px solid var(--stroke);
    color: var(--text-muted);
    font-size: 13px;
}

/* ------------------------------------------------------------------ footer */

footer {
    padding: 40px 0 56px;
    border-top: 1px solid var(--stroke);
    color: var(--text-muted);
    font-size: 14px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

/* ------------------------------------------------------------------ small screens */

@media (max-width: 860px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 56px;
    }
}
