/* NexLauncher site. Colours are the nexventures.net tokens the app uses (Nexventures Ember).
   Shape rule: cards 22px, interactive controls are full pills, inputs 14px. */

@font-face {
  font-family: "Geist";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --fg: #0b0d12;
  --fg-2: #454c5a;
  --fg-3: #5f6778;
  --line: #e2e3e8;
  --accent: #cf3f0e;
  --accent-hover: #a8320b;
  --accent-soft: #fff0e8;
  --accent-ink: #a8320b;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgb(30 22 18 / 0.05), 0 18px 48px -18px rgb(120 50 20 / 0.22);
  --shot-shadow: 0 40px 90px -40px rgb(90 40 15 / 0.45), 0 12px 30px -12px rgb(30 20 15 / 0.18);
  --radius-card: 22px;
  --radius-input: 14px;
  --max: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #07080c;
    --surface: #0f1117;
    --surface-2: #151822;
    --fg: #f3f4f7;
    --fg-2: #aeb4c2;
    --fg-3: #8c93a4;
    --line: #232735;
    --accent: #f0561f;
    --accent-hover: #ff7440;
    --accent-soft: #2a140c;
    --accent-ink: #ff8a5c;
    --on-accent: #120805;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 24px 60px -30px rgb(0 0 0 / 0.8);
    --shot-shadow: 0 40px 100px -40px rgb(240 86 31 / 0.25), 0 20px 50px -20px rgb(0 0 0 / 0.9);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.illo img, .process-step img, .chapter-side img { width: 100%; height: auto; }
.process-step picture { width: 140px; }
.chapter-side picture { width: 120px; }
a { color: inherit; }
code, pre, kbd { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) {
  text-decoration: none; color: var(--fg-2); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--fg); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--fg); font-size: 26px; padding: 8px; border-radius: 999px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px; background: var(--canvas); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap;
  font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: -0.005em;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn i { font-size: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--fg) 25%, var(--line)); }
