/* ProjectMetrix — projectmetrix.dev
   Plain CSS, no build step. Palette mirrors the product UI so screenshots
   sit inside the page rather than on top of it. */

:root {
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --wrap: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.015em; margin-bottom: .6em; }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
/* The nav is sticky, so anchored sections must leave room or their heading
   lands underneath it. */
section[id] { scroll-margin-top: 84px; }
.section { padding: 84px 24px; }
.band { background: var(--bg-alt); border-block: 1px solid var(--line); padding: 76px 0; }
.band + .band { border-top: none; }

/* ── nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav nav a { color: var(--body); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav nav a:hover { color: var(--accent); }
.nav nav a.keep { font-weight: 600; }
.nav .cta {
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px;
}
.nav .cta:hover { background: var(--accent); color: #fff; }

/* ── hero ────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 0; text-align: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .76rem;
  font-weight: 700; color: var(--accent); margin-bottom: 14px;
}
.hero h1 { max-width: 17ch; margin-inline: auto; }
.lede {
  font-size: 1.16rem; color: var(--muted); max-width: 62ch;
  margin: 18px auto 30px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 46px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: .97rem;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }

/* ── screenshots ─────────────────────────────────────────────────── */
.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 50px -24px rgba(15, 23, 42, .35);
}
.hero-shot { margin-top: 8px; }
.shot.narrow { max-width: 460px; margin-inline: auto; }
.shot.centered { max-width: 860px; margin: 34px auto 0; }

/* ── generic layouts ─────────────────────────────────────────────── */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.cols-3 h3 { margin-bottom: .35em; }
.cols-3 p { color: var(--muted); font-size: .97rem; margin: 0; }
.principles { margin-top: 26px; }

.feature {
  display: grid; grid-template-columns: 1fr 1.25fr;
  gap: 48px; align-items: center;
  margin: 56px 0;
}
.feature.reverse .feature-text { order: 2; }
.feature h3 { font-size: 1.45rem; }
.feature p { color: var(--muted); }
.feature .pull {
  border-left: 3px solid var(--accent);
  padding-left: 14px; color: var(--ink); font-weight: 500;
}
.section-lede { color: var(--muted); max-width: 68ch; font-size: 1.05rem; }

/* ── engineering cards ───────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.cards article {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--bg-alt);
}
.cards h3 { font-size: 1.05rem; }
.cards p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ── roadmap ─────────────────────────────────────────────────────── */
/* align-items:start so a short column doesn't stretch to match a long one */
.roadmap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 30px; align-items: start; }
.rm-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.rm-group h4 { margin: 0 0 12px; }
.rm-group ul { margin: 0; padding-left: 18px; }
.rm-group li { margin-bottom: 9px; color: var(--muted); font-size: .96rem; }
.rm-group li strong { color: var(--ink); }
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
}
.pill.done { background: #dcfce7; color: #14532d; }
.pill.wip  { background: #fef3c7; color: #78350f; }
.pill.next { background: #dbeafe; color: #1e3a8a; }
.pill.later{ background: #f1f5f9; color: #334155; }

/* ── contact ─────────────────────────────────────────────────────── */
.contact { max-width: 760px; }
.contact p { font-size: 1.05rem; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 30px; }
.byline { color: var(--muted); font-size: .95rem; border-top: 1px solid var(--line); padding-top: 22px; }

footer { border-top: 1px solid var(--line); padding: 26px 0; }
.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cols-3, .cards, .roadmap { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 26px; margin: 44px 0; }
  .feature.reverse .feature-text { order: 0; }
  .nav { padding: 12px 16px; gap: 10px; }
  .nav nav { gap: 12px; }
  .nav nav a { white-space: nowrap; }
  .nav nav a:not(.cta):not(.keep) { display: none; }
  .nav nav a.keep { font-size: .86rem; }
  .nav .cta { padding: 7px 13px; font-size: .86rem; }
  .brand { font-size: 1rem; }
  .section, .band { padding: 56px 0; }
  .section { padding-inline: 24px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Open-source callout in the engineering section */
.opensource { border-left: 3px solid var(--accent); padding-left: 16px; margin-top: 18px; }

/* ── additions: loop, agents, page headings ──────────────────────────
   Same components as above, one variant each — no new visual language. */

/* Four-across variant of .cards, for the control loop and the corpus story. */
.cards.four { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cards.four p { font-size: .92rem; }

/* Small accent label above a card heading ("Step 2 · Monitor", "Project 10"). */
.step {
  display: block; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .09em;
  font-size: .7rem; font-weight: 700; color: var(--accent);
}

/* Agent cards lead with Monitors / Detects / Recommends, inline. */
.cards.agents p strong { color: var(--ink); }

/* The "built on a real engine" line directly under the hero lede. */
.foundation {
  color: var(--ink); font-weight: 600; font-size: 1.02rem;
  max-width: 54ch; margin-top: -14px;
}

/* Honest caveat under a forward-looking section. */
.section-lede.note { font-size: .95rem; margin-top: 26px; }

/* Sub-page h1 — the hero h1 scale is too large outside the hero. */
.page-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: .4em; }

@media (max-width: 900px) {
  .cards.four { grid-template-columns: 1fr; }
}

/* ── environment badge ─────────────────────────────────────────────────
   Beside the logo, saying which environment this is. Quiet on purpose: it
   has to be legible in a screenshot without competing with the product name
   next to it. Colour carries the meaning — amber where data is disposable,
   blue where it is not. Matches the badge the app renders, so the two read
   as one system rather than two. */
.envbadge {
  display: inline-block; margin-left: 10px; padding: 2px 9px;
  border-radius: 999px; font-size: .66rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent; vertical-align: middle;
}
.envbadge.dev  { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.envbadge.beta { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
