:root {
  --bg: #09090b;
  --bg-card: #111113;
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-dim: #8b8b95;
  --border: #ffffff14;
  --border-strong: #ffffff24;
  --accent: #3595e3;
  --accent-dim: #3595e326;
  --ok: oklch(72% .16 150);
  --warn: oklch(76% .15 75);
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-size: 11px;
  font-weight: 500;
}

.display { letter-spacing: -.035em; font-weight: 500; line-height: 1.05; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .18s, background .18s, border-color .18s, color .18s;
}

.btn-primary { background: var(--fg); color: #09090b; font-weight: 600; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--fg-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--fg); border-color: var(--border-strong); background: #ffffff05; }
.btn-lg { padding: 14px 22px; border-radius: 10px; font-size: 15px; }

.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(#ffffff04, #fff0);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

[data-rise] { animation: .7s cubic-bezier(.2, .7, .2, 1) both rise; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  [data-rise] { animation: none; }
}

/* Shell */

.page { display: flex; flex-direction: column; min-height: 100vh; overflow-x: clip; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.nav.is-scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 32px;
}

.nav-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); }
.nav-brand img { width: 24px; height: 24px; border-radius: 6px; }
.nav-brand-name { font-size: 16px; font-weight: 650; letter-spacing: -.025em; line-height: 1; }

.nav-right { display: inline-flex; align-items: center; gap: 8px; }

.nav-link {
  padding: 0 10px;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .18s;
}

.nav-link:hover { color: var(--fg); }

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff05;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .18s, border-color .18s, background .18s;
}

.nav-pill:hover { color: var(--fg); border-color: var(--border-strong); background: #ffffff0a; }
.nav-pill strong { color: var(--fg); font-weight: 600; }
.nav-pill svg { flex-shrink: 0; }

.main { display: flex; flex-direction: column; flex: 1; }

section { position: relative; padding: 96px 0; border-top: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-head h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.section-head p { max-width: 620px; color: var(--fg-muted); font-size: 18px; letter-spacing: -.005em; }

.checklist { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); font-size: 15px; }
.checklist li svg { flex-shrink: 0; color: var(--ok); }

/* Hero */

.hero { padding: 72px 0 60px; border-top: 0; overflow: hidden; }

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, #ffffff09 1px, #0000 1px), linear-gradient(#ffffff09 1px, #0000 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 40%, #0000 100%);
  mask-image: radial-gradient(80% 60% at 50% 40%, #000 40%, #0000 100%);
}

.hero-inner { position: relative; text-align: center; }

.hero-title {
  max-width: 20ch;
  margin: 48px auto 22px;
  font-size: clamp(38px, 5.6vw, 76px);
  text-wrap: balance;
}

.hero-title span { display: inline-block; }

.hero-sub {
  max-width: 660px;
  margin: 0 auto 36px;
  color: var(--fg-muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  letter-spacing: -.005em;
}

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 56px; }

.hero-source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: color .18s;
}

.hero-source-link:hover { color: var(--fg); }
.hero-source-arrow { flex-shrink: 0; opacity: .6; transition: transform .18s, opacity .18s; }
.hero-source-link:hover .hero-source-arrow { opacity: 1; transform: translate(2px, -2px); }

.hero-platform-line {
  display: block;
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: -.005em;
}

.hero-platform-line a {
  color: var(--fg-muted);
  text-decoration: underline #a1a1aa66;
  text-underline-offset: 3px;
  transition: color .18s, text-decoration-color .18s;
}

.hero-platform-line a:hover { color: var(--fg); text-decoration-color: var(--fg); }

.dl-icon { display: none; flex-shrink: 0; width: 14px; height: 14px; }
[data-platform='win'] .dl-icon--windows,
[data-platform='mac'] .dl-icon--apple,
[data-platform='linux'] .dl-icon--linux { display: block; }

.hero-preview {
  max-width: 1180px;
  margin: 0 auto;
  transform: perspective(2000px) rotateX(2deg);
  transition: transform .6s;
}

.hero-preview:hover { transform: perspective(2000px) rotateX(0); }

.hero-screenshot-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1280 / 800;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0a0a0c;
  box-shadow: 0 28px 64px -28px #000000bf;
}

.hero-screenshot-frame img {
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin: -2px;
  object-fit: cover;
  object-position: center top;
}

/* Primitives marquee */

.sec-primitives { overflow: hidden; }

