/* ==========================================================================
   AppMaker marketing site
   Sections: tokens, base, buttons, header, hero, IDE mockup, strip, video,
   product, stack, AI, export, pricing, CTA, footer, modal, motion, responsive
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* Dark surfaces (hero, AI section, IDE windows) */
  --ink-950: #0b1220;
  --ink-900: #111a2b;
  --ink-800: #182338;
  --ink-700: #243149;
  --line-dark: rgba(255, 255, 255, 0.09);
  --text-dark-1: #f1f5f9;
  --text-dark-2: rgba(255, 255, 255, 0.72);
  --text-dark-3: #8fa3bf;

  /* Light surfaces */
  --paper: #f5f6f8;
  --surface: #ffffff;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #6b7a90;
  --line: #e3e7ee;
  --line-strong: #c9d1dc;

  /* Accent */
  --accent: #2e6bff;
  --accent-ink: #1f56d8;
  --accent-2: #7aa2ff;
  --accent-soft: #eef3ff;
  --ok: #15803d;
  --warn: #b45309;

  /* Code colours (dark) */
  --code-kw: #1f56d8;
  --code-fn: #9a4d00;
  --code-str: #15803d;
  --code-cm: #7c8797;

  /* Type */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --container: 1140px;
  --gutter: 24px;
  --header-h: 64px;
  --hero-bleed: 140px;   /* how far the hero window overlaps the light area */
  --section-y: 112px;

  /* Radii and shadows */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-window: 0 40px 90px -30px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -20px rgba(15, 23, 42, 0.25);
}

/* ---------- Base -------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; }
code, pre, .mono { font-family: var(--font-mono); }
code { font-size: 0.92em; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 9px; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.btn-outline {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text-1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.btn-outline:hover { background: var(--paper); border-color: #b3bdcb; }

.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 9%, transparent); }

.btn .arrow { display: inline-block; transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  color: var(--text-1);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { display: block; width: 28px; height: 26px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.beta {
  margin-left: 2px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

/* Status pill under a section heading (e.g. "coming soon") */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(46, 107, 255, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Small caveat lines (API subject to change, etc.) */
.fine-note {
  max-width: 640px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-3);
}

.site-nav { display: flex; align-items: center; flex: 1; }
.site-nav ul { display: flex; gap: 2px; list-style: none; }
.site-nav ul a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  opacity: 0.78;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.site-nav ul a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }

