/* Project Nexus — website styles.
   One stylesheet, no framework, no build step beyond the page generator.
   Navy #1e3a5f is the application's own brand colour; the site inherits it so
   the two do not look like different products. */

:root {
  --navy-900: #0f2338;
  --navy-800: #16304b;
  --navy: #1e3a5f;
  --navy-600: #2c5183;
  --navy-300: #7fa0c6;
  --accent-text: #2c5183;   /* accent-coloured TEXT — must pass on --bg */

  --ink: #15202b;
  --ink-2: #43536422;
  --muted: #5b6b7c;
  --line: #dde3ea;
  --line-soft: #eaeff4;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --bg-3: #eef2f7;

  --green: #0f7b53;
  --green-bg: #e4f4ec;
  --amber: #8a5906;
  --amber-bg: #fdf1dc;
  --red: #b3261e;
  --red-bg: #fbe6e4;

  --radius: 10px;
  --maxw: 1140px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7edf3;
    --muted: #9aabbc;
    --line: #26364a;
    --line-soft: #1d2b3c;
    --bg: #0d1620;
    --bg-2: #121e2b;
    --bg-3: #172533;
    --navy-300: #9dbde0;
    --accent-text: #9dbde0;
    --green-bg: #10352a;
    --amber-bg: #3a2c11;
    --red-bg: #3a1c1a;
    --green: #5fd3a3;
    --amber: #e5b85c;
    --red: #f08a80;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

img { max-width: 100%; }

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
/* The application's own app icon. It already carries its own rounded square,
   navy gradient and transparent corners, so no background or border-radius
   here -- either would double up or clip the mark's own edge. */
.brand-mark { width: 26px; height: 26px; flex: none; display: block; }
/* Who the product is for, directly under the hero lede. Deliberately quieter
   and narrower than the lede above it: it qualifies the reader rather than
   selling, so it should read as a statement of fact, not a second headline. */
.positioning {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid var(--navy-300);
  padding-left: 14px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
/* The nav's link colour is more specific than .btn-primary's, so without this
   the header call to action renders muted grey on navy -- about 2:1, which is
   unreadable. Buttons in the nav keep their own colours. */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav a.btn-ghost, .nav a.btn-ghost:hover { color: var(--ink); }
.cta-short { display: none; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, transform .05s;
  min-height: 44px; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-800); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 8px 14px; font-size: 14px; min-height: 38px; }

/* ─── Type ────────────────────────────────────────────────────────────────── */

h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; }
h2 { font-size: clamp(25px, 3.2vw, 36px); font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .09em; font-size: 12px;
  font-weight: 700; color: var(--accent-text);
}
.lede { font-size: clamp(17px, 1.5vw, 19.5px); color: var(--muted); }
.muted { color: var(--muted); }

section { padding: 76px 0; }
section + section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 + p { margin-top: 14px; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero { padding: 68px 0 20px; background:
  radial-gradient(1100px 420px at 12% -10%, color-mix(in srgb, var(--navy) 9%, transparent), transparent 70%); }
.hero h1 { margin: 14px 0 18px; max-width: 24ch; text-wrap: balance; }
.hero .lede { max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ─── Screen mockups ──────────────────────────────────────────────────────── */

.screen {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg); box-shadow: 0 18px 44px -26px rgba(15, 35, 56, .45);
}
.screen-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--bg-3); border-bottom: 1px solid var(--line);
}
.screen-dots { display: flex; gap: 5px; }
.screen-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.screen-title { font-size: 12px; color: var(--muted); font-weight: 600; }
.screen-body { padding: 16px; background: var(--bg-2); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; }
.tile .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.tile .v { font-size: 20px; font-weight: 750; margin-top: 3px; letter-spacing: -0.02em; }
.tile .s { font-size: 11px; color: var(--muted); }

table.mock { width: 100%; border-collapse: collapse; background: var(--bg); font-size: 12.5px; }
table.mock th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.mock td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
table.mock tr:last-child td { border-bottom: 0; }
table.mock .num { text-align: right; font-variant-numeric: tabular-nums; }
.mock-wrap { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.scroll-x { overflow-x: auto; }

.pill {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red   { background: var(--red-bg);   color: var(--red); }
.pill.plain { background: var(--bg-3); color: var(--muted); }

.bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--navy-600); }

