:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --panel: #fffefd;
  --ink: #161717;
  --muted: #656b68;
  --line: #d9ddd6;
  --accent: #127466;
  --accent-dark: #0c4f46;
  --gold: #b7832f;
  --code: #111615;
  --code-soft: #1d2523;
  --shadow: 0 20px 60px rgba(22, 23, 23, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 253, 0.9), rgba(248, 247, 243, 1) 420px),
    var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 16px 0;
  background: rgba(248, 247, 243, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav,
.hero-actions,
.proof-strip,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.site-header nav {
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.header-action {
  border: 1px solid var(--line);
  padding: 0 16px;
  background: var(--panel);
}

.header-action:hover,
.button.secondary:hover {
  border-color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  gap: 46px;
  align-items: center;
  width: min(1180px, calc(100vw - 32px));
  min-height: 0;
  margin: 0 auto;
  padding: 34px 0 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 10px;
  font-size: clamp(4rem, 9vw, 7.2rem);
  line-height: 0.82;
  letter-spacing: 0;
}

h2 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-title {
  max-width: 14ch;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 0.96;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.button {
  padding: 0 18px;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
}

.proof-strip {
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.proof-strip div {
  min-width: 132px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.72);
}

.proof-strip dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.proof-strip dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.terminal,
.trace-card,
.code-block,
.demo-notes article,
.feature-grid article,
.architecture-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal {
  overflow: hidden;
  background: var(--code);
  color: #f6fbf8;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 14px 16px;
  background: var(--code-soft);
  color: #b8c3bf;
  font-size: 0.8rem;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d06d4f;
}

.terminal-bar span:nth-child(2) {
  background: #ddb35a;
}

.terminal-bar span:nth-child(3) {
  background: #5dbb80;
}

.terminal-bar strong {
  margin-left: auto;
  font-weight: 700;
}

.terminal pre,
.code-block pre {
  margin: 0;
  overflow: auto;
  padding: 20px;
  font-size: 0.86rem;
  line-height: 1.66;
}

.trace-card {
  padding: 18px;
}

.trace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.trace-header strong {
  color: var(--accent-dark);
}

.trace-card ol {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trace-card li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trace-card span,
.trace-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.section {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.recruiter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: stretch;
  width: min(1180px, calc(100vw - 32px));
  margin: 48px auto 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.recruiter-panel h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.recruiter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recruiter-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf7;
}

.recruiter-grid strong,
.recruiter-grid span {
  display: block;
}

.recruiter-grid span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

.demo-grid,
.feature-grid,
.architecture-grid {
  display: grid;
  gap: 16px;
}

.demo-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.code-block {
  background: var(--code);
  color: #f6fbf8;
}

.demo-notes {
  display: grid;
  gap: 16px;
}

.demo-notes article,
.feature-grid article,
.architecture-grid article {
  padding: 22px;
}

.demo-notes p,
.feature-grid p,
.architecture-grid p {
  color: var(--muted);
  line-height: 1.62;
}

.feature-grid p code,
.demo-notes p code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(12, 79, 70, 0.08);
  font-size: 0.84em;
  color: var(--accent-dark);
}

.feature-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid,
.architecture-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
}

.site-footer {
  justify-content: center;
  gap: 22px;
  padding: 36px 16px 54px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer span {
  color: var(--ink);
  font-weight: 800;
}

/* ── replay widget ─────────────────────────────────────────────── */

.replay-widget {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: var(--code);
  color: #f6fbf8;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.replay-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--code-soft);
  color: #b8c3bf;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tl {
  display: flex;
  gap: 6px;
}

.tl b {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d06d4f;
}

.tl b:nth-child(2) { background: #ddb35a; }
.tl b:nth-child(3) { background: #5dbb80; }

.replay-module {
  flex: 1;
  margin-left: 2px;
  font-weight: 700;
  color: #c5d8d3;
}

.replay-nav {
  display: flex;
  gap: 4px;
}

.replay-nav button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #b8c3bf;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.replay-nav button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f6fbf8;
}

.replay-source {
  list-style: none;
  margin: 0;
  padding: 14px 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.62;
  flex-shrink: 0;
}

.replay-source li {
  display: grid;
  grid-template-columns: 32px 1fr;
  padding: 1px 16px;
  transition: background 0.3s;
}

.replay-source li.active {
  background: rgba(18, 116, 102, 0.3);
}

.replay-source .ln {
  color: rgba(255, 255, 255, 0.18);
  text-align: right;
  padding-right: 10px;
  user-select: none;
}

.replay-source li.active .ln {
  color: var(--accent);
}

.replay-source .lc {
  color: #8eb0aa;
  white-space: pre;
}

.replay-source li.active .lc {
  color: #ddf0ea;
}

.replay-event-box {
  margin: 6px 14px 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  flex-shrink: 0;
  min-height: 76px;
}

.re-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  padding: 2px 0;
  align-items: baseline;
}

.re-row > span {
  color: #4e6e68;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.re-row > strong {
  color: #b4ceca;
  font-weight: 500;
}

.dec-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.dec-mock  { background: rgba(183, 131, 47, 0.2);  color: #ddb35a; }
.dec-grant { background: rgba(18, 116, 102, 0.28); color: #5cc9ae; }
.dec-deny  { background: rgba(208, 109, 79, 0.2);  color: #e07060; }

.replay-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 14px;
  flex-shrink: 0;
}

.replay-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: all 0.25s;
}

.rdot.active {
  background: var(--accent);
  transform: scale(1.4);
}

.rdot.has-cap:not(.active) {
  background: rgba(183, 131, 47, 0.45);
}

.rdot.active.has-cap {
  background: #ddb35a;
  transform: scale(1.4);
}

.replay-open {
  color: #4e6e68;
  font-size: 0.76rem;
  font-weight: 600;
  transition: color 0.15s;
}

.replay-open:hover {
  color: var(--accent);
}

/* ── why section ───────────────────────────────────────────────── */

.why-section {
  border-top: 1px solid var(--line);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.why-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.why-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.why-card > p {
  color: var(--muted);
  line-height: 1.62;
  margin-bottom: 14px;
  font-size: 0.97rem;
}

.why-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.why-card li {
  margin-bottom: 5px;
}

.why-card code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(12, 79, 70, 0.08);
  font-size: 0.84em;
  color: var(--accent-dark);
}

.why-num {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ── pipeline / architecture ───────────────────────────────────── */

.pipeline {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  gap: 0;
  margin-bottom: 20px;
  padding-bottom: 2px;
}

.pl-node {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 130px;
  min-width: 130px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.pl-node--key {
  border-color: var(--accent);
  background: rgba(18, 116, 102, 0.06);
}

.pl-step {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
}

.pl-node strong {
  font-size: 0.88rem;
  line-height: 1.3;
}

.pl-node > span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.pl-arr {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pl-tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 96px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.pl-tools span {
  display: block;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.crate-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.crate-card {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.crate-card code {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.crate-card > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ── responsive ────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .header-action {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .hero,
  .demo-grid,
  .section-heading,
  .recruiter-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 30px;
  }

  h1,
  h2 {
    max-width: 14ch;
  }

  h1 {
    font-size: clamp(3.6rem, 15vw, 6.8rem);
  }

  .hero-title {
    max-width: 16ch;
    font-size: clamp(2rem, 8vw, 3.8rem);
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .section,
  .recruiter-panel {
    width: min(100vw - 22px, 1180px);
  }

  .hero {
    gap: 30px;
  }

  .feature-grid,
  .architecture-grid,
  .recruiter-grid,
  .why-grid,
  .crate-row {
    grid-template-columns: 1fr;
  }

  .recruiter-panel {
    padding: 20px;
  }

  .trace-card li {
    grid-template-columns: 1fr;
  }

  .terminal pre,
  .code-block pre {
    padding: 16px;
    font-size: 0.78rem;
  }

  .pipeline {
    flex-direction: column;
    overflow-x: visible;
  }

  .pl-arr {
    transform: rotate(90deg);
    padding: 2px 0;
    align-self: flex-start;
    margin-left: 20px;
  }
}