.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-auth [hidden] { display: none !important; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: var(--r-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 96px);
  background: var(--surface);
  color: var(--text-1);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 78% -10%, rgba(46, 107, 255, 0.16), transparent 65%),
    radial-gradient(40% 50% at 8% 110%, rgba(122, 162, 255, 0.10), transparent 60%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-copy { max-width: 760px; margin-bottom: 72px; }
.hero-title {
  font-size: clamp(44px, 7.2vw, 80px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: var(--text-1);
}
.hero-lead {
  max-width: 640px;
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 22px; font-size: 14px; color: var(--text-3); }
.hero-note code { color: var(--text-2); }

.hero-visual { position: relative; margin: 0 0 calc(-1 * var(--hero-bleed)); }
.hero-shot {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 40px 90px -40px rgba(15, 23, 42, 0.45);
  overflow: hidden;
}
.hero-shot img { display: block; width: 100%; height: auto; }

/* ---------- IDE window mockup (light) ---------------------------------- */
.ide {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 30px 70px -30px rgba(15, 23, 42, 0.35);
  color: var(--text-1);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
}

.ide-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 42px;
  padding: 0 8px 0 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.ide-tabs { display: flex; height: 100%; overflow-x: auto; scrollbar-width: none; }
.ide-tabs::-webkit-scrollbar { display: none; }
.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: default;
}
button.ide-tab { cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease; }
button.ide-tab:hover { color: var(--text-1); }
.ide-tab.is-active { color: var(--text-1); background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); }
.ide-tab:focus-visible { outline-offset: -3px; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.dot-js { background: #d9a400; }
.dot-srv { background: #22a35d; }
.dot-run { background: #ea8a12; }

.ide-actions { display: flex; align-items: center; gap: 8px; }
.ide-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}
.ide-run {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: #e6f6ec;
  color: var(--ok);
  font-size: 11px;
  font-weight: 500;
}

.ide-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 196px;
  min-height: 380px;
}

.ide-tree,
.ide-toolbox,
.ide-props { padding: 14px 12px; font-size: 11.5px; }
.ide-tree, .ide-toolbox { border-right: 1px solid var(--line); }
.ide-props { border-left: 1px solid var(--line); }

.tree-h { margin: 0 8px 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.ide-tree ul, .ide-toolbox ul { list-style: none; }
.ide-tree li, .ide-toolbox li { padding: 4px 8px; border-radius: 5px; color: var(--text-2); }
.ide-tree li > ul { padding-left: 12px; margin-top: 2px; }
.ide-tree li.sel, .ide-toolbox li.sel { background: var(--accent-soft); color: var(--accent-ink); }
.ide-tree li.open { padding-bottom: 0; }

.ide-canvas {
  position: relative;
  display: flex;
  padding: 22px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(15, 23, 42, 0.14) 1px, transparent 1px);
  background-size: 16px 16px;
  min-width: 0;
}

.props-h { margin: 0 0 12px; font-weight: 600; color: var(--text-1); }
.props-h span { margin-left: 6px; font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; color: var(--text-3); }
.ide-props dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 0; }
.ide-props dt { color: var(--text-3); }
.ide-props dd { margin: 0; color: var(--text-1); }
.ide-props .mono { font-size: 11px; }
.ide-props .link { color: var(--accent-ink); }

/* The form being designed / run */
.form-mock {
  position: relative;
  align-self: flex-start;
  width: 100%;
  background: #fff;
  color: var(--text-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px -14px rgba(15, 23, 42, 0.3);
  font-size: 11.5px;
}
.fm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.fm-title { margin-right: auto; font-size: 13px; font-weight: 600; }
.fm-btn {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}
.fm-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }

.fm-grid { padding-bottom: 4px; }
.fm-row {
  display: grid;
  grid-template-columns: 1.3fr 1.6fr 0.7fr 0.8fr;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid #eef1f5;
  white-space: nowrap;
}
.fm-row > span { overflow: hidden; text-overflow: ellipsis; }
.fm-row-h { color: var(--text-3); font-size: 10.5px; font-weight: 500; }
.tag {
  justify-self: start;
  padding: 1px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 500;
}
.tag-ok { background: #e6f6ec; color: var(--ok); }
.tag-warn { background: #fdf1e1; color: var(--warn); }

/* Selection outline around the grid control (designer state) */
.fm-selection {
  position: absolute;
  inset: 44px 6px 6px;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  pointer-events: none;
}
.fm-handle { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid var(--accent); }
.fm-handle.tl { left: -4px; top: -4px; }
.fm-handle.tr { right: -4px; top: -4px; }
.fm-handle.bl { left: -4px; bottom: -4px; }
.fm-handle.br { right: -4px; bottom: -4px; }

.fm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px 12px 16px; }
.fm-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--text-3); }
.fm-fields .wide { grid-column: 1 / -1; }
.fm-input {
  display: block;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text-1);
  font-size: 11.5px;
}
.fm-select { position: relative; padding-right: 22px; }
.fm-select::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
}
.fm-area { min-height: 44px; }
.form-mock-edit .fm-btn-primary { outline: 1px dashed var(--accent); outline-offset: 3px; }

.fm-toast {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--ink-900);
  color: #fff;
  font-size: 11px;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}

/* Code panes */
.code {
  margin: 0;
  grid-column: span 2;
  padding: 20px 22px;
  overflow: auto;
  background: var(--surface);
  color: var(--text-1);
  font-size: 11.75px;
  line-height: 1.75;
  tab-size: 2;
  font-variant-ligatures: none;
}
.code .kw { color: var(--code-kw); }
.code .fn { color: var(--code-fn); }
.code .str { color: var(--code-str); }
.code .cm { color: var(--code-cm); font-style: italic; }