.btn-sm { padding: 9px 16px; font-size: 14.5px; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.05; font-weight: 680; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.2; font-weight: 640; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--fg-2); max-width: 46ch; }
.muted { color: var(--fg-2); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { max-width: 640px; display: grid; gap: 16px; margin-bottom: 48px; }

/* ---------- Screenshots ---------- */
.shot {
  border-radius: 18px; box-shadow: var(--shot-shadow);
  background: var(--surface); width: 100%; height: auto;
}
picture { display: block; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: 40px; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
.hero-copy { display: grid; gap: 24px; align-content: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-media { position: relative; margin-right: calc(-1 * max(0px, (100vw - var(--max)) / 2 + 40px)); }
.hero-media .shot { width: min(980px, 100%); }
.hero-glow {
  position: absolute; inset: 8% 6% auto auto; width: 70%; aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(30px);
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { margin-right: 0; }
}

/* ---------- Stack strip (the one marquee on the page) ---------- */
.stacks { padding-block: 36px 8px; }
.stacks p { text-align: center; color: var(--fg-3); font-size: 15px; margin-bottom: 22px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 48s linear infinite; }
.marquee-track img { height: 30px; width: auto; opacity: 0.9; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 260px;
}
.tile p { color: var(--fg-2); max-width: 42ch; }
.tile-a { grid-column: span 7; padding-bottom: 0; }
.tile-b { grid-column: span 5; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.tile-c { grid-column: span 5; padding-bottom: 0; }
.tile-d { grid-column: span 3; }
.tile-e { grid-column: span 4; background: linear-gradient(200deg, var(--accent-soft), var(--surface) 75%); }
.tile .tile-shot { margin-top: auto; padding-top: 18px; }
.tile .tile-shot img { border-radius: 12px 12px 0 0; box-shadow: 0 -1px 0 var(--line), 0 20px 50px -30px rgb(0 0 0 / 0.35); }
.tile .illo { width: 132px; height: 132px; margin-top: auto; align-self: flex-end; }
.tile-b .illo { width: 230px; height: 230px; }
@media (max-width: 960px) {
  .tile-a, .tile-b, .tile-c, .tile-d, .tile-e { grid-column: span 12; }
}

/* ---------- Split section (AI) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
}
.agents { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.agent {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  font-weight: 600; font-size: 15.5px;
}
.agent i { font-size: 20px; color: var(--accent); width: 36px; height: 36px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 10px; flex: none; }
.agent span { display: block; font-weight: 450; font-size: 13.5px; color: var(--fg-3); }
.note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; color: var(--fg-2); font-size: 15px; }
.note i { color: var(--accent); font-size: 18px; margin-top: 3px; }

/* ---------- Wide media ---------- */
.wide-media { display: grid; gap: 40px; }
.wide-media .head { display: grid; gap: 16px; max-width: 640px; }

/* ---------- Process (how it works teaser) ---------- */
.process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
.process::before {
  content: ""; position: absolute; top: 70px; left: 12%; right: 12%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); z-index: 0;
}
.process-step { display: grid; gap: 12px; justify-items: start; position: relative; z-index: 1; }
.process-step img { width: 140px; height: 140px; }
.process-step p { color: var(--fg-2); max-width: 32ch; }
@media (max-width: 820px) { .process { grid-template-columns: 1fr; } .process::before { display: none; } }

/* ---------- Download band ---------- */
.download {
  border-radius: 32px; padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center;
}
.download-copy { display: grid; gap: 18px; }
.release-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--fg-2); font-size: 15px; }
.release-meta span { display: inline-flex; align-items: center; gap: 6px; }
.release-meta i { color: var(--fg-3); }
.download .illo { width: min(300px, 100%); justify-self: center; }
@media (max-width: 860px) { .download { grid-template-columns: 1fr; } .download .illo { width: 200px; order: -1; justify-self: start; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 8px; max-width: 460px; }
.form label { font-weight: 600; font-size: 15px; }
.form .row { display: flex; gap: 8px; }
.form input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--canvas); border: 1px solid color-mix(in srgb, var(--fg) 22%, var(--line));
  border-radius: var(--radius-input); padding: 11px 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.form input::placeholder { color: var(--fg-3); }
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form .help { font-size: 14px; color: var(--fg-3); }
.form .status { font-size: 14.5px; min-height: 1.4em; }
.form .status.ok { color: #1f8a4c; }
.form .status.err { color: #c62828; }
@media (prefers-color-scheme: dark) { .form .status.ok { color: #4cc27f; } .form .status.err { color: #ff6b6b; } }
@media (max-width: 480px) { .form .row { flex-direction: column; } }

/* ---------- Contribute teaser ---------- */
.contrib { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-block: 8px; }
.contrib-copy { display: grid; gap: 12px; max-width: 560px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 40px 56px; margin-top: 40px; color: var(--fg-2); font-size: 15px; }
.footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--fg); }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: clamp(48px, 8vw, 96px) 24px; }
.page-hero .split { gap: 40px; }
.page-hero .illo { width: min(320px, 70%); justify-self: center; }
.prose { display: grid; gap: 18px; max-width: 68ch; }
.prose p, .prose li { color: var(--fg-2); }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose strong { color: var(--fg); }
.prose a { color: var(--accent-ink); }
pre {
  margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 14.5px; line-height: 1.7;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; color: var(--fg);
}
code { font-size: 0.92em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
kbd { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }

.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; padding-block: 56px; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter-side { display: grid; gap: 14px; align-content: start; position: sticky; top: 96px; }
.chapter-side img { width: 120px; height: 120px; }
@media (max-width: 860px) { .chapter { grid-template-columns: 1fr; gap: 24px; } .chapter-side { position: static; } }

.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; display: grid; gap: 10px; align-content: start; }
.group h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.group h3 i { color: var(--accent); font-size: 20px; }
.group p { color: var(--fg-2); font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13.5px; font-weight: 550; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-2); }
@media (max-width: 680px) { .groups { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 14px 16px; vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 600; color: var(--fg); }
tbody tr + tr td { border-top: 1px solid var(--line); }
td { color: var(--fg-2); }
td code { white-space: normal; overflow-wrap: anywhere; }

.figure { display: grid; gap: 12px; }
.figure figcaption { color: var(--fg-3); font-size: 14px; }

/* ---------- Changelog ---------- */
.releases { display: grid; gap: 0; }
.release { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 40px; padding-block: 48px; border-top: 1px solid var(--line); }
.release-side { display: grid; gap: 8px; align-content: start; position: sticky; top: 96px; }
.release-version { font-family: "Geist Mono", monospace; font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.release-date { color: var(--fg-3); font-size: 14.5px; }
.release-body { display: grid; gap: 14px; }
.release-body > p { color: var(--fg-2); }
.changes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.changes li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: baseline; color: var(--fg-2); }
.kind { font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; justify-self: start; letter-spacing: 0.01em; }
.kind-added { background: color-mix(in srgb, #1f8a4c 14%, transparent); color: #187040; }
.kind-changed { background: var(--accent-soft); color: var(--accent-ink); }
.kind-fixed { background: color-mix(in srgb, #2f6fdb 14%, transparent); color: #2a5fbf; }
@media (prefers-color-scheme: dark) { .kind-added { color: #5fd391; } .kind-fixed { color: #7fa8ff; } }
.release .btn { justify-self: start; margin-top: 8px; }
@media (max-width: 760px) { .release { grid-template-columns: 1fr; gap: 16px; } .release-side { position: static; } .changes li { grid-template-columns: 1fr; gap: 6px; } }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Contributors ---------- */
.people { display: flex; flex-wrap: wrap; gap: 10px; }
.people a { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 550; font-size: 15px; }
.people img { width: 32px; height: 32px; border-radius: 50%; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--delay, 0s); }
  .reveal.is-visible { opacity: 1; transform: none; }
  .hero-media .shot { animation: rise 1.1s var(--ease) both 0.15s; }
  .float { animation: float 6s ease-in-out infinite; }
  .tile { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
  .tile:hover { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
  html { scroll-behavior: auto; }
}
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Download chooser ---------- */
.chooser {
  width: min(520px, calc(100vw - 32px)); padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--surface); color: var(--fg); box-shadow: var(--shot-shadow);
}
.chooser::backdrop { background: rgb(8 8 12 / 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chooser h2 { font-size: 1.75rem; padding-right: 40px; }
.chooser > .muted { margin-top: 8px; font-size: 15.5px; }
.chooser-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-2); display: grid; place-items: center; font-size: 16px;
}
.chooser-close:hover { color: var(--fg); }
.choices { display: grid; gap: 10px; margin-top: 22px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--fg); background: var(--canvas); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}
.choice:hover, .choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.choice:active { transform: scale(0.99); }
.choice > i { font-size: 22px; color: var(--accent); width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--accent-soft); border-radius: 12px; }
.choice strong { display: block; font-size: 16.5px; font-weight: 640; }
.choice span span { display: block; color: var(--fg-3); font-size: 14px; }
.guess { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; color: var(--fg-2); font-size: 14.5px; }
.hint i { color: var(--fg-3); margin-top: 3px; }
.universal { margin-top: 12px; padding: 0; border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--accent-ink); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .chooser[open] { animation: chooser-in 0.35s var(--ease); }
}
@keyframes chooser-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