/* ─── Grids ───────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--bg);
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

.stat { display: flex; gap: 16px; align-items: flex-start; }
.stat .n { font-size: 40px; font-weight: 800; line-height: 1; color: var(--accent-text); letter-spacing: -0.03em; }

.stage {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; background: var(--bg); position: relative;
}
.stage .n {
  width: 26px; height: 26px; border-radius: 7px; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; margin-bottom: 10px;
}
.stage h3 { font-size: 15.5px; }
.stage p { font-size: 13.5px; margin: 6px 0 0; color: var(--muted); }

/* ─── Pillars ─────────────────────────────────────────────────────────────── */

.pillar { border-top: 2px solid var(--navy); padding-top: 16px; }
.pillar .count { font-size: 12px; font-weight: 700; color: var(--accent-text); letter-spacing: .04em; }
.pillar h3 { margin: 4px 0 8px; }
.pillar p { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.pillar ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.pillar li { margin-bottom: 3px; }

/* ─── Features page ───────────────────────────────────────────────────────── */

.feat-layout { display: grid; grid-template-columns: 232px 1fr; gap: 40px; align-items: start; }
.feat-nav { position: sticky; top: 82px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
.feat-nav h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-text); margin: 18px 0 7px; font-weight: 700;
}
.feat-nav h4:first-child { margin-top: 0; }
.feat-nav a {
  display: block; text-decoration: none; color: var(--muted);
  font-size: 13.5px; padding: 4px 0; line-height: 1.35;
}
.feat-nav a:hover { color: var(--ink); }

.topic { padding: 26px 0; border-bottom: 1px solid var(--line-soft); }
.topic:first-of-type { padding-top: 0; }
.topic > h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic .cat { font-size: 11.5px; color: var(--accent-text); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.topic dl { margin: 14px 0 0; display: grid; gap: 12px; }
.topic dt { font-weight: 650; font-size: 14.5px; }
.topic dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.new-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--green-bg); color: var(--green); padding: 2px 6px; border-radius: 4px;
}

.cat-band {
  margin: 44px 0 6px; padding-top: 26px; border-top: 2px solid var(--navy);
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.cat-band:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.cat-band + .topic { padding-top: 20px; }
/* The per-category screenshot sits between the band heading and its first
   topic; .cat-band + .topic above assumes they are adjacent, so the shot
   carries the same top padding when it comes between them. */
.cat-shot { padding-top: 20px; }
.cat-shot + .topic { padding-top: 22px; }
.cat-band h2 { font-size: 24px; }
.cat-band .meta { font-size: 13px; color: var(--muted); }

.searchbar { margin-bottom: 28px; }
.searchbar input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink);
  min-height: 46px;
}
.searchbar input:focus { outline: 2px solid var(--navy-600); outline-offset: 1px; border-color: transparent; }
.search-count { margin-top: 8px; font-size: 13px; color: var(--muted); }
[hidden] { display: none !important; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-foot { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-2); }
.site-foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-foot p { margin: 0; font-size: 13.5px; color: var(--muted); }
.site-foot .spacer { margin-left: auto; }
.site-foot a { color: var(--muted); text-decoration: none; font-size: 13.5px; }
.site-foot a:hover { color: var(--ink); }

.disclaimer {
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 12px; max-width: 70ch;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .feat-layout { grid-template-columns: 1fr; gap: 24px; }
  .feat-nav { position: static; max-height: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 20px; }
  .feat-nav h4 { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  section { padding: 52px 0; }
  .brand { font-size: 15px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 14px; }
  .nav a.hide-sm { display: none; }
  .feat-nav { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
}

/* ─── Screenshots ─────────────────────────────────────────────────────────── */
/* The captures are light-mode. Framing them on a fixed light surface in both
   themes keeps them reading as a window into the product rather than a bright
   hole punched in a dark page. */
.shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shot-frame {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  box-shadow: 0 18px 44px -28px rgba(15, 35, 56, .5);
}
.shot-frame img { display: block; width: 100%; height: auto; border-radius: 7px; background: #fff; }
.shot figcaption { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.shot-wide .shot-frame { padding: 10px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-frame { background: #1b2937; }
}
:root[data-theme="dark"] .shot-frame { background: #1b2937; }
