:root {
  --bg: #0e0f14;
  --panel: #14161d;
  --panel-2: #1a1d26;
  --border: #262a36;
  --text: #e7e9ef;
  --muted: #9aa0b2;
  --accent: #8b6cff;
  --accent-strong: #7a58ff;
  --accent-soft: rgba(139, 108, 255, 0.14);
  --ok: #58d68d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #b9a6ff;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(14, 15, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 60px;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.logo span {
  color: var(--accent);
}

header.site nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: #3a4052;
}

.btn.primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

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

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

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

.hero {
  padding: 76px 0 40px;
  text-align: center;
  background: radial-gradient(900px 420px at 50% -60px, rgba(122, 88, 255, 0.22), transparent 70%);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 auto 18px;
  max-width: 820px;
}

.hero p.lead {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto 30px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.fine {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.shot {
  margin: 48px auto 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

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

section {
  padding: 68px 0;
}

section.alt {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 34px;
}

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

.card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

section.alt .card {
  background: var(--bg);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

.step {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.engines {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.engines li {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15.5px;
}

.engines li small {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
}

.engines li.soon {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: #b9a6ff;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ---------- pricing ---------- */

.plans {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.plan {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px var(--accent-strong) inset;
}

.plan h3 {
  margin: 0;
  font-size: 20px;
}

.price {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 2px;
}

.price small {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  flex: 1;
}

.plan li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 15.5px;
  color: var(--text);
}

.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ok);
}

.faq h3 {
  font-size: 18px;
  margin: 28px 0 6px;
}

.faq p {
  margin: 0;
  color: var(--muted);
}

/* ---------- documents ---------- */

.doc {
  padding: 56px 0 80px;
}

.doc h1 {
  font-size: 36px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.doc h2 {
  font-size: 22px;
  margin: 36px 0 8px;
}

.doc p,
.doc li {
  color: #c9cdd8;
}

.doc .updated {
  color: var(--muted);
  font-size: 15px;
}

.notice {
  border: 1px solid #5b4a1e;
  background: rgba(242, 184, 75, 0.08);
  color: #f2d08a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  margin: 18px 0;
}

.center {
  text-align: center;
}

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

footer.site {
  border-top: 1px solid var(--border);
  padding: 30px 0 44px;
  color: var(--muted);
  font-size: 14.5px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
}

footer.site a {
  color: var(--muted);
  text-decoration: none;
}

footer.site a:hover {
  color: var(--text);
}

footer.site .spacer {
  flex: 1;
}

@media (max-width: 640px) {
  header.site nav a.hide-small {
    display: none;
  }
  section {
    padding: 48px 0;
  }
  .hero {
    padding-top: 48px;
  }
}

/* ---------- demo: the app at work ---------- */

.demo-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px auto 0;
}

.demo-also {
  max-width: 720px;
  margin: 14px auto 0;
  font-size: 15px;
  color: var(--muted);
}

.demo-also strong {
  color: var(--text);
  font-weight: 600;
}

.demo-picker button {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 16px;
  cursor: pointer;
}

.demo-picker button:hover {
  color: var(--text);
}

.demo-picker button[aria-selected='true'] {
  color: #fff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

/* The stage is drawn at a fixed size, like the real window, and scaled to fit the page. */
.demo-wrap {
  margin: 48px auto 0;
  text-align: left;
  position: relative;
  width: 100%;
  aspect-ratio: 1040 / 650;
}

.demo-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1040px;
  height: 650px;
  transform: scale(var(--demo-scale, 1));
  transform-origin: top left;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  user-select: none;
}

.m-top {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.m-home,
.m-ico {
  width: 15px;
  height: 15px;
  border: 1.5px solid #6a7085;
  border-radius: 4px;
  flex: none;
}

.m-name {
  font-weight: 600;
}

.m-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: #b9a6ff;
}

.m-tabs {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
}

.m-tabs b,
.m-tabs span {
  padding: 3px 14px;
  border-radius: 6px;
}

.m-tabs b {
  background: var(--panel-2);
  color: var(--text);
}

.m-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-pill {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.m-run {
  color: var(--ok);
  border: 1px solid rgba(88, 214, 141, 0.45);
  background: rgba(88, 214, 141, 0.08);
  border-radius: 7px;
  padding: 3px 12px;
  font-weight: 600;
  white-space: nowrap;
}

.m-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.m-chat {
  flex: none;
  width: 300px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.m-chat-head {
  flex: none;
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.m-scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px;
}

.m-scroll > * {
  flex: none;
  animation: m-in 0.25s ease both;
}

@keyframes m-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.m-user {
  align-self: flex-end;
  max-width: 92%;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 108, 255, 0.35);
  border-radius: 12px 12px 3px 12px;
  padding: 7px 10px;
}

.m-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
}

.m-tool i {
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: m-spin 0.8s linear infinite;
}

.m-tool.done i {
  border: 0;
  animation: none;
  width: 12px;
  height: 12px;
}

.m-tool.done i::before {
  content: '✓';
  color: var(--ok);
  font-style: normal;
  font-size: 12px;
  line-height: 12px;
  display: block;
}

.m-tool small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.m-think {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px;
}

.m-think i {
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: m-spin 0.8s linear infinite;
}

.m-agent {
  padding: 2px;
}

.m-composer {
  flex: none;
  margin: 0 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.m-input {
  min-height: 58px;
  padding: 10px 12px 4px;
}

.m-placeholder {
  color: #5d6376;
}

.m-caret::after {
  content: '';
  display: inline-block;
  width: 1.5px;
  height: 14px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--text);
  animation: m-blink 0.9s steps(2) infinite;
}

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

.m-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 8px;
}

.m-row .m-pill {
  font-size: 10.5px;
  padding: 3px 6px;
}

.m-spacer {
  flex: 1;
}

.m-send {
  flex: none;
  white-space: nowrap;
  background: var(--accent-strong);
  color: #fff;
  border-radius: 7px;
  padding: 4px 11px;
  font-weight: 600;
  font-size: 12px;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.12s;
}

.m-send.ready {
  opacity: 1;
}

.m-send.press {
  transform: scale(0.93);
}

.m-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.m-game {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #0b0c11;
  display: grid;
  place-items: center;
}

.m-game iframe {
  width: 100%;
  aspect-ratio: 2 / 1;
  border: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.m-game iframe.on {
  opacity: 1;
}

/* Phone preview: the game sits in a device frame, as in the app. */
.m-game.phone iframe {
  width: 82%;
  border: 7px solid #23262f;
  border-radius: 26px;
  background: #000;
}

/* The preview steps back when another window comes to the front. */
.m-game.behind iframe {
  opacity: 0.18;
}

/* Something that opens outside the app, such as the iOS Simulator: shown as its own window. */
.m-window {
  position: absolute;
  margin: 0;
  width: 66%;
  border: 1px solid #3a3f4f;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1e26;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  animation: m-in 0.35s ease both;
}

.m-window figcaption {
  padding: 6px 12px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  border-bottom: 1px solid #2c303c;
}

.m-window img {
  width: 100%;
}

.m-empty,
.m-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 0 40px;
  color: var(--muted);
}

.m-empty strong,
.m-cover strong {
  color: var(--text);
  font-size: 16px;
}

.m-cover {
  background: rgba(11, 12, 17, 0.9);
}

.m-spin {
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: m-spin 0.9s linear infinite;
}

@keyframes m-spin {
  to {
    transform: rotate(360deg);
  }
}

.m-console {
  flex: none;
  height: 92px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.m-console-tabs {
  display: flex;
  gap: 14px;
  padding: 8px 14px 4px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.m-console-tabs b {
  color: var(--text);
}

.m-log {
  padding: 2px 14px;
  font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}

.demo-note {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #b9a6ff;
  text-decoration: underline;
  cursor: pointer;
}

/* On a phone the window is too small to read when shrunk, so its two halves are stacked. */
@media (max-width: 700px) {
  .demo-wrap {
    aspect-ratio: auto;
  }
  .demo-stage {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
  }
  .m-body {
    flex-direction: column-reverse;
  }
  .m-chat {
    width: 100%;
    height: 300px;
    border-right: 0;
    border-top: 1px solid var(--border);
  }
  .m-game {
    aspect-ratio: 2 / 1;
    flex: none;
  }

  .m-tabs,
  .m-console,
  .m-right .m-pill,
  .m-ico,
  .m-chat-head {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-spin,
  .m-tool i,
  .m-think i,
  .m-caret::after,
  .m-scroll > * {
    animation: none;
  }
}

/* The hidden attribute wins over any display set above. */
[hidden] {
  display: none !important;
}

/* ---------- downloads and the demo request form ---------- */

.muted {
  color: var(--muted);
}

.plan p.muted {
  margin: 6px 0 0;
  font-size: 15px;
}

.plan.current {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px var(--accent-strong) inset;
}

.plans.downloads {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.plans.downloads .plan {
  padding: 22px;
}

.plan.current h3::after {
  content: 'Your computer';
  display: block;
  width: fit-content;
  margin: 6px 0 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: #b9a6ff;
}

.plan.soon {
  opacity: 0.75;
}

.plan ul.plain li {
  padding-left: 0;
  color: var(--muted);
}

.plan ul.plain li::before {
  content: none;
}

.btn.disabled {
  cursor: default;
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

.demo-form {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
}

.demo-form::backdrop {
  background: rgba(5, 6, 10, 0.7);
}

.demo-form form {
  position: relative;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-form h2 {
  font-size: 24px;
  margin: 0;
}

.demo-form .sub {
  margin: 0 0 4px;
  font-size: 15.5px;
}

.demo-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14.5px;
  font-weight: 600;
}

.demo-form label span {
  font-weight: 400;
  color: var(--muted);
}

.demo-form input,
.demo-form textarea {
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  resize: vertical;
}

.demo-form input:focus,
.demo-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* A field people never see; automated form-fillers fill it in and give themselves away. */
.demo-form-trap {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.demo-form-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 15px;
  color: var(--muted);
}

.demo-form-status.ok {
  color: var(--ok);
}

.demo-form-status.bad {
  color: #ff8a96;
}

.demo-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.demo-form-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.demo-form .fine {
  margin: 0;
}

/* ---------- platform pages ---------- */

.platform-hero {
  padding-bottom: 24px;
  text-align: left;
}

.platform-hero h1,
.platform-hero p.lead {
  margin-left: 0;
  margin-right: 0;
}

.platform-hero .cta {
  justify-content: flex-start;
}

.crumb {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--muted);
}

.crumb a {
  color: var(--muted);
}

.platform {
  padding-top: 24px;
}

.platform h2 {
  font-size: 26px;
  margin: 44px 0 10px;
}

.platform .sub {
  margin-bottom: 18px;
}

.platform ul,
.platform ol {
  padding-left: 22px;
  color: #c9cdd8;
}

.platform li {
  margin: 7px 0;
}

.platform p {
  color: #c9cdd8;
}

.prompt {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(139, 108, 255, 0.35);
  border-radius: 14px 14px 4px 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 18px;
}

.took {
  color: var(--muted) !important;
}

.took strong {
  color: var(--text);
}

.others {
  list-style: none;
  padding: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.others li {
  margin: 0;
}

.others a {
  display: block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.others a:hover {
  border-color: #3a4052;
}

/* On the home page, a platform's tile is a link to its page. */
.engines li a {
  display: block;
  margin: -12px -14px;
  padding: 12px 14px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.engines li a:hover {
  background: rgba(255, 255, 255, 0.04);
}
