/* ==========================================================================
   AssemblyWright — marketing site
   Theme: custom, derived from the product's own light "Status Cockpit" tokens
   (frontend/app.jsx) so the site and the app read as one brand. Gold is the
   accent and is reserved for primary CTAs + one highlighted word, per
   docs/ux-principles.md. All colour flows through these tokens.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --line: #e0e7ef;

  /* Text */
  --ink: #15212e;
  --muted: #5e6b7a;

  /* Brand — gold accent (fills) + a darker gold that passes contrast as TEXT */
  --accent: #c8a84a;
  --accent-ink: #15212e;
  --accent-text: #856618;
  --accent-soft: rgba(200, 168, 74, .13);
  --accent-2: #2f74c0;
  --glow: #c8a84a;

  /* Semantic — the product's own status palette */
  --positive: #1d8f5f;
  --warn: #b5810f;
  --red: #cf564c;
  --violet: #6a55c4;

  /* Shape + depth */
  --radius: 14px;
  --shadow: 0 10px 34px rgba(21, 33, 46, .08);

  /* Type */
  --font-display: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* ------------------------------- base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.center { text-align: center; }

section { padding-block: clamp(64px, 9vw, 116px); }

.h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; font-weight: 700; }
.sub { color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin-inline: auto; margin-top: 14px; }
.body { color: var(--muted); margin-top: 16px; font-size: 1.03rem; }
.kicker {
  font: 600 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 14px;
}

/* ------------------------------ buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font: 600 15px/1 var(--font-body);
  border: 1px solid transparent; cursor: pointer; transition: .22s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 8px 22px rgba(200, 168, 74, .34); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }

/* -------------------------------- nav ----------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 18px/1 var(--font-display); letter-spacing: -.02em;
}
.mark { width: 26px; height: 26px; flex: none; }
.mark rect { fill: var(--ink); }
.mark .m-stroke { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ------------------------------- hero ----------------------------------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 84px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -10% -20% auto; height: 70%; z-index: -1;
  background:
    radial-gradient(520px 340px at 50% 12%, color-mix(in srgb, var(--glow) 26%, transparent), transparent 70%),
    radial-gradient(420px 300px at 82% 4%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 72%);
  filter: blur(26px);
}
.hero-inner { text-align: center; }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--accent-soft);
  color: var(--accent-text); font: 500 13px/1 var(--font-body);
}
.display {
  font-size: clamp(2.5rem, 6.6vw, 4.4rem); line-height: 1.04; letter-spacing: -.035em;
  font-weight: 700; margin: 22px 0 0;
}
.display em { font-style: normal; color: var(--accent-text); }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 58ch; margin: 20px auto 0; }
.cta-row { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-inner .cta-row, .center-row { justify-content: center; }

/* hero graph */
.graph-frame {
  position: relative; margin-top: clamp(40px, 6vw, 64px);
  height: min(54vh, 430px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
#graph { width: 100%; height: 100%; display: block; }
#gnodes { position: absolute; inset: 0; pointer-events: none; }
.g-node {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font: 11px/1.35 var(--font-mono); color: var(--ink); padding: 6px 11px;
  border-radius: 9px; background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(3px);
  box-shadow: 0 2px 10px rgba(21, 33, 46, .06);
}
.g-node .st { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.g-node.hub {
  font-size: 12.5px; padding: 11px 17px; text-align: center;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 26%, transparent);
}
.g-node.hub b { font-family: var(--font-display); font-size: 13.5px; }
.g-node.done   { border-color: color-mix(in srgb, var(--positive) 46%, var(--line)); }
.g-node.done .st { color: var(--positive); }
.g-node.working { border-color: color-mix(in srgb, var(--accent-2) 52%, var(--line)); }
.g-node.working .st { color: var(--accent-2); }
.g-node.gate { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.g-node.gate .st { color: var(--warn); }
.graph-legend {
  position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px;
  font: 10.5px/1 var(--font-body); color: var(--muted); flex-wrap: wrap;
}
.graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.done { background: var(--positive); }
.dot.working { background: var(--accent-2); }
.dot.queued { background: var(--muted); }
.dot.gate { background: var(--warn); }

/* --------------------------- stat strip --------------------------------- */
.strip { padding-block: 0; }
.strip-inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  border-block: 1px solid var(--line); padding-block: 26px; text-align: center;
}
.stat b { display: block; font: 700 clamp(1.5rem, 3vw, 2rem)/1 var(--font-display); }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-top: 7px; }

/* ------------------------------- pain ----------------------------------- */
/* Deliberately 2×2, not auto-fit: four quotes across three columns leaves a
   lopsided orphan on the second row. */
.quotes {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-top: 40px; max-width: 900px; margin-inline: auto;
}
.quotes blockquote {
  margin: 0; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius); color: var(--muted); font-size: .98rem;
}
.pain-close {
  text-align: center; margin-top: 36px; font: 600 clamp(1.05rem, 2vw, 1.3rem)/1.5 var(--font-display);
}

