@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

/* Cool paper, ink, the steel blue of the app icon, one warm accent. */
:root {
  --paper: #F5F7F6;
  --ink: #0E2233;
  --muted: #566675;
  --rule: #D5DDE0;
  --blue: #2C6FA8;
  --pen: #C96F00;
  --surface: #FFFFFF;
  --tint: #EEF2F2;
  --ok: #1F7A5C;
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0C1A26;
    --ink: #E9EFF3;
    --muted: #93A4B3;
    --rule: #22384A;
    --blue: #6FB0E6;
    --pen: #F2B14A;
    --surface: #112433;
    --tint: #182E40;
    --ok: #5CC9A0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 3px; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 20; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* Top bar */
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark img { border-radius: 7px; display: block; }
.top-link { color: var(--muted); font-size: 0.9375rem; text-decoration-color: var(--rule); }
.top-link:hover { color: var(--ink); text-decoration-color: var(--pen); }

/* Hero */
.hero { padding-top: clamp(40px, 9vh, 112px); }
.hero h1 {
  margin: 0;
  font-weight: 450;
  font-stretch: 86%;
  font-size: clamp(2.375rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero h1 .line > span { display: inline-block; }
.lede {
  margin: clamp(20px, 3vw, 32px) 0 0;
  max-width: 26em;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  line-height: 1.45;
}

/* The centrepiece: loose threads in, one point, ordered lines out. */
.weave { height: clamp(260px, 46vh, 520px); margin-top: clamp(16px, 3vw, 40px); }
.weave canvas { display: block; width: 100%; height: 100%; }

/* Three lines, no explanations. */
.creed ul {
  list-style: none;
  margin-top: clamp(24px, 5vw, 64px);
  margin-bottom: 0;
  display: grid;
}
.creed li {
  padding: 20px 0 22px;
  border-top: 1px solid var(--rule);
  font-weight: 450;
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
@media (min-width: 820px) {
  .creed ul { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
}

/* Product preview: a made-up screen, built in HTML so it stays sharp. */
.preview { padding-top: clamp(72px, 12vw, 152px); }
.preview h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-weight: 450;
  font-stretch: 86%;
  font-size: clamp(1.875rem, 4.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.preview-note { margin: 14px 0 0; color: var(--muted); font-size: 0.8125rem; }
.console {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(14 34 51 / .04), 0 24px 60px -24px rgb(14 34 51 / .28);
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.console p, .console ul { margin: 0; padding: 0; list-style: none; }
.console b { font-weight: 600; }
.c-shell { display: grid; }
.c-side { display: none; }
.c-main { padding: clamp(16px, 2.6vw, 28px); display: grid; gap: clamp(14px, 2vw, 20px); min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.c-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.c-sub { color: var(--muted); margin-top: 3px !important; }
.c-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--muted); white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; position: relative; }

.c-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c-stat { background: var(--tint); border-radius: 10px; padding: 12px 14px 13px; display: grid; gap: 2px; }
.c-stat p, .c-stat span { color: var(--muted); }
.c-stat span { font-size: 0.75rem; }
.c-stat strong { font-size: 1.625rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.c-stat small { font-size: 0.875rem; font-weight: 450; color: var(--muted); letter-spacing: 0; }

.c-cols, .c-col { display: grid; gap: clamp(14px, 2vw, 20px); min-width: 0; align-content: start; }
.c-card { border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px 6px; min-width: 0; }
.c-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; padding-bottom: 8px; }
.c-label span { font-weight: 400; color: var(--muted); }
.c-label span b { color: var(--ink); }

.c-sched li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.c-sched time { color: var(--muted); }
.c-sched span { color: var(--muted); min-width: 0; }
.c-sched span b { display: block; color: var(--ink); }
.c-sched em { font-style: normal; font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.c-sched .ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.c-sched .wait { color: var(--pen); background: color-mix(in srgb, var(--pen) 14%, transparent); }

.c-chart { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 14px; }
.c-big { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.c-note { color: var(--muted); font-size: 0.75rem; }
.c-chart svg { width: 100%; height: 84px; display: block; overflow: visible; }
.c-chart .band { fill: var(--blue); opacity: .13; }
.c-chart .line { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; }

.c-agents li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 13px 0 14px; border-top: 1px solid var(--rule); }
.c-agents .dot { margin-top: 6px; }
.c-agents p { color: var(--muted); transition: opacity .3s; margin-top: 1px !important; }
.c-agents p.swap { opacity: 0; }
.c-agents .bar { display: block; height: 3px; margin-top: 9px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.c-agents .bar i { display: block; height: 100%; border-radius: 3px; background: var(--blue); transition: width 1.2s var(--ease); }
.c-agents .done .dot { background: var(--pen); }
.c-agents u { display: inline-block; margin-top: 9px; padding: 5px 11px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 0.75rem; text-decoration: none; }

@media (min-width: 620px) {
  .c-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-chart { grid-template-columns: minmax(0, 13em) minmax(0, 1fr); align-items: end; }
}
@media (min-width: 900px) {
  .c-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .c-side { display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px; border-right: 1px solid var(--rule); background: color-mix(in srgb, var(--tint) 55%, var(--surface)); }
  .c-brand { display: flex; align-items: center; gap: 8px; font-weight: 650; padding: 0 8px !important; }
  .c-brand img { border-radius: 5px; }
  .c-side li { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 7px; color: var(--muted); }
  .c-side li.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
  .c-side li b { font-size: 0.6875rem; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: var(--surface); }
  .c-user { margin-top: auto !important; display: flex; align-items: center; gap: 8px; padding: 0 8px !important; color: var(--muted); }
  .c-user i { font-style: normal; font-size: 0.6875rem; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); }
  .c-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  /* The screen rises once as it scrolls into view; working agents pulse. */
  .js .console { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
  .js .console.in { opacity: 1; transform: none; }
  .js .c-chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) .5s; }
  .js .console.in .c-chart .line { stroke-dashoffset: 0; }
  .c-live .dot::after, .c-agents li:not(.done) .dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
    animation: pulse 2.2s ease-out infinite;
  }
  .c-agents li:nth-child(2) .dot::after { animation-delay: .7s; }
  .c-agents li:nth-child(3) .dot::after { animation-delay: 1.4s; }
}
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }

/* Contact */
.contact { padding: clamp(72px, 13vw, 168px) 0; }
.contact h2 {
  margin: 0;
  font-weight: 450;
  font-stretch: 86%;
  font-size: clamp(1.875rem, 4.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--blue); }
.btn:active { transform: translateY(1px); }

.contact-lede { margin: 16px 0 0; color: var(--muted); max-width: 30em; }
.contact-form { margin-top: clamp(28px, 4vw, 44px); max-width: 720px; display: grid; gap: 26px 32px; }
.contact-form[hidden] { display: none; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.875rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--muted);
  border-radius: 0;
  padding: 8px 0 10px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 6.5em; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field .bad { border-color: var(--pen); box-shadow: 0 1px 0 var(--pen); }
.hp { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-actions .btn { margin-top: 0; border: 0; font-family: inherit; cursor: pointer; }
.form-actions .btn:disabled { opacity: .55; cursor: default; }
.form-status { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--pen); }
@media (min-width: 620px) {
  .contact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-form .wide { grid-column: 1 / -1; }
}

/* Footer */
.foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 26px; padding-bottom: 34px; }
.foot p { margin: 0; }
.foot .name { color: var(--ink); font-weight: 650; }
.foot small { font-size: inherit; }
.foot a { text-decoration-color: var(--rule); }
.foot a:hover { color: var(--ink); }

/* One load sequence: headline lines rise, then main.js draws the threads. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .line > span {
    transform: translateY(110%);
    animation: line-up 1.05s var(--ease) forwards;
    animation-delay: calc(var(--i) * 130ms + 80ms);
  }
  .js .lede { opacity: 0; animation: fade-in 1s var(--ease) .55s forwards; }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
