/* ==========================================================================
   Kernal Logic Automation — design system
   Built from scratch. No framework, no template inheritance.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces — dark-first. The product mockups are dark UIs, so the page is
     dark too; they sit in the design instead of being pasted onto it. */
  --plane:        #0a0c10;
  --plane-2:      #0d1016;
  --surface:      #121722;
  --surface-2:    #171e2b;
  --surface-3:    #1d2534;

  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.14);
  --grid:         rgba(255, 255, 255, 0.06);

  /* Ink */
  --ink:          #f2f6fb;
  --ink-2:        #a7b4c6;
  --ink-3:        #6e7e94;
  --ink-4:        #4d5b6e;

  /* Brand — UI chrome only (buttons, links, focus rings, rules). */
  --brand:        #00bbf0;
  --brand-ink:    #00131c;
  --brand-dim:    rgba(0, 187, 240, 0.12);
  --brand-line:   rgba(0, 187, 240, 0.32);

  /* Data marks — validated against --surface for the dark band,
     chroma floor, CVD separation and 3:1 contrast. Do not substitute
     --brand here: it sits outside the dark lightness band. */
  --data-1:       #1295c4;   /* primary series  */
  --data-2:       #7c5cff;   /* agentic AI      */

  /* Status — fixed, never themed. Always paired with a glyph + label;
     colour never carries the meaning alone. */
  --ok:           #0ca30c;
  --warn:         #fab219;
  --crit:         #d03b3b;
  --neutral:      #64748b;

  /* Type */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.125rem;
  --step-2:  clamp(1.25rem, 0.6vw + 1.1rem, 1.5rem);
  --step-3:  clamp(1.5rem, 1.1vw + 1.25rem, 2rem);
  --step-4:  clamp(1.875rem, 2vw + 1.35rem, 2.75rem);
  --step-5:  clamp(2.25rem, 4.2vw + 1.1rem, 4.25rem);

  /* Space + shape */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --bleed:  clamp(4rem, 7.5vw, 7rem);
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 40px 120px -30px rgba(0, 0, 0, 0.85);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--plane);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

::selection { background: var(--brand); color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 860px; }

.section { padding-block: var(--bleed); position: relative; }
.section--tight { padding-block: calc(var(--bleed) * 0.62); }

.rule { height: 1px; background: var(--line); border: 0; }

/* Section header */
.s-head { max-width: 720px; margin-inline: auto; text-align: center; }
.s-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.15rem;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.eyebrow--ai { color: var(--data-2); }

.s-head h2 { font-size: var(--step-4); }

.s-head .lede {
  margin-top: 1.1rem;
  font-size: var(--step-1);
  color: var(--ink-2);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Atmosphere — a single soft accent glow and a hairline dot field.
      Kept very low contrast: texture, not decoration.
   -------------------------------------------------------------------------- */

.glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow::before {
  content: "";
  position: absolute;
  top: -35%;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 187, 240, 0.13) 0%, rgba(0, 187, 240, 0.04) 38%, transparent 68%);
}

.glow--ai::before {
  background: radial-gradient(circle, rgba(124, 92, 255, 0.15) 0%, rgba(124, 92, 255, 0.04) 40%, transparent 70%);
}

.dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.055) 1px, transparent 0);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 20%, transparent 75%);
}

.section > .wrap { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn--primary:hover { background: #4ad2f7; }

.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.24); }

.btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn svg { width: 16px; height: 16px; flex: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 550;
}

.link-arrow svg { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.hdr.is-scrolled {
  background: rgba(10, 12, 16, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--line);
}

.hdr__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.25rem;
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 0.65rem; flex: none; }

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand), #0b7fa8);
  display: grid;
  place-items: center;
  flex: none;
}

.brand__mark svg { width: 18px; height: 18px; }

.brand__name {
  font-size: 0.9875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.brand__sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}

/* Nav */
.nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }

.nav a {
  padding: 0.45rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-2);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav a.is-active { color: var(--ink); }

.hdr__cta { display: flex; align-items: center; gap: 0.6rem; flex: none; }

.hdr__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  place-items: center;
  color: var(--ink);
}

