/* ============ NueveLabs — terminal/dev aesthetic ============ */

:root {
  --bg: #0B0E1A;
  --surface: #11152A;
  --surface-2: #161B34;
  --border: #1E2340;
  --border-strong: #2A3156;
  --ink: #E8E6E1;
  --ink-dim: #9CA3BE;
  --ink-faint: #5B6286;
  --accent: #6B7FFF;
  --accent-2: #A7B5FF;
  --accent-glow: rgba(107, 127, 255, 0.28);
  --ok: #7FE3A1;
  --warn: #FFB86B;
  --danger: #FF6B6B;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-display: var(--font-sans);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --container: 1280px;
  --gutter: 28px;
}

[data-theme="light"] {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #EFECE4;
  --border: #E3DED0;
  --border-strong: #C9C2B0;
  --ink: #0B0E1A;
  --ink-dim: #4A5174;
  --ink-faint: #8A8F9E;
  --accent: #4355E8;
  --accent-2: #6B7FFF;
  --accent-glow: rgba(67, 85, 232, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 0%, transparent 70%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before { opacity: 0.5; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Typography helpers ---------- */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01", "ss02"; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent-glow);
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; }
h1 { font-weight: 500; line-height: 0.95; }
h2 { font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-weight: 500; line-height: 1.15; }

p { margin: 0; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

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

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}
.nav.scrolled {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(11, 14, 26, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 40px -28px rgba(0,0,0,0.75);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(245, 243, 238, 0.72);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 16px 40px -28px rgba(0,0,0,0.15);
}
/* Fallback for browsers without backdrop-filter support */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.scrolled { background: rgba(11, 14, 26, 0.94); }
  [data-theme="light"] .nav.scrolled { background: rgba(245, 243, 238, 0.96); }
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Nav brand is larger for prominence */
.nav .brand {
  font-size: 32px;
  gap: 14px;
}

/* Footer brand: even larger wordmark treatment */
.footer-brand .brand {
  font-size: 40px;
  gap: 18px;
}

.brand-mark {
  min-width: 36px;
  height: 22px;
  padding: 0 6px;
  display: grid; place-items: center;
  color: var(--bg);
  background: var(--ink);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Stacked variant: "10" on top, "01" below (whole badge blinks like a cursor) */
.brand-mark.stacked {
  width: 30px;
  min-width: 30px;
  height: 48px;
  padding: 4px 0;
  line-height: 1;
  letter-spacing: 0.06em;
  grid-template-rows: 1fr 1fr;
  row-gap: 2px;
  align-content: stretch;
  justify-items: center;
  font-size: 12px;
  border-radius: 6px;
  animation: brand-blink 2.2s steps(1) infinite;
}
.brand-mark.stacked > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
/* Nav badge stays static; footer keeps the cursor blink */
.nav .brand-mark.stacked { animation: none; }
@keyframes brand-blink { 60% { opacity: 0; } }

/* Footer uses the same stacked mark but a touch larger */
.footer-brand .brand .brand-mark.stacked {
  width: 38px;
  min-width: 38px;
  height: 58px;
  font-size: 15px;
  border-radius: 8px;
  padding: 6px 0;
}
[data-theme="light"] .brand-mark { background: var(--ink); color: var(--bg); }

.brand-name { color: var(--ink); }
.brand-name em { color: var(--accent); font-style: normal; }

.nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}
.nav-center a, .nav-center button {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-dim);
  padding: 7px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Hamburger button: only visible on mobile (when .nav-center is hidden) */
.nav-right .icon-btn[data-open-sidebar] { display: none; }
@media (max-width: 960px) {
  .nav-right .icon-btn[data-open-sidebar] { display: inline-flex; }
  /* Hide the CTA button in the nav on mobile — sidebar provides navigation */
  .nav-right .btn-primary { display: none; }
  /* Prevent nav-right from overflowing */
  .nav-inner { grid-template-columns: 1fr 1fr; }
}
.nav-center a:hover, .nav-center button:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--surface-2) 80%, transparent);
}
.nav-center .has-caret::after {
  content: "▾";
  font-size: 9px;
  opacity: 0.6;
  transform: translateY(-1px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-dim);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 15px; height: 15px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}
