:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --sunk: #f3f1ed;
  --fg: #1d1b22;
  --muted: #5d5966;
  --faint: #8e8a96;
  --line: #e7e3dc;
  --accent: #6d4aff;
  --accent-2: #9b7bff;
  --accent-soft: #efeaff;
  --shadow: 0 1px 2px rgba(20, 16, 40, 0.06), 0 12px 32px -12px rgba(40, 24, 110, 0.18);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111016;
    --surface: #18171f;
    --sunk: #1e1c26;
    --fg: #f1eff6;
    --muted: #b1acbd;
    --faint: #7f7a8c;
    --line: #2b2836;
    --accent: #9b82ff;
    --accent-2: #c2b1ff;
    --accent-soft: #241d3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre { font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.88em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.6) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #8B5CF6, #5B21B6); color: #fff;
  box-shadow: 0 6px 16px -6px var(--accent);
}
.nav { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--fg); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 11px; font-weight: 600; font-size: 15px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 620px; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(35% 45% at 72% 35%, color-mix(in srgb, #ff7ac3 22%, transparent), transparent 70%);
  filter: blur(10px);
}
.pill {
  display: inline-flex; gap: 8px; align-items: center; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px;
}
.pill b { color: var(--accent); }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.035em; margin: 22px auto 18px; max-width: 900px; }
h1 .grad { background: linear-gradient(90deg, var(--accent), #ff6fb5 60%, #ffaa5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.platforms { margin-top: 22px; color: var(--faint); font-size: 14px; }

/* app preview */
.preview {
  margin: 56px auto 0; max-width: 980px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden; text-align: start;
}
.preview .bar { display: flex; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sunk); }
.preview .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.preview .body { display: grid; grid-template-columns: 210px 1fr 250px; min-height: 340px; }
.pv-side { border-inline-end: 1px solid var(--line); padding: 14px; font-size: 13px; color: var(--muted); background: var(--sunk); }
.pv-side div { padding: 5px 8px; border-radius: 7px; }
.pv-side .on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pv-main { padding: 22px 26px; }
.pv-main h3 { margin: 0 0 6px; font-size: 22px; }
.pv-main p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.pv-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pv-col { background: var(--sunk); border-radius: 10px; padding: 8px; font-size: 12px; }
.pv-col b { display: block; margin: 2px 4px 6px; color: var(--muted); font-weight: 600; }
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; margin-bottom: 6px; }
.pv-card span { display: inline-block; margin-top: 4px; padding: 0 6px; border-radius: 6px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.pv-chat { border-inline-start: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pv-chat .t { font-weight: 600; margin-bottom: 4px; }
.bub { padding: 7px 11px; border-radius: 14px; background: var(--sunk); max-width: 88%; }
.bub.me { align-self: flex-end; background: var(--accent); color: #fff; }
.pv-call { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-call i { aspect-ratio: 16/10; border-radius: 8px; background: linear-gradient(135deg, #2c2540, #48366f); position: relative; }
.pv-call i.talk { outline: 3px solid #4ade80; outline-offset: -3px; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; line-height: 1.15; margin: 8px 0 14px; }
.sub { color: var(--muted); max-width: 640px; margin: 0 0 36px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .ic {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.card .ic svg { width: 21px; height: 21px; }
.card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; color: var(--muted); }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.checks b { color: var(--fg); }
.term {
  background: #15131c; color: #e9e6f2; border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.75; overflow-x: auto;
}
.term .c { color: #8a83a0; }
.term .p { color: #b9a8ff; }
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl .card { display: flex; flex-direction: column; gap: 10px; }
.dl .card .btn { margin-top: auto; align-self: flex-start; }
.band {
  border-radius: 24px; padding: 44px; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, #ff7ac3 12%, var(--surface)));
  border: 1px solid var(--line);
}
footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 36px 0 80px; }
.toc { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14px; padding-inline-end: 6px; }
.toc input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); padding: 0 12px; margin-bottom: 14px; font: inherit;
}
.toc h4 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); }
.toc a:hover { background: var(--sunk); text-decoration: none; color: var(--fg); }
.toc a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sunk); margin-bottom: 26px; }
.tabs a { padding: 7px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tabs a:hover { text-decoration: none; }
.md { max-width: 820px; }
.md h1 { font-size: 38px; text-align: start; margin: 0 0 14px; }
.md h2 { font-size: 26px; margin: 46px 0 12px; padding-top: 10px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.md h3 { font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 80px; }
.md p, .md li { color: var(--muted); }
.md strong, .md b { color: var(--fg); }
.md li { margin: 6px 0; }
.md code { background: var(--sunk); padding: 2px 6px; border-radius: 6px; color: var(--fg); }
.md pre { background: #15131c; color: #e9e6f2; padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 14px 0; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 11px; text-align: start; vertical-align: top; }
.md th { background: var(--sunk); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.md blockquote { margin: 16px 0; padding: 10px 16px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
mark { background: color-mix(in srgb, #ffd54a 55%, transparent); color: inherit; border-radius: 3px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .grid, .dl { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .preview .body { grid-template-columns: 1fr; }
  .pv-side, .pv-chat { display: none; }
  .docs { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; max-height: none; display: none; margin-bottom: 20px; }
  .toc.open { display: block; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  .grid, .dl { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
  .hero { padding: 56px 0 48px; }
  section { padding: 52px 0; }
  .band { padding: 30px 20px; }
  .pv-board { grid-template-columns: 1fr 1fr; }
  .pv-col:last-child { display: none; }
}

/* See it in action */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.shots figure { margin: 0; }
.shots img, .phones img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.shots figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 760px; margin: 26px auto 0; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } .phones { gap: 10px; } }

/* Atrium Cloud signup */
.signup { display: grid; gap: 10px; margin-top: 16px; text-align: start; }
.signup input[type=email] { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.signup input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.signup .consent input { margin-top: 3px; }
.signup button { justify-self: start; }
.signup-msg { min-height: 1.2em; font-size: 14px; margin: 0; }
.signup-msg.ok { color: #16a34a; }
.signup-msg.err { color: #dc2626; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Privacy note */
.wrap.narrow { max-width: 760px; }
#privacy p { color: var(--muted); line-height: 1.7; }

.btn.kofi { background: #ff5e5b; border-color: transparent; color: #fff; }
.btn.kofi:hover { background: #f04845; }