/* ---------------------- inverted deep-dive section ---------------------- */
/* Tokens re-derived for a dark background — the light preset's muted/accent
   values do not pass contrast here. Gold reads 7:1 on this ink, so it is used
   as text directly in this scope. */
.section-invert {
  --bg: #15212e;
  --surface: #1c2a3a;
  --surface-2: #223244;
  --line: #2f4256;
  --ink: #eef3f8;
  --muted: #9fb0c2;
  --accent-text: #d7bb63;
  --shadow: none;
  background: var(--bg); color: var(--ink);
}
.section-invert .btn-ghost { background: var(--surface); color: var(--ink); }

.demo { margin-top: 42px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tab {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1 var(--font-body); transition: .2s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.panel { margin-top: 26px; }
.panel[hidden] { display: none; }
.panel-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.panel-grid > * { min-width: 0; }
.panel-copy h3 { font-size: 1.4rem; font-weight: 600; }
.panel-copy p { color: var(--muted); margin-top: 12px; }

/* mock UI (shared) */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  font: 600 12.5px/1 var(--font-body); color: var(--muted);
}
.mock-live { color: var(--accent-2); font-weight: 500; }
.mock-live.warn { color: var(--warn); }
.section-invert .mock-live { color: #7fb2ee; }
.section-invert .mock-live.warn { color: #e0b757; }
.mock-body { padding: 18px; }
.mock-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.mock-input {
  min-height: 74px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font: 13.5px/1.6 var(--font-mono);
  color: var(--ink); white-space: pre-wrap; word-break: break-word;
}
.caret { display: inline-block; width: 7px; height: 15px; background: var(--accent); vertical-align: -2px; animation: blink 1.05s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 500 11.5px/1 var(--font-body); color: var(--muted);
}
.chip-accent { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.section-invert .chip-warn { color: #e0b757; }
.mock-cta {
  display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--font-body);
}
.mock-cta.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.mock-body .mock-cta:first-of-type { margin-top: 0; }
.mock-body > .mock-cta { margin-top: 14px; }

/* pipeline mock */
.pipeline { display: grid; gap: 7px; }
.stage {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center;
  column-gap: 12px; padding: 10px 13px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.stage i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); grid-row: span 2; }
.stage b { font: 600 13.5px/1.3 var(--font-body); }
.stage span { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.stage em { grid-column: 3; grid-row: span 2; font-style: normal; font-size: 11.5px; color: var(--muted); }
.stage.done i { background: var(--positive); }
.stage.done em { color: var(--positive); }
.stage.working { border-color: color-mix(in srgb, var(--accent-2) 50%, var(--line)); }
.stage.working i { background: var(--accent-2); }
.stage.working em { color: var(--accent-2); }
.section-invert .stage.done i, .section-invert .stage.done em { color: #4fc08a; background-color: #4fc08a; }
.section-invert .stage.done em { background: none; color: #4fc08a; }
.section-invert .stage.working i, .section-invert .stage.working em { color: #7fb2ee; background-color: #7fb2ee; }
.section-invert .stage.working em { background: none; color: #7fb2ee; }

/* review-gate mock */
.gate-head { font: 600 15px/1.4 var(--font-display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gate-note { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.gate-doc {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.gate-doc b { display: block; font-size: 13.5px; }
.gate-doc small { color: var(--muted); font-size: 11.5px; }

/* ----------------------------- features --------------------------------- */
.feature.alt { background: var(--surface-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split > * { min-width: 0; }
.checks { margin-top: 22px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 26px; color: var(--muted); font-size: .97rem; }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }
.visual > * {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}

/* roster */
.roster { display: grid; gap: 9px; }
.role { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.role i {
  flex: none; width: 42px; height: 34px; border-radius: 8px; font-style: normal;
  display: grid; place-items: center; font: 600 11px/1 var(--font-mono);
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 34%, transparent);
}
.role b { display: block; font-size: 13.5px; }
.role small { color: var(--muted); font-size: 11.5px; }
.role.muted-role { opacity: .82; }

/* knowledge card */
.know { display: grid; gap: 8px; }
.know-row.head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px;
  font: 700 14px/1 var(--font-display);
}
.know-row.head.second { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.know-row.head small { color: var(--muted); font-weight: 400; font-size: 11.5px; font-family: var(--font-body); }
.know-item {
  padding: 10px 13px; border-radius: 9px; background: var(--surface-2);
  border-left: 3px solid var(--accent); font-size: 13px; color: var(--muted);
}
.know-item.bench { border-left-color: var(--accent-2); }
.know-item b { color: var(--ink); font-weight: 600; }

/* guard card */
.guard-head { margin-bottom: 12px; }
.guard-title { font: 600 15.5px/1.4 var(--font-display); }
.guard-list { margin-top: 12px; display: grid; gap: 8px; }
.guard-list li {
  padding: 9px 13px; border-radius: 9px; background: var(--surface-2);
  font-size: 13px; color: var(--muted); border-left: 3px solid var(--line);
}
.guard-list li.danger { border-left-color: var(--red); color: var(--ink); }
.guard-list li.ok { border-left-color: var(--positive); }
.guard-confirm {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted);
}
.guard-confirm i { flex: 1; height: 34px; border-radius: 8px; border: 1px dashed var(--line); background: var(--surface-2); }

/* ------------------------------- bento ---------------------------------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: .25s ease;
}
.cell:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.cell.wide { grid-column: span 2; }
/* Closes the grid on a full-width row instead of a 1-of-3 trailing hole. */
.cell.full { grid-column: 1 / -1; }
.cell .ico {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 16px; margin-bottom: 14px;
}
.cell h3 { font-size: 1.08rem; font-weight: 600; }
.cell p { color: var(--muted); font-size: .93rem; margin-top: 8px; }

/* ---------------------------- economics --------------------------------- */
.econ { background: var(--surface-2); border-block: 1px solid var(--line); }
.econ-inner { text-align: center; }
.econ-num {
  font: 700 clamp(2.6rem, 8vw, 4.4rem)/1 var(--font-display);
  letter-spacing: -.04em; color: var(--accent-text);
}
.econ-cap { color: var(--muted); max-width: 52ch; margin: 18px auto 0; font-size: 1rem; }

/* ----------------------------- CTA band --------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(560px 300px at 50% 40%, color-mix(in srgb, var(--glow) 24%, transparent), transparent 70%);
  filter: blur(20px);
}
.fine { color: var(--muted); font-size: 13.5px; margin-top: 20px; }

/* ------------------------------ footer ---------------------------------- */
.footer { background: var(--surface-2); border-top: 1px solid var(--line); padding-block: 44px 26px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--muted); align-items: flex-start; }
.footer-links a:hover { color: var(--accent-text); }
.footer-fine { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* ------------------------------ reveal ---------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ----------------------------- responsive -------------------------------- */
@media (max-width: 900px) {
  .split, .panel-grid { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .visual { order: 2; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell.wide, .cell.full { grid-column: span 2; }
  .quotes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Wordmark + CTA alone still overflowed 375px at desktop sizing — shrink both
     and let the wordmark truncate rather than push the CTA off-screen. */
  .nav-links { display: none; }
  .nav-signin { display: none; }
  .nav-inner { gap: 12px; }
  .wordmark { font-size: 16px; gap: 8px; min-width: 0; }
  .nav .wordmark { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mark { width: 23px; height: 23px; }
  .nav-actions { margin-left: auto; flex: none; }
  .nav-actions .btn { padding: 9px 14px; font-size: 14px; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .bento { grid-template-columns: 1fr; }
  .cell.wide, .cell.full { grid-column: auto; }
  .graph-frame { height: 400px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  body { font-size: 16px; }
}

/* -------------------------- reduced motion ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  * { transition-duration: .01ms !important; }
}