/* Running app pane */
.ide-body-run {
  display: flex;
  grid-template-columns: none;
  padding: 22px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(15, 23, 42, 0.14) 1px, transparent 1px);
  background-size: 16px 16px;
}
.browser-mock {
  position: relative;
  flex: 1;
  max-width: 640px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px -14px rgba(15, 23, 42, 0.3);
}
.bm-bar { display: flex; align-items: center; height: 32px; padding: 0 12px; background: #f1f4f8; border-bottom: 1px solid var(--line); }
.bm-url {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  text-align: center;
}
.form-mock-live { border-radius: 0; box-shadow: none; }

/* Tabbed variant: panes stack in the same box */
.ide-panes { position: relative; }
.ide-pane[hidden] { display: none; }
.ide-tabbed .ide-body { min-height: 420px; }

/* ---------- Trust strip ------------------------------------------------- */
.strip {
  padding: calc(var(--hero-bleed) + 56px) 0 56px;
  border-bottom: 1px solid var(--line);
}
.strip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  list-style: none;
}
.strip-list li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 500; }
.strip-list svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* ---------- Sections ---------------------------------------------------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background: linear-gradient(180deg, #f3f6fd 0%, var(--paper) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text-1);
}

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.section-head p { margin-top: 20px; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.section-head-center { margin-inline: auto; text-align: center; }
.section-head-wide { max-width: 820px; }

/* Shared check list */
.check-list { list-style: none; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-2);
}
.check-list li:last-child { margin-bottom: 0; }
.check-list strong { font-weight: 600; color: var(--text-1); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%232e6bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Video ------------------------------------------------------- */
.section-video { padding-top: 96px; }
.video-frame { max-width: 960px; margin-inline: auto; }
.video-poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 30px 70px -30px rgba(15, 23, 42, 0.4);
  cursor: pointer;
  font: inherit;
  color: #fff;
}
.video-poster img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 600;
  object-fit: cover;
  background: var(--paper);
}
.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-950);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.play-badge svg { margin-left: 3px; }
.video-poster:hover .play-badge { transform: translate(-50%, -50%) scale(1.06); }
.video-meta {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  gap: 14px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: rgba(11, 18, 32, 0.66);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- Product: visual + code ------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.feature-list { list-style: none; }
.feature-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list h3 { font-size: 16px; margin-bottom: 6px; }
.feature-list p { font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* ---------- Stack / database ------------------------------------------- */
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.app-tree {
  padding: 22px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-card);
}
.app-tree-head { margin-bottom: 10px; font-size: 13.5px; color: var(--text-1); }
.tree-lines { list-style: none; margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.tree-lines li {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 7px 0 7px 18px;
}
.tree-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}
.tree-lines li:last-child::after {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  bottom: -2px;
  width: 2px;
  background: var(--surface);
}
.tree-lines .node { min-width: 156px; font-family: var(--font-mono); font-size: 13px; color: var(--text-1); }
.tree-lines .node-db { color: var(--accent-ink); }
.tree-lines .desc { font-size: 13.5px; color: var(--text-3); }

.stack-copy article + article { margin-top: 36px; }
.stack-copy h3 { font-size: 20px; margin-bottom: 10px; }
.stack-copy p { font-size: 16px; line-height: 1.6; color: var(--text-2); }

/* ---------- AI ---------------------------------------------------------- */
.ai-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }

