/* Sona marketing pages — one shared system.
 *
 * A light, drafted page: hairline rails frame the content column, sections
 * are ruled cells rather than floating cards, the nav is a small solid pill,
 * headlines are a tight grotesk in two tones, and a dashed blueprint grid
 * sits behind the product. One trust blue on cool slate neutrals; no glass,
 * glows, gradients or decorative motion. One dark band holds the product
 * tour. Light is the default; dark is the same drawing on deep slate.
 *
 * Used by index, docs, changelog, company, contact, privacy, terms, security.
 */

/* ─── Tokens ─── */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --panel: #f8fafc;
  --card: #ffffff;
  --card-2: #f8fafc;
  --raise: #f1f5f9;
  --raise-2: #e2e8f0;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --mute: #7c879a;          /* second tone of a headline (large text only) */
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --dash: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-ink: #1d4ed8;
  --accent-wash: rgba(37,99,235,.08);
  --on-accent: #ffffff;
  --nav-bg: #ffffff;
  --foot-bg: #f8fafc;
  /* Keys, after eden.so: dark key in daylight */
  --key-top: #383838; --key-bot: #111111; --key-hover: #383838; --key-ink: #ffffff;
  --key-edge: rgba(255,255,255,.18); --key-edge-hover: rgba(255,255,255,.22);
  --sec-top: #ffffff; --sec-bot: #f5f6f8; --sec-line: rgba(15,23,42,.10); --sec-edge: #ffffff;
  /* Cursor-lit dot grid */
  --dot-rgb: 15,23,42; --dot-base: .11; --dot-peak: .7;
  --tray: #f1f5f9; --tray-line: #e2e8f0; --seg-on: #ffffff; --seg-off: #64748b;
  --seg-drop: 0 1px 2px rgba(15,23,42,.08), 0 0 0 1px rgba(15,23,42,.06);
  --shadow-card: 0 1px 2px rgba(15,23,42,.05);
  --shadow-float: 0 1px 3px rgba(15,23,42,.06), 0 12px 32px -16px rgba(15,23,42,.18);
  --shadow-nav: 0 1px 2px rgba(15,23,42,.06), 0 4px 12px -6px rgba(15,23,42,.1);
}
html[data-theme="dark"],
.dark-scope {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-2: #0f172a;
  --panel: #0f172a;
  --card: #111a2e;
  --card-2: #16213a;
  --raise: #16213a;
  --raise-2: #1e293b;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --mute: #64748b;
  --line: #1e293b;
  --line-2: #334155;
  --dash: #334155;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-ink: #93c5fd;
  --accent-wash: rgba(96,165,250,.12);
  --on-accent: #0b1120;
  --nav-bg: #111a2e;
  --foot-bg: #0f172a;
  --key-top: #ffffff; --key-bot: #e5e7eb; --key-hover: #ffffff; --key-ink: #0b1120;
  --key-edge: rgba(255,255,255,.18); --key-edge-hover: rgba(255,255,255,.22);
  --sec-top: rgba(255,255,255,.08); --sec-bot: rgba(255,255,255,.04); --sec-line: rgba(255,255,255,.10); --sec-edge: rgba(255,255,255,.07);
  --dot-rgb: 241,245,249; --dot-base: .08; --dot-peak: .85;
  --tray: #111a2e; --tray-line: #1e293b; --seg-on: #1e293b; --seg-off: #94a3b8;
  --seg-drop: 0 0 0 1px #334155;
  --shadow-card: 0 1px 2px rgba(0,0,0,.3);
  --shadow-float: 0 1px 3px rgba(0,0,0,.35), 0 12px 32px -16px rgba(0,0,0,.6);
  --shadow-nav: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px -6px rgba(0,0,0,.5);
}
:root {
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --word: 'DM Sans', system-ui, sans-serif;   /* the logo wordmark only */
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --ease-out: cubic-bezier(0,0,.2,1);
  --ease-io: cubic-bezier(.4,0,.2,1);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  /* No background on body: the rails sit at z-index -1, which paints under
     the body's own background. The colour comes from <html>. */
  min-height: 100vh; color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.6; letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--accent-wash); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ─── The frame: two hairline rails at the edges of the content column ─── */
.rails { position: fixed; top: 0; bottom: 0; left: 50%; z-index: -1; pointer-events: none;
  width: min(var(--wrap), 100%); transform: translateX(-50%);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.ruled { border-top: 1px solid var(--line); }

/* Blueprint: dashed squares, faded at the edges. Drawn with an inline SVG
   pattern so it follows the theme through currentColor. */
.blueprint { position: absolute; inset: 0; z-index: -1; color: var(--dash); pointer-events: none;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 35%, transparent 100%);
          mask-image: radial-gradient(70% 70% at 50% 50%, #000 35%, transparent 100%); }
.blueprint svg { width: 100%; height: 100%; }

/* ─── Type ─── */
h1, h2, h3 { text-wrap: balance; color: var(--ink); font-weight: 500; }
h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; }
h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -.01em; font-weight: 600; }
/* Two-tone headline: the second clause steps back */
.tone { color: var(--mute); }
p { text-wrap: pretty; }
.lede { font-size: 1.06rem; line-height: 1.6; color: var(--ink-2); }
.lede b, .lede strong { color: var(--ink); font-weight: 600; }
.small { font-size: .875rem; color: var(--ink-3); }
.link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }

