/* Locus site. No frameworks, no web fonts: system fonts only, so the page makes no
   requests to anyone but GitHub. */

:root {
  --paper: #f5f3ee;
  --panel: #fffdf8;
  --band: #ebe7de;
  --ink: #1d1c1a;
  --muted: #625e56;
  --line: #d9d4c9;
  --accent: #b9481f;
  --accent-ink: #ffffff;
  --ok: #2f6b4f;
  --warn: #9a3412;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;

  --wrap: 1080px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141412;
    --panel: #1c1b19;
    --band: #1a1917;
    --ink: #ece9e2;
    --muted: #a39e94;
    --line: #2f2d29;
    --accent: #e06a3b;
    --accent-ink: #141412;
    --ok: #7fbf9c;
    --warn: #f0a07a;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

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

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; z-index: 10;
}
.skip:focus { top: 1rem; }

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

.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600; text-decoration: none;
}
.brand:hover { color: inherit; }
.brand__mark { width: 1.6rem; height: 1.6rem; }
.brand__dot { fill: var(--accent); }

.nav { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }

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

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: start;
  padding-top: 4.5rem; padding-bottom: 5rem;
}
.eyebrow {
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.1rem;
}
.lede { font-size: 1.2rem; color: var(--muted); margin-top: 1.4rem; max-width: 34rem; }
.lede q { color: var(--ink); quotes: "“" "”"; }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.cta__note { font-size: 0.9rem; color: var(--muted); margin-top: 0.85rem; }
.cta__alt { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
code { font-family: var(--mono); font-size: 0.92em; }

.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 1rem/1 var(--sans); padding: 0.85rem 1.15rem; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.button svg { width: 1.15rem; height: 1.15rem; }
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { color: var(--accent-ink); filter: brightness(0.93); }
.button--quiet { border-color: var(--line); color: var(--ink); background: transparent; }
.button--quiet:hover { color: var(--ink); border-color: var(--muted); }
.button[data-state="soon"]::after {
  content: "Coming soon"; font-weight: 500; font-size: 0.78rem;
  padding: 0.2rem 0.45rem; border-radius: 4px; background: rgb(0 0 0 / 0.16);
}

.soon {
  margin-top: 1.25rem; padding: 1rem 1.15rem; border-left: 3px solid var(--accent);
  background: var(--panel); max-width: 34rem; font-size: 0.97rem;
}
.soon p + p { margin-top: 0.6rem; }

/* ---------- demo ---------- */

.demo {
  margin: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.demo__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.85rem;
}
.demo__title { font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.demo__status { color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }

.demo__log {
  list-style: none; margin: 0; padding: 1.25rem 1rem; min-height: 15.5rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.msg { max-width: 88%; }
.msg--you {
  align-self: flex-end; font-family: var(--mono); font-size: 0.92rem;
  background: var(--band); padding: 0.55rem 0.8rem; border-radius: 8px 8px 2px 8px;
}
.msg--locus { align-self: flex-start; }
.msg--locus p { line-height: 1.5; }
.msg__tag {
  display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--muted);
}
.msg code { font-family: var(--mono); font-size: 0.88em; }

.confirm {
  border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: var(--radius); padding: 0.8rem 0.9rem;
}
.confirm__actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.confirm__actions button {
  font: 600 0.9rem/1 var(--sans); padding: 0.55rem 0.85rem; border-radius: 5px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.confirm__actions button.is-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.confirm__timer { font-size: 0.8rem; color: var(--muted); margin-top: 0.55rem; }

.demo__try { border-top: 1px solid var(--line); padding: 0.9rem 1rem 1rem; }
.demo__label { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.55rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font: 0.85rem/1.2 var(--mono); padding: 0.45rem 0.65rem; border-radius: 5px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--band); }

.demo figcaption {
  font-size: 0.78rem; color: var(--muted); padding: 0 1rem 0.9rem;
}

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

.section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.section--band { background: var(--band); padding-left: 0; padding-right: 0; }
.section__lede { color: var(--muted); font-size: 1.1rem; margin-top: 0.9rem; max-width: 40rem; }

.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 2.5rem; }
.column h3 { padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.examples { list-style: none; margin: 1rem 0 0; padding: 0; }
.examples li { font-family: var(--mono); font-size: 0.92rem; padding: 0.4rem 0; }
.examples li::before { content: "› "; color: var(--accent); }
.column__note { font-size: 0.9rem; color: var(--muted); margin-top: 0.9rem; }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: start; }

.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding: 1rem 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0.2rem 0 0; color: var(--muted); }

.ladder { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: step; }
.ladder li {
  display: grid; grid-template-columns: 2.2rem 15rem 1fr 14rem; gap: 1rem;
  align-items: baseline; padding: 1.05rem 0; border-top: 1px solid var(--line);
  counter-increment: step;
}
.ladder li:last-child { border-bottom: 1px solid var(--line); }
.ladder li::before {
  content: counter(step); font-family: var(--serif); font-size: 1.3rem; color: var(--accent);
}
.ladder__level { font-weight: 600; }
.ladder__eg { color: var(--muted); font-size: 0.92rem; }
.ladder li:last-child .ladder__rule { font-weight: 600; }

.footnote { color: var(--muted); font-size: 0.95rem; margin-top: 1.4rem; max-width: 46rem; }

.table-scroll { overflow-x: auto; margin-top: 2rem; }
.specs { border-collapse: collapse; width: 100%; min-width: 30rem; }
.specs th, .specs td { text-align: left; padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--line); }
.specs thead th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.specs tbody th { font-weight: 600; width: 28%; }

.progress { list-style: none; margin: 0; padding: 0; }
.progress li {
  position: relative; padding: 0.9rem 0 0.9rem 2rem; color: var(--muted);
  border-top: 1px solid var(--line);
}
.progress li:last-child { border-bottom: 1px solid var(--line); }
.progress li span { display: block; color: var(--ink); font-weight: 600; }
.progress li::before {
  content: ""; position: absolute; left: 0.2rem; top: 1.25rem;
  width: 0.75rem; height: 0.75rem; border-radius: 50%; border: 2px solid var(--line);
}
.progress li.is-done::before { background: var(--ok); border-color: var(--ok); }
.progress li.is-now::before { border-color: var(--accent); background: var(--paper); box-shadow: inset 0 0 0 2px var(--accent); }
.progress li.is-now span::after {
  content: "Now"; margin-left: 0.5rem; font-size: 0.75rem; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em;
}

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

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.92rem; }
.site-footer__inner { display: grid; gap: 0.4rem; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding-top: 3rem; padding-bottom: 3.5rem; }
  .columns { grid-template-columns: 1fr; gap: 2rem; }
  .ladder li { grid-template-columns: 2rem 1fr; gap: 0.25rem 0.75rem; }
  .ladder__rule, .ladder__eg { grid-column: 2; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .nav { gap: 0.9rem; }
  .nav li:nth-child(-n+4) { display: none; }
  .cta .button { width: 100%; justify-content: center; }
  .section { padding-top: 3.25rem; padding-bottom: 3.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .msg { animation: rise 0.22s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
}