.ai-diagram {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--line-strong); /* connector colour via currentColor */
  box-shadow: var(--shadow-card);
}
.ai-diagram svg { display: block; width: 100%; height: auto; }
.dg-box { fill: #ffffff; stroke: var(--line-strong); }
.dg-box-model { fill: var(--accent-soft); stroke: rgba(46, 107, 255, 0.7); }
.dg-box-soft { fill: var(--paper); stroke: var(--line); }
.dg-box-db { fill: #ffffff; stroke: rgba(46, 107, 255, 0.5); }
.dg-t { font-family: var(--font-sans); font-size: 15px; font-weight: 500; fill: var(--text-1); }
.dg-t-ai { font-size: 18px; font-weight: 600; fill: #fff; }
.dg-t-model { font-size: 16px; font-weight: 600; fill: var(--accent-ink); }
.dg-t-mono { font-family: var(--font-mono); font-size: 12px; font-weight: 400; fill: var(--text-3); }
.dg-t-mono2 { font-family: var(--font-mono); font-size: 13.5px; font-weight: 400; }

.ai-log {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.ai-log-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  color: var(--text-1);
}
.ai-log-head::before { content: "›"; margin-right: 8px; color: var(--accent); font-weight: 600; }
.ai-log ol { list-style: none; padding: 6px 0; }
.ai-log li {
  display: grid;
  grid-template-columns: 68px 104px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 6px 14px;
  font-size: 12.5px;
}
.ai-log .op { font-family: var(--font-mono); font-size: 11px; }
.ai-log .op-add { color: var(--ok); }
.ai-log .op-mod { color: var(--warn); }
.ai-log .what { color: var(--text-3); }
.ai-log .mono { font-size: 12px; color: var(--text-1); }

/* ---------- Export / no lock-in ---------------------------------------- */
.export-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }

.flow { list-style: none; display: flex; flex-direction: column; align-items: flex-start; }
.flow-step { position: relative; padding-bottom: 30px; }
.flow-step:not(.flow-step-last)::before {
  content: "";
  position: absolute;
  left: 24px;
  bottom: 6px;
  height: 24px;
  width: 1px;
  background: var(--line-strong);
}
.flow-step:not(.flow-step-last)::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 2px;
  border: 4.5px solid transparent;
  border-top: 6px solid var(--line-strong);
}
.flow-step-last { padding-bottom: 0; }
.flow-node {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
}
.flow-node-brand { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow-node-out { background: var(--accent-soft); border-color: rgba(46, 107, 255, 0.45); color: var(--accent-ink); }
.flow-node-out .mono { font-size: 13.5px; }
.flow-node-hosts { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; }
.hosts { display: flex; flex-wrap: wrap; gap: 6px; max-width: 360px; }
.hosts span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-2);
}

.export-claim { margin-bottom: 24px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.terminal {
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-1);
  font-size: 12.5px;
  line-height: 1.75;
  overflow: auto;
  box-shadow: var(--shadow-card);
}
.terminal .prompt { margin-right: 6px; color: var(--accent-ink); }
.terminal .out { color: var(--text-3); }

/* ---------- Pricing ----------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; align-items: start; }
.price-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.price-card-main {
  border-color: rgba(46, 107, 255, 0.4);
  box-shadow: 0 30px 60px -40px rgba(46, 107, 255, 0.5);
}
.price-card h3 { font-size: 18px; margin-bottom: 12px; }
.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 26px; }
.price-amount { font-size: 46px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.price-amount-sm { font-size: 30px; }
.price-note { font-size: 14px; color: var(--text-3); }
.price-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-bottom: 30px;
  font-size: 15px;
}
.price-features li { position: relative; padding-left: 26px; }
.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%232e6bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.price-card-ai { background: var(--paper); }
.price-card-ai p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.pricing-fine { max-width: 720px; margin-top: 28px; font-size: 14px; line-height: 1.55; color: var(--text-3); }

/* ---------- Final CTA --------------------------------------------------- */
.section-cta {
  position: relative;
  padding: 128px 0;
  background: var(--surface);
  color: var(--text-1);
  text-align: center;
  overflow: hidden;
}
.section-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 70% at 50% 110%, rgba(46, 107, 255, 0.18), transparent 65%);
}
.cta-inner { position: relative; }
.cta-inner h2 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -0.03em; }
.cta-inner .hero-actions { justify-content: center; margin-top: 32px; }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { background: var(--paper); color: var(--text-1); border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; padding-top: 64px; padding-bottom: 44px; }
.footer-brand p { max-width: 320px; margin-top: 16px; font-size: 14.5px; line-height: 1.55; color: var(--text-3); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { margin-bottom: 14px; font-size: 14px; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin: 9px 0; }
.footer-cols a { font-size: 14.5px; color: var(--text-2); transition: color 0.15s ease; }
.footer-cols a:hover { color: var(--text-1); }
.footer-cols [hidden] { display: none; }
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}
.footer-legal ul { display: flex; gap: 20px; list-style: none; }
.footer-legal a:hover { color: var(--text-1); }