/* ─── Buttons, after eden.so ───
   A key with a lit top edge and three stacked soft shadows. On hover the
   gradient flattens, the key lifts 2px, the shadow deepens and the arrow
   nudges forward; pressing sets it back down. 200ms ease-out throughout. */
.btn, .mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border-radius: 10px; border: 0;
  font-size: 14.5px; font-weight: 500; letter-spacing: -.015em; text-decoration: none; cursor: pointer; white-space: nowrap;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; will-change: transform;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out);
}
.btn-go, .mini.go {
  color: var(--key-ink); background: linear-gradient(var(--key-top), var(--key-bot));
  box-shadow: inset 0 1px 0 var(--key-edge), 0 1px 1.5px rgba(0,0,0,.16), 0 3px 6px -1px rgba(0,0,0,.22), 0 8px 14px -4px rgba(0,0,0,.18);
}
.btn-go:hover, .mini.go:hover {
  background: linear-gradient(var(--key-hover), var(--key-hover));
  box-shadow: inset 0 1px 0 var(--key-edge-hover), 0 1px 2px rgba(0,0,0,.18), 0 5px 10px -1px rgba(0,0,0,.26), 0 12px 22px -4px rgba(0,0,0,.22);
}
.btn-line, .mini {
  color: var(--ink); background: linear-gradient(var(--sec-top), var(--sec-bot));
  box-shadow: inset 0 1px 0 var(--sec-edge), 0 0 0 1px var(--sec-line), 0 1px 2px rgba(15,23,42,.06), 0 4px 10px -4px rgba(15,23,42,.12);
}
.btn-line:hover, .mini:hover {
  box-shadow: inset 0 1px 0 var(--sec-edge), 0 0 0 1px var(--sec-line), 0 2px 4px rgba(15,23,42,.08), 0 10px 18px -6px rgba(15,23,42,.2);
}
@media (hover: hover) { .btn:hover, .mini:hover { transform: translateY(-2px); } }
.btn:active, .mini:active { transform: translateY(0); transition-duration: .08s; }
.btn[disabled], .mini[disabled] { opacity: .5; cursor: progress; transform: none; }
.btn-arr { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease-out); }
.btn:hover .btn-arr, .btn:focus-visible .btn-arr { transform: translateX(2px); }
.btn-lg { min-height: 44px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn-sm .btn-arr { width: 14px; height: 14px; }
.mini { min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; }

/* ─── Cursor-lit dot grid (drawn by site.js) ───
   Dots brighten, grow and lean toward the pointer within ~150px, then ease
   back. Static on touch screens and with reduced motion. */
.dots { position: absolute; left: 0; top: 0; width: 100%; height: min(820px, 100%); z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(85% 85% at 50% 38%, #000 45%, transparent 100%);
          mask-image: radial-gradient(85% 85% at 50% 38%, #000 45%, transparent 100%); }

/* ─── Nav: a floating pill ─── */
.nav { position: sticky; top: 12px; z-index: 40; padding: 0 16px; margin-top: 12px; }
.nav .wrap { display: flex; align-items: center; gap: 22px; max-width: 780px; height: 52px; padding: 0 8px 0 14px;
  background: var(--nav-bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-nav); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--word); font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.logo-mark { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.mark-img { display: block; width: 100%; height: 100%; }
.nav-links { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0 auto 0 6px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-signin { background: none; border: 0; padding: 6px 4px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: color .15s; }
.nav-signin:hover { color: var(--ink); }
.user-menu { position: relative; cursor: pointer; }
.user-avatar { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--raise-2); box-shadow: 0 0 0 1px var(--line); color: var(--ink); font-weight: 600; font-size: 12.5px; }

/* Mobile menu: one button opens and closes it; the sheet unrolls from under
   the nav and the rows rise in one after another. */
.menu-btn { display: none; position: relative; width: 40px; height: 40px; margin-left: auto; border: 0; border-radius: 10px; cursor: pointer; color: var(--ink); background: linear-gradient(var(--sec-top), var(--sec-bot)); box-shadow: inset 0 1px 0 var(--sec-edge), 0 0 0 1px var(--sec-line), 0 1px 2px rgba(15,23,42,.06); }
.menu-btn span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1.6px; margin: 0; border-radius: 2px; background: currentColor; transition: transform .45s cubic-bezier(.32,.72,0,1); }
.menu-btn span:nth-child(1) { transform: translate(-50%, -4px); }
.menu-btn span:nth-child(2) { transform: translate(-50%, 3px); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, -.5px) rotate(-45deg); }
/* While the menu is open the body scroll is locked and Lenis clips <html>;
   that makes <body> the scroller, and a sticky nav would slide away with the
   page. Pin it instead, keeping its space so nothing shifts. */
html.menu-is-open .nav { position: fixed; left: 0; right: 0; top: 12px; margin-top: 0; }
html.menu-is-open body { padding-top: 64px; }
.mobile-menu { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 39; display: flex; flex-direction: column;
  padding: 80px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .32s cubic-bezier(.4,0,1,1), visibility 0s linear .32s; }
.mobile-menu.open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .55s cubic-bezier(.32,.72,0,1), visibility 0s; }
.mm-links { list-style: none; padding: 0; margin: 0; }
.mm-links a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 18px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color .2s, padding-left .25s cubic-bezier(.32,.72,0,1); }
.mm-links a:active { background: var(--raise); padding-left: 10px; }
.mm-links b { font-size: 28px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; color: var(--ink); }
.mm-links small { grid-column: 1; font-size: 14.5px; color: var(--ink-3); }
.mm-links svg { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--ink-3); }
.mm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 28px; }
.mm-actions .btn { width: 100%; min-height: 46px; }
.mm-links li, .mm-actions { opacity: 0; transform: translateY(18px); transition: opacity .2s ease, transform .2s ease; }
.mobile-menu.open .mm-links li, .mobile-menu.open .mm-actions { opacity: 1; transform: none;
  transition: opacity .45s ease, transform .6s cubic-bezier(.32,.72,0,1); transition-delay: calc(90ms + var(--i, 0) * 45ms); }