.lang-toggle button {
  padding: 8px 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.lang-toggle button.active { color: var(--ink); background: var(--surface-2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  background: var(--surface);
  transition: transform 0.12s ease, border-color 0.18s, background 0.18s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #0B0E1A;
  border-color: var(--accent);
  font-weight: 500;
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-arrow::after {
  content: "→";
  transition: transform 0.2s ease;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Sidebar menu ---------- */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}
.sidebar-scrim.open { opacity: 1; pointer-events: auto; }

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 92vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.sidebar.open { transform: translateX(0); }

.sidebar-head {
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sidebar-head .eyebrow { text-transform: none; letter-spacing: 0; }

.sidebar-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-dim);
}
.sidebar-close:hover { color: var(--ink); }

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px;
}

.sb-group {
  padding: 18px 24px 8px;
}
.sb-group-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.sb-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sb-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px 24px;
  color: var(--ink);
  border-left: 2px solid transparent;
  transition: background 0.18s, border-color 0.18s;
  position: relative;
}
.sb-item:hover {
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
  border-left-color: var(--accent);
}
.sb-item .sb-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  padding-top: 2px;
}
.sb-item .sb-title {
  font-size: 15.5px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.sb-item .sb-desc {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  margin-top: 4px;
  line-height: 1.5;
}
.sb-item .sb-arrow {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  align-self: center;
  transition: transform 0.18s, color 0.18s;
}
.sb-item:hover .sb-arrow { color: var(--accent); transform: translateX(3px); }

.sb-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.sb-footer .dot {
  width: 6px; height: 6px; background: var(--ok); border-radius: 999px;
  box-shadow: 0 0 8px var(--ok);
  display: inline-block; margin-right: 6px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 28px;
}
.hero-meta .tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-dim);
  display: inline-flex; align-items: center; gap: 6px;
}
.hero-meta .tag .dot {
  width: 5px; height: 5px; border-radius: 999px; background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.035em;
  line-height: 0.96;
  max-width: 12ch;
}
.hero h1 .punct { color: var(--accent); }
.hero h1 .underline {
  position: relative;
  display: inline-block;
  color: var(--ink);
}
.hero h1 .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.12em;
  background: var(--accent);
  opacity: 0.35;
  z-index: -1;
}
.hero h1 .cursor {
  display: inline-block;
  width: 0.45em;
  height: 0.75em;
  background: var(--accent);
  vertical-align: -0.05em;
  margin-left: 0.05em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  margin-top: 28px;
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 48ch;
  line-height: 1.55;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 520px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero-stats .num {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-stats .num .accent { color: var(--accent); }
.hero-stats .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ---------- Hero visual (agent graph) ---------- */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin-left: auto;
  width: 100%;
}
.hero-visual .frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--surface) 85%, transparent), color-mix(in oklab, var(--bg) 95%, transparent));
  overflow: hidden;
}
.hero-visual .corner {
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--accent);
}
.hero-visual .corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero-visual .corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hero-visual .corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hero-visual .corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.hero-visual .topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  z-index: 2;
}
.hero-visual .topbar .lights { display: flex; gap: 6px; }
.hero-visual .topbar .lights span {
  width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong);
}

.hero-visual .scene {
  position: absolute;
  inset: 34px 0 0 0;
}
.hero-visual svg { width: 100%; height: 100%; display: block; }

.node {
  transform-origin: center;
}
.node circle.core {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.node circle.halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0;
}
.node text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-dim);
  text-anchor: middle;
  letter-spacing: 0.02em;
}
.node.central circle.core {
  fill: var(--accent);
  stroke: var(--accent-2);
}
.node.central text { fill: var(--bg); font-weight: 600; }
[data-theme="light"] .node.central text { fill: #fff; }

.edge {
  stroke: var(--border-strong);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 3 4;
}

.packet {
  fill: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.hero-visual .bottombar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 10px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  z-index: 2;
}
.hero-visual .bottombar .typed::after {
  content: "_";
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* ---------- Section ---------- */
section.band { padding: 100px 0; position: relative; }
section.band.tight { padding: 70px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  align-items: end;
}
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 56px);
  max-width: 16ch;
}
.section-head .lede {
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 52ch;
}

/* ---------- Products ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.product {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  min-height: 340px;
  overflow: hidden;
}
.product::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.product:hover::before { opacity: 1; }
.product:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.product-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
}
.product-head .status {
  color: var(--ok);
  display: inline-flex; align-items: center; gap: 6px;
}
.product-head .status .dot {
  width: 6px; height: 6px; background: var(--ok); border-radius: 999px;
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s infinite;
}
.product-head .idx { color: var(--ink-faint); }

.product-logo {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.product-logo .punct { color: var(--accent); }

.product-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  padding-top: 2px;
}

.product-desc {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}

.product-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.product-meta span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-dim);
}

.product-link {
  display: inline-flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--ink);
  transition: color 0.18s;
}
.product-link .ext { color: var(--ink-faint); }
.product:hover .product-link { color: var(--accent-2); }
.product:hover .product-link .ext { color: var(--accent); }

/* ---------- Metrics ---------- */
.metrics {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.metrics-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  background: color-mix(in oklab, var(--surface-2) 50%, transparent);
}
.metrics-head .live {
  color: var(--ok);
  display: inline-flex; align-items: center; gap: 6px;
}
.metrics-head .live .dot {
  width: 6px; height: 6px; background: var(--ok); border-radius: 999px;
  animation: pulse 2s infinite;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.metric {
  padding: 28px;
  border-right: 1px solid var(--border);
  position: relative;
}
.metric:last-child { border-right: 0; }
.metric .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.metric .val {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric .val .accent { color: var(--accent); }
.metric .delta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ok);
}
.metric .spark {
  margin-top: 14px;
  height: 26px;
  width: 100%;
}

