/* Formexium marketing site.
   System font stack only — no webfonts, no external requests of any kind.
   The page that makes the architecture argument does not get to load
   third-party assets.

   Layout note: the prose column is capped near 68 characters on purpose.
   Long lines are harder to read, so the desktop treatment adds structure
   AROUND the reading column rather than widening it. */

:root {
  --ink: #16181d;
  --ink-soft: #4a5058;
  --ink-faint: #6d747d;
  --line: #dfe2e7;
  --paper: #ffffff;
  --paper-alt: #f6f7f9;
  --accent: #b4531f;
  --measure: 34rem;
  --wide: 64rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

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

header.site {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.bar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  justify-content: space-between;
}

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

.tag {
  display: none;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

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

.hero {
  padding: 3.2rem 0 2.8rem;
  border-bottom: 1px solid var(--line);
}

.hero-main { max-width: var(--measure); }

h1 {
  font-size: 1.95rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0 0 1.1rem;
  font-weight: 650;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.constraint {
  margin: 1.8rem 0 0;
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
  font-weight: 550;
  line-height: 1.9;
}

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

main section {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}

main section:last-of-type { border-bottom: 0; }

.sec-body { max-width: var(--measure); }

h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 0.9rem;
  font-weight: 650;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.08em 0.32em;
  white-space: nowrap;
}

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin-bottom: 0.75rem; }
li:last-child { margin-bottom: 0; }
ol.flow li { margin-bottom: 0.85rem; }

.note {
  margin-top: 1.3rem;
  padding: 0.9rem 1rem;
  background: var(--paper-alt);
  border-left: 3px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.status .sec-body { color: var(--ink-soft); }

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.6rem;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

/* ---------- tablet ---------- */

@media (min-width: 42rem) {
  body { font-size: 18px; }
  h1 { font-size: 2.4rem; }
  .lede { font-size: 1.14rem; }
  main section { padding: 3rem 0; }
  .hero { padding: 4rem 0 3.4rem; }
}

/* ---------- desktop: structure around the reading column ---------- */

@media (min-width: 60rem) {
  .tag { display: inline; }

  .hero { padding: 5rem 0 4.2rem; }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) 15rem;
    gap: 4rem;
    align-items: start;
  }

  h1 { font-size: 2.9rem; }

  .hero-side { padding-top: 0.5rem; }

  .constraint {
    margin: 0;
    padding: 1.1rem 0 0;
    font-size: 0.98rem;
  }

  /* Section heading sits in its own left rail, prose stays at measure. */
  .sec {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure));
    gap: 4rem;
    align-items: start;
  }

  .sec-head { padding-top: 0.25rem; }

  h2 {
    font-size: 1.12rem;
    letter-spacing: 0.005em;
    position: sticky;
    top: 2rem;
  }

  main section { padding: 3.6rem 0; }
}

/* ---------- dark mode ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eaee;
    --ink-soft: #a9b0ba;
    --ink-faint: #868d97;
    --line: #2c3037;
    --paper: #101318;
    --paper-alt: #191d24;
    --accent: #d9793d;
  }
}
