/**
 * Landing page styles.
 *
 * Separate from styles.css on purpose: the app stylesheet is 37KB of ledger
 * tables, review queues and form controls that a marketing page never renders,
 * and the landing page is the one URL whose load time is measured by people
 * deciding whether to bother. It carries its own tokens rather than importing
 * them, so the two can never block each other on a render-critical request.
 *
 * No JavaScript anywhere on this page. The CSP is `script-src 'self'` with no
 * inline allowance, and a landing page that needs a bundle to show its own
 * sentences has already lost the argument it is making.
 */

:root {
  --bg: #f6f1e8;
  --bg-elevated: #fffdf8;
  --bg-muted: #ebe4d6;
  --ink: #1c1915;
  --ink-2: #4a453c;
  --ink-3: #7a7366;
  --line: rgba(28, 25, 21, 0.12);
  --line-strong: rgba(28, 25, 21, 0.22);
  --accent: #c45c26;
  --accent-ink: #fff8f2;
  --accent-soft: #f3e0d2;
  --accent-deep: #8f3d12;
  --good: #1f6b45;
  --radius: 14px;
  --radius-pill: 999px;
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --measure: 68ch;
  --shell: 1080px;
}

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

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

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

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

/* Keyboard users reach the content without walking the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg-elevated);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}
.skip-link:focus {
  left: 0;
}

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

/* Visible focus everywhere. The default ring disappears against cream. */
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ——— header ——— */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}

.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 650;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15.5px;
}

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

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

/* ——— buttons ——— */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

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

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--bg-muted);
}

/* ——— hero ——— */

.hero {
  padding: 76px 0 64px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}

.hero .lede {
  font-size: clamp(1.06rem, 2.1vw, 1.3rem);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.cta-note {
  font-size: 14.5px;
  color: var(--ink-3);
  margin: 18px 0 0;
}

/* ——— generic section ——— */

section {
  padding: 60px 0;
  border-top: 1px solid var(--line);
}

section > .shell > h2 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  max-width: 24ch;
}

.section-lede {
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0 0 34px;
}

/* ——— feature cards ——— */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.card h3 {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.17rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.8px;
}

/* ——— the ledger proof block ——— */

.proof {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  overflow-x: auto;
}

.proof table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-family: var(--mono);
  font-size: 14.5px;
}

.proof caption {
  text-align: left;
  font-family: var(--font);
  color: var(--ink-3);
  font-size: 14.5px;
  padding-bottom: 14px;
}

.proof th,
.proof td {
  text-align: left;
  padding: 7px 14px 7px 0;
  border-bottom: 1px solid var(--line);
}

.proof th {
  color: var(--ink-3);
  font-weight: 550;
}

.proof td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.proof tfoot td {
  border-bottom: none;
  border-top: 2px solid var(--line-strong);
  font-weight: 600;
  padding-top: 10px;
}

.balanced {
  color: var(--good);
  font-weight: 600;
}

/* ——— steps ——— */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
  max-width: var(--measure);
}

.steps li {
  counter-increment: step;
  padding-left: 52px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.steps h3 {
  margin: 4px 0 4px;
  font-size: 1.08rem;
  font-family: var(--display);
  font-weight: 650;
}

.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.8px;
}

/* ——— FAQ ——— */

.faq {
  max-width: var(--measure);
  display: grid;
  gap: 4px;
}

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

.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

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

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}

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

.faq summary:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 2px;
}

.faq details p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 16px;
}

/* ——— footer ——— */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 40px 0;
  font-size: 15px;
  color: var(--ink-3);
}

.site-footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: baseline;
}

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

@media (max-width: 640px) {
  .hero {
    padding: 52px 0 44px;
  }
  section {
    padding: 46px 0;
  }
  .masthead nav {
    gap: 16px;
    font-size: 15px;
  }
}