/* ---------- Manifesto ---------- */
.manifesto {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.manifesto-lines {
  border-left: 1px solid var(--border);
  padding-left: 28px;
  counter-reset: manifesto;
}
.manifesto-line {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: baseline;
}
.manifesto-line:last-child { border-bottom: 0; }
.manifesto-line .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.manifesto-line p {
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.manifesto-line p strong {
  color: var(--accent-2);
  font-weight: 500;
}
[data-theme="light"] .manifesto-line p strong { color: var(--accent); }

/* ---------- Cases ---------- */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s;
}
.case:hover { border-color: var(--border-strong); }
.case-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.case-head .industry {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-dim);
}
.case-logo {
  height: 32px;
  display: flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.case-quote {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.case-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.case-result .cell .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.case-result .cell .val {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent-2);
  letter-spacing: -0.02em;
  margin-top: 4px;
}
[data-theme="light"] .case-result .cell .val { color: var(--accent); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  max-width: 14ch;
}
.contact-info p {
  margin-top: 20px;
  color: var(--ink-dim);
  max-width: 44ch;
  line-height: 1.55;
}
.contact-meta {
  margin-top: 32px;
  display: grid;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.contact-meta .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.contact-meta .row .k { color: var(--ink-faint); }
.contact-meta .row .v { color: var(--ink); }
.contact-meta .row .v a { color: var(--accent-2); }

.form {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 14px;
  position: relative;
}
.form::before {
  content: "~/contact.sh";
  position: absolute;
  top: -10px; left: 20px;
  padding: 0 8px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: inline-flex;
  gap: 6px;
}
.field label::before { content: ">"; color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font: inherit;
  font-family: var(--font-mono);
  transition: border-color 0.18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.check {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.check input { accent-color: var(--accent); margin-top: 2px; }
.check a { color: var(--accent-2); text-decoration: underline; text-decoration-style: dotted; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 60px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { display: grid; gap: 18px; max-width: 34ch; }
.footer-brand .desc { color: var(--ink-dim); font-size: 13px; line-height: 1.55; }
.footer-brand .made { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); display: inline-flex; gap: 8px; align-items: center; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a {
  font-size: 13.5px;
  color: var(--ink-dim);
  transition: color 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-col a:hover { color: var(--ink); }
.footer-col a .ext { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }

.footer-end {
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.footer-end .legal { display: flex; gap: 18px; }
.footer-end .legal a:hover { color: var(--ink); }

/* Oversized wordmark */
.footer-word {
  font-family: var(--font-display);
  font-size: clamp(80px, 18vw, 260px);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  margin-top: 40px;
  user-select: none;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
}
.footer-word span {
  color: var(--accent);
  -webkit-text-stroke: 0;
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: 0.18em;
  margin: 0 0.06em;
  font-size: 0;
  line-height: 1;
}

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  z-index: 70;
  overflow: hidden;
  display: none;
}
.tweaks.open { display: block; }
.tweaks-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  background: var(--surface-2);
}
.tweaks-body { padding: 16px; display: grid; gap: 16px; }
.tw-row { display: grid; gap: 8px; }
.tw-row label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.tw-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-swatch {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: transform 0.14s;
}
.tw-swatch:hover { transform: scale(1.1); }
.tw-swatch.active { border: 2px solid var(--ink); }
.tw-opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.tw-opts button {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-align: left;
}
.tw-opts button.active { border-color: var(--accent); color: var(--ink); background: color-mix(in oklab, var(--accent-glow) 40%, transparent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 100%; margin: 0 auto; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .products, .cases { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--border); }
  .manifesto, .contact { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-center { display: none; }
  .hero { padding: 60px 0 32px; }
  section.band { padding: 64px 0; }
  section.band.tight { padding: 48px 0; }
}

@media (max-width: 600px) {
  :root { --gutter: 18px; }
  .hero { padding: 48px 0 28px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-visual { aspect-ratio: 4/3; }
  .footer-grid { grid-template-columns: 1fr; }
  section.band { padding: 48px 0; }
  section.band.tight { padding: 36px 0; }
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-dim);
  background: var(--surface);
}
