/* ==========================================================================
   NOCTRODEX (OPC) PRIVATE LIMITED — shared design system
   Served from R2 at /assets/noctrodex.css. Loaded by every page.

   Structure:  tokens · reset · a11y floor · layout · nav · hero · components
               · legal prose · footer · motion · print
   ========================================================================== */

/* ---------- tokens ---------------------------------------------------- */
:root {
  /* surfaces — near-black through raised card */
  --ink:      #03050a;
  --ink-2:    #070c12;
  --ink-3:    #0c141c;
  --ink-4:    #121c28;

  /* accents. green = live/affirmative, cyan = secondary, amber = in-dev */
  --signal:   #3dff9a;
  --cyan:     #22d3ee;
  --violet:   #a78bfa;
  --amber:    #fbbf24;
  --danger:   #ff6b6b;

  --text:     #e8fff4;
  --muted:    #7a9e8c;          /* 6.8:1 on --ink — safe for body copy */
  --dim:      #4d6b5c;

  --line:     rgba(61, 255, 154, 0.18);
  --line-c:   rgba(34, 211, 238, 0.22);
  --line-q:   rgba(122, 158, 140, 0.16);
  --card:     rgba(12, 24, 32, 0.55);
  --glow:     rgba(61, 255, 154, 0.28);

  /* type roles */
  --display:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --body:     'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:     'IBM Plex Mono', ui-monospace, monospace;

  /* fluid type scale */
  --fs-micro: 0.68rem;
  --fs-label: 0.72rem;
  --fs-sm:    0.84rem;
  --fs-body:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --fs-lede:  clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem);
  --fs-h4:    clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --fs-h3:    clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  --fs-h2:    clamp(1.65rem, 1.3rem + 1.9vw, 2.6rem);
  --fs-h1:    clamp(2.1rem, 1.4rem + 3.6vw, 3.9rem);

  /* space + measure */
  --gutter:   clamp(18px, 5vw, 64px);
  --max:      1180px;
  --measure:  68ch;
  --sp-1: 6px;  --sp-2: 12px; --sp-3: 18px; --sp-4: 26px;
  --sp-5: 38px; --sp-6: 56px; --sp-7: clamp(56px, 7vw, 92px);

  --radius:   12px;
  --radius-s: 8px;
  --nav-h:    64px;
  --tap:      44px;             /* minimum touch target */
}

/* ---------- reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); text-transform: uppercase; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.03em; }
h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -0.02em; }

p { text-wrap: pretty; }
a { color: var(--signal); }
strong { color: var(--text); font-weight: 600; }

/* ---------- accessibility floor --------------------------------------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute; left: var(--sp-2); top: -100px; z-index: 999;
  background: var(--signal); color: #03140c;
  padding: 10px 18px; border-radius: var(--radius-s);
  font-family: var(--mono); font-weight: 700; font-size: var(--fs-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: calc(var(--sp-2) + env(safe-area-inset-top)); }

/* ---------- layout primitives ----------------------------------------- */
.wrap {
  width: min(100% - (2 * var(--gutter)), var(--max));
  margin-inline: auto;
}

.section {
  padding-block: var(--sp-7);
  scroll-margin-top: calc(var(--nav-h) + 16px + env(safe-area-inset-top));
  position: relative;
  z-index: 1;
}
.section--alt { background: var(--ink-2); border-block: 1px solid var(--line-q); }

/* section head — eyebrow left, honest status right, hairline under */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line-q);
  margin-bottom: var(--sp-4);
}
.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.eyebrow .dim { color: var(--dim); }
.sec-meta {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}
.lede {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: var(--measure);
  margin-top: var(--sp-3);
}
.section > .wrap > h2 + .lede { margin-top: var(--sp-3); }

.grad {
  background: linear-gradient(120deg, var(--signal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--signal);           /* fallback if background-clip unsupported */
}
.mono { font-family: var(--mono); }

/* ---------- canvas typography (pretext) -------------------------------- */
/* Default state is a normal, visible heading. JS swaps in the canvas only
   after a successful paint, so a failure anywhere leaves plain HTML. */
.ct-wrap { position: relative; }
.ct-canvas { display: block; width: 100%; }
.ct-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 26px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease;
}
.btn--primary {
  background: linear-gradient(120deg, var(--signal), var(--cyan));
  color: #03140c;                 /* dark ink on bright green — 12:1 */
  box-shadow: 0 4px 22px rgba(61, 255, 154, 0.22);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(61, 255, 154, 0.34); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--signal); background: rgba(61, 255, 154, 0.06); }
