/* Colours come from the Lasso logo in Figma. */
:root {
  --ink: #2a2724;
  --stroke: #2a2724;
  --muted: #6a6158;
  --rust: #9e5a3c;
  --page: #f6f2ec;
  --surface: #ffffff;
  --canvas: #ffffff;
  --line: #e9e3da;
  --dot: #d9d2c7;
  --code: #2a2724;
  --code-ink: #f6f2ec;
  --code-muted: #b6aea3;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f6f2ec;
    --stroke: #d8d2c8;
    --muted: #b6aea3;
    --page: #2a2724;
    --surface: #35312d;
    --canvas: #221f1c;
    --line: #47423c;
    --dot: #47423c;
    --code: #1e1b19;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

h1,
h2 {
  font-family: ui-serif, "New York", Georgia, serif;
}

h1 {
  font-size: clamp(2.75rem, 7.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  font-weight: 700;
  text-wrap: balance;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
}

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

:not(pre) > code {
  font-size: 0.88em;
  white-space: nowrap;
}

a:focus-visible,
pre:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

.wrap {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.logo {
  display: block;
  height: 34px;
  width: auto;
}

.hero-mark {
  order: 1;
  width: clamp(160px, 22vw, 240px);
  height: auto;
}

.soon {
  display: inline-block;
  margin-top: 28px;
  padding: 6px 12px;
  border: 1.5px solid var(--rust);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.split.last {
  padding-bottom: clamp(64px, 10vw, 120px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 64px);
}

.lede {
  max-width: 34em;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.45;
  text-wrap: pretty;
}

/* The hero canvas */
.stage {
  margin-block: 0;
}

.canvas {
  padding: clamp(24px, 5vw, 56px);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 20px 20px;
}

.diagram {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}

.shape {
  fill: var(--surface);
  stroke: var(--stroke);
  stroke-width: 1.5;
}

.diagram text {
  fill: var(--ink);
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: central;
}

.diagram .edge {
  fill: var(--muted);
  font-size: 13px;
}

.arrow,
.head {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 1.5;
}

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

figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.8em;
}

/* Sections */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(64px, 10vw, 120px) 0;
}

.split p {
  margin-top: 16px;
  color: var(--muted);
  text-wrap: pretty;
}

.shapes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 24px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  text-align: center;
  color: var(--muted);
}

.shapes svg {
  display: block;
  width: 92px;
  max-width: 100%;
  margin: 0 auto 8px;
}

.sample {
  fill: var(--ink);
  font-size: 22px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.points {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  padding-block: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.9688rem;
}

pre {
  min-width: 0;
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--code);
  color: var(--code-ink);
  font-size: 0.8125rem;
  line-height: 1.65;
}

pre .c {
  color: var(--code-muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 760px) {
  .hero-mark {
    display: none;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .shapes {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .shapes li {
    grid-column: span 2;
  }

  .shapes li:nth-child(4) {
    grid-column: 2 / span 2;
  }
}