.hdr__toggle svg { width: 18px; height: 18px; }
.hdr__toggle .i-close { display: none; }
.hdr__toggle[aria-expanded="true"] .i-close { display: block; }
.hdr__toggle[aria-expanded="true"] .i-menu { display: none; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero { padding-top: 9rem; padding-bottom: 0; position: relative; overflow: hidden; }

.hero__inner { position: relative; z-index: 1; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.85rem 0.34rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-bottom: 1.75rem;
}

.pill b {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-dim);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: var(--step-5);
  letter-spacing: -0.038em;
  font-weight: 600;
  max-width: 17ch;
  margin-inline: auto;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand) 10%, #7fe3ff 50%, var(--data-2) 95%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__lede {
  margin: 1.5rem auto 0;
  max-width: 58ch;
  font-size: var(--step-1);
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.75rem;
  margin-top: 2.25rem;
  list-style: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.hero__proof li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__proof svg { width: 14px; height: 14px; color: var(--ok); flex: none; }

.hero__stage { margin-top: 4rem; position: relative; z-index: 1; }

/* No bottom fade: the mock is fully contained, so a fade would just crop
   the last row of content instead of suggesting "continues below". */
.hero__stage { padding-bottom: var(--bleed); }

/* --------------------------------------------------------------------------
   8. App mockup — the product UI shell
   -------------------------------------------------------------------------- */

.app {
  background: var(--plane-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}

.app__chrome {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}

.app__dots { display: flex; gap: 5px; flex: none; }
.app__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }

.app__crumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--ink-3);
  min-width: 0;
}

.app__crumb b { color: var(--ink); font-weight: 550; }
.app__crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app__tabs { display: flex; gap: 2px; margin-left: 0.6rem; }

.app__tabs span {
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.app__tabs span.on { background: rgba(255, 255, 255, 0.07); color: var(--ink); }

.app__right { margin-left: auto; display: flex; align-items: center; gap: 0.65rem; flex: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
  box-shadow: 0 0 0 3px rgba(12, 163, 12, 0.16);
}

.status-pill i.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(250, 178, 25, 0.16); }

.app__body { padding: 0.9rem; display: grid; gap: 0.75rem; }

.app__cols { display: grid; grid-template-columns: 200px 1fr; gap: 0.75rem; }

/* Side rail */
.rail {
  border-right: 1px solid var(--line);
  padding-right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rail__label {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 0.5rem 0.55rem 0.3rem;
}

.rail a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--r-sm);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.rail a.on { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.rail a svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }
.rail a .count { margin-left: auto; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4); }

/* --------------------------------------------------------------------------
   9. Panels, stat tiles, charts
   -------------------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.85rem 0.95rem;
  min-width: 0;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.panel__title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.panel__meta { font-size: 0.6875rem; color: var(--ink-4); font-family: var(--mono); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

.span-2 { grid-column: span 2; }
.grid--top { align-items: start; }
.stack { display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.span-3 { grid-column: span 3; }

/* Stat tile — the number is the chart. */
.tile { display: flex; flex-direction: column; gap: 0.25rem; }

.tile__label {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.tile__value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  /* proportional figures: tabular-nums would make large numbers read loose */
}

.tile__value sup {
  font-size: 0.875rem;
  font-weight: 500;
  vertical-align: baseline;
  color: var(--ink-2);
  margin-left: 1px;
}

.tile__foot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  color: var(--ink-3);
}

.delta { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 550; }
.delta svg { width: 11px; height: 11px; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--crit); }
.delta--flat { color: var(--ink-3); }

.tile__spark { margin-top: 0.4rem; }
.tile__spark svg { width: 100%; height: 34px; overflow: visible; }

/* Charts */
.chart { position: relative; }
.chart svg { width: 100%; display: block; overflow: visible; }

.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }

.chart .series { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.chart .series--1 { stroke: var(--data-1); }
.chart .series--ref { stroke: var(--ink-4); stroke-width: 1.5; }

.chart .marker { fill: var(--data-1); stroke: var(--surface); stroke-width: 2; }

.chart__x {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.chart__y {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Legend — always present for 2+ series */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.6875rem;
  color: var(--ink-2);
}

.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }

.legend i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--data-1);
  flex: none;
}

.legend i.ref { background: var(--ink-4); }
.legend i.dot { width: 8px; height: 8px; border-radius: 50%; }

/* Crosshair tooltip */
.chart__hit { position: absolute; inset: 0; cursor: crosshair; }

.tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -115%);
  transition: opacity 0.12s linear;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.6rem;
  box-shadow: var(--shadow-2);
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--ink);
}