/* ---------- Content pages (privacy, terms, docs) ------------------------ */
.subpage { background: var(--surface); }
.site-nav ul a[aria-current="page"] { opacity: 1; color: var(--accent-ink); }

.page { padding: calc(var(--header-h) + 80px) 0 112px; }
.page-head { max-width: 720px; margin-bottom: 48px; }
.page-head h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -0.03em; line-height: 1.05; }
.page-meta { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.page-lead { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--text-2); }

.prose { max-width: 720px; }
.prose h2 { margin: 40px 0 12px; font-size: 22px; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.65; color: var(--text-2); }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
.prose strong { color: var(--text-1); font-weight: 600; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose .doc-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.prose .doc-list li { position: relative; padding-left: 26px; }
.prose .doc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%232e6bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 48px; }
.doc-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}
.doc-card h3 { font-size: 17px; margin-bottom: 10px; }
.doc-card p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

@media (max-width: 880px) {
  .doc-cards { grid-template-columns: 1fr; }
  .prose .doc-list { grid-template-columns: 1fr; }
  .page { padding-top: calc(var(--header-h) + 48px); padding-bottom: 80px; }
}

/* ---------- Video modal ------------------------------------------------- */
.video-modal {
  width: min(1100px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.video-modal::backdrop {
  background: rgba(4, 8, 18, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.video-modal-inner {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: var(--ink-900);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.video-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
}
.video-modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.video-modal-close:hover { background: rgba(255, 255, 255, 0.1); }
.video-modal video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }

/* ---------- Motion ------------------------------------------------------ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html.js .hero-title { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  html.js .hero-lead { animation: rise 0.7s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  html.js .hero-actions,
  html.js .hero-note { animation: rise 0.7s 0.16s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  html.js .hero-visual { animation: rise 0.9s 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  html.js .reveal.is-visible { opacity: 1; transform: none; }

  .video-modal[open] { animation: modal-in 0.22s ease-out; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Responsive -------------------------------------------------- */
@media (max-width: 1024px) {
  .product-grid,
  .stack-grid,
  .ai-grid,
  .export-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .feature-list li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .ai-diagram { max-width: 640px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--surface);
    color: var(--text-1);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.25);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 8px; font-size: 16px; }
  .nav-auth { margin-left: 0; flex-wrap: wrap; }
  .nav-auth .btn { flex: 1; }
}

@media (max-width: 720px) {
  :root { --hero-bleed: 72px; --section-y: 80px; --gutter: 16px; }
  .hero { padding-top: calc(var(--header-h) + 64px); }
  .hero-copy { margin-bottom: 48px; }
  .hero-lead { font-size: 17px; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 16.5px; }

  .ide-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ide-tree, .ide-toolbox, .ide-props { display: none; }
  .code { grid-column: auto; font-size: 11.5px; }
  .ide-actions .ide-chip { display: none; }

  .strip { padding-bottom: 40px; }
  .strip-list { justify-content: flex-start; gap: 14px 28px; }
  .strip-list li { font-size: 14.5px; }

  .feature-list { grid-template-columns: 1fr; }
  .feature-list li:nth-last-child(2) { border-bottom: 0; }

  .app-tree { padding: 18px 16px 20px; }
  .tree-lines li { flex-direction: column; gap: 2px; }
  .tree-lines .node { min-width: 0; }

  .pricing-grid { grid-template-columns: 1fr; }
  .price-card { padding: 24px; }
  .price-features { grid-template-columns: 1fr; }

  .ai-log li { grid-template-columns: 62px 1fr; }
  .ai-log li .mono { grid-column: 2; }

  .footer-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-legal { flex-direction: column; }

  .play-badge { width: 60px; height: 60px; }
  .video-meta { display: none; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .fm-fields { grid-template-columns: 1fr; }
}