.btn--block { width: 100%; }

/* ---------- nav -------------------------------------------------------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  background: rgba(3, 5, 10, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-q);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.top.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(3, 5, 10, 0.94);
}
body { padding-top: calc(var(--nav-h) + env(safe-area-inset-top)); }

.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 800;
  font-size: 1.02rem; letter-spacing: -0.045em;
  color: var(--text); text-decoration: none;
  flex-shrink: 0;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }

.nav-links { display: flex; gap: clamp(14px, 2vw, 28px); list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav-links a:hover { color: var(--text); border-bottom-color: var(--signal); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-cta {
  display: inline-flex; align-items: center;
  min-height: var(--tap);              /* keep it a real tap target */
  background: linear-gradient(120deg, var(--signal), var(--cyan));
  color: #03140c;
  padding: 0 18px; border-radius: 7px;
  font-family: var(--mono); font-size: var(--fs-sm); font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 32, 0.7);
  cursor: pointer;
}
.nav-toggle-bars {
  display: block; width: 18px; height: 2px;
  background: var(--signal);
  box-shadow: 0 -6px 0 var(--signal), 0 6px 0 var(--signal);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent; box-shadow: none; position: relative;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  content: ''; position: absolute; left: 0; top: 0;
  width: 18px; height: 2px; background: var(--signal);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: rotate(-45deg); }

.nav-drawer {
  position: fixed;
  top: calc(var(--nav-h) + env(safe-area-inset-top));
  inset-inline: 0; bottom: 0;
  z-index: 190;
  background: rgba(3, 5, 10, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: var(--sp-3) max(var(--gutter), env(safe-area-inset-right))
           max(var(--sp-4), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.nav-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-drawer a {
  display: flex; align-items: center;
  min-height: var(--tap);
  padding: 12px;
  border: 1px solid transparent; border-radius: 10px;
  font-family: var(--mono); font-size: 0.95rem; font-weight: 600;
  color: var(--text); text-decoration: none;
}
.nav-drawer a:hover, .nav-drawer a:focus-visible {
  border-color: var(--line);
  background: rgba(61, 255, 154, 0.06);
  color: var(--signal);
}
body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
  .nav-cta { display: none; }        /* drawer carries the CTA below 420px */
}

/* ---------- hero: the perimeter ---------------------------------------- */
/* Signature element. Compute stays inside the customer perimeter, so the
   headline is drawn inside one: hairline frame, corner brackets, edge labels. */
.hero {
  position: relative;
  display: flex; align-items: center;
  min-height: 78vh;
  min-height: 78svh;
  padding-block: var(--sp-6) var(--sp-7);
  overflow: hidden;
}
#rain {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0.22;                     /* atmosphere, not a competing effect */
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}
.hero > .wrap { position: relative; z-index: 1; }

.perimeter {
  position: relative;
  padding: clamp(24px, 4vw, 44px) clamp(18px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    radial-gradient(70% 120% at 10% 0%, rgba(61, 255, 154, 0.05), transparent 70%),
    radial-gradient(60% 100% at 95% 10%, rgba(34, 211, 238, 0.04), transparent 70%);
  /* Wide enough that the text column still clears the headline's longest line
     once the robot takes its column — otherwise the h1 gains a fourth line. */
  max-width: 62rem;
}

/* The machine sits inside the perimeter it runs in. */
.perimeter__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: center;
}
.hero-robot { display: block; justify-self: start; }
.hero-robot img {
  width: 100%;
  height: auto;
  /* The artwork is opaque on a near-black backdrop. Screen blending drops that
     backdrop into the page, and a 4% edge feather kills the remaining seam.
     Both are edge-only — the wordmark sits well inside, so nothing is cropped. */
  mix-blend-mode: screen;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 4%, #000 96%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  mask-image:
    linear-gradient(to right, transparent, #000 4%, #000 96%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  filter: drop-shadow(0 0 26px rgba(61, 255, 154, 0.16));
}
@media (min-width: 900px) {
  .perimeter__grid {
    grid-template-columns: minmax(0, 1fr) clamp(150px, 17vw, 225px);
    gap: var(--sp-5);
  }
  .hero-robot { justify-self: center; }
}
/* Below the split it leads as a mark rather than trailing after the buttons —
   kept small so it never pushes the headline under the fold. */
@media (max-width: 899px) {
  /* Big enough that the wordmark inside the artwork still reads. */
  .hero-robot { width: clamp(118px, 32vw, 178px); order: -1; margin-bottom: calc(-1 * var(--sp-3)); }
}
/* corner brackets — scope marks, drawn not decorative */
.perimeter::before, .perimeter::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--signal);
  pointer-events: none;
}
.perimeter::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.perimeter::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.perimeter__label, .perimeter__foot {
  position: absolute;
  font-family: var(--mono);
  /* must never wrap or overflow the frame it labels, down to 320px */
  font-size: clamp(0.54rem, 2.1vw, 0.68rem);
  font-weight: 600;
  letter-spacing: clamp(0.04em, 0.5vw, 0.16em);
  text-transform: uppercase;
  background: var(--ink);
  padding-inline: 8px;
  white-space: nowrap;
}
.perimeter__label { top: -0.62em; left: clamp(14px, 3vw, 28px); color: var(--signal); }
.perimeter__foot  { bottom: -0.62em; right: clamp(14px, 3vw, 28px); color: var(--dim); }
.perimeter__label .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 6px var(--signal);
  margin-right: 7px; vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.hero p.lede { margin-top: var(--sp-4); }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-5);
}

