/*
 * The same dark surfaces as the app (web/src/index.css) so the two read as one
 * product. White, not the app's indigo, carries the primary action: it is the
 * contrast of the badge itself. Other colors only ever mean a result.
 */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: oklch(0.165 0.006 285);
  --surface: oklch(0.205 0.006 285);
  --surface-raised: oklch(0.245 0.007 285);
  --foreground: oklch(0.97 0.002 285);
  --muted: oklch(0.72 0.012 285);
  --dim: oklch(0.6 0.015 285);
  --border: oklch(1 0 0 / 10%);
  --ok: oklch(0.78 0.14 160);
  --danger: oklch(0.72 0.17 25);
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.wrap {
  width: min(100%, 76rem);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 1.75rem;
  height: 1.75rem;
}

.mark-badge {
  fill: var(--foreground);
}

.mark-glyph {
  fill: var(--background);
}

.mark-ring {
  stroke: var(--background);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms;
}

.site-header nav a:hover {
  color: var(--foreground);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2.25rem, 4vw, 3.5rem) clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(4rem, 8vw, 7rem);
}

h1 {
  grid-column: 1 / -1;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h1 span {
  display: block;
}

h1 .quiet {
  color: var(--dim);
}

.lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--foreground);
  color: var(--background);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 120ms;
}

.button:hover {
  opacity: 0.86;
}

.text-link {
  color: var(--muted);
  font-size: 0.95rem;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--border);
}

.text-link:hover {
  color: var(--foreground);
}

/* The review: the product's actual output, so it stands in for a screenshot. */

.review-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.9rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.review-steps li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.review-steps li::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ok);
}

.review-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.review-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 0.82rem;
}

.review-head p {
  flex: 1;
  min-width: 0;
}

.review-head strong {
  color: var(--foreground);
  font-weight: 600;
}

.review-head code {
  flex-shrink: 0;
  color: var(--dim);
}

.review-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.35rem;
  background: var(--foreground);
  color: var(--background);
  font-weight: 800;
  line-height: 1;
}

.bot {
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  font-size: 0.7rem;
}

.review-body {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.1rem 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.review-body strong {
  display: block;
  color: var(--foreground);
  font-weight: 600;
}

.review-body code {
  color: var(--foreground);
}

.verdict {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  color: var(--foreground);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.verdict span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--danger);
}

figcaption {
  margin-top: 0.75rem;
  color: var(--dim);
  font-size: 0.78rem;
}

/* Sections: a label in the margin, the argument beside it. */

.section {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-top: calc(clamp(3.5rem, 7vw, 6rem) * -1);
  margin-bottom: calc(clamp(3.5rem, 7vw, 6rem) - 1.5rem);
  background: var(--border);
}

.section-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 2.4;
}

.statement {
  max-width: 44rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.jobs,
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.steps {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 1.75rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0.1rem;
  left: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.steps code,
.rules code {
  color: var(--foreground);
}

.aside {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.aside strong {
  color: var(--foreground);
  font-weight: 600;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  counter-reset: how;
}

.how-steps li {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  counter-increment: how;
}

.how-steps li::before {
  content: counter(how);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.how-steps p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.facts dt {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.facts dd {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The probes */

.table-scroll {
  margin-top: clamp(2rem, 4vw, 3rem);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

caption {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: left;
}

thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

td {
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  vertical-align: baseline;
}

tbody tr:first-child td {
  border-top: 0;
}

td:first-child {
  width: 42%;
  color: var(--foreground);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.ok {
  margin-right: 0.4rem;
  color: var(--ok);
  font-weight: 600;
}

.rules {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.rules strong {
  color: var(--foreground);
  font-weight: 600;
}

.rules-title {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.rules-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem clamp(2rem, 4vw, 3.5rem);
}

/* The form */

.talk {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2.5rem, 6vw, 6rem);
  padding-block: 0 clamp(4rem, 8vw, 7rem);
}

/* A pseudo-element, so the rule stops at the content edge like the sections' do. */
.talk::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: calc(clamp(4rem, 8vw, 7rem) - 2.5rem);
  background: var(--border);
}

.talk h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.talk-copy p {
  max-width: 28rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.talk-form {
  display: grid;
  gap: 1.1rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.talk-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.talk-form em {
  color: var(--dim);
  font-style: normal;
  font-weight: 400;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid oklch(1 0 0 / 16%);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.trap {
  position: absolute;
  left: -100vw;
}

.talk-send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.25rem;
}

.talk-send small {
  color: var(--dim);
  font-size: 0.82rem;
}

button.button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.75rem;
  color: var(--dim);
  font-size: 0.85rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--foreground);
}

/* 404, and the pages the form lands on */

.notice {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

.notice h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.notice p {
  margin: 1rem 0 2rem;
  color: var(--muted);
}

@media (max-width: 62rem) {
  .hero,
  .talk {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .section::before {
    margin-bottom: calc(clamp(3.5rem, 7vw, 6rem) - 1rem);
  }
}

@media (max-width: 44rem) {
  .jobs,
  .split,
  .facts,
  .how-steps,
  .rules-grid,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header nav {
    gap: 1rem;
  }

  .nav-section {
    display: none;
  }

  td {
    display: block;
    padding-block: 0.15rem;
    border-top: 0;
  }

  td:first-child {
    width: auto;
    padding-top: 0.8rem;
  }

  td:last-child {
    padding-bottom: 0.8rem;
  }

  tbody tr {
    display: block;
    border-top: 1px solid var(--border);
  }

  tbody tr:first-child {
    border-top: 0;
  }

  .review-head code {
    display: none;
  }
}

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