.tip.on { opacity: 1; }
.tip b { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.tip__k {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
}

.tip__row { display: flex; align-items: center; gap: 0.4rem; }
.tip__row i { width: 8px; height: 8px; border-radius: 2px; flex: none; }

.crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
  opacity: 0;
  pointer-events: none;
}

.crosshair.on { opacity: 1; }

/* Donut meter */
.meter { display: flex; align-items: center; gap: 0.9rem; }

.meter__ring { width: 78px; height: 78px; flex: none; position: relative; }
.meter__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.meter__track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 8; }
.meter__fill { fill: none; stroke: var(--data-1); stroke-width: 8; stroke-linecap: round; }
.meter__fill.ok { stroke: var(--ok); }
.meter__fill.warn { stroke: var(--warn); }

.meter__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.meter__txt { min-width: 0; }
.meter__txt b { display: block; color: var(--ink); font-size: 0.875rem; font-weight: 550; }
.meter__txt span { font-size: 0.75rem; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   10. Status marks — colour is never the only channel
   -------------------------------------------------------------------------- */

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.state__glyph {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}

.state--run  .state__glyph { background: rgba(12, 163, 12, 0.22);  color: #3ddb3d; box-shadow: inset 0 0 0 1px var(--ok); }
.state--set  .state__glyph { background: rgba(100, 116, 139, 0.25); color: #9fb0c6; box-shadow: inset 0 0 0 1px var(--neutral); }
.state--idle .state__glyph { background: rgba(250, 178, 25, 0.2);  color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.state--down .state__glyph { background: rgba(208, 59, 59, 0.24);  color: #f06a6a; box-shadow: inset 0 0 0 1px var(--crit); }

.state b { color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }
.state span { color: var(--ink-3); }

/* Machine grid */
.machines {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: 44px;
  gap: 4px;
}

.machines button {
  position: relative;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.machines button::after {
  content: attr(data-glyph);
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  line-height: 1;
  opacity: 1;
}

.machines button:hover { transform: scale(1.14); z-index: 2; box-shadow: var(--shadow-2); }

.m-run  { background: rgba(12, 163, 12, 0.18);   box-shadow: inset 0 0 0 1px rgba(12, 163, 12, 0.85); }
.m-set  { background: rgba(100, 116, 139, 0.22); box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.9); }
.m-idle { background: rgba(250, 178, 25, 0.16);  box-shadow: inset 0 0 0 1px rgba(250, 178, 25, 0.9); }
.m-down { background: rgba(208, 59, 59, 0.2);    box-shadow: inset 0 0 0 1px rgba(208, 59, 59, 0.95); }

/* Alarm / event rows */
.events { display: flex; flex-direction: column; }

.events li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.3rem 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.events li p { grid-column: 1 / -1; }
.events li .sev { justify-self: start; }

.events li:first-child { border-top: 0; }

.events time { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.events p { color: var(--ink-2); min-width: 0; }
.events p b { color: var(--ink); font-weight: 550; }

.sev {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.sev svg { width: 10px; height: 10px; }
.sev--crit { background: rgba(208, 59, 59, 0.16); color: #f06a6a; }
.sev--warn { background: rgba(250, 178, 25, 0.14); color: var(--warn); }
.sev--info { background: rgba(255, 255, 255, 0.06); color: var(--ink-3); }

/* Data table */
.dtable { width: 100%; border-collapse: collapse; font-size: 0.75rem; }

.dtable th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 0 0 0.45rem;
  border-bottom: 1px solid var(--line);
}

.dtable td { padding: 0.42rem 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.dtable tr:last-child td { border-bottom: 0; }
.dtable td:last-child, .dtable th:last-child { text-align: right; }
.dtable .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }

/* Horizontal comparison bars — one series, one hue */
.hbars { display: flex; flex-direction: column; gap: 0.5rem; }

.hbar { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 0.7rem; font-size: 0.75rem; }
.hbar__name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hbar__track {
  display: block;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  position: relative;
}

.hbar__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--data-1);
  transform-origin: left;
  animation: grow 0.9s var(--ease) both;
}

@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hbar__fill.under { background: var(--warn); }

.hbar__val { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); min-width: 3.4rem; text-align: right; }

.hbar__target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--ink-3);
}

/* --------------------------------------------------------------------------
   11. Marquee / trust strip
   -------------------------------------------------------------------------- */

.trust { border-block: 1px solid var(--line); background: var(--plane-2); }

.trust__inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  justify-content: center;
  padding-block: 2rem;
}

.trust__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.trust__items { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: center; }

.trust__items span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  font-weight: 500;
}