/* facts strip — label above value, docked under the perimeter */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-q);
  max-width: 62rem;          /* stay flush with the perimeter above */
}
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact__val {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  letter-spacing: -0.03em;
}
.fact__key {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}

/* ---------- focus bar (marquee) ---------------------------------------- */
.focus-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding-block: var(--sp-3);
  background: var(--ink-2);
  border-block: 1px solid var(--line-q);
  overflow: hidden;
  position: relative; z-index: 1;
}
.focus-label {
  flex-shrink: 0;
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
  padding-left: var(--gutter);
}
.focus-track {
  display: flex; gap: 10px;
  animation: marquee 42s linear infinite;
  will-change: transform;
}
.focus-bar:hover .focus-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  flex-shrink: 0;
  background: var(--ink-3); border: 1px solid var(--line-q);
  color: var(--muted);
  padding: 5px 13px; border-radius: 4px;
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600;
  white-space: nowrap;
}

/* ---------- terminal ---------------------------------------------------- */
.terminal {
  border: 1px solid var(--line-c);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(4, 8, 12, 0.86);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.05);
}
.terminal__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line-q);
}
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex-shrink: 0; }
.terminal__dot:first-child { background: var(--signal); }
.terminal__title {
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--dim);
  margin-left: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.terminal__body {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 0.66rem + 0.3vw, 0.85rem);
  line-height: 1.85;
  padding: var(--sp-3);
  overflow-x: auto;
  overflow-wrap: anywhere;
}
.terminal__body .line {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.terminal__body .line.visible { opacity: 1; transform: none; }
.line.prompt  { color: var(--cyan); }
.line.cmd     { color: var(--text); }
.line.success { color: var(--signal); }
.line.finding { color: var(--amber); }
.line.muted   { color: var(--dim); }
.terminal-cursor {
  display: inline-block; width: 8px; height: 1em;
  background: var(--signal); vertical-align: text-bottom;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- cards ------------------------------------------------------- */
.grid {
  display: grid;
  /* min() guard is what stops 320px overflow */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: var(--sp-3);
}
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }

.card {
  container-type: inline-size;      /* cards respond to their column, not the viewport */
  position: relative;
  display: flex; flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  background: var(--card);
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
a.card { text-decoration: none; color: inherit; }
.card--feature {
  border-color: var(--line);
  background:
    linear-gradient(160deg, rgba(61, 255, 154, 0.06), transparent 55%),
    var(--card);
}
.card--feature::after {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--signal), var(--cyan));
  border-radius: var(--radius) var(--radius) 0 0;
}
.card__icon { font-size: 1.5rem; line-height: 1; color: var(--signal); }
.card p { color: var(--muted); font-size: var(--fs-sm); }
@container (min-width: 22rem) {
  .card { padding: var(--sp-4); }
  .card p { font-size: var(--fs-body); }
}

/* status — colour carries meaning, not decoration */
.status {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: flex-start;
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid currentColor;
}
.status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.status--live { color: var(--signal); background: rgba(61, 255, 154, 0.07); }
.status--dev  { color: var(--amber);  background: rgba(251, 191, 36, 0.07); }
.status--road { color: var(--muted);  background: rgba(122, 158, 140, 0.06); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: var(--sp-2); }
.tag {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  border: 1px solid var(--line-q); border-radius: 3px;
  padding: 2px 7px;
}