.marquee { position: relative; display: flex; flex-direction: column; gap: 12px; }

.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: max(48px, 50vw - 564px);
  pointer-events: none;
}

.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

.marquee-row { overflow: hidden; }

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 76s linear infinite;
  will-change: transform;
}

.marquee-group { display: flex; gap: 12px; padding-right: 12px; }
.marquee-row.is-reverse .marquee-track { animation-duration: 84s; animation-direction: reverse; }
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-row { overflow-x: auto; }
  .marquee-group[aria-hidden] { display: none; }
  html { scroll-behavior: auto; }
}

.primitive-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: clamp(264px, 22vw, 308px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff03;
}

.primitive-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.primitive-card p { color: var(--fg-muted); font-size: 13.5px; line-height: 1.45; letter-spacing: -.003em; }

.type-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff03;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.marquee-row.is-types .marquee-group { gap: 10px; padding-right: 10px; }

/* Local-first grid */

.local-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.local-cell {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(#ffffff04, #0000);
  transition: background .2s;
}

.local-cell:hover { background: #ffffff06; }
.local-cell:nth-child(3n) { border-right: 0; }
.local-cell:nth-child(n + 4) { border-bottom: 0; }

.local-mark { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; color: var(--accent); }
.local-name { margin-bottom: 3px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.local-tag { font-family: var(--font-mono); color: var(--fg-dim); font-size: 11px; }

.local-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  color: var(--fg-muted);
  font-size: 13px;
}

.local-footer-item { display: inline-flex; align-items: center; gap: 8px; }
.local-footer-item svg { color: var(--ok); }

/* Quick action split */

.split-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
.split-visual { position: relative; display: flex; flex-direction: column; gap: 20px; }

.action-card { padding: 20px; }
.action-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.action-head svg { color: var(--accent); }
.action-title { flex: 1; font-size: 15px; font-weight: 500; }

.action-status {
  padding: 2px 8px;
  border: 1px solid var(--ok);
  border-radius: 999px;
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.action-fields { margin-bottom: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.action-fields > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.action-fields > div:first-child { border-top: 0; }
.action-fields span { color: var(--fg-dim); }
.action-fields .is-required span { color: var(--fg); }

.action-more {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--fg-dim);
  font-size: 12px;
}

.action-trail { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: -4px 0; }
.action-trail-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong); }
.action-trail-line { width: 1px; height: 28px; background: linear-gradient(180deg, var(--border-strong), var(--accent)); }

.action-button-shell { display: flex; justify-content: center; }

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--fg);
  color: #09090b;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px #fff3;
}

.action-button-kbd { padding: 2px 6px; border-radius: 4px; background: #0000001a; font-family: var(--font-mono); font-size: 10px; }

/* Open source */

.open-head { margin: 0 auto 56px; text-align: center; }
.open-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.open-term { padding: 0; overflow: hidden; }

.open-term-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #ffffff05;
}

.open-term-head > span { display: block; width: 10px; height: 10px; border-radius: 999px; background: #2a2a30; }

.open-term-title {
  flex: 1;
  margin-left: 10px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  background: none !important;
  width: auto !important;
  height: auto !important;
}

.open-term-body { padding: 20px 22px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; }
.open-term-body > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-term-body .prompt { margin-right: 8px; color: var(--accent); }
.open-term-body .dim { color: var(--fg-dim); }
.open-term-body .accent { color: var(--accent); }
.open-term-body .cursor { display: flex; align-items: center; }

.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 4px;
  background: var(--fg);
  animation: blink 1s steps(2, end) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}

.open-pitch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 32px;
  background: radial-gradient(110% 75% at 100% 0%, var(--accent-dim), transparent 60%), linear-gradient(180deg, #ffffff05, transparent);
}

.open-pitch-list { display: flex; flex-direction: column; gap: 16px; list-style: none; }
.open-pitch-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--fg-muted); font-size: 15px; line-height: 1.5; }
.open-pitch-list strong { color: var(--fg); font-weight: 600; }

.open-pitch-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 7px;
  background: var(--accent-dim);
  color: var(--accent);
}

.open-pitch-footer { display: flex; flex-direction: column; gap: 18px; }
.open-pitch-meta { display: flex; align-items: center; gap: 8px; color: var(--fg-dim); font-family: var(--font-mono); font-size: 11px; }
.meta-sep { width: 1px; height: 10px; background: var(--border-strong); }

