/*
 * The marketing site's stylesheet.
 *
 * The same tokens as `frontend/src/design/tokens.css`, written as plain CSS custom properties so the
 * public site and the application look like one product. There is no shared build between them on
 * purpose: coupling a landing page to an application bundle costs a build step and buys nothing, and
 * a hundred duplicated lines of CSS is the cheaper trade.
 *
 * No JavaScript is required for anything here. Motion is CSS, the nav is CSS, and the page is fully
 * readable with scripting disabled — which is also what makes it fast to crawl.
 */

:root {
  color-scheme: light;

  --plane: #f9f9f7;
  --surface: #fcfcfb;
  --raised: #ffffff;
  --sunken: #f2f1ee;

  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;

  --hairline: rgb(11 11 11 / 9%);
  --hairline-strong: #e1e0d9;

  --accent: #2a78d6;
  --accent-strong: #256abf;
  --accent-ink: #ffffff;
  --accent-wash: rgb(42 120 214 / 9%);

  --good: #006300;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --measure: 68rem;

  --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --plane: #0e0e0d;
    --surface: #151513;
    --raised: #1c1c1a;
    --sunken: #0a0a09;

    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #898781;

    --hairline: rgb(255 255 255 / 10%);
    --hairline-strong: #2c2c2a;

    --accent: #3987e5;
    --accent-strong: #5598e7;
    --accent-ink: #08172a;
    --accent-wash: rgb(57 135 229 / 14%);

    --good: #0ca30c;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--plane);
  /* Two very faint radial washes, both under 5%. Felt rather than seen — a flat expanse of white
     is what makes a page read as unfinished. */
  background-image:
    radial-gradient(120rem 55rem at 15% -8%, var(--accent-wash), transparent 62%),
    radial-gradient(85rem 45rem at 92% 2%, rgb(235 104 52 / 5%), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Type ---- */

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.lede {
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 42ch;
}

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin: 0 0 0.75rem;
}

.muted {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.nums {
  font-variant-numeric: tabular-nums;
}

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

/* Skip link — visible only once focused. */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

/* ---- Layout ---- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.hero {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

/* ---- Chrome ---- */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: color-mix(in oklab, var(--plane) 80%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span[aria-hidden] {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

nav.site {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

nav.site a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background-color 190ms var(--ease), color 190ms var(--ease);
}

nav.site a:hover {
  background: var(--sunken);
  color: var(--ink);
}

nav.site a[aria-current="page"] {
  color: var(--ink);
  background: var(--sunken);
}

@media (max-width: 46rem) {
  nav.site a.hide-sm {
    display: none;
  }
}

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 3.5rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

footer.site nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

footer.site a {
  color: var(--ink-2);
  text-decoration: none;
}

footer.site a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 110ms var(--ease),
    background-color 190ms var(--ease),
    border-color 190ms var(--ease);
}

.btn:active {
  transform: scale(0.972);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgb(11 11 11 / 12%);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  border-color: var(--hairline-strong);
  background: var(--sunken);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---- Cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(11 11 11 / 4%);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card .glyph {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent);
}

/* ---- Prose pages ---- */

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--ink-2);
  margin: 0.75rem 0;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li {
  margin: 0.4rem 0;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.prose th {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.note {
  background: var(--sunken);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* ---- Pricing ---- */

.price {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.checklist li {
  display: flex;
  gap: 0.7rem;
  padding: 0.4rem 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.checklist li::before {
  content: "✓";
  color: var(--good);
  font-weight: 700;
  flex: none;
}

/* ---- Reveal ----
   Pure CSS: content starts one step down and translucent, then animates in on load with a small
   per-card delay. No observer, no script — and `prefers-reduced-motion` switches it off below. */

.reveal {
  animation: rise 700ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
  .btn:active {
    transform: none;
  }
}