/* ---------- steps ------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--sp-3);
}
.step {
  padding: var(--sp-3);
  border: 1px solid var(--line-q);
  border-left: 2px solid var(--line);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--ink-2);
}
.step__key {
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: var(--sp-1);
}
.step__icon { font-size: 1.25rem; line-height: 1; margin-bottom: var(--sp-1); }
.step h4 { margin-bottom: 4px; }
.step p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- deployment comparison --------------------------------------- */
.deploy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.deploy__col {
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
}
.deploy__col header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--line-q);
  background: var(--ink-3);
}
.deploy__col header span {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}
.deploy__row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2);
  align-items: baseline;
  padding: 11px var(--sp-3);
  border-bottom: 1px solid rgba(122, 158, 140, 0.1);
  font-size: var(--fs-sm);
}
.deploy__row:last-child { border-bottom: none; }
.deploy__row .k { font-family: var(--mono); color: var(--muted); font-size: var(--fs-sm); }
.deploy__row .v { color: var(--text); font-weight: 600; text-align: right; }
/* the rows that do not move between the two models */
.deploy__row.locked { background: rgba(61, 255, 154, 0.045); }
.deploy__row.locked .k { color: var(--signal); }
.deploy-note {
  margin-top: var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: var(--measure);
}

/* ---------- release log -------------------------------------------------- */
.log {
  margin-top: var(--sp-4);
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.log__head {
  padding: 12px var(--sp-3);
  border-bottom: 1px solid var(--line-q);
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal);
}
.log__row {
  display: grid; grid-template-columns: 7rem 1fr; gap: var(--sp-2);
  padding: 13px var(--sp-3);
  border-bottom: 1px solid rgba(122, 158, 140, 0.1);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.log__row:last-child { border-bottom: none; }
.log__row > :first-child { font-family: var(--mono); font-weight: 600; color: var(--signal); }
.log__row.roadmap > :first-child { color: var(--cyan); }
@media (max-width: 520px) {
  .log__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- use cases ---------------------------------------------------- */
.uc {
  container-type: inline-size;
  padding: var(--sp-3);
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.uc:hover { border-color: var(--line-c); transform: translateY(-3px); }
.uc__icon { font-size: 1.3rem; line-height: 1; margin-bottom: var(--sp-1); }
.uc h4 { margin-bottom: 5px; }
.uc p { color: var(--muted); font-size: var(--fs-sm); }
.uc__link {
  display: block;
  margin-top: 10px;
  font-family: var(--mono); font-size: 0.74rem;
  color: var(--signal);
}
.uc__link .dim { color: var(--dim); }

.panel {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  background: var(--card);
}
.panel__head {
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: var(--sp-2);
}
.panel p { color: var(--muted); font-size: var(--fs-sm); max-width: var(--measure); }

/* ---------- pitch teaser -------------------------------------------------- */
.teaser {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line-c);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.06), transparent 60%),
    var(--card);
}
.teaser p { color: var(--muted); font-size: var(--fs-sm); max-width: 52ch; margin-top: 6px; }

/* ---------- about + founder ----------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
}
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.about h3 { margin: var(--sp-4) 0 var(--sp-1); color: var(--signal); }
.about h3:first-child { margin-top: 0; }
.about p { color: var(--muted); max-width: var(--measure); margin-bottom: var(--sp-2); }

.pill-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--sp-3); }
.pill {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: var(--muted);
  background: var(--ink-3);
  border: 1px solid var(--line-q); border-radius: 5px;
  padding: 4px 11px;
}

.founder {
  position: sticky; top: calc(var(--nav-h) + 24px);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
@media (max-width: 900px) { .founder { position: static; } }
.founder__avatar {
  width: 96px; height: 96px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: var(--sp-3);
}
.founder__avatar img { width: 100%; height: 100%; object-fit: cover; }
.founder__name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.03em; }
.founder__role {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal);
  margin-bottom: var(--sp-2);
}
.founder__bio { color: var(--muted); font-size: var(--fs-sm); }
.founder__meta {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--line-q);
  display: flex; flex-direction: column; gap: 7px;
  font-size: var(--fs-sm); color: var(--muted);
}
.meta-row { display: flex; gap: 9px; align-items: flex-start; }
.meta-row a { color: var(--muted); text-decoration: none; }
.meta-row a:hover { color: var(--signal); }
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--line-q);
}
.stat__val { font-family: var(--mono); font-weight: 700; font-size: var(--fs-sm); color: var(--text); }
.stat__key {
  font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}

/* ---------- contact form ---------------------------------------------------- */
.contact-card {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  max-width: 48rem;
  margin-top: var(--sp-4);
}
.form { display: flex; flex-direction: column; gap: var(--sp-2); }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: var(--sp-2); }
.field {
  width: 100%; min-width: 0;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line-q);
  border-radius: var(--radius-s);
  color: var(--text);
  transition: border-color 0.18s ease;
}
.field::placeholder { color: var(--dim); }
.field:hover { border-color: var(--line); }
textarea.field { resize: vertical; min-height: 120px; }
select.field { appearance: none; background-image: none; cursor: pointer; }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: var(--fs-micro); color: var(--muted); line-height: 1.6;
  cursor: pointer;
}
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--signal); flex-shrink: 0; }
.note { font-size: var(--fs-micro); color: var(--muted); text-align: center; }
.note.err { color: var(--danger); }
.note.ok  { color: var(--signal); }
.direct {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--line-q);
  font-size: var(--fs-sm); color: var(--muted);
}
.direct a { text-decoration: none; }

