/*
 * OnisAI - shared styling for /demo and /engineering.
 *
 * Design tokens are taken from the product's own landing page (landing.html)
 * so these pages read as part of the same site rather than a bolt-on: the
 * Apple-derived 980px measure, the #f5f5f7 grey, SF Pro, 980px pill radii,
 * and the #0a66c2 brand blue.
 */
:root {
  --blue: #0a66c2;
  --blue-light: #1a8cff;
  --blue-dark: #083d77;
  --blue-bg: #f0f6ff;
  --black: #1d1d1f;
  --gray-1: #86868b;
  --gray-2: #6e6e73;
  --gray-3: #f5f5f7;
  --line: #d2d2d7;
  --white: #ffffff;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --max-w: 980px;
  --nav-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Compatibility aliases.
     /demo and /engineering carry inline <style> blocks written against the
     earlier dark palette. Mapping the old token names onto the brand palette
     recolours both pages to match the landing page without rewriting every
     rule in them. */
  --bg: var(--white);
  --bg-2: var(--gray-3);
  --panel: var(--gray-3);
  --panel-2: var(--white);
  --line-soft: var(--line);
  --text: var(--black);
  --muted: var(--gray-2);
  --dim: var(--gray-1);
  --accent: var(--blue);
  --accent-deep: var(--blue-dark);
  --good: var(--green);
  --warn: var(--amber);
  --bad: var(--red);
  --r: 18px;
  --sans: var(--font);
  --maxw: var(--max-w);
}


*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; }
:where(a, button):focus-visible {
  outline: 3px solid rgba(10,102,194,0.24);
  outline-offset: 3px;
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }

/* nav - mirrors the landing page bar */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-inner { display: flex; align-items: center; gap: 22px; height: var(--nav-h); }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px; color: var(--black); letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: var(--blue); display: grid; place-items: center;
}
.brand-mark::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--black); font-size: 13.5px; font-weight: 400; opacity: .85; }
.nav-links a:hover { opacity: 1; text-decoration: none; color: var(--blue); }
.nav-cta {
  background: var(--blue); color: #fff !important; opacity: 1 !important;
  border-radius: 980px; padding: 6px 15px; font-weight: 500;
}
.nav-cta:hover { background: var(--blue-light); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 980px; padding: 11px 22px;
  font-size: 15px; font-weight: 500; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); }
.btn-ghost { border-color: var(--line); color: var(--blue); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-bg); }

/* sections */
section { padding: 68px 0; }
section + section { border-top: 1px solid var(--line); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 12px;
}
.sec-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.sec-lead { color: var(--gray-2); font-size: 17px; max-width: 62ch; }

/* cards */
.card {
  background: var(--gray-3); border: 1px solid rgba(0,0,0,0.05);
  border-radius: 18px; padding: 26px 24px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card > p { color: var(--gray-2); font-size: 15px; }
.tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--blue); background: var(--blue-bg); border-radius: 5px; padding: 3px 8px;
}

/* spec tables */
table.spec { width: 100%; border-collapse: collapse; margin-top: 15px; }
table.spec th, table.spec td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line);
}
table.spec th {
  color: var(--gray-1); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em;
}
table.spec td { font-family: var(--mono); font-size: 12.5px; color: var(--gray-2); }
table.spec td:first-child { color: var(--black); }
table.spec tr:last-child td { border-bottom: 0; }

.formula {
  font-family: var(--mono); font-size: 13px; color: var(--blue-dark);
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 13px 15px; margin-top: 14px;
  overflow-x: auto; white-space: nowrap;
}
.note { font-size: 13.5px; color: var(--gray-1); margin-top: 12px; }
code.inl {
  font-family: var(--mono); font-size: 12.5px; color: var(--blue-dark);
  background: var(--blue-bg); padding: 2px 6px; border-radius: 5px;
}
.pull {
  border-left: 3px solid var(--blue); padding-left: 16px;
  margin: 16px 0; color: var(--black); font-size: 16px;
}

/* cta band */
.band {
  background: var(--blue-bg); border: 1px solid rgba(10,102,194,0.14);
  border-radius: 18px; padding: 40px 38px;
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
}
.band h2 { font-size: 27px; margin-bottom: 9px; }
.band p { color: var(--gray-2); max-width: 52ch; }

/* footer */
footer {
  border-top: 1px solid var(--line); padding: 34px 0;
  color: var(--gray-1); font-size: 13px; background: var(--gray-3);
}
.foot-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--gray-2); }

@media (max-width: 940px) {
  .nav-links { display: none; }
  section { padding: 48px 0; }
  .band { padding: 28px 24px; }
}

/* .hero-cta - button row, used on /engineering and the 404 page */
.hero-cta { display: flex; gap: 11px; flex-wrap: wrap; }
