/* =========================================================
   UrboPulse — marketing site
   One token set, one type scale, one spacing scale. Every
   component below draws from these; nothing hard-codes its own.
   ========================================================= */

:root {
  /* Brand */
  --brand: #27418C;
  --accent: #5E8EEA;
  --accent-2: #8DB2F7;
  --violet: #A78BFA;

  /* Signal colours, matched to the app */
  --light: #5EEAD4;
  --standard: #8B9CF6;
  --deep: #C084FC;
  --ok: #4ADE80;
  --fail: #F87171;
  --info: #60A5FA;

  /* Surfaces */
  --bg: #0A0F1C;
  --surface: #0F1627;
  --surface-2: #151D31;
  --border: #1E2940;
  --border-strong: #2B3956;

  /* Text */
  --text: #E8ECF4;
  --text-2: #B3BDCE;
  --muted: #7D8AA0;

  /* Type */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.625rem, 1.1rem + 1.6vw, 2.25rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 3.6vw, 3.75rem);

  /* Space (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Shape */
  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-2);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }
em { color: var(--text); font-style: normal; font-weight: 500; }

code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--accent-2);
  background: rgba(94, 142, 234, 0.08);
  border: 1px solid rgba(94, 142, 234, 0.16);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

::selection { background: rgba(94, 142, 234, 0.35); color: #fff; }

/* ---------- Views (hash router) ---------- */
main { flex: 1; }
.js .view { display: none; }
.js .view.is-active { display: block; animation: view-in 0.4s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--s-8); }
.section + .section { padding-top: 0; }
.section--tight { padding-bottom: var(--s-8); }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
.stack { display: grid; gap: var(--s-5); }

