/* Kanso landing · direction 1b "Core". Tokens from the KANSO design system (tokens/colors.css). */
:root {
  --n900: #16181B; --n800: #23272E; --n700: #343A40; --n600: #4E545B; --n500: #6E7278;
  --n400: #9A9EA3; --n300: #C9C9C4; --n200: #DCDCD7; --n100: #EFEEEA; --n050: #F7F7F5; --n000: #FFFFFF;
  --ink-2: #3F4348;
  --primary: #0064D2; --primary-hover: #0056B3; --primary-text: #0056B3; --primary-on-dark: #6BB6FF;
  --focus: #007BFF;
  --inv-text: #006D73;
  --sans: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1312px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--n900); color: var(--n000);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--n000); color: var(--n900); padding: 10px 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 3px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--n000); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost-dark { color: var(--n000); border-color: var(--n600); }
.btn-ghost-dark:hover { border-color: var(--n400); background: var(--n800); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { padding: 0 32px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--n900); border-bottom: 1px solid var(--n800); }
.bar {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; overflow: visible; flex: none; }
.brand-word { font-size: 18px; font-weight: 600; letter-spacing: .06em; }
.nav { display: flex; gap: 32px; }
.nav a { font-size: 14px; color: var(--n400); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--n000); }
.bar-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  display: none; min-height: 40px; padding: 0 14px; border-radius: 3px; cursor: pointer;
  background: none; color: var(--n000); border: 1px solid var(--n600); font: 600 14px var(--sans);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.s-pos { --c: #007BFF; --w: rgba(0,123,255,.12); --t: #0056B3; }
.s-inv { --c: #00C4CC; --w: rgba(0,196,204,.12); --t: #006D73; }
.s-anl { --c: #FF4500; --w: rgba(255,69,0,.12); --t: #B33000; }
.s-sup { --c: #3D4EA8; --w: rgba(61,78,168,.12); --t: #2E3C82; }
.s-loy { --c: #F5A623; --w: rgba(245,166,35,.16); --t: #8A5B00; }

/* Shared */
.eyebrow {
  font: 500 11px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--n500);
}
.eyebrow-dark { color: var(--n400); }
.body { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.note { font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--n500); }
.note-dark { color: var(--n400); }
section { scroll-margin-top: 68px; }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 96px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 40px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 30px; }
.hero h1 { font-size: clamp(48px, 7.4vw, 88px); font-weight: 600; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.hero-lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--n300); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "d d" "n c"; align-items: end; gap: 0 24px; }
.core-diagram { grid-area: d; }
.hero-visual .note { grid-area: n; }
.copilot { grid-area: c; }
.core-diagram { width: 100%; height: auto; max-width: 600px; margin: 0 auto; overflow: visible; }
.d-core { font-family: var(--mono); font-size: .56px; font-weight: 500; letter-spacing: .16em; fill: var(--n900); }
.d-label { font-family: var(--mono); font-size: .62px; font-weight: 500; letter-spacing: .14em; fill: var(--n300); }
.orbit { transform-origin: 10px 10.8px; animation: orbit 90s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.copilot {
  width: 280px; margin-top: 8px;
  background: var(--n800); border: 1px solid var(--n700); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.copilot-meta { font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--n400); }
.copilot-text { font-size: 13px; line-height: 1.5; }
.copilot-actions { font: 500 12px/1.4 var(--mono); color: #00C4CC; }

/* Streams */
.streams { background: var(--n050); color: var(--n900); }
.streams {
  padding: 96px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 80px; align-items: start;
}
.streams-intro { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 108px; }
.streams h2, .intel h2 { font-size: clamp(32px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
.stream-list { border-top: 1px solid var(--n200); }
.stream {
  display: grid; grid-template-columns: 24px 140px minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--n200);
}
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.stream h3 { font-size: 20px; font-weight: 600; }
.stream p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.stream .stream-tag { font: 400 12px/1.5 var(--mono); color: var(--n500); text-align: right; white-space: nowrap; }

/* Intelligence */
.intel {
  background: var(--n000); color: var(--n900); border-top: 1px solid var(--n200); border-bottom: 1px solid var(--n200);
  padding: 96px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center;
}
.chat {
  background: var(--n050); border: 1px solid var(--n200); padding: 24px;
  display: flex; flex-direction: column; gap: 14px; min-height: 400px;
}
.chat-head { font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--n500); }
.chat-q { align-self: flex-end; max-width: 80%; background: var(--n900); color: var(--n000); padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.chat-a {
  max-width: 88%; background: var(--n000); border: 1px solid var(--n200); padding: 14px 16px;
  font-size: 14px; line-height: 1.6; color: var(--n700); display: flex; flex-direction: column; gap: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 3px;
  background: var(--w); color: var(--t); font-size: 12px; font-weight: 600;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chat-action { font: 400 12px/1.5 var(--mono); color: var(--primary-text); }
.chat-input { margin-top: auto; border: 1px solid var(--n300); border-radius: 3px; padding: 11px 14px; font-size: 14px; color: var(--n500); background: var(--n000); }
.intel-copy { display: flex; flex-direction: column; gap: 22px; }
.points { counter-reset: p; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.points li { counter-increment: p; display: flex; gap: 14px; font-size: 15px; line-height: 1.55; }
.points li::before { content: counter(p, decimal-leading-zero); font: 400 12px/1.9 var(--mono); color: var(--primary-text); flex: none; }

/* CTA */
.cta {
  padding: 112px var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
}
.cta h2 { font-size: clamp(36px, 5vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; max-width: 16ch; text-wrap: balance; }
.cta p { font-size: 17px; color: var(--n400); max-width: 30em; }

/* Footer */
.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--n800); font-size: 13px; color: var(--n400);
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .brand-mark { width: 22px; height: 22px; }
.foot-brand .brand-word { font-size: 14px; color: var(--n000); }
.foot-copy { margin-left: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer nav a { text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover { color: var(--n000); }

/* Responsive */
@media (max-width: 1080px) {
  .stream { grid-template-columns: 24px 130px minmax(0, 1fr); }
  .stream .stream-tag { grid-column: 3; text-align: left; margin-top: -14px; white-space: normal; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 64px; padding-bottom: 72px; gap: 48px; }
  .streams, .intel { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 72px; padding-bottom: 72px; }
  .streams-intro { position: static; }
  .intel .chat { order: 2; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 0;
    background: var(--n900); border-bottom: 1px solid var(--n800); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 16px; padding: 12px 0; color: var(--n300); }
  .hero-visual { grid-template-columns: minmax(0, 1fr); grid-template-areas: "d" "c" "n"; }
  .copilot { width: auto; margin-top: 24px; }
  .hero-visual .note { margin-top: 12px; }
  .d-label { font-size: .95px; }
  .d-core { font-size: .9px; }
  .stream { grid-template-columns: 14px minmax(0, 1fr); gap: 6px 14px; padding: 22px 0; }
  .stream h3 { grid-column: 2; }
  .stream p, .stream .stream-tag { grid-column: 2; margin-top: 0; }
  .chat { padding: 18px; min-height: 0; }
  .chat-q, .chat-a { max-width: 100%; }
  .cta { padding-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 420px) {
  .bar { gap: 12px; }
  .brand-word { font-size: 16px; }
  .btn-sm { padding: 0 12px; }
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit { animation: none; }
  .btn { transition: none; }
}

/* 404 */
.page-404 { min-height: 100vh; justify-content: center; }
.page-404 h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; }