/* ---------- legal / prose pages ----------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 {
  font-size: var(--fs-h3);
  color: var(--signal);
  text-transform: none;
  margin: var(--sp-5) 0 var(--sp-2);
}
.prose h2:first-of-type { margin-top: var(--sp-4); }
.prose h3 { margin: var(--sp-3) 0 var(--sp-1); }
.prose p, .prose li { color: var(--muted); margin-bottom: var(--sp-2); }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: var(--sp-3); }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.updated {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  margin-bottom: var(--sp-4);
}
.back {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  font-family: var(--mono); font-size: var(--fs-sm);
  color: var(--muted); text-decoration: none;
}
.back:hover { color: var(--signal); }
.doc-card {
  margin-top: var(--sp-2);
  padding: var(--sp-5);
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  background: var(--card);
}
@media (max-width: 560px) { .doc-card { padding: var(--sp-4) var(--sp-3); } }

/* centred stub pages (404, blog) */
.stub {
  min-height: 64vh; min-height: 64svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: var(--sp-2);
  padding-block: var(--sp-6);
}
.stub img { width: 52px; height: 52px; border-radius: 12px; margin-bottom: var(--sp-2); }
.stub p { color: var(--muted); max-width: 46ch; }
.stub .btn { margin-top: var(--sp-3); }

/* ---------- footer -------------------------------------------------------------- */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line-q);
  background: var(--ink-2);
  padding-block: var(--sp-6) var(--sp-4);
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--sp-4);
}
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.foot-legal-name { font-family: var(--display); font-weight: 800; font-size: 0.9rem; letter-spacing: -0.03em; }
.foot-entity { font-family: var(--mono); font-size: var(--fs-micro); color: var(--dim); margin-top: 3px; }
.foot-col h4 {
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal);
  margin-bottom: var(--sp-2);
}
.foot-col p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-2); }
.foot-col a { color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--signal); }
.foot-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-5); padding-top: var(--sp-3);
  border-top: 1px solid var(--line-q);
}
.copy { font-size: var(--fs-sm); color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: 8px; }
.foot-links a {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
}
.foot-links a:hover { color: var(--signal); }
.disclaimer { font-size: var(--fs-micro); color: var(--dim); line-height: 1.65; }

/* compact statutory footer used by stub pages */
.foot-mini {
  border-top: 1px solid var(--line-q);
  padding: var(--sp-4) var(--gutter);
  font-family: var(--mono); font-size: var(--fs-micro);
  color: var(--dim); line-height: 1.7; text-align: center;
}
.foot-mini a { color: var(--signal); text-decoration: none; }

/* ==========================================================================
   Business overview (pitch.html)
   ========================================================================== */

/* boot sequence — brief, then gone. A JS safety net removes it regardless. */
.boot {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  font-family: var(--mono); font-size: 0.8rem; color: var(--signal);
  animation: bootOut 0.45s ease 1.35s forwards;
}
.boot ol { list-style: none; width: min(520px, 86vw); }
.boot li {
  opacity: 0;
  animation: bootLine 0.01s linear forwards;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.boot li:nth-child(1) { animation-delay: 0.10s; }
.boot li:nth-child(2) { animation-delay: 0.32s; }
.boot li:nth-child(3) { animation-delay: 0.54s; }
.boot li:nth-child(4) { animation-delay: 0.76s; }
.boot li:nth-child(5) { animation-delay: 0.98s; }
.boot li b { color: var(--dim); font-weight: 400; }
.boot .ok { color: var(--signal); }
@keyframes bootLine { to { opacity: 1; } }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }

