@font-face {
  font-family: 'Poppins';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-v15-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-v15-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-v15-latin-700.woff2') format('woff2');
}

:root {
  /* The brand colour is the logo's indigo. */
  --paper: #f5f5fb;
  --surface: #ffffff;
  --ink: #1b1a36;
  --ink-soft: #55547a;
  --line: #dedef0;
  --brand: #5f5fd3;
  --brand-deep: #4343b0;
  --term: #17162e;
  --term-text: #cfcfee;
  --term-dim: #7c7ba8;
  --term-mark: #a9a9ff;
  --warn: #f0b429;

  --font: 'Poppins', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  --width: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand-deep); }
code { font-family: var(--mono); }

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

/* Header */

.site-header {
  max-width: var(--width);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand img { display: block; }
.site-header nav { display: flex; align-items: center; gap: clamp(0.75rem, 3vw, 2rem); }
.site-header nav a:not(.button) {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-header nav a:not(.button):hover { color: var(--ink); }
@media (max-width: 34rem) {
  .site-header nav a:not(.button) { display: none; }
}

.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
}
.button:hover { background: var(--brand-deep); }
.button-small { padding: 0.45rem 1.1rem; font-size: 0.9rem; }

/* Hero */

.hero {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

/* Same size as the section headings. */
.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
/* One sentence per line; each sentence wraps on its own if it has to. */
.hero h1 span { display: block; }
.hero-lede {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  max-width: 32rem;
}

.try { margin-top: 2.25rem; }
.download { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.download .button { padding: 0.85rem 1.8rem; }
.download-others {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.download-others li:not([hidden]) ~ li:not([hidden])::before { content: '·'; margin: 0 0.5em; }
.download + .try-label { margin-top: 1.75rem; }
.try-label { font-weight: 500; font-size: 0.95rem; }
.command {
  margin-top: 0.6rem;
  display: flex;
  align-items: stretch;
  background: var(--term);
  border-radius: 10px;
  overflow: hidden;
  max-width: 32rem;
}
.command code {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow-x: auto;
}
.command .prompt { color: var(--term-dim); margin-right: 0.4em; user-select: none; }
.copy {
  border: 0;
  background: var(--brand);
  color: #fff;
  font: 600 0.85rem var(--font);
  padding: 0 1.1rem;
  cursor: pointer;
}
.copy:hover { background: var(--brand-deep); }
.copy:focus-visible { outline-offset: -3px; outline-color: #fff; }
.try-note { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.platform-note { margin-top: 0.6rem; font-size: 0.85rem; color: var(--ink-soft); max-width: 32rem; }
.platform-note code { display: block; margin-top: 0.2rem; font-size: 0.9em; overflow-wrap: anywhere; }

/* The monkey's log: the page's signature element */

.monkey-log {
  margin: 0;
  background: var(--term);
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgb(27 26 54 / 0.55);
  overflow: hidden;
}
.log-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}
.log-dots { display: flex; gap: 0.35rem; }
.log-dots i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: rgb(255 255 255 / 0.15); }
.log-title { font-family: var(--mono); font-size: 0.8rem; color: var(--term-dim); }

.log-lines {
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--term-text);
  height: 16.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Old lines fade out at the top instead of being cut in half. */
  mask-image: linear-gradient(transparent, #000 3rem);
}
.log-lines li { overflow-wrap: anywhere; }
.log-lines time { color: var(--term-dim); margin-right: 0.6em; }
.log-lines mark { background: none; color: var(--term-mark); }
.log-lines .warn { color: var(--warn); }
.log-lines .new { animation: log-in 0.35s ease-out; }
@keyframes log-in {
  from { opacity: 0; transform: translateY(0.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .log-lines .new { animation: none; }
}

/* Sections */

.demo, .steps, .pricing {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
}

.demo h2 { text-align: center; margin-bottom: 2rem; }
.video-frame {
  max-width: 58rem;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--term);
}
.video-frame video { width: 100%; height: 100%; display: block; }
.video-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--term-dim);
  font-size: 0.95rem;
}
.video-caption {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-deep);
}

.steps h2 { margin-bottom: 2.5rem; }
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 2rem;
}
.step-list li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.step-list h3::before {
  content: counter(step);
  font-family: var(--mono);
  color: var(--brand);
  margin-right: 0.6rem;
}
.step-list p { margin-top: 0.6rem; color: var(--ink-soft); }
.inline-command {
  display: block;
  margin-top: 0.8rem;
  background: var(--term);
  color: #fff;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: nowrap;
}

.plans {
  margin-top: 2rem;
  display: grid;
  /* The same columns as .step-list; auto-fill keeps them when the offer card is hidden. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 2rem;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.plan-amount { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.4rem 0 0.5rem; }
.plan p:last-child { color: var(--ink-soft); font-size: 0.95rem; }
.plan-muted .plan-amount { color: var(--ink-soft); }
.feedback { margin-top: 1.5rem; color: var(--ink-soft); }

/* The free-testing offer, shown as the first price while it runs. */
.offer { background: var(--brand); border-color: var(--brand); color: #fff; }
.offer p:last-child { color: rgb(255 255 255 / 0.9); }

/* Footer */

.site-footer {
  max-width: var(--width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.site-footer a { color: inherit; }
