/* ============================================================
   Peki AI — responsive marketing site
   Rebuilt from the fixed-width 1440/390 mockup artboards into a
   single fluid page. Breakpoints: 1180 / 980 / 900 / 760 / 560.
   ============================================================ */

:root {
  --bg: #040810;
  --panel: #070d18;
  --ink: #eef6ff;
  --cyan: #3fb6ff;
  --cyan-hi: #63c5ff;
  --ice: #a5ecff;
  --violet: #8b7cf6;
  --violet-lt: #a99bfa;
  --deep: #04121f;

  --ink-88: rgba(238, 246, 255, .88);
  --ink-78: rgba(238, 246, 255, .78);
  --ink-72: rgba(238, 246, 255, .72);
  --ink-62: rgba(238, 246, 255, .62);
  --ink-55: rgba(238, 246, 255, .55);
  --ink-45: rgba(238, 246, 255, .45);
  --ink-40: rgba(238, 246, 255, .40);
  --ink-35: rgba(238, 246, 255, .35);
  --ink-30: rgba(238, 246, 255, .30);
  --line: rgba(238, 246, 255, .12);
  --line-soft: rgba(238, 246, 255, .07);
  --fill: rgba(238, 246, 255, .025);

  --maxw: 1240px;
  --gut: clamp(20px, 4.6vw, 40px);
  --sec: clamp(64px, 9vw, 110px);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --sans: 'Sora', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--ink); }

.mono { font-family: var(--mono); }
.cyan { color: var(--cyan); }
.ice { color: var(--ice); }
.violet { color: var(--violet-lt); }

/* Anchors clear the sticky header. */
[id] { scroll-margin-top: 84px; }

/* ---------- a11y ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 12px 18px; background: var(--cyan); color: var(--deep);
  font-size: 14px; font-weight: 600; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

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

.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout primitives ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--sec) var(--gut) 0;
}
.section--last { padding-bottom: clamp(64px, 8vw, 96px); }

.eyebrow {
  font-family: var(--mono);
  font-size: clamp(10px, 1.4vw, 11px);
  letter-spacing: .3em;
  color: var(--cyan);
}

.h2 {
  margin-top: 16px;
  font-size: clamp(1.6rem, 4.3vw, 2.5rem);
  text-wrap: balance;
}
.h2--wide { max-width: 720px; }

.lead {
  margin-top: 18px;
  font-size: clamp(.94rem, 1.6vw, .9375rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-62);
  text-wrap: pretty;
}

.section__split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: clamp(20px, 4vw, 40px);
}
.section__aside {
  max-width: 420px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-62);
  text-wrap: pretty;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--sm { padding: 10px 22px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--cyan); color: var(--deep); }
.btn--primary:hover { background: var(--cyan-hi); }
.btn--glow { box-shadow: 0 0 34px rgba(63, 182, 255, .35); }
.btn--outline {
  border-color: rgba(238, 246, 255, .28);
  color: var(--ink);
  font-weight: 400;
  background: transparent;
}
.btn--outline:hover { border-color: rgba(238, 246, 255, .55); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 34%, rgba(4, 8, 16, .72) 0%, rgba(4, 8, 16, .25) 55%, rgba(4, 8, 16, 0) 78%);
}
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 260px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 8, 16, 0) 0%, var(--bg) 92%);
}

/* ---------- nav ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: rgba(4, 8, 16, .55);
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.nav-wrap.is-stuck {
  background: rgba(4, 8, 16, .88);
  border-bottom-color: var(--line-soft);
}

.nav {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  font-size: 13.5px;
  color: var(--ink-72);
}
.nav__links a { transition: color .16s ease; }
.nav__links a:hover { color: var(--ink); }

.nav__actions { display: flex; align-items: center; gap: 14px; flex: none; }
.nav__signin { font-size: 13.5px; color: var(--ink-72); }
.nav__signin:hover { color: var(--ink); }

/* hamburger */
.burger {
  display: none;
  width: 42px; height: 42px;
  padding: 11px 9px;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.burger span {
  display: block; height: 1.6px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }

/* ---------- mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(2, 5, 11, .72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s ease;
}
.drawer[hidden] { display: none; }
.drawer.is-open { opacity: 1; }

.drawer__panel {
  position: absolute; top: 0; right: 0;
  width: min(86vw, 340px);
  height: 100%;
  padding: 24px 24px 32px;
  background: #060c17;
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }

.drawer__close {
  align-self: flex-end;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--ink-72);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.drawer__close:hover { color: var(--ink); }

.drawer__links { margin-top: 22px; display: flex; flex-direction: column; }
.drawer__links a {
  display: block;
  padding: 15px 2px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-88);
  border-bottom: 1px solid var(--line-soft);
}
.drawer__links a:hover { color: var(--cyan); }

.drawer__foot { margin-top: auto; padding-top: 26px; display: grid; gap: 10px; }

/* ---------- hero body ---------- */
.hero__body {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 88px) var(--gut) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(63, 182, 255, .35);
  border-radius: 999px;
  background: rgba(63, 182, 255, .08);
  font-family: var(--mono);
  font-size: clamp(9.5px, 1.5vw, 10.5px);
  letter-spacing: .22em;
  color: var(--ice);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  flex: none;
}