/* statutory identity card */
.idcard {
  margin-top: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.idcard-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line-q);
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--dim);
}
.idcard-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex-shrink: 0; }
.idcard-bar .dot.g { background: var(--signal); }
.idgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.idgrid > div {
  padding: 13px var(--sp-3);
  border-bottom: 1px solid rgba(122, 158, 140, 0.1);
}
.idgrid dt {
  font-family: var(--mono); font-size: var(--fs-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 3px;
}
.idgrid dd { font-size: var(--fs-sm); color: var(--text); font-weight: 500; }

/* layered definition list */
.deflist { margin-top: var(--sp-4); border-top: 1px solid var(--line-q); }
.deflist > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-q);
}
@media (max-width: 640px) { .deflist > div { grid-template-columns: 1fr; gap: 4px; } }
.deflist dt { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 700; color: var(--signal); }
.deflist dd { color: var(--muted); font-size: var(--fs-sm); }

/* comparison table — scrolls inside its own box, never the page */
.tablewrap {
  margin-top: var(--sp-4);
  overflow-x: auto;
  border: 1px solid var(--line-q);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
table.cmp { border-collapse: collapse; width: 100%; min-width: 34rem; }
table.cmp th, table.cmp td {
  text-align: left;
  padding: 12px var(--sp-3);
  border-bottom: 1px solid rgba(122, 158, 140, 0.12);
  font-size: var(--fs-sm);
}
table.cmp th {
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--signal); background: var(--ink-3);
  white-space: nowrap;
}
table.cmp td { color: var(--muted); vertical-align: top; }
table.cmp td:first-child { color: var(--text); font-weight: 600; }
table.cmp td:last-child { color: var(--text); }
table.cmp tr:last-child td { border-bottom: none; }

/* revenue streams — a real enumeration, so it is numbered */
.streams { list-style: none; counter-reset: s; margin-top: var(--sp-4); }
.streams li {
  counter-increment: s;
  display: grid; grid-template-columns: 2.2rem 1fr; gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-q);
}
.streams li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: var(--fs-sm); font-weight: 700;
  color: var(--cyan);
}
.streams strong { display: block; color: var(--text); font-size: var(--fs-body); }
.streams span { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }

.card__num {
  font-family: var(--mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan);
}

.cta-block {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(61, 255, 154, 0.07), transparent 60%),
    var(--card);
}
.cta-block p { color: var(--muted); max-width: var(--measure); margin: var(--sp-2) 0 var(--sp-4); }
.cta-block .btn + .btn { margin-left: 10px; }
@media (max-width: 480px) {
  .cta-block .btn { display: flex; width: 100%; }
  .cta-block .btn + .btn { margin: 10px 0 0; }
}

/* ---------- scroll reveal --------------------------------------------------------- */
/* Only hidden once JS has confirmed it is running — no-JS sees everything. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); }
.js-reveal [data-reveal].revealed {
  opacity: 1; transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---------- motion + contrast preferences ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  #rain { display: none; }
  .focus-track { animation: none; }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #b9d8c8;
    --dim:   #93b3a2;
    --line:  rgba(61, 255, 154, 0.4);
    --line-q: rgba(122, 158, 140, 0.35);
  }
  #rain { display: none; }
}

/* ---------- print ------------------------------------------------------------------- */
/* Pitch and legal pages get printed by banks and registrars. Make that work. */
@media print {
  :root { --text: #000; --muted: #333; --dim: #555; }
  body { background: #fff; color: #000; padding-top: 0; font-size: 11pt; }
  .top, .nav-drawer, .skip, #rain, .focus-bar, .terminal, .ct-canvas,
  .hero-actions, .nav-toggle, .boot { display: none !important; }

  /* the reveal observer never runs for a print render — show everything */
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }

  /* canvas headings do not print — restore the real ones */
  .ct-hidden {
    position: static !important;
    width: auto; height: auto;
    margin: 0; clip-path: none; white-space: normal;
  }
  .grad { -webkit-text-fill-color: #000; color: #000; }

  .section { padding-block: 18pt; break-inside: avoid; }
  .card, .step, .deploy__col, .founder, .panel, .teaser {
    border: 1pt solid #999; background: none; break-inside: avoid;
  }
  .perimeter { border: 1pt solid #999; background: none; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .site-footer { background: none; border-top: 1pt solid #999; }
}