/* ─── Surfaces ─── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-card); }
.icon-sq { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 7px; color: var(--ink-2);
  background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20,20,30,.06); }
.icon-sq svg { width: 16px; height: 16px; }
/* A ruled grid of cells: hairlines between, one border around */
.cells { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cells > * { background: var(--bg); }

/* ─── Sub-page shell ─── */
.page { position: relative; isolation: isolate; padding: clamp(64px, 10vh, 104px) 0 112px; }
.page-head { max-width: var(--col, 720px); margin: 0 auto 52px; }
.page-head .lede { max-width: 58ch; margin-top: 18px; }
.page-head .updated { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* Long-form text: legal pages, docs */
.prose { max-width: 720px; margin: 0 auto; color: var(--ink-2); font-size: 16.5px; line-height: 1.72; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); line-height: 1.2; letter-spacing: -.025em; margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prose h2 + * { margin-top: 12px; }
.prose h3 { margin-top: 32px; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose a, a.inline { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.prose a:hover, a.inline:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ink-3); }
.prose code { overflow-wrap: anywhere; font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 5px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.prose pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.65; overflow-x: auto; color: var(--ink); }
.note { padding: 14px 16px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.note strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ─── Footer ─── */
.site-foot { position: relative; background: var(--foot-bg); border-top: 1px solid var(--line); padding: 64px 0 36px; }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.foot-brand p { margin-top: 14px; max-width: 34ch; color: var(--ink-3); font-size: 15px; }
.foot-sub { display: flex; gap: 8px; margin-top: 22px; max-width: 380px; }
.foot-sub input { flex: 1; min-width: 0; min-height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink); font-size: 15px; }
.foot-sub input::placeholder { color: var(--ink-3); }
.foot-sub input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.foot-col h3 { font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.foot-col a { display: block; padding: 5px 0; font-size: 14.5px; text-decoration: none; color: var(--ink-3); transition: color .15s; }
.foot-col a:hover { color: var(--ink); }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding-top: 26px; font-size: 13.5px; color: var(--ink-3); }
.foot-base .links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-base a { color: var(--ink-3); text-decoration: none; }
.foot-base a:hover { color: var(--ink); }
.foot-base .theme-toggle { margin-left: auto; }
.foot-badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.foot-badges img { height: 40px; width: auto; }
.ph-crop { display: block; height: 40px; overflow: hidden; border-radius: 8px; }

/* ─── Theme switch: sits in the footer ─── */
.theme-toggle { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--tray); box-shadow: inset 0 0 0 1px var(--tray-line); }
.theme-toggle button { width: 30px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; transition: background-color .15s, color .15s; }
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-drop); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .nav { padding: 0 10px; }
  .nav .wrap { padding: 0 6px 0 12px; }
  .nav-links, .nav-right { display: none; }
  .menu-btn { display: block; }
  .rails { display: none; }
  .page { padding: 48px 0 80px; }
  .page-head { margin-bottom: 36px; }
  .foot-base .theme-toggle { margin-left: 0; }
  .site-foot { padding: 52px 0 40px; }
}
@media (min-width: 761px) { .mobile-menu { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
