/*
 * The marketing site's stylesheet.
 *
 * Hand-written, one file, no framework. The whole site is five pages of prose and
 * a price table; a utility framework would be more bytes than the pages it styled,
 * and this way the first paint needs one small stylesheet and nothing else.
 *
 * The look is borrowed openly from the way Apple lays out a product page, because
 * it suits what this has to do: very large quiet type, a great deal of space,
 * one idea per screen, and photographs of the thing rather than illustrations
 * about it. What is *not* borrowed is their habit of animating everything on
 * scroll — the fades here are short, subtle, and turn themselves off for anybody
 * who has asked for less motion.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #86868b;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-card: #ffffff;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --good: #1d8a4e;

  --radius: 18px;
  --radius-sm: 10px;
  --shell: 1024px;
  --gutter: clamp(20px, 5vw, 40px);

  /*
   * The system font stack, deliberately. A web font is 30–100KB that delays the
   * first paint of text, and every platform this will be read on already has a
   * good interface face installed — the one its owner is used to reading.
   */
  --sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --ink-soft: #a1a1a6;
    --ink-faint: #86868b;
    --bg: #000000;
    --bg-soft: #101012;
    --bg-card: #17171a;
    --line: #333336;
    --accent: #2997ff;
    --accent-ink: #04122a;
    --good: #41c77e;
  }
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchored sections stop below the sticky header rather than under it. */
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Visible focus, on everything, always. Removing it is removing the keyboard. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* For a heading that has to exist for the document outline but not on screen. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 50%;
  translate: -50% -120%;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px 18px;
  transition: translate 0.15s;
}

.skip:focus {
  translate: -50% 0;
}

/* ---------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wide {
  max-width: 1200px;
}

section {
  padding-block: clamp(64px, 11vw, 128px);
}

.band {
  background: var(--bg-soft);
}

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand:hover {
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 22px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top nav a {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.top nav a:hover {
  color: var(--ink);
  background: var(--bg-soft);
  text-decoration: none;
}

/* The two links that matter are kept visible even on a narrow screen. */
@media (max-width: 620px) {
  .top nav a.hide-sm {
    display: none;
  }
}

/* ------------------------------------------------------------------ type */

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.07;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 650;
}

h3 {
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lead {
  font-size: clamp(1.14rem, 2vw, 1.45rem);
  line-height: 1.42;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
  max-width: 34ch;
  text-wrap: pretty;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.muted {
  color: var(--ink-soft);
}

.fine {
  font-size: 0.8rem;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* ----------------------------------------------------------------- hero */

.hero {
  text-align: center;
  padding-block: clamp(56px, 10vw, 112px) clamp(40px, 7vw, 80px);
}

.hero .lead {
  margin-inline: auto;
  max-width: 40ch;
  margin-block: 22px 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost {
  color: var(--accent);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  filter: none;
}

.btn-block {
  width: 100%;
}

/* ----------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 20px;
  margin-top: 44px;
}

/*
 * Fixed column counts above a breakpoint rather than auto-fit. auto-fit with a
 * 260px minimum happily made four columns out of a four-card grid on a wide
 * screen, which turned each card into a strip two words wide.
 */
.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.5;
}

.card-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 14px;
}

/* --------------------------------------------------------------- pricing */

.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  margin-top: 44px;
  align-items: start;
}

.plan {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.plan.featured {
  border-color: var(--accent);
  /* Two pixels of accent, not a coloured background: the point is to draw the
     eye, not to make the middle column shout at the other two. */
  box-shadow: 0 0 0 1px var(--accent);
}

.plan-flag {
  position: absolute;
  top: -11px;
  left: 26px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 980px;
}

.plan-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.plan-tagline {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 6px 0 0;
  min-height: 2.8em;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price b {
  font-size: 2.5rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.price span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 0.94rem;
  flex: 1;
}

.plan li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  line-height: 1.4;
}

.plan li svg {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--good);
}

.plan li.no {
  color: var(--ink-faint);
}

.plan li.no svg {
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------- faq */

.faq {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 20px 34px 20px 0;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  position: relative;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details > div {
  padding: 0 0 22px;
  color: var(--ink-soft);
  max-width: 62ch;
}

.faq details > div p {
  margin: 0 0 10px;
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------- app shot */

/*
 * The product shot: a real screen of the application, framed as a browser
 * window. Rendered from markup rather than a screenshot so it stays sharp at any
 * size, needs no image request, and cannot go stale showing an old design.
 */
.shot {
  /* Inside the hero, which is centred. A screenshot of an application is not,
     and inheriting that centring made every row read as a caption. */
  text-align: left;
  margin-top: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 35%);
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.shot-bar span {
  margin-left: 8px;
  font-size: 0.74rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.shot-body {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.stat-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}

.stat small {
  display: block;
  color: var(--ink-faint);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat b {
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.rows {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 15px;
  background: var(--bg-card);
  font-size: 0.88rem;
}

.row i {
  display: block;
  font-style: normal;
  color: var(--ink-faint);
  font-size: 0.76rem;
}

.row b {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.row .in {
  color: var(--good);
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 980px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  margin-left: 7px;
  vertical-align: 1px;
}

/* ---------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--line);
  padding-block: 44px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.foot-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

footer h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

footer a {
  color: var(--ink-soft);
}

footer a:hover {
  color: var(--ink);
}

.foot-note {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

/* -------------------------------------------------------------- prose */

/* Legal pages: one column, comfortable measure, nothing clever. */
.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 42px;
  margin-bottom: 12px;
}

.prose h1 + p {
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.prose p,
.prose li {
  color: var(--ink-soft);
  line-height: 1.62;
}

.prose ul {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------- motion */

/*
 * A short rise as each block arrives. Added by a class from script, so with
 * JavaScript off nothing is hidden — the page is simply not animated, which is a
 * far better failure than a blank page.
 */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  translate: none;
}

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

  .reveal,
  .reveal.in {
    opacity: 1;
    translate: none;
    transition: none;
  }
}