.section-head { max-width: 680px; margin-bottom: var(--s-6); }
.section-head p:not(.eyebrow) { margin-top: var(--s-3); font-size: var(--fs-lg); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.lede { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; max-width: 640px; margin-top: var(--s-5); }

.grad {
  background: linear-gradient(100deg, var(--accent-2) 0%, var(--accent) 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footnote { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s-4); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 300;
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-5);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn--lg { height: 52px; padding: 0 var(--s-6); font-size: var(--fs-base); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #7C7CF0 55%, var(--violet) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 8px 24px -8px rgba(94, 142, 234, 0.6);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 12px 32px -8px rgba(124, 124, 240, 0.75); }

.btn--ghost { color: var(--text); border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(94, 142, 234, 0.08); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.byo { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--text-2); }
.byo li { display: inline-flex; align-items: center; gap: var(--s-2); }
.byo li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%234ADE80' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 28, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(10, 15, 28, 0.88); }
.site-header__wrap { display: flex; align-items: center; gap: var(--s-6); height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__word { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.brand__urbo { color: #fff; }
.brand__pulse { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: var(--s-5); flex: 1; }
.site-nav__list { display: flex; gap: var(--s-1); margin-left: auto; }
.site-nav__list a {
  display: block;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s, background-color 0.15s;
}
.site-nav__list a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.site-nav__list a[aria-current="page"] { color: var(--text); background: rgba(94, 142, 234, 0.12); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

/* ---------- Hero ---------- */
.hero, .page-hero { position: relative; isolation: isolate; }
.hero::before, .page-hero::before {
  content: '';
  position: absolute;
  inset: -68px 0 auto;
  height: 720px;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(39, 65, 140, 0.55), transparent 70%),
    radial-gradient(30% 35% at 85% 10%, rgba(167, 139, 250, 0.14), transparent 70%);
  pointer-events: none;
}
.hero::after, .page-hero::after {
  content: '';
  position: absolute;
  inset: -68px 0 auto;
  height: 620px;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero { padding: var(--s-9) 0 var(--s-7); }
.hero__copy { max-width: 820px; margin: 0 auto; text-align: center; }
.hero__copy .lede { margin-left: auto; margin-right: auto; }
.hero__copy .actions { justify-content: center; }

.page-hero { padding: var(--s-9) 0 var(--s-7); }
.page-hero h1 { max-width: 880px; }

/* ---------- Screenshots ---------- */
.figure { margin-top: var(--s-6); }
.figure--hero { margin-top: var(--s-8); }
.figure--hero .shot { box-shadow: 0 0 0 1px rgba(94, 142, 234, 0.12), 0 40px 120px -30px rgba(39, 65, 140, 0.8), var(--shadow-lg); }

.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), border-color 0.2s;
}
.shot img { display: block; width: 100%; height: auto; }
.shot:hover { border-color: rgba(94, 142, 234, 0.5); }
button.shot::after {
  content: '⤢';
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text);
  background: rgba(10, 15, 28, 0.8);
  border: 1px solid var(--border-strong);
  opacity: 0;
  transition: opacity 0.2s;
}
button.shot:hover::after, button.shot:focus-visible::after { opacity: 1; }

figcaption { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--muted); text-align: center; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stats .stat { padding: var(--s-6) var(--s-5); }
.stats .stat + .stat { border-left: 1px solid var(--border); }
.stats + .footnote { text-align: center; }

.stat { display: flex; flex-direction: column; }
.stat__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.stat__value {
  order: -1;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
}
.stat__unit { font-size: 0.5em; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.stat__sub { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

.stat--card {
  padding: var(--s-6);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  justify-content: center;
}
.stat--card .stat__value { order: 0; margin: var(--s-2) 0 var(--s-1); }
.stat--card .stat__label { font-family: var(--mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: var(--s-6);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: var(--s-2); }
:where(.card) p { font-size: 0.9375rem; }
.card--wide { padding: var(--s-7) var(--s-6); text-align: center; }
.card--wide h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); margin-bottom: var(--s-3); }
.card--wide p { max-width: 640px; margin: 0 auto; font-size: var(--fs-base); }
.card__title { font-size: 1.25rem; }
.card__sub { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); margin: var(--s-1) 0 var(--s-5); }

.card--link { display: flex; flex-direction: column; transition: transform 0.2s var(--ease), border-color 0.2s; }
.card--link:hover { transform: translateY(-3px); border-color: rgba(94, 142, 234, 0.45); }
.card--link p { flex: 1; }
.card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: var(--s-5);
  border-radius: 10px;
  background: rgba(94, 142, 234, 0.1);
  border: 1px solid rgba(94, 142, 234, 0.22);
}
.card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-2); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card__more { margin-top: var(--s-5); font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.card__more span { display: inline-block; transition: transform 0.2s var(--ease); }
.card--link:hover .card__more span { transform: translateX(3px); }

.callout {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(94, 142, 234, 0.06);
  font-size: 0.9375rem;
}

/* ---------- Pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.pipeline__stage {
  position: relative;
  padding: var(--s-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.pipeline__stage:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--s-4) / 2 - 5px);
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.pipeline__label {
  margin-bottom: var(--s-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.pipeline__label span { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; color: var(--accent); margin-right: var(--s-1); }
.pipeline__steps { display: grid; gap: 14px; }
.pipeline__step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 38px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
}
.pipeline__step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 14px;
  background: var(--border-strong);
}
.pipeline__step span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
}
.pipeline__step code { background: none; border: 0; padding: 0; color: inherit; font-size: 0.75rem; white-space: normal; }
.pipeline__step--gate { border-style: dashed; border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.05); color: #B7F5CB; }
.pipeline__step--jev { border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.08); }
.pipeline__step--code { border-style: dotted; color: var(--text-2); }
.pipeline__step--code span { color: var(--muted); }
.pipeline__step--io { border-color: rgba(94, 142, 234, 0.5); background: rgba(94, 142, 234, 0.08); color: var(--accent-2); }

.legend { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend__swatch { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.legend__swatch--jev { border-color: var(--violet); background: rgba(167, 139, 250, 0.15); }
.legend__swatch--gate { border: 1px dashed var(--ok); background: rgba(74, 222, 128, 0.1); }
.legend__swatch--code { border-style: dotted; background: transparent; }

/* ---------- Tiers ---------- */
.tier { overflow: hidden; display: flex; flex-direction: column; }
.tier::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tier); }
.tier--light { --tier: var(--light); }
.tier--standard { --tier: var(--standard); }
.tier--deep { --tier: var(--deep); }
.tier__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s-2); }
.tier__head h3 { color: var(--tier); margin: 0; }
.tier__cost { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 500; color: var(--text); letter-spacing: 0.05em; }
.tier__cost span { color: var(--border-strong); }
.tier__price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.tier > p { margin-bottom: var(--s-5); }
.tier__price dt { font-size: var(--fs-xs); color: var(--muted); }
.tier__price dd { font-family: var(--mono); font-size: var(--fs-lg); font-weight: 500; color: var(--text); }