.hero__title {
  margin-top: 26px;
  max-width: 900px;
  font-size: clamp(2.05rem, 6.4vw, 3.875rem);
  letter-spacing: -.025em;
  line-height: 1.06;
  text-wrap: balance;
}

.hero__lead {
  margin-top: 22px;
  max-width: 640px;
  font-size: clamp(.95rem, 2.1vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(238, 246, 255, .66);
  text-wrap: pretty;
}

.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-55);
}
.chips li { padding: 6px 12px; border: 1px solid rgba(238, 246, 255, .14); border-radius: 6px; }

.only-sm { display: none; }

/* ============================================================
   APP WINDOW MOCK
   ============================================================ */
.appwin-wrap {
  position: relative;
  max-width: 1160px;
  margin: clamp(40px, 5vw, 60px) auto 0;
  padding: 0 var(--gut) clamp(56px, 7vw, 84px);
}

.appwin {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: 0 50px 140px rgba(0, 0, 0, .65), 0 0 80px rgba(63, 182, 255, .08);
  overflow: hidden;
}

.appwin__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(238, 246, 255, .08);
  background: rgba(238, 246, 255, .02);
}
.appwin__dots { display: flex; gap: 7px; width: 220px; flex: 1 1 0; }
.appwin__dots span { width: 11px; height: 11px; border-radius: 50%; background: rgba(238, 246, 255, .16); }
.appwin__title { font-size: 12.5px; font-weight: 500; color: rgba(238, 246, 255, .75); white-space: nowrap; }
.appwin__badge {
  display: inline-flex; align-items: center; gap: 6px;
  width: 220px; flex: 1 1 0;
  justify-content: flex-end;
  font-size: 9.5px; letter-spacing: .12em; color: var(--ice);
  white-space: nowrap;
}
.appwin__badge .dot { width: 5px; height: 5px; box-shadow: none; }

.appwin__grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 300px;
  min-height: 560px;
}

/* panes */
.pane {
  padding: 18px 14px;
  background: rgba(4, 8, 16, .55);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.pane--left { border-right: 1px solid var(--line-soft); }
.pane--right { border-left: 1px solid var(--line-soft); gap: 12px; padding: 18px 16px; }

.pane__group { display: flex; flex-direction: column; gap: 6px; }
.pane__label {
  padding: 0 8px;
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--ink-40);
}

.kb, .agent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12.5px;
  color: var(--ink-72);
}
.kb .mono { font-size: 9.5px; color: var(--ink-40); }
.kb--on {
  background: rgba(63, 182, 255, .12);
  border-color: rgba(63, 182, 255, .25);
  color: var(--ink);
  font-weight: 500;
}
.kb--on .mono { color: var(--ice); }
.kb:not(.kb--on):hover, .agent:hover { background: rgba(238, 246, 255, .04); }

.agent { justify-content: flex-start; gap: 8px; }
.sq { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.agent .sq { width: 6px; height: 6px; }
.sq--cyan { background: var(--cyan); }
.sq--ice { background: var(--ice); }
.sq--violet { background: var(--violet); }

.pane__user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  font-size: 10px; font-weight: 600; color: var(--deep);
  flex: none;
}
.pane__who { display: flex; flex-direction: column; }
.pane__name { font-size: 11.5px; font-weight: 500; }
.pane__role { font-size: 9px; color: var(--ink-40); }

