/* Misralo — the company site.
 *
 * Tokens are lifted verbatim from the dashboard (app/src/index.css) so the
 * site and the product read as one thing. Same rule applies here: green,
 * amber and red mean delivery outcomes, so the accent is a cobalt and it does
 * almost nothing but focus rings and links. Monospace is a display face.
 *
 * Hand-written, no build step, no external requests -- ./scripts/deploy.sh
 * --site-only rsyncs this directory as-is, and there is no font or script for
 * a third party to serve.
 */

:root {
  --bg: #f6f7f9;
  --bg-subtle: #eef0f4;
  --surface: #ffffff;
  --border: #e2e5ea;
  --border-strong: #cfd3db;
  --fg: #14161a;
  --fg-muted: #656c7a;
  --fg-subtle: #8a919f;
  --accent: #2b4be8;
  --ok: #1a7f47;
  --ok-subtle: #e6f4ec;
  --ok-border: #b4ddc6;
  --inverse: #14161a;
  --inverse-fg: #e9ebef;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --radius: 10px;
  --wrap: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d;
    --bg-subtle: #101215;
    --surface: #131519;
    --border: #22252b;
    --border-strong: #343841;
    --fg: #e9ebef;
    --fg-muted: #9aa1ae;
    --fg-subtle: #6e7684;
    --accent: #6486ff;
    --ok: #4ec27f;
    --ok-subtle: #10241a;
    --ok-border: #24503a;
    --inverse: #000000;
    --inverse-fg: #e9ebef;
  }
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

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

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

/* The recurring texture, same as the app's: mono, uppercase, wide-tracked. */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

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

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand img { display: block; }
header.site nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
}
header.site nav a { color: var(--fg-muted); text-decoration: none; }
header.site nav a:hover { color: var(--fg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 7px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); }
/* Near-black, not the accent: the accent is reserved for state and links. */
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { opacity: 0.9; }
.btn.lg { height: 2.625rem; padding: 0 1.15rem; font-size: 1rem; }

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

.hero { padding: 5rem 0 4rem; }
.hero-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; }
}

h1 {
  font-size: clamp(2.25rem, 5.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 640;
  margin: 0 0 1.1rem;
  max-width: 15ch;
}
.lede { font-size: 1.125rem; color: var(--fg-muted); margin: 0 0 1.75rem; max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cta-note { font-size: 0.875rem; color: var(--fg-subtle); margin: 1rem 0 0; }

/* The signature artifact -- the one ornament on the page.
 *
 * It is the product's whole thesis as an object: a message that carries a
 * signature anyone can check against DNS the sender controls. Everything else
 * on this page is deliberately quieter than this. */
.signed {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -12px rgb(0 0 0 / 0.12);
}
.signed-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.dot { width: 9px; height: 9px; border-radius: 99px; background: var(--border-strong); }
.signed-head .label {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.signed-body { padding: 1rem 1.15rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.85; }
.signed-body .k { color: var(--fg-subtle); }
.signed-body .v { color: var(--fg); }
.signed-body .sig { color: var(--fg-muted); overflow-wrap: anywhere; display: block; }
.signed-body .row { display: block; }
.signed-foot {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  border-top: 1px solid var(--border);
  background: var(--ok-subtle);
  color: var(--ok);
  font-size: 0.875rem;
}
.signed-foot svg { display: block; flex-shrink: 0; }
.signed-foot strong { font-family: var(--mono); font-weight: 600; font-size: 0.8125rem; }

/* ---- sections ----------------------------------------------------------- */

section { padding: 4rem 0; border-top: 1px solid var(--border); }
h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 620;
  margin: 0 0 0.6rem;
  max-width: 22ch;
}
.section-lede { color: var(--fg-muted); margin: 0 0 2.25rem; max-width: 52ch; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
/* For a group of four. The track above fits three columns inside --wrap, which
   would leave the fourth card orphaned on a row of its own; a wider minimum
   fits exactly two and squares the group up.
   min(22rem, 100%) rather than a bare 22rem: a hard 352px minimum is wider
   than the content box on a 360px phone, and the grid would push the whole
   page into a horizontal scroll rather than collapsing to one column. */
.cards-2up { grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}
.card h3 { font-size: 1rem; margin: 0 0 0.45rem; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--fg-muted); font-size: 0.9375rem; }

/* Numbered because these genuinely are a sequence: you cannot verify a domain
   you have not added, or send from one you have not verified. */
.steps { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.step .n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1rem; margin: 0 0 0.4rem; font-weight: 600; }
.step p { margin: 0; color: var(--fg-muted); font-size: 0.9375rem; }

pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  margin: 0 0 1rem;
  color: var(--fg);
}
pre .c { color: var(--fg-subtle); }
code.inl {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08em 0.36em;
}

.two-col { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .two-col { grid-template-columns: 1fr 1fr; } }

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

.tiers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.tier.current { border-color: var(--accent); }
.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tier h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.pill {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  white-space: nowrap;
}
.price { font-size: 1.9rem; font-weight: 640; letter-spacing: -0.02em; margin: 0.9rem 0 0; }
.price .per { font-size: 0.9375rem; font-weight: 400; color: var(--fg-muted); }
.allowance { margin: 0.9rem 0 0; font-weight: 500; }
.allowance + p { margin: 0; color: var(--fg-muted); font-size: 0.9375rem; }
/* align-content:start, because `flex: 1` makes this grid as tall as the
   tallest tier and stretched rows would space a three-feature list differently
   from a four-feature one sitting next to it. */
.tier ul {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  flex: 1;
  display: grid;
  gap: 0.4rem;
  align-content: start;
}
.tier li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}
.tier li svg { flex-shrink: 0; margin-top: 0.35rem; color: var(--fg-subtle); }
.tier .btn { margin-top: 1.35rem; justify-content: center; }

/* ---- legal pages -------------------------------------------------------- */

/* Long-form prose, which the rest of the site does not have: everywhere else
   the copy is a lede or a card. Narrower than --wrap because a legal document
   is read line by line, and 64rem of running text is not read at all. */
.legal { max-width: 42rem; }
.legal h2 {
  font-size: 1.1875rem;
  margin: 2.75rem 0 0.75rem;
  max-width: none;
  scroll-margin-top: 4.5rem;
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: 0.45rem; }
.legal li::marker { color: var(--fg-subtle); }
.legal strong { font-weight: 600; }

/* The dated header every legal page carries, and the plain-English summary
   that sits above the operative text. The summary is not the agreement and
   says so; it is there because nobody reads the agreement. */
.legal-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 2.5rem;
}
.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin: 0 0 2.5rem;
}
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }
.summary .eyebrow { margin-bottom: 0.6rem; }

/* Sub-processors and retention: short tables that must stay readable on a
   phone, hence the scroll container rather than a squeezed layout. */
.table-scroll { overflow-x: auto; margin: 0 0 1rem; }
.legal table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.9375rem;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.legal th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
}
.legal td { color: var(--fg-muted); }
.legal td:first-child { color: var(--fg); }

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

footer.site {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3.5rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }
footer.site a { color: var(--fg-muted); text-decoration: none; }
footer.site a:hover { color: var(--fg); text-decoration: underline; }