/* ---------- Thinking scale ---------- */
.thinking { padding: var(--s-6); }
.thinking__levels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); }
.thinking__levels button {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.thinking__levels button:hover { border-color: var(--accent); color: var(--text); }
.thinking__levels button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(94, 142, 234, 0.7); }
.thinking__bar { height: 4px; margin-top: var(--s-5); border-radius: 999px; background: linear-gradient(90deg, var(--light), var(--standard), var(--deep)); }
.thinking__ends { display: flex; justify-content: space-between; margin-top: var(--s-2); font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.thinking__note { margin-top: var(--s-5); text-align: center; font-size: var(--fs-lg); font-weight: 500; color: var(--text); min-height: 1.6em; }
.thinking__example { margin-top: var(--s-2); text-align: center; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Gates ---------- */
.gate h3 code { font-size: 0.9375rem; }
.meter { height: 6px; margin-top: var(--s-5); border-radius: 999px; background: rgba(248, 113, 113, 0.5); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--pass); background: var(--ok); border-radius: 999px 0 0 999px; }
.gate__tally span { white-space: nowrap; }
.gate__tally { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-3); font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.gate__tally .ok { color: var(--ok); }
.gate__tally .fail { color: var(--fail); }

/* ---------- Feature rows ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-8);
  align-items: center;
}
.feature + .feature { margin-top: var(--s-9); }
.feature--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature--rev .feature__text { order: 2; }
.feature__text h2 { font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2rem); }
.feature__text p:not(.eyebrow):not(.pills) { margin-top: var(--s-4); font-size: var(--fs-lg); }
.feature .figure { margin-top: 0; }

/* ---------- Pills & routes ---------- */
.pills { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(94, 142, 234, 0.45);
  background: rgba(94, 142, 234, 0.08);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent-2);
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--muted { color: var(--text-2); border-color: var(--border-strong); background: transparent; }
.pill--info { color: var(--info); border-color: rgba(96, 165, 250, 0.45); background: rgba(96, 165, 250, 0.08); }
.pill--ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.08); }
.pill--fail { color: var(--fail); border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.08); }

.routes { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.routes li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.routes__arrow { color: var(--muted); }

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th, .table td { padding: var(--s-3) 0; text-align: left; border-bottom: 1px solid var(--border); }
.table thead th { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-top: 0; }
.table td { color: var(--text); }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table tfoot th, .table tfoot td { border-bottom: 0; padding-bottom: 0; font-weight: 600; color: var(--text); }
.table tfoot td { color: var(--accent-2); }

/* ---------- ROI calculator ---------- */
.roi { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); padding: var(--s-6); }
.roi__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); align-content: start; }
.field label { display: block; margin-bottom: var(--s-2); font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 var(--s-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: var(--mono);
  font-size: var(--fs-base);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:hover { border-color: #3A4A6B; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 142, 234, 0.2); }

.roi__output {
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
  border-radius: var(--radius);
  border: 1px solid rgba(94, 142, 234, 0.3);
  background: radial-gradient(120% 80% at 100% 0%, rgba(39, 65, 140, 0.5), transparent 60%), var(--bg);
}
.roi .roi__headline-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.roi .roi__headline { margin: var(--s-1) 0 var(--s-5); font-size: clamp(2.25rem, 1.6rem + 2vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--ok); font-variant-numeric: tabular-nums; }
.roi__headline .is-negative { color: var(--fail); }
.roi__list { display: grid; }
.roi__list div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.roi__list dt { color: var(--text-2); }
.roi__list dd { font-family: var(--mono); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.roi .roi__output .footnote { margin-top: auto; padding-top: var(--s-4); }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 var(--s-8); }
.cta-band__inner > * { position: relative; }
.cta-band__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-7);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(94, 142, 234, 0.3);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(39, 65, 140, 0.7), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, rgba(167, 139, 250, 0.2), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); }
.cta-band p { margin-top: var(--s-2); max-width: 560px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: #080C17; }
.site-footer__wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-6); padding-top: var(--s-7); padding-bottom: var(--s-6); }
.site-footer__brand p { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer__links a { font-size: var(--fs-sm); color: var(--text-2); transition: color 0.15s; }
.site-footer__links a:hover, .site-footer__links a[aria-current="page"] { color: var(--text); }
.site-footer__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding-top: var(--s-5); padding-bottom: var(--s-6); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(94vw, 1600px);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: var(--s-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
.lightbox::backdrop { background: rgba(4, 7, 14, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in 0.25s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.shot--lightbox { cursor: default; box-shadow: none; border-radius: var(--radius); }
.shot--lightbox:hover { border-color: var(--border-strong); }
.lightbox__close {
  position: absolute;
  top: var(--s-6);
  right: var(--s-6);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-strong);
}
.lightbox__close:hover { border-color: var(--accent); }
.lightbox__caption { margin-top: var(--s-3); font-size: var(--fs-sm); text-align: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .site-header__wrap { gap: var(--s-4); }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-4);
    padding: var(--s-4) var(--gutter) var(--s-5);
    background: rgba(10, 15, 28, 0.98);
    border-bottom: 1px solid var(--border);
  }
  html:not(.js) .site-header { position: static; }
  html:not(.js) .site-header__wrap { flex-wrap: wrap; height: auto; padding-top: var(--s-4); }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-nav { position: static; display: flex; flex-basis: 100%; padding: 0 0 var(--s-4); background: none; border: 0; }
  .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; margin-left: 0; }
  .site-nav__list a { padding: var(--s-3); font-size: var(--fs-base); }
  .site-nav__cta { height: 44px; }
}

