@font-face {
  font-family: Geist;
  src: url("geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0e191b;
  --surface: #142327;
  --panel: #192c30;
  --line: #2c4549;
  --ink: #ecf7f5;
  --muted: #a7bfbd;
  --accent: #b2efdf;
  --dark-ink: #0d302b;
  --radius: 16px;
  --gutter: clamp(20px, 5vw, 80px);
  --nav: 72px;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav) + 16px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.55 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link { position: absolute; top: 12px; left: var(--gutter); z-index: 2; }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { padding: 8px 12px; background: var(--ground); }

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}
.nav__bar, .footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__bar { min-height: var(--nav); }
.brand { display: inline-flex; align-items: center; gap: 7px; font-size: 21px; font-weight: 700; letter-spacing: -.045em; }
.nav__links, .footer nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); font-size: 14px; }
.nav__links a, .footer nav a, .link { color: var(--muted); text-underline-offset: 5px; }
.nav__links a:hover, .footer nav a:hover, .link:hover { color: var(--ink); text-decoration: underline; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.btn--primary { background: var(--accent); color: var(--dark-ink); }
.btn--secondary { border-color: var(--line); color: var(--ink); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { background: #ccf8eb; }
  .btn--secondary:hover { background: var(--surface); border-color: var(--muted); }
}
.btn:active { transform: translateY(1px) scale(.985); }

.hero {
  display: grid;
  align-items: center;
  min-height: calc(100svh - var(--nav) - 1px);
  padding-block: clamp(44px, 7vh, 84px);
  border-bottom: 1px solid var(--line);
}
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero__copy, .download-grid > div { grid-column: span 5; }
.stage, .packages { grid-column: span 7; }
h1, h2 { font-weight: 630; line-height: 1.04; letter-spacing: -.065em; text-wrap: balance; }
h1 { font-size: clamp(52px, 5.9vw, 88px); }
h2 { font-size: clamp(38px, 4.4vw, 62px); }
h3 { font-size: 22px; font-weight: 650; letter-spacing: -.04em; }
.hero__period { color: var(--accent); }
.lead { max-width: 45ch; margin-top: 20px; color: var(--muted); font-size: clamp(17px, 1.45vw, 21px); }
.hero .btn-row { margin-top: 28px; }
.hero__platforms { margin-top: 24px; color: var(--muted); font-size: 13px; }
.hero__platforms span { margin-inline: 3px; color: var(--accent); }

.stage {
  position: relative;
  min-width: 0;
  padding: clamp(18px, 3.5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 86% 9%, #315552, transparent 59%),
    radial-gradient(ellipse at 5% 95%, #1a363d, transparent 62%),
    #142529;
  isolation: isolate;
}
.stage::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(#b2efdf27 1px, transparent 1px);
  background-size: 16px 16px;
  content: "";
}
.app-frame {
  position: relative;
  min-height: 414px;
  border: 1px solid #486267;
  border-radius: var(--radius);
  background: #111e21;
  box-shadow: 0 24px 48px #050b0c75;
}
.app-bar { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 650; }
.app-bar__badge { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.app-workspace { display: grid; grid-template-columns: minmax(110px, .66fr) minmax(0, 1fr); }
.events, .actions { padding: 16px 14px; }
.events { min-height: 210px; border-right: 1px solid var(--line); }
.ui-label { margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.event {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 500 13px/1.2 var(--mono);
  text-align: left;
}
.event + .event { margin-top: 4px; }
.event[aria-pressed="true"] { border-color: #537d73; background: #233b39; color: var(--accent); }
.event:hover { background: #29443f; color: var(--accent); }
.action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}
.action__icon, .mini-symbol { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 6px; background: #25433f; color: var(--accent); font: 500 13px/1 var(--mono); }
.action strong, .action strong + span { display: block; }
.action strong + span { color: var(--muted); font-size: 12px; }

.chat {
  position: relative;
  width: min(82%, 345px);
  min-height: 190px;
  margin: -14px 14px 18px auto;
  border: 1px solid #4a686e;
  border-radius: 12px;
  overflow: hidden;
  background: #122126;
  box-shadow: 0 12px 28px #04090c70;
}
.chat__bar { display: flex; gap: 8px; align-items: center; min-height: 42px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #1a2d32; font-size: 13px; font-weight: 600; }
.chat__avatar { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--dark-ink); }
.chat__badge { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.chat__body { display: grid; gap: 6px; justify-items: start; padding: 10px; font-size: 13px; }
.chat__command { justify-self: end; padding: 4px 8px; border-radius: 7px 7px 2px 7px; background: #254941; color: var(--accent); font-family: var(--mono); }
.chat__reply { min-width: 0; padding: 8px 10px; border-radius: 7px 7px 7px 2px; background: #20363d; }
.chat__reply strong, .chat__reply span { display: block; }
.chat__reply span { color: #c0d3d4; }
.chat__option { padding: 3px 10px; border: 1px solid #36565a; border-radius: 6px; background: transparent; color: var(--accent); font-weight: 550; cursor: pointer; }
.chat__option:hover { background: #25433f; }

.section { display: grid; align-items: center; min-height: calc(100svh - var(--nav) - 1px); padding-block: clamp(64px, 10vw, 128px); }
.section--builder { background: #112022; border-bottom: 1px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-block: 36px 24px; }
.feature { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature__visual { display: grid; min-height: 164px; place-items: center; padding: 18px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 10%, #29423e, #17292d 85%); }
.feature__copy { padding: 20px; }
.feature__copy p { margin-top: 6px; color: var(--muted); }
.mini-flow, .mini-library, .mini-plugin { position: relative; width: min(100%, 240px); color: var(--ink); font-size: 13px; }
.mini-flow > div, .mini-library > div, .mini-plugin > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111e21;
}
.mini-flow > div + div { margin: 9px 0 0 18px; }
.mini-flow > div + div::before { position: absolute; bottom: 20px; left: 6px; width: 8px; height: 22px; border: solid #6da28f; border-width: 0 0 1px 1px; content: ""; }
.mini-flow code { margin-left: auto; color: var(--accent); font-family: var(--mono); }
.mini-library > div + div, .mini-plugin > div + div { margin-top: 5px; }
.mini-plugin > div + div { justify-content: space-between; color: var(--muted); }
.mini-plugin > div + div span:last-child { color: var(--accent); }
.link { display: inline-block; color: var(--accent); font-weight: 600; }

.download-note { max-width: 42ch; margin-top: 18px; color: var(--muted); }
.download-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 14px; }
.packages { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.packages a {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}
.packages a:hover { transform: translateY(-2px); border-color: #638b84; background: var(--panel); }
.packages strong, .packages small { display: block; }
.packages strong { font-size: 17px; font-weight: 650; }
.packages small { color: var(--muted); font-size: 13px; }
.package-arrow { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 7px; background: #25433f; color: var(--accent); font-size: 20px; }
.footer { border-top: 1px solid var(--line); background: #0b1416; }
.footer__inner { min-height: 88px; padding-block: 12px; }

@media (max-width: 940px) {
  .hero__copy, .stage { grid-column: 1 / -1; }
  .hero__copy { max-width: 680px; }
  h1 br { display: none; }
  .app-frame { min-height: 0; }
  .features { gap: 12px; }
  .feature__visual { padding-inline: 10px; }
  .feature__copy { padding: 16px; }
}

@media (max-width: 680px) {
  :root { --nav: 58px; }
  .nav__links { display: none; }
  .nav__bar { gap: 12px; }
  .hero { padding-block: 32px 24px; }
  h1 { font-size: clamp(42px, 11vw, 64px); }
  .lead { margin-top: 12px; }
  .hero .btn-row { margin-top: 18px; }
  .hero__platforms { margin-top: 16px; }
  .stage { padding: 12px; border-radius: var(--radius); }
  .app-bar { min-height: 42px; padding: 5px 8px; font-size: 13px; }
  .app-workspace { grid-template-columns: minmax(86px, .65fr) minmax(0, 1fr); }
  .events, .actions { padding: 10px 8px; }
  .events { min-height: auto; }
  .event { min-height: 34px; }
  .ui-label { margin-bottom: 5px; }
  .action { align-items: start; gap: 5px; padding: 8px 5px; }
  .action__icon { width: 20px; height: 20px; flex-basis: 20px; }
  .chat { width: auto; margin: 0 8px 8px; min-height: 157px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .download-grid > div, .packages { grid-column: 1 / -1; }
  .feature__visual { min-height: 146px; }
  .footer__inner { flex-wrap: wrap; gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .packages a { transition: none; }
}
