:root {
  color-scheme: dark;
  --bg: #0b0c11;
  --bg-2: #111219;
  --card: #13141c;
  --card-2: #171822;
  --line: #242634;
  --line-2: #33364a;
  --text: #eceef5;
  --muted: #9ca1b5;
  --faint: #6b7088;
  --brand: #5b6cff;
  --brand-2: #8b93ff;
  --accent-a: #ffc24b;
  --accent-b: #ff7a2f;
  --ok: #3ccf8e;
  --radius: 18px;
  --max: 1160px;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; font-size: 17px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.lang { font-size: 13px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; }
.lang:hover { color: var(--text); border-color: var(--line-2); }
.top .btn { padding: 7px 14px; font-size: 14px; border-radius: 9px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color .15s, transform .15s, filter .15s;
}
.btn:hover { border-color: var(--line-2); }
.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(180deg, #6c7bff, #4552e6);
  box-shadow: 0 8px 30px rgba(91,108,255,.32), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 24px; text-align: center; position: relative; isolation: isolate; }
.hero::before {
  /* The dotted grid of the Crosskit canvas, fading out downwards. */
  content: ""; position: absolute; inset: 0 0 auto; height: 900px; z-index: -2;
  background-image: radial-gradient(rgba(255,255,255,.075) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; left: 50%; top: -260px; width: min(1100px, 140vw); height: 700px; z-index: -1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(91,108,255,.24), transparent 72%);
}
.badge {
  display: inline-flex; gap: 9px; align-items: center;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px 5px 11px; background: rgba(17,18,25,.8);
}
.badge b { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(60,207,142,.15); font-size: 0; }
h1 {
  font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 750;
  margin: 24px auto 20px; max-width: 920px; text-wrap: balance;
}
h1 .grad {
  background: linear-gradient(90deg, var(--brand-2), var(--accent-a) 58%, var(--accent-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 700px; margin: 0 auto; text-wrap: pretty; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 34px 0 12px; }
.fine { font-size: 13px; color: var(--faint); margin: 0; }

/* ---------- demo video ---------- */
.demo { position: relative; isolation: isolate; max-width: 1120px; margin: 64px auto 0; }
.demo::before {
  /* Soft brand glow behind the window. */
  content: ""; position: absolute; inset: 8% 4% 10%; z-index: -1; border-radius: 40px;
  background: conic-gradient(from 200deg at 50% 50%, rgba(91,108,255,.55), rgba(255,122,47,.35), rgba(255,194,75,.25), rgba(139,147,255,.5), rgba(91,108,255,.55));
  filter: blur(70px); opacity: .42;
}
.shot {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--bg);
  border-radius: 16px; border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 50px 120px -20px rgba(0,0,0,.7);
}
.chapters {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; text-align: left;
}
.chapters button {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%;
  padding: 0 2px; color: var(--faint); font-size: 13px; line-height: 1.35;
  transition: color .2s;
}
.chapters button:hover, .chapters .on button { color: var(--text); }
.chapters button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 4px; border-radius: 4px; }
.chapters .bar { display: block; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.chapters .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--brand-2), var(--accent-a)); }
.chapters .n { font: 600 11px var(--mono); color: var(--faint); margin-right: 6px; }
.chapters .on .n { color: var(--accent-a); }

/* ---------- agents ---------- */
.agents { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 44px; }
.agents .label { font-size: 13px; color: var(--faint); margin-right: 6px; }
.agent { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--bg-2); }
.agent i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- sections ---------- */
section { padding: 104px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-2); font-weight: 600; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0 14px; text-wrap: balance; }
.sub { color: var(--muted); max-width: 640px; font-size: 17px; margin: 0; text-wrap: pretty; }

/* bento */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 48px; }
.feature {
  grid-column: span 2; position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feature.wide { grid-column: span 4; }
.feature.half { grid-column: span 3; }
.feature .ic {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(91,108,255,.13); color: var(--brand-2); margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(139,147,255,.18);
}
.feature .ic svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.015em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; max-width: 46ch; }

/* the agents card lists the three agents */
.trio { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.trio span { font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); display: inline-flex; gap: 7px; align-items: center; }
.trio i { width: 8px; height: 8px; border-radius: 50%; }

/* the emulator card shows a real screen from the demo */
.feature.device { display: grid; grid-template-columns: 1fr 210px; gap: 24px; padding-bottom: 0; min-height: 290px; }
.feature.device .copy { padding-bottom: 26px; }
.phone {
  align-self: start; justify-self: center; width: 196px; height: 290px; overflow: hidden;
  border-radius: 32px 32px 0 0; padding: 8px 8px 0; background: #050508;
  box-shadow: 0 0 0 1px #2b2e3d, 0 30px 60px rgba(0,0,0,.5), 0 0 70px rgba(255,122,47,.14);
}
.phone img { border-radius: 25px 25px 0 0; width: 100%; height: auto; }
.feature.device::after {
  content: ""; position: absolute; right: -60px; bottom: -100px; width: 360px; height: 360px; z-index: -1;
  background: radial-gradient(closest-side, rgba(255,122,47,.16), transparent);
}

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 52px; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; left: 18px; right: 18px; top: 18px; height: 1px; background: linear-gradient(90deg, var(--line-2), var(--line) 80%, transparent); }
.step { position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font: 600 13px var(--mono); color: var(--accent-a);
  background: var(--bg); border: 1px solid var(--line-2); position: relative;
}
.step h3 { margin: 18px 0 6px; font-size: 18px; letter-spacing: -0.015em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.tools-box { margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--bg-2); }
.tools-box .label { font-size: 13px; color: var(--faint); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tools span { font: 13px var(--mono); color: #c7cbe0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }

/* download */
.download {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  background: linear-gradient(180deg, var(--card-2), var(--bg));
  border: 1px solid var(--line); border-radius: 28px; padding: 72px 24px;
}
.download::before {
  content: ""; position: absolute; left: 50%; top: -220px; width: min(760px, 120%); height: 480px; z-index: -1; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(91,108,255,.3), transparent 70%);
}
.download::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000, transparent 70%);
}
.download img { width: 84px; height: 84px; margin: 0 auto 20px; filter: drop-shadow(0 12px 30px rgba(91,108,255,.35)); }
.download .sub { margin: 0 auto; }
.download ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.download li::before { content: "✓ "; color: var(--ok); }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.half { grid-column: span 1; }
  .feature.wide { grid-column: span 2; }
  .chapters .t { display: none; }
  .chapters button { text-align: center; }
  .chapters .n { margin: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .top .wrap { justify-content: space-between; }
  .top .btn { display: none; }
  .hero { padding-top: 56px; }
  .demo { margin-top: 44px; }
  .shot { border-radius: 10px; }
  .chapters { gap: 6px; }
  .grid { grid-template-columns: 1fr; }
  .feature, .feature.wide, .feature.half { grid-column: span 1; }
  .feature.device { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { display: none; }
  section { padding: 72px 0; }
  .download { padding: 56px 18px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