/* chat */
.chat {
  display: flex;
  flex-direction: column;
  background: rgba(238, 246, 255, .012);
  min-width: 0;
}
.chat__stream {
  flex: 1;
  padding: 26px clamp(16px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}
.chat__ts { align-self: center; font-size: 9.5px; letter-spacing: .18em; color: var(--ink-35); }

.bubble { font-size: 13.5px; line-height: 1.55; }
.bubble--me {
  align-self: flex-end;
  max-width: 420px;
  padding: 13px 17px;
  border-radius: 14px 14px 4px 14px;
  background: rgba(63, 182, 255, .14);
  border: 1px solid rgba(63, 182, 255, .2);
  color: var(--ink);
}
.answer { align-self: flex-start; max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.chat__model { display: flex; align-items: center; gap: 8px; font-size: 9.5px; letter-spacing: .14em; color: var(--ink-45); }
.chat__chip { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--cyan), var(--violet)); flex: none; }
.bubble--ai {
  padding: 16px 18px;
  border-radius: 4px 14px 14px 14px;
  background: rgba(238, 246, 255, .035);
  border: 1px solid rgba(238, 246, 255, .09);
  line-height: 1.6;
  color: var(--ink-88);
}

.findings { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.findings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(4, 8, 16, .5);
  font-size: 12.5px;
}
.cite {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(63, 182, 255, .12);
  color: var(--ice);
  font-size: 9.5px;
  white-space: nowrap;
  flex: none;
}
.cite--violet { background: rgba(139, 124, 246, .14); color: #c9bfff; }
.findings__more { margin-top: 12px; font-size: 9.5px; letter-spacing: .08em; color: var(--ink-40); }

.chat__composer {
  margin: 0 clamp(16px, 2.6vw, 30px) 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 8, 16, .6);
}
.chat__composer svg { flex: none; }
.chat__ph { flex: 1; font-size: 13px; color: var(--ink-35); min-width: 0; }
.chat__send {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--cyan);
  flex: none;
}

/* retrieval trace */
.trace__head { display: flex; align-items: center; justify-content: space-between; }
.trace__head .pane__label { padding: 0; }
.trace__time { font-size: 9px; color: var(--ink-30); }
.trace { display: flex; flex-direction: column; gap: 12px; }

.trace__card { border-radius: var(--r-sm); padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; }
.trace__card--vector { border: 1px solid rgba(63, 182, 255, .22); background: rgba(63, 182, 255, .05); }
.trace__card--sql { border: 1px solid rgba(165, 236, 255, .18); background: rgba(165, 236, 255, .04); }
.trace__card--graph { border: 1px solid rgba(139, 124, 246, .24); background: rgba(139, 124, 246, .06); }

.trace__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trace__row .mono { font-size: 9px; }
.trace__kind { font-size: 9px; letter-spacing: .16em; color: var(--cyan); }
.trace__kind--ice { color: var(--ice); }
.trace__kind--violet { color: var(--violet-lt); }
.trace__quote { font-size: 11px; line-height: 1.5; color: var(--ink-62); }
.trace__meta { font-size: 8.5px; color: var(--ink-35); }
.trace__code {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(4, 8, 16, .6);
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-55);
  white-space: pre-wrap;
  overflow-x: auto;
}
.graph { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-family: var(--mono); font-size: 9px; color: rgba(238, 246, 255, .6); }
.graph__node { padding: 3px 7px; border-radius: 4px; background: rgba(139, 124, 246, .16); }
.graph__arr { color: var(--ink-30); }
.trace__note { font-size: 10.5px; line-height: 1.5; color: var(--ink-45); }
.trace__foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 8.5px;
  line-height: 1.7;
  color: var(--ink-30);
}

/* ============================================================
   CARDS
   ============================================================ */
.cards { display: grid; gap: 20px; margin-top: clamp(32px, 4.4vw, 48px); }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 4vw, 44px); }

.card {
  border: 1px solid rgba(238, 246, 255, .09);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.4vw, 26px) clamp(18px, 2.2vw, 24px);
  background: var(--fill);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: rgba(63, 182, 255, .4); transform: translateY(-2px); }