@media (max-width: 900px) {
  .grid--3, .grid--2, .grid--split { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline__stage:nth-child(2)::after { display: none; }
  .stats .stat:nth-child(3) { border-left: 0; }
  .stats .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .feature, .feature--rev { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .feature--rev .feature__text { order: 0; }
  .feature + .feature { margin-top: var(--s-8); }
  .roi { grid-template-columns: minmax(0, 1fr); }
  .cta-band__inner { flex-direction: column; align-items: flex-start; padding: var(--s-6); }
  .hero, .page-hero { padding-top: var(--s-8); }
}

@media (max-width: 600px) {
  .section { padding-block: var(--s-7); }
  .hero__copy { text-align: left; }
  .hero__copy .actions { justify-content: flex-start; }
  .byo { justify-content: flex-start; flex-direction: column; }
  .figure--hero { margin-top: var(--s-6); }
  .stats .stat { padding: var(--s-5) var(--s-4); }
  .card, .thinking, .roi { padding: var(--s-5); }
  .roi__form { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipeline__stage:not(:last-child)::after { display: block; top: auto; bottom: calc(-1 * var(--s-4) / 2 - 5px); right: auto; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .roi__output { padding: var(--s-5); }
  .thinking__levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card--wide { padding: var(--s-6) var(--s-5); text-align: left; }
  .card--wide p { margin: 0; }
  .btn--lg { width: 100%; }
  .site-footer__wrap, .site-footer__meta { flex-direction: column; }
  .lightbox { padding: var(--s-2); }
  .lightbox__close { top: var(--s-4); right: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Project memory ---------- */
.tree {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text);
}
.tree code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; white-space: pre; }
.tree span { color: var(--muted); }
.table--notes td:first-child { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; padding-right: var(--s-4); }
.table--notes td:nth-child(2) { white-space: nowrap; padding-right: var(--s-4); }
.table--notes td:last-child { color: var(--text-2); }
.table__jev td:first-child { color: var(--violet); }
.jev-callout {
  align-self: center;
  padding: var(--s-5) var(--s-6);
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(167, 139, 250, 0.08);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.jev-callout p + p { margin-top: var(--s-2); }
.jev-callout__head { font-weight: 600; color: #D9CCFF; }
.jev-callout__head span { color: var(--violet); margin-right: var(--s-1); }
.jev-callout__meta { color: var(--muted); }
.jev-callout code { background: none; border: 0; padding: 0; color: inherit; }
.card--wide.card--link { align-items: center; }
.jev-card__title { margin: var(--s-2) 0 var(--s-3); }

@media (max-width: 600px) {
  .table--notes thead { display: none; }
  .table--notes tr { display: grid; grid-template-columns: 7rem 1fr; gap: 0 var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
  .table--notes td { border: 0; padding: 0; }
  .table--notes td:last-child { grid-column: 1 / -1; margin-top: var(--s-1); }
  .jev-callout { padding: var(--s-4); }
  .card--wide.card--link { align-items: flex-start; }
}
