/* Oness single-page site. No external fonts or libraries. */
:root {
  --bg: #070a0f;
  --bg-alt: #0a0f16;
  --panel: #0e141d;
  --panel-2: #121a25;
  --line: rgba(148, 170, 200, 0.14);
  --line-strong: rgba(148, 170, 200, 0.28);
  --text: #e6ecf3;
  --muted: #93a1b3;
  --accent: #5ee6d0;
  --accent-dim: rgba(94, 230, 208, 0.14);
  --warn: #f5b85c;
  --danger: #ef6b6b;
  --keep: #6b7686;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --r: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--accent); color: #04110f; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

.eyebrow, .k { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.num { color: var(--accent); margin-right: 10px; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7, 10, 15, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.8; }
.brand-mark .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.brand-sm { font-size: 16px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted); transition: color 0.2s, background-color 0.2s; }
.nav a:hover { color: var(--text); }
.nav a.is-here { color: var(--text); background: rgba(148, 170, 200, 0.1); }

.nav a.nav-login { margin-left: 6px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; }
.nav a.nav-login:hover { border-color: var(--accent); background: var(--accent-dim); }
.client-line { margin-top: 20px; color: var(--muted); font-size: 16px; }
.client-line a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero */
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: center; padding: 72px 0 64px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 40%, rgba(94, 230, 208, 0.09), transparent 70%); pointer-events: none; }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 38%, #000 72%); mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 38%, #000 72%); }
.hero-in { position: relative; }
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 650; max-width: 15ch; margin-top: 20px; text-wrap: balance; }
.hl { color: var(--accent); }
.lede { margin-top: 24px; max-width: 56ch; font-size: clamp(17px, 1.6vw, 20px); color: #b9c4d2; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(148, 170, 200, 0.04); font-size: 15.5px; font-weight: 550; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, transform 0.2s; }
.btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #04110f; }
.btn-solid:hover { background: #86f0df; border-color: #86f0df; }
.btn-sm { padding: 7px 16px; font-size: 13.5px; min-width: 76px; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 64px; border-top: 1px solid var(--line); }
.pillars a { display: block; padding: 16px 16px 4px 0; font-size: 15px; color: var(--muted); transition: color 0.2s; }
.pillars a:hover { color: var(--text); }
.pillars .num { display: block; font-family: var(--mono); font-size: 12px; margin-bottom: 4px; }

/* ---------- sections */
.sec { padding: clamp(72px, 10vw, 128px) 0; border-bottom: 1px solid var(--line); }
.sec-alt { background: var(--bg-alt); }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 640; margin-top: 16px; text-wrap: balance; }
.sec-lede { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 62ch; }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- service cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; padding: 26px 22px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color 0.25s, opacity 0.6s ease, transform 0.6s ease; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(94, 230, 208, 0.1), transparent 70%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.ico { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-top: 20px; font-size: 18px; font-weight: 620; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }
.cards .card:nth-child(2) { transition-delay: 0s, 0.07s, 0.07s; }
.cards .card:nth-child(3) { transition-delay: 0s, 0.14s, 0.14s; }
.cards .card:nth-child(4) { transition-delay: 0s, 0.21s, 0.21s; }

/* ---------- shared: segmented buttons, points */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.seg button { padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: color 0.2s, background-color 0.2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg-col { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.points li { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.points h3 { font-size: 17px; font-weight: 620; }
.points p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }

/* ---------- agent workflow demo */
.flow { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.flow-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.flow-stage { padding: 12px 10px; background-color: #0a0f16; background-image: radial-gradient(rgba(148, 170, 200, 0.16) 1px, transparent 1px); background-size: 24px 24px; background-position: 12px 12px; }
#flow-svg { display: block; width: 100%; height: auto; max-height: 640px; margin: 0 auto; }
.fedge { fill: none; stroke: rgba(148, 170, 200, 0.26); stroke-width: 1.4; transition: stroke 0.3s; }
.fedge.is-live { stroke: rgba(94, 230, 208, 0.6); }
.pkt { fill: var(--accent); filter: drop-shadow(0 0 5px rgba(94, 230, 208, 0.9)); }
.pkt-warn { fill: var(--warn); filter: drop-shadow(0 0 5px rgba(245, 184, 92, 0.9)); }
.fnode { cursor: pointer; outline: none; }
.fnode rect { fill: #0e141d; stroke: rgba(148, 170, 200, 0.3); stroke-width: 1.2; transition: stroke 0.3s, fill 0.3s; }
.fnode .fk { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--muted); }
.fnode .fn { font-family: var(--sans); font-size: 13px; font-weight: 600; fill: var(--text); }
.fnode .fs { fill: rgba(148, 170, 200, 0.35); transition: fill 0.3s; }
.fnode:hover rect, .fnode.is-sel rect { stroke: rgba(230, 236, 243, 0.7); }
.fnode:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.fnode.is-active rect { stroke: var(--accent); fill: #0f1d22; }
.fnode.is-active .fs { fill: var(--accent); animation: blink 0.9s ease-in-out infinite; }
.fnode.is-wait rect { stroke: var(--warn); fill: #1d1a12; }
.fnode.is-wait .fs { fill: var(--warn); animation: blink 0.9s ease-in-out infinite; }
.fnode.is-done .fs { fill: var(--accent); }
@keyframes blink { 50% { opacity: 0.25; } }
.flow-foot { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-top: 1px solid var(--line); }
.flow-detail, .flow-log { padding: 16px 18px; min-height: 176px; }
.flow-detail { border-right: 1px solid var(--line); }
.flow-detail .v { margin-top: 8px; font-size: 15.5px; color: #c3cdd9; }
.flow-detail .v b { display: block; color: var(--text); font-size: 17px; font-weight: 620; margin-bottom: 2px; }
.sim { margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 10.5px; letter-spacing: 0.08em; }
#flow-log { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--muted); }
#flow-log li { display: grid; grid-template-columns: 44px 104px minmax(0, 1fr); gap: 8px; animation: logIn 0.3s ease; }
#flow-log li:last-child { color: var(--text); }
#flow-log .who { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#flow-log .warn { color: var(--warn); }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } }

/* ---------- SME steps */
.sme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.sme .sec-head { margin-bottom: 0; position: sticky; top: 96px; }
.ticks { margin-top: 28px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: #c3cdd9; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.42em; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.steps { position: relative; display: grid; gap: 14px; }
.steps::before { content: ""; position: absolute; left: 27px; top: 24px; bottom: 24px; width: 1px; background: linear-gradient(var(--accent), rgba(94, 230, 208, 0.05)); }
.step { position: relative; padding: 20px 22px 22px 76px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.step-n { position: absolute; left: 12px; top: 18px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-size: 12px; }
.step h3 { font-size: 18px; font-weight: 620; }
.step p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }

/* ---------- 3D viewer */
.viz { display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.viz-stage { position: relative; height: clamp(360px, 56vw, 580px); background: #0b1017; }
#viz-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline-offset: -3px; }
#viz-canvas.is-drag { cursor: grabbing; }
.viz-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.viz-labels span { position: absolute; left: 0; top: 0; padding: 1px 7px; border-radius: 999px; background: rgba(7, 10, 15, 0.78); border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 11px; white-space: nowrap; will-change: transform; }
.viz-zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.viz-zoom button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(7, 10, 15, 0.7); font-size: 19px; line-height: 1; cursor: pointer; transition: border-color 0.2s; }
.viz-zoom button:hover { border-color: var(--accent); }
.viz-pick { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: rgba(7, 10, 15, 0.78); border: 1px solid var(--line); font-size: 14px; }
.viz-pick .nm { font-weight: 600; }
.viz-pick .ph { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.viz-pick .ph.p-demo { color: var(--danger); }
.viz-pick .ph.p-new { color: var(--accent); }
.viz-fallback { display: none; position: absolute; inset: 0; place-items: center; color: var(--muted); padding: 24px; text-align: center; }
.no-gl .viz-fallback { display: grid; }
.no-gl canvas, .no-gl .viz-zoom, .no-gl .viz-pick { display: none; }
.viz-side { display: flex; flex-direction: column; gap: 22px; padding: 20px; border-left: 1px solid var(--line); }
.ctl { display: grid; gap: 10px; }
.ctl .k { display: flex; justify-content: space-between; align-items: baseline; }
.ctl output { color: var(--text); letter-spacing: 0.02em; text-transform: none; font-size: 13px; }
.note { font-size: 14.5px; color: var(--muted); min-height: 4.6em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: #c3cdd9; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-demo { background: var(--danger); }
.sw-new { background: var(--accent); }
.sw-keep { background: var(--keep); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 24px; margin: 0; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.small { font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- footer */
.foot { padding: 28px 0 36px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.foot-note { font-size: 13.5px; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz { grid-template-columns: minmax(0, 1fr); }
  .viz-side { border-left: 0; border-top: 1px solid var(--line); }
  .note { min-height: 0; }
  .sme { grid-template-columns: minmax(0, 1fr); }
  .sme .sec-head { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav a { padding: 8px 6px; font-size: 13px; }
  .nav a.nav-login { padding: 6px 10px; margin-left: 4px; }
  .hero { min-height: 0; padding: 56px 0 40px; }
  .hero-net { opacity: 0.6; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 44px; }
  .points { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .flow-foot { grid-template-columns: minmax(0, 1fr); }
  .flow-detail { border-right: 0; border-bottom: 1px solid var(--line); min-height: 124px; }
  .flow-log { min-height: 190px; }
  #flow-log li { grid-template-columns: 40px 84px minmax(0, 1fr); gap: 6px; font-size: 11.5px; }
  .flow-bar .seg { max-width: 100%; overflow-x: auto; }
  .sec-head { margin-bottom: 32px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .brand span { font-size: 17px; }
  .nav { gap: 0; }
  .nav a:not(.nav-login):not([href="#viz"]):not([href="#agents"]) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .fnode.is-active .fs, .fnode.is-wait .fs, #flow-log li { animation: none; }
}