/* Held while a click waits for the latest release to resolve. */
.is-resolving { opacity: .7; pointer-events: none; }
.open-pitch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.open-source-link { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); font-size: 13px; font-weight: 500; transition: color .18s; }
.open-source-link:hover { color: var(--fg); }

/* Closing call to action */

.sec-cta { padding: 120px 0; text-align: center; overflow: hidden; }

.sec-cta::before {
  content: '';
  position: absolute;
  inset: auto 0 -50%;
  height: 60%;
  opacity: .6;
  pointer-events: none;
  background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 60%);
}

.cta-inner { position: relative; }
.cta-title { font-size: clamp(40px, 6vw, 72px); }
.cta-sub { max-width: 600px; margin: 20px auto 36px; color: var(--fg-muted); font-size: 18px; line-height: 1.55; letter-spacing: -.005em; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 24px; }

/* Download page */

.doc { padding: 72px 0 40px; border-top: 0; }
.doc-head { max-width: 720px; margin-bottom: 48px; }
.doc-head h1 { margin-bottom: 18px; font-size: clamp(34px, 4.4vw, 52px); }
.doc-head p { color: var(--fg-muted); font-size: 18px; letter-spacing: -.005em; }

.dl-list { display: flex; flex-direction: column; gap: 12px; }

.dl-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.dl-row .local-mark { color: var(--fg-muted); }
.dl-row-name { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.dl-row-meta { margin-top: 4px; color: var(--fg-dim); font-family: var(--font-mono); font-size: 11px; }
.dl-note { margin-top: 6px; color: var(--fg-muted); font-size: 13px; }
.dl-note code { padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; background: #ffffff08; color: var(--fg); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }

.dl-source { margin-top: 40px; padding: 24px; }
.dl-source h2 { margin-bottom: 12px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.dl-source p { max-width: 640px; margin-bottom: 16px; color: var(--fg-muted); font-size: 14px; }
.dl-source pre { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #ffffff05; color: var(--fg-muted); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; overflow-x: auto; }

/* Footer */

.footer { margin-top: auto; padding: 40px 0 32px; border-top: 1px solid var(--border); }

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

.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--fg-dim); font-size: 13px; }
.footer-brand img { width: 20px; height: 20px; border-radius: 4px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.footer-links a { color: var(--fg-dim); font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: var(--fg); }

@media (width <= 960px) {
  .hero-preview { width: min(860px, 100vw - 24px); margin-left: 50%; transform: translateX(-50%) perspective(1600px) rotateX(1.5deg); }
  .hero-preview:hover { transform: translateX(-50%) perspective(1600px) rotateX(0); }
  .local-grid { grid-template-columns: 1fr 1fr; }
  .local-cell { border-right: 0; border-bottom: 1px solid var(--border); }
  .local-cell:nth-child(odd) { border-right: 1px solid var(--border); }
  .local-cell:nth-child(n + 5) { border-bottom: 0; }
  .split-inner { grid-template-columns: 1fr; gap: 40px; }
  .open-grid { grid-template-columns: 1fr; }
}

@media (width <= 820px) {
  section { padding: 64px 0; }
  .sec-cta { padding: 96px 0; }
  .container, .nav-inner, .footer-inner { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 40px; }
  .hero-title { margin-top: 14px; font-size: clamp(40px, 11vw, 56px); }
  .hero-preview { display: none; }
  .marquee::before, .marquee::after { width: 28px; }
  .dl-row { grid-template-columns: 1fr; gap: 14px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; width: 100%; justify-content: initial; }
}

@media (width <= 620px) {
  .local-grid { grid-template-columns: 1fr; }
  .local-cell,
  .local-cell:nth-child(odd) { border-right: 0; }
  .local-cell:nth-child(n + 5) { border-bottom: 1px solid var(--border); }
  .local-cell:last-child { border-bottom: 0; }
}

/* Local-data explanation uses the site's existing type, borders and spacing. */
.portability { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.portability h3 { font-size: 22px; font-weight: 500; margin-bottom: 20px; }
.portability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.portability dt { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.portability dd { color: var(--fg-muted); font-size: 15px; line-height: 1.6; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: var(--fg); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.dl-row-meta { min-height: 1.5em; overflow-wrap: anywhere; }
.dl-note a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .portability-grid { grid-template-columns: 1fr; gap: 20px; } }
