:root {
  --ink: #120635;
  --muted: #5c5868;
  --line: #dbd9e4;
  --paper: #fff;
  --wash: #efedf5;
  --lilac: #c7b9ec;
  --mint: #85ecce;
  --orange: #ffac4d;
  --blue: #3d92e8;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wash);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 8% 5%, #c7b9ec66, transparent 27rem),
    radial-gradient(circle at 92% 16%, #85ecce42, transparent 25rem),
    var(--wash);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  background: var(--ink);
  font: 650 0.75rem/1 var(--mono);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid #ffffff99;
  background: #ffffffd6;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: auto;
  height: 28px;
}

.brand em {
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 600 0.68rem/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow: auto;
  padding: 0.15rem;
}

.site-header nav a {
  flex: none;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  font: 650 0.68rem/1 var(--mono);
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a[aria-current="page"] {
  color: #fff;
  background: var(--ink);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 0 6rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(21rem, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  min-height: 65vh;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font: 650 0.7rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy,
.intro-copy {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.pill {
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 650 0.69rem/1 var(--mono);
  text-transform: uppercase;
}

.pill.mint { background: #85ecce70; }
.pill.lilac { background: #c7b9ec70; }
.pill.warm { background: #ffac4d55; }

.loop-card,
.card,
.metric,
.diagram,
.product-frame,
.data-table-wrap,
.callout,
.terminal,
.example-stage {
  border: 1px solid #fff;
  border-radius: 1.5rem;
  background: #ffffffdc;
  box-shadow: 0 18px 60px #1206350a;
}

.loop-card {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.loop-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.2rem 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.loop-step span {
  grid-row: 1 / 3;
  color: var(--muted);
  font: 500 0.7rem var(--mono);
}

.loop-step small {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 4rem 0 7rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: var(--line);
}

.metric {
  display: grid;
  gap: 0.35rem;
  padding: 1.6rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.metric strong { font-size: 1.65rem; }
.metric span { color: var(--muted); font-size: 0.78rem; }

.section {
  margin-top: 7rem;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading .eyebrow { margin: 0; }

.section h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card { padding: 1.6rem; }
.card h3 { margin: 0.7rem 0; font-size: 1.15rem; }
.card p:last-child { color: var(--muted); line-height: 1.6; }
.card-index { color: var(--muted); font: 650 0.65rem var(--mono); }

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.link-grid a {
  display: grid;
  gap: 0.5rem;
  padding: 1.3rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.link-grid a:hover { background: #ffffff80; }
.link-grid span { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.page-intro {
  padding: 3rem 0 5rem;
  border-bottom: 1px solid #ffffffaa;
}

.page-intro h1 { max-width: 17ch; }
.page-intro .intro-copy { margin-top: 1.5rem; }

.diagram {
  overflow: auto;
  padding: 1.2rem;
}

.flow-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  min-width: 880px;
}

.flow-node {
  display: grid;
  flex: 1;
  align-content: space-between;
  gap: 1rem;
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.flow-node b { font-size: 0.94rem; }
.flow-node small { color: var(--muted); line-height: 1.4; }
.flow-arrow { align-self: center; color: var(--muted); font: 650 1rem var(--mono); }
.flow-band { margin-top: 1rem; padding: 1rem; border-radius: 1rem; color: var(--muted); background: #c7b9ec28; font-size: 0.8rem; }

.boundary-list {
  display: grid;
  gap: 0.75rem;
  counter-reset: bound;
}

.boundary-list article {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  counter-increment: bound;
}

.boundary-list article::before {
  content: counter(bound, decimal-leading-zero);
  color: var(--muted);
  font: 0.7rem var(--mono);
}

.boundary-list h3 { margin: 0 0 0.35rem; }
.boundary-list p { margin: 0; color: var(--muted); line-height: 1.6; }

.data-table-wrap { overflow: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th,
.data-table td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font: 0.65rem var(--mono); text-transform: uppercase; }
.data-table td:first-child { font: 650 0.78rem var(--mono); }
.data-table td { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.data-table tr:last-child td { border: 0; }
.readiness-table td:first-child { min-width: 9rem; }
.readiness-table td:nth-child(2),
.readiness-table td:nth-child(3) { width: 40%; }
.readiness-metrics { margin-bottom: 2rem; }

.callout { padding: 1.5rem; background: #85ecce35; }
.callout b { display: block; margin-bottom: 0.5rem; }
.callout p { margin: 0; color: var(--muted); line-height: 1.6; }

.product-frame { overflow: hidden; }
.window-bar { display: flex; gap: 0.4rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: #f7f7f9; }
.window-bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--line); }
.product-shell { display: grid; grid-template-columns: 11rem 1fr; min-height: 520px; background: #fff; }
.product-sidebar { padding: 1.2rem 0.8rem; border-right: 1px solid var(--line); background: #fafafc; }
.product-sidebar b { display: block; margin: 0 0.5rem 1.5rem; }
.product-sidebar span { display: block; padding: 0.65rem 0.7rem; border-radius: 0.45rem; color: var(--muted); font-size: 0.78rem; }
.product-sidebar .selected { color: var(--ink); background: #c7b9ec26; font-weight: 650; }
.product-content { min-width: 0; padding: 2rem; }
.product-title h2 { margin: 0; font-size: 1.6rem; }
.product-title p { margin: 0.35rem 0 1.8rem; color: var(--muted); }
.product-control { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.fake-field label { display: block; margin-bottom: 0.45rem; font-size: 0.7rem; font-weight: 700; }
.fake-select { padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.35rem; font-size: 0.8rem; }
.help-text { margin-top: 0.4rem; color: var(--muted); font-size: 0.68rem; }
.product-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.product-tabs span { padding: 1rem 0.2rem 0.75rem; color: var(--muted); font: 0.66rem var(--mono); }
.product-tabs .active { color: var(--ink); border-bottom: 2px solid var(--lilac); }
.insight-row { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.insight-head { display: flex; justify-content: space-between; gap: 1rem; }
.insight-row h3 { margin: 0; font-size: 1rem; }
.insight-row p { color: var(--muted); font-size: 0.78rem; }
.mini-pill { flex: none; padding: 0.35rem 0.45rem; border: 1px solid var(--line); border-radius: 0.3rem; background: #f0f0f4; font: 0.58rem var(--mono); }
.evidence { font: 0.63rem var(--mono); text-decoration: underline; }

.terminal,
.code-panel { overflow: hidden; color: #fff; background: #120635; }
.terminal-bar { padding: 0.8rem 1rem; border-bottom: 1px solid #34285b; color: #cbc5dc; font: 0.65rem var(--mono); }
.code-panel { border: 1px solid var(--line); border-radius: 1rem; }
.code-block { overflow: auto; margin: 0; padding: 1.5rem; font: 500 0.79rem/1.75 var(--mono); white-space: pre; }

.example-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.example-stage { padding: 1.2rem; }
.example-stage span { color: var(--muted); font: 0.65rem var(--mono); }
.example-stage h3 { margin: 0.8rem 0 0.5rem; font-size: 1rem; }
.example-stage p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

.bar-chart { display: grid; gap: 0.9rem; }
.bar-row { display: grid; grid-template-columns: 10rem 1fr 5rem; align-items: center; gap: 1rem; }
.bar-row label { font: 0.7rem var(--mono); }
.bar-track { overflow: hidden; height: 1.1rem; border-radius: 999px; background: #ffffff90; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lilac), var(--mint)); }
.bar-row strong { font-size: 0.8rem; }
.proof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "PASS"; padding: 0.3rem 0.4rem; border-radius: 0.3rem; background: #85ecce70; font: 650 0.58rem var(--mono); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
  border-top: 1px solid #ffffffaa;
  color: var(--muted);
  font: 0.65rem var(--mono);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
  .site-header nav { width: 100%; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .metric-grid,
  .card-grid.three,
  .link-grid,
  .example-flow { grid-template-columns: repeat(2, 1fr); }
  .section-heading { grid-template-columns: 1fr; }
  .product-shell { grid-template-columns: 1fr; }
  .product-sidebar { display: none; }
  .proof-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  main { width: min(100% - 1.2rem, 1180px); padding-top: 2.5rem; }
  h1 { font-size: 2.75rem; }
  .metric-grid,
  .card-grid,
  .card-grid.three,
  .link-grid,
  .example-flow { grid-template-columns: 1fr; }
  .product-content { padding: 1.1rem; }
  .product-control { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 7rem 1fr 3.5rem; }
  .site-header { padding: 0.8rem; }
  .site-header nav a { font-size: 0.58rem; }
  .brand em { display: none; }
  footer { flex-direction: column; }
  .section { margin-top: 5rem; }
}

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