.trust__items svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }

/* --------------------------------------------------------------------------
   12. Stats row
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.stats > div { background: var(--plane); padding: 1.75rem 1.5rem; }

.stats dt {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats dt .u { color: var(--brand); }

.stats dd {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   13. Cards
   -------------------------------------------------------------------------- */

.cards { display: grid; gap: 1.25rem; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--plane-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-dim);
  border: 1px solid var(--brand-line);
  color: var(--brand);
  margin-bottom: 1.1rem;
}

.card__icon svg { width: 19px; height: 19px; }

.card--ai .card__icon {
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.34);
  color: #a48bff;
}

.card h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.card h4 { font-size: 1.0625rem; margin-bottom: 0.5rem; letter-spacing: -0.015em; }
.card p { font-size: 0.9375rem; color: var(--ink-2); }

.card__list { list-style: none; padding: 0; margin: 1.3rem 0 0; display: flex; flex-direction: column; }

.card__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.card__list li b { color: var(--ink); font-weight: 550; }

.card__list svg { width: 15px; height: 15px; margin-top: 0.28rem; color: var(--brand); flex: none; }
.card--ai .card__list svg { color: #a48bff; }

/* Bento capability grid */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }

.bento__cell { background: var(--plane); padding: 1.6rem; transition: background 0.25s var(--ease); }
.bento__cell:hover { background: var(--plane-2); }

.bento__cell svg.ico { width: 20px; height: 20px; color: var(--brand); margin-bottom: 0.9rem; }
.bento__cell h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.bento__cell p { font-size: 0.875rem; color: var(--ink-3); line-height: 1.55; }

/* --------------------------------------------------------------------------
   14. Tabs (use cases)
   -------------------------------------------------------------------------- */

.tabs { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: all 0.2s var(--ease);
}

.tab:hover { color: var(--ink); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }

.tab__n { font-family: var(--mono); font-size: 0.6875rem; opacity: 0.7; }

.tabpanel[hidden] { display: none; }
.tabpanel { margin-top: 2.5rem; animation: fade 0.45s var(--ease); }

@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.uc__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.uc__top h3 { font-size: var(--step-3); margin-bottom: 0.75rem; }
.uc__top p { font-size: 1rem; max-width: 70ch; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; list-style: none; padding: 0; }

.tags li {
  font-family: var(--mono);
  font-size: 0.6875rem;
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-3);
}

.uc__kpi {
  text-align: right;
  border-left: 1px solid var(--line);
  padding-left: 2rem;
  flex: none;
}

.uc__kpi b {
  display: block;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1;
}

.uc__kpi span { font-size: 0.8125rem; color: var(--ink-3); display: block; margin-top: 0.5rem; max-width: 14ch; margin-left: auto; }

.outcomes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 1.25rem;
}

