/* The website: near-black and neutral, one accent colour. The accent is set by data-accent on <html> (site.js:
   SITE.accent, or ?accent=teal to preview); everything coloured uses --accent, --accent-hi or --accent-2. */

:root {
    --bg: #08090b;
    --bg-2: #0d0f12;
    --panel: #121418;
    --panel-2: #181b20;
    --line: #24282f;
    --term: #050607;
    --text: #e8e9ec;
    --muted: #9a9fa9;
    --bad: #ff5d6c;
    --warn: #ffb547;
    --ok: #4cd68a;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 10px;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { color: var(--accent-2); }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--panel-2); color: var(--text); }

/* a faint blueprint grid, fading out downwards */
.grid-bg {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--accent-hi) 7%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent-hi) 7%, transparent) 1px, transparent 1px),
        radial-gradient(ellipse at 70% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

/* ---------- nav ---------- */

.site-nav {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px clamp(16px, 5vw, 64px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.brand:hover { text-decoration: none; }
.brand.small { font-size: 15px; }

.site-nav nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 14px; }
.site-nav nav a { color: var(--muted); }
.site-nav nav a:hover { color: var(--text); text-decoration: none; }
.site-nav .nav-gh { color: var(--text); }

/* ---------- hero ---------- */

main { padding: 0 clamp(16px, 5vw, 64px); }

.hero {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
    max-width: 1200px; margin: 0 auto; padding: clamp(48px, 9vw, 110px) 0 56px;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
    font: 13px var(--mono); color: var(--accent-2); text-transform: lowercase;
    padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--accent-2) 6%, transparent);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

h1 { font-size: clamp(32px, 4.3vw, 52px); line-height: 1.08; margin: 0 0 20px; letter-spacing: -1px; }
h1 .accent {
    background: linear-gradient(90deg, var(--accent-hi), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.lead.small { font-size: 17px; }
.lead em { color: var(--text); font-style: normal; border-bottom: 1px dashed var(--accent-2); }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 15px;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn.ghost { color: var(--text); border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.btn.ghost:hover { border-color: var(--accent-hi); }

.fine { font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* ---------- terminal ---------- */

.terminal {
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    background: var(--term); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--accent-hi) 8%, transparent);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4566; }
.term-bar span:nth-child(1) { background: #ff5f57; } .term-bar span:nth-child(2) { background: #febc2e; } .term-bar span:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: auto; font: 12px var(--mono); font-style: normal; color: var(--muted); }

.term-body { margin: 0; padding: 18px 20px 22px; font: 13px/1.75 var(--mono); color: #cfd8ea; overflow-x: auto; }
.term-body code { color: inherit; font-size: inherit; }
.t-c { color: #6b7a9e; }
.t-p { color: var(--ok); margin-right: 6px; }
.t-bad { color: var(--bad); }
.t-ok { color: var(--ok); }
.t-note { color: #e9a3ab; } /* the detail under a ✗: the same problem, quieter */

/* lines appear one after another, like a session being typed */
.t-line { opacity: 0; animation: line-in 0.35s ease forwards; }
.t-line:nth-of-type(1) { animation-delay: 0.2s; } .t-line:nth-of-type(2) { animation-delay: 0.6s; }
.t-line:nth-of-type(3) { animation-delay: 1.2s; } .t-line:nth-of-type(4) { animation-delay: 1.6s; }
.t-line:nth-of-type(5) { animation-delay: 2.2s; } .t-line:nth-of-type(6) { animation-delay: 2.9s; }
.t-line:nth-of-type(7) { animation-delay: 3.3s; } .t-line:nth-of-type(8) { animation-delay: 3.5s; }
.t-line:nth-of-type(9) { animation-delay: 4.3s; } .t-line:nth-of-type(10) { animation-delay: 4.5s; }
.t-line:nth-of-type(11) { animation-delay: 5.2s; }
@keyframes line-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: text-bottom; margin-left: 6px; background: var(--accent-2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- screenshots ---------- */
/* real screenshots of the app (taken by tools/screenshots/run.ps1), framed as a window: the app's own colours */

.showcase { max-width: 1200px; margin: 0 auto; padding: 8px 0 40px; }
.window {
    border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fafafa;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px color-mix(in srgb, var(--accent-hi) 15%, transparent), 0 0 120px color-mix(in srgb, var(--accent) 18%, transparent);
}
.win-bar { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: #15171b; border-bottom: 1px solid var(--line); }
.win-bar > span { width: 11px; height: 11px; border-radius: 50%; background: #3a3f4a; }
.win-bar em { margin-left: 10px; font: 12px var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window a { display: block; cursor: zoom-in; }
.window img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; background: #f5f5f5; }

.theme-switch { display: flex; gap: 2px; width: max-content; margin: 20px auto 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.theme-switch button { font: 12px var(--mono); color: var(--muted); background: none; border: 0; padding: 5px 16px; border-radius: 999px; cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.caption { text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0 0; }

/* the tour: a list of screens beside the selected one */
.tour { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.tour-tabs { display: flex; flex-direction: column; gap: 8px; }
.tour-tabs button {
    text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel); color: var(--muted); font: 13.5px/1.45 var(--sans); cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.tour-tabs button b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.tour-tabs button:hover { border-color: color-mix(in srgb, var(--accent-hi) 55%, transparent); }
.tour-tabs button[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.tour-tabs button[aria-selected="true"] b { color: var(--accent-hi); }
.tour-tabs button:focus-visible, .theme-switch button:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.tour .window { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--accent-hi) 12%, transparent); }
.tour-caption { display: none; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- sections ---------- */

.section { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 0 0; }
.kicker { font: 13px var(--mono); color: var(--accent-2); margin: 0 0 10px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin: 0 0 28px; letter-spacing: -0.5px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.features article, .installs article {
    position: relative; padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    transition: border-color 0.15s, transform 0.15s;
}
.features article:hover { border-color: color-mix(in srgb, var(--accent-hi) 55%, transparent); transform: translateY(-2px); }
.features .num { font: 12px var(--mono); color: var(--accent-hi); }
.features h3, .installs h3 { margin: 8px 0 8px; font-size: 17px; }
.features p, .installs p { margin: 0; color: var(--muted); font-size: 14.5px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { position: relative; padding: 14px 16px 14px 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--muted); font-size: 15px; }
.checks li::before { content: "✓"; position: absolute; left: 16px; top: 13px; color: var(--ok); font-weight: 700; }
.checks b { color: var(--text); }

.installs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.os { display: inline-block; width: 26px; color: var(--accent-2); }
.code {
    display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 12px;
    border: 1px solid var(--line); border-radius: 6px; background: var(--term); overflow-x: auto;
}
.code code { flex: 1; white-space: nowrap; font-size: 12.5px; }
.copy {
    flex: none; font: 12px var(--mono); color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 4px; padding: 3px 8px; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--accent-hi); }

.cta-band {
    max-width: 1200px; margin: clamp(64px, 9vw, 110px) auto 0; padding: 48px 24px; text-align: center;
    border: 1px solid var(--line); border-radius: 16px;
    background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%), var(--bg-2);
}
.cta-band h2 { margin-bottom: 22px; }
.cta-band .ctas { justify-content: center; }

.site-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    max-width: 1200px; margin: 64px auto 0; padding: 24px clamp(16px, 5vw, 64px) 36px;
    border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.muted { opacity: 0.75; }

/* ---------- smaller screens ---------- */

@media (max-width: 1000px) {
    .hero, .split { grid-template-columns: minmax(0, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .installs { grid-template-columns: 1fr; }
    /* the screen list becomes a row of names above the picture, with the selected one's text under it */
    .tour { grid-template-columns: minmax(0, 1fr); }
    .tour-tabs { flex-direction: row; flex-wrap: wrap; }
    .tour-tabs button { padding: 7px 12px; }
    .tour-tabs button b { font-size: 13.5px; margin: 0; }
    .tour-tabs button span { display: none; }
    .tour-caption { display: block; }
}

@media (max-width: 620px) {
    .site-nav nav a:not(.nav-gh) { display: none; }
    .features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .t-line { animation: none; opacity: 1; }
    .cursor { animation: none; }
}

/* grid and flex children may shrink below their content (long terminal lines scroll inside the terminal instead of
   widening the page on phones) */
.hero > *, .split > *, .features > *, .installs > *, .showcase, .window, .terminal { min-width: 0; }
@media (max-width: 620px) {
    .term-body { font-size: 12px; }
    .site-footer { justify-content: flex-start; }
}

/* ---------- accents ---------- */
/* --accent: buttons, the logo's needle; --accent-hi: links, numbers; --accent-2: code, the headline's gradient end */
:root, [data-accent="amber"] { --accent: #f5a524; --accent-hi: #ffc35c; --accent-2: #ffd98f; --on-accent: #17120a; }
[data-accent="teal"] { --accent: #14b8a6; --accent-hi: #2dd4bf; --accent-2: #99f6e4; --on-accent: #04201c; }
[data-accent="violet"] { --accent: #8b5cf6; --accent-hi: #a78bfa; --accent-2: #d8b4fe; --on-accent: #fff; }
[data-accent="blue"] { --accent: #326ce5; --accent-hi: #5b8cff; --accent-2: #3ad0e0; --on-accent: #fff; }

.logo { color: var(--text); flex: none; }
.lower { text-transform: lowercase; }