.card h3 { font-size: clamp(1rem, 1.5vw, 1.0625rem); }
.card p { font-size: 13px; font-weight: 300; line-height: 1.65; color: rgba(238, 246, 255, .6); text-wrap: pretty; }
.card--kb { gap: 9px; border-radius: var(--r-md); }
.card--kb h3 { font-size: 16px; }
.card--kb p { font-size: 12px; line-height: 1.6; color: var(--ink-55); }
.card--dashed { border: 1.5px dashed rgba(63, 182, 255, .4); background: rgba(63, 182, 255, .04); }
.card--dashed:hover { border-color: rgba(63, 182, 255, .7); }
.card__stat { margin-top: auto; padding-top: 4px; font-size: 9px; letter-spacing: .12em; color: var(--cyan); }
.card__stat--ice { color: var(--ice); }

/* ============================================================
   ARCHITECTURE FLOW
   ============================================================ */
.frame {
  position: relative;
  margin-top: clamp(30px, 4vw, 44px);
  border: 1px dashed rgba(63, 182, 255, .35);
  border-radius: var(--r-lg);
  padding: clamp(30px, 3.6vw, 34px) clamp(18px, 2.6vw, 30px) clamp(24px, 3vw, 28px);
  background: rgba(63, 182, 255, .02);
}
.frame--tight { margin-top: 0; flex: 1; padding: 26px 22px; min-width: 0; }
.frame__tag {
  position: absolute;
  top: -9px;
  left: 22px;
  padding: 2px 10px;
  background: var(--bg);
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--cyan);
  white-space: nowrap;
  max-width: calc(100% - 44px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow { display: flex; align-items: center; gap: 0; }

.flow__box {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(238, 246, 255, .03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flow__box h3 { font-size: 14px; }
.flow__box p { font-size: 9px; line-height: 1.7; color: var(--ink-45); }
.flow__box--accent {
  border-color: rgba(63, 182, 255, .4);
  background: linear-gradient(135deg, rgba(63, 182, 255, .1), rgba(139, 124, 246, .1));
  box-shadow: 0 0 40px rgba(63, 182, 255, .12);
}
.flow__box--accent p { color: rgba(238, 246, 255, .5); }

.flow__stack { flex: 1.15 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.idx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
}
.idx .mono { font-size: 8.5px; flex: none; }
.idx__short { display: none; }
.idx--vector { border: 1px solid rgba(63, 182, 255, .35); background: rgba(63, 182, 255, .07); }
.idx--sql { border: 1px solid rgba(165, 236, 255, .3); background: rgba(165, 236, 255, .05); }
.idx--graph { border: 1px solid rgba(139, 124, 246, .35); background: rgba(139, 124, 246, .08); }

/* connector: horizontal on wide, vertical when the flow stacks */
.flow__arrow {
  position: relative;
  flex: 0 1 34px;
  min-width: 14px;
  height: 2px;
  background: linear-gradient(90deg, rgba(63, 182, 255, .5), rgba(63, 182, 255, .25));
}
.flow__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px; height: 6px;
  border-top: 1.6px solid rgba(63, 182, 255, .7);
  border-right: 1.6px solid rgba(63, 182, 255, .7);
  transform: translateY(-50%) rotate(45deg);
}
.flow__arrow--violet { background: linear-gradient(90deg, rgba(139, 124, 246, .5), rgba(139, 124, 246, .25)); }
.flow__arrow--violet::after { border-color: rgba(139, 124, 246, .7); }

.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(24px, 3.4vw, 34px);
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.legend p { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; font-weight: 300; line-height: 1.6; color: rgba(238, 246, 255, .6); }
.legend .sq { margin-top: 5px; }

/* ============================================================
   SECURITY
   ============================================================ */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.ticks { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.ticks li { display: flex; gap: 13px; align-items: flex-start; font-size: 14px; line-height: 1.6; color: var(--ink-78); }
.ticks svg { margin-top: 2px; flex: none; }

.gap-diagram { display: flex; align-items: center; gap: 0; }

.net { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.net__box {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px;
  background: rgba(4, 8, 16, .6);
  min-width: 0;
}
.net__box h3 { font-size: 12.5px; }
.net__box p { margin-top: 3px; font-size: 8.5px; color: var(--ink-40); }
.net__box--accent { border-color: rgba(63, 182, 255, .35); background: rgba(63, 182, 255, .08); }

.airgap {
  width: 74px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.airgap__line {
  position: relative;
  width: 100%;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, var(--ink-30) 0 6px, transparent 6px 12px);
}
.airgap__x {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid rgba(255, 120, 120, .6);
  display: grid; place-items: center;
  color: #ff8a8a;
  font-size: 11px; font-weight: 600;
}
.airgap__label { font-size: 8px; letter-spacing: .16em; color: var(--ink-35); white-space: nowrap; }

.cloud {
  width: 130px;
  flex: none;
  border: 1px solid rgba(238, 246, 255, .1);
  border-radius: var(--r-md);
  padding: 16px 14px;
  opacity: .5;
}
.cloud h3 { margin-top: 8px; font-size: 11.5px; font-weight: 500; color: rgba(238, 246, 255, .6); }
.cloud p { margin-top: 3px; font-size: 8.5px; color: var(--ink-35); }

/* ============================================================
   DEPLOYMENT STEPS
   ============================================================ */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(36px, 5vw, 52px);
}
.steps::before {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(12.5% + 8px);
  right: calc(12.5% + 8px);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 0 clamp(10px, 1.6vw, 18px);
}
.step__dot {
  position: relative;
  z-index: 1;
  width: 12px; height: 12px;
  border-radius: 50%;
  flex: none;
}
.step__dot--1 { background: var(--cyan); box-shadow: 0 0 12px rgba(63, 182, 255, .7); }
.step__dot--2 { background: #5daefb; box-shadow: 0 0 12px rgba(93, 174, 251, .7); }
.step__dot--3 { background: #7a95f8; box-shadow: 0 0 12px rgba(122, 149, 248, .7); }
.step__dot--4 { background: var(--violet); box-shadow: 0 0 12px rgba(139, 124, 246, .7); }
.step__when { margin-top: 6px; font-size: 9.5px; letter-spacing: .2em; color: var(--ink-45); }
.step h3 { font-size: clamp(1rem, 1.5vw, 1.0625rem); }
.step__text { font-size: 12.5px; font-weight: 300; line-height: 1.65; color: rgba(238, 246, 255, .6); text-wrap: pretty; }

/* ============================================================
   CONTACT
   ============================================================ */
.cta {
  border: 1px solid rgba(238, 246, 255, .1);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(63, 182, 255, .07), rgba(139, 124, 246, .07));
  padding: clamp(28px, 4.6vw, 60px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.cta__copy .lead { max-width: 420px; }
.promises { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; font-size: 11px; letter-spacing: .08em; color: var(--ink-55); }

.form {
  background: rgba(4, 8, 16, .6);
  border: 1px solid rgba(238, 246, 255, .1);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.6vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.form input, .form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(238, 246, 255, .14);
  border-radius: var(--r-sm);
  background: rgba(238, 246, 255, .03);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input::placeholder, .form textarea::placeholder { color: var(--ink-35); }
.form input:focus, .form textarea:focus { border-color: rgba(63, 182, 255, .55); background: rgba(63, 182, 255, .04); }
.form input:user-invalid { border-color: rgba(255, 120, 120, .55); }
.form button { padding: 15px; border-radius: var(--r-sm); font-size: 14.5px; }
.form__note { font-size: 11px; font-weight: 300; color: var(--ink-40); text-align: center; }
.form__note.is-error { color: #ff9f9f; }
.form__note.is-ok { color: var(--ice); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line-soft); }
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 3.4vw, 40px) var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer__name { font-size: 14px; font-weight: 600; }
.footer__tag { margin-left: 6px; font-size: 9.5px; letter-spacing: .14em; color: var(--ink-35); }
.footer__links { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 28px); font-size: 12.5px; color: var(--ink-55); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { font-size: 10px; color: var(--ink-35); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- 1180px: app mock drops the left sidebar --- */
@media (max-width: 1180px) {
  .appwin__grid { grid-template-columns: minmax(0, 1fr) 290px; min-height: 520px; }
  .pane--left { display: none; }
}

/* --- 980px: nav collapses to the drawer --- */
@media (max-width: 980px) {
  .nav__links, .nav__actions { display: none; }
  .burger { display: flex; }
  .nav { height: 68px; }
  [id] { scroll-margin-top: 74px; }
}

/* --- 900px: two-up cards, stacked security, vertical flow --- */
@media (max-width: 900px) {
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .section__split { flex-direction: column; align-items: flex-start; }
  .section__aside { max-width: 620px; }

  .duo { grid-template-columns: minmax(0, 1fr); }

  /* flow becomes a vertical pipeline */
  .flow { flex-direction: column; align-items: stretch; }
  .flow__box, .flow__stack { flex: none; width: 100%; }

  /* The three indexes are parallel, not sequential — keep them side by side
     so stacking the pipeline doesn't imply an order that isn't there. */
  .flow__stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .idx { flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; }
  .idx__long { display: none; }
  .idx__short { display: block; }
  .flow__box { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 14px; }
  .flow__box p { text-align: right; }
  .flow__arrow {
    flex: none;
    align-self: center;
    width: 2px;
    height: 26px;
    min-width: 0;
    background: linear-gradient(180deg, rgba(63, 182, 255, .5), rgba(63, 182, 255, .25));
  }
  .flow__arrow--violet { background: linear-gradient(180deg, rgba(139, 124, 246, .5), rgba(139, 124, 246, .25)); }
  .flow__arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%) rotate(135deg);
  }

  .legend { grid-template-columns: minmax(0, 1fr); gap: 14px; }

  /* air-gap diagram stacks vertically */
  .gap-diagram { flex-direction: column; align-items: stretch; }
  .frame--tight { width: 100%; }
  .airgap { width: 100%; flex-direction: column; padding: 4px 0; }
  .airgap__line {
    width: 1.5px;
    height: 46px;
    background: repeating-linear-gradient(180deg, var(--ink-30) 0 6px, transparent 6px 12px);
  }
  .cloud { width: 100%; display: flex; align-items: center; gap: 12px; }
  .cloud h3, .cloud p { margin-top: 0; }

  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta__copy .lead { max-width: none; }
}

/* --- 820px: app mock collapses to one column, trace moves below --- */
@media (max-width: 820px) {
  .appwin__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pane--right {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .chat__stream { padding-top: 20px; gap: 16px; }
  .bubble--me, .answer { max-width: 100%; }
  .trace { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
  .trace__foot { margin-top: 4px; }
}

/* --- 900px: four-across timeline gets too narrow; go two-up --- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
  .steps::before { display: none; }
}

/* --- 640px: steps become a vertical timeline --- */
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .steps::before {
    display: block;
    top: 6px;
    bottom: 6px;
    left: 5px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--cyan), var(--violet));
  }
  .step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "dot when" ".  title" ".  text";
    column-gap: 20px;
    row-gap: 6px;
    align-items: start;
    text-align: left;
    padding: 0;
  }
  .step__dot { grid-area: dot; margin-top: 5px; }
  .step__when { grid-area: when; margin-top: 0; }
  .step h3 { grid-area: title; }
  .step__text { grid-area: text; }
}

/* --- 640px: single-column cards --- */
@media (max-width: 640px) {
  .cards--4, .cards--5 { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* --- 560px: phone tuning --- */
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .only-sm { display: inline; }

  .hero__cta { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  .chips { gap: 8px; }
  .chips li { font-size: 9px; padding: 5px 10px; }

  .appwin__bar { padding: 8px 12px; }
  .appwin__dots { display: none; }
  .appwin__title { flex: 1; }
  .appwin__badge { width: auto; font-size: 8.5px; }

  .findings li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cite { white-space: normal; word-break: break-word; }

  .flow__box { flex-direction: column; align-items: flex-start; }
  .flow__box p { text-align: left; }

  .net { grid-template-columns: minmax(0, 1fr); }

  .frame__tag { left: 14px; font-size: 8.5px; letter-spacing: .16em; }

  .footer__tag { margin-left: 0; }
}

/* --- 380px: very narrow --- */
@media (max-width: 380px) {
  .chat__stream { padding-left: 12px; padding-right: 12px; }
  .chat__composer { margin-left: 12px; margin-right: 12px; }
  .trace { grid-template-columns: minmax(0, 1fr); }
}

/* --- motion / contrast preferences --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .card:hover { transform: none; }
}

/* Print: drop the decorative chrome. */
@media print {
  .hero__canvas, .hero__veil, .hero__fade, .nav-wrap, .drawer, .appwin-wrap { display: none !important; }
  body { background: #fff; color: #000; }
}