.outcomes > div { background: var(--plane); padding: 1.1rem 1.25rem; }
.outcomes b { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.outcomes span { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.45; }

/* --------------------------------------------------------------------------
   15. Agent console
   -------------------------------------------------------------------------- */

.console { display: flex; flex-direction: column; gap: 0.5rem; }

.msg {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid var(--line-strong);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.msg__who {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding-top: 0.2rem;
}

.msg p { color: var(--ink-2); }
.msg p b { color: var(--ink); font-weight: 600; }

.msg--agent { border-left-color: var(--data-2); }
.msg--agent .msg__who { color: #a48bff; }

.msg--tool { border-left-color: var(--data-1); font-family: var(--mono); font-size: 0.75rem; }
.msg--tool .msg__who { color: var(--data-1); }
.msg--tool p { color: var(--ink-3); }

.msg--gate { border-left-color: var(--warn); }
.msg--gate .msg__who { color: var(--warn); }

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 3rem;
}

.pipeline > div { background: var(--plane); padding: 1.4rem 1.25rem; position: relative; }

.pipeline .n {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--data-2);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.7rem;
}

.pipeline h4 { font-size: 0.9375rem; margin-bottom: 0.3rem; }
.pipeline p { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.5; }

.guard {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.875rem;
  color: var(--ink-3);
}

.guard svg { width: 17px; height: 17px; color: var(--ok); flex: none; margin-top: 0.15rem; }

/* --------------------------------------------------------------------------
   16. Process, engagement, quote, FAQ
   -------------------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; margin-top: 3rem; }

.step { position: relative; padding-top: 1.75rem; }

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.step::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.step .n { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-4); letter-spacing: 0.1em; }
.step h4 { font-size: 1rem; margin: 0.5rem 0 0.4rem; }
.step p { font-size: 0.875rem; color: var(--ink-3); line-height: 1.55; }

.plan {
  background: var(--plane-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
}

.plan--featured { border-color: var(--brand-line); background: linear-gradient(180deg, rgba(0, 187, 240, 0.07), var(--plane-2) 60%); }

.plan__tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan__tag em {
  font-style: normal;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
}

.plan h3 { font-size: 1.25rem; margin-bottom: 0.65rem; }
.plan > p { font-size: 0.9375rem; color: var(--ink-2); }

.plan ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-direction: column; gap: 0.55rem; }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; font-size: 0.875rem; color: var(--ink-2); }
.plan li svg { width: 14px; height: 14px; color: var(--brand); margin-top: 0.3rem; flex: none; }

.quote { text-align: center; max-width: 900px; margin-inline: auto; }

.quote blockquote {
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 400;
}

.quote figcaption { margin-top: 1.75rem; font-size: 0.875rem; color: var(--ink-3); }
.quote figcaption b { display: block; color: var(--ink); font-weight: 550; margin-bottom: 0.15rem; }

.faq { max-width: 820px; margin: 3rem auto 0; border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; transition: transform 0.25s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }

.faq p { padding-bottom: 1.5rem; font-size: 0.9375rem; color: var(--ink-2); max-width: 68ch; }

/* --------------------------------------------------------------------------
   17. CTA + footer
   -------------------------------------------------------------------------- */

.cta {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vw, 4.25rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--plane-2);
}

.cta::before {
  content: "";
  position: absolute;
  top: -70%;
  left: 50%;
  width: 800px;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 187, 240, 0.16), transparent 62%);
  pointer-events: none;
}

.cta > * { position: relative; }
.cta h2 { font-size: var(--step-4); }
.cta p { margin: 1rem auto 0; max-width: 52ch; font-size: var(--step-1); }
.cta .hero__actions { margin-top: 2rem; }

.ftr { border-top: 1px solid var(--line); background: var(--plane-2); padding-block: 4rem 2rem; }

.ftr__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }

.ftr__about p { font-size: 0.875rem; color: var(--ink-3); margin-top: 1.1rem; max-width: 34ch; }

.ftr h5 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 500;
  margin-bottom: 1rem;
}

.ftr ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ftr li a { font-size: 0.875rem; color: var(--ink-2); transition: color 0.18s var(--ease); }
.ftr li a:hover { color: var(--brand); }
.ftr li a svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 0.45rem; color: var(--ink-4); }

.ftr__base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink-4);
}

/* --------------------------------------------------------------------------
   18. Reveal
   -------------------------------------------------------------------------- */

/* Scoped to .js so that if the script never runs, nothing is left invisible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .ftr__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .app__cols { grid-template-columns: 1fr; }
  .rail { display: none; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 4.25rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: rgba(10, 12, 16, 0.98);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.32s var(--ease);
    margin: 0;
  }

  .nav.is-open { transform: none; }
  .nav a { padding: 0.8rem 0.5rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .hdr__toggle { display: grid; }
  .hdr__cta .btn { display: none; }

  .cards--2, .cards--3 { grid-template-columns: 1fr; }
  .uc__top { grid-template-columns: 1fr; }
  .uc__kpi { text-align: left; border-left: 0; border-top: 1px solid var(--line); padding: 1.25rem 0 0; }
  .uc__kpi span { margin-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .span-3 { grid-column: span 2; }
  .machines { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .hero { padding-top: 7rem; }
  .stats { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.1rem; }
  .pipeline { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .ftr__grid { grid-template-columns: 1fr; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .machines { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .app__chrome { flex-wrap: wrap; row-gap: 0.5rem; }
  .app__tabs, .app__crumb span { display: none; }
  .app__crumb b { white-space: nowrap; }
  .app__right { margin-left: 0; width: 100%; }
  .msg { grid-template-columns: 1fr; gap: 0.3rem; }
  .hbar { grid-template-columns: 4.5rem 1fr auto; }
  .trust__inner { flex-direction: column; gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hbar__fill { transform: scaleX(1); }
}

@media print {
  .hdr, .glow, .dots { display: none; }
  body { background: #fff; color: #000; }
}
