/* Ledger marketing site — tokens from DESIGN.md (light-first, calm, exact). */

:root {
  --canvas: #F4F6F2;
  --surface: #FCFDF9;
  --raised: #FFFFFF;
  --text: #17201C;
  --muted: #65706A;
  --hairline: #DDE3DE;
  --primary: #236A5B;
  --primary-pressed: #195246;
  --tint: #DDEEE8;
  --radius-card: 18px;
  --radius-button: 14px;
  --gutter: 20px;
  --max: 1060px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141916;
    --surface: #1A211D;
    --raised: #212A25;
    --text: #E9EFEA;
    --muted: #9BA69E;
    --hairline: #2C3831;
    --primary: #57A88F;
    --primary-pressed: #6DBBA1;
    --tint: #223730;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--canvas);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-button);
  background: var(--primary);
  color: #F4F6F2;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease, transform 180ms ease;
}
@media (prefers-color-scheme: dark) {
  .button { color: #10201A; }
}
.button:hover { background: var(--primary-pressed); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button-secondary {
  background: var(--raised);
  color: var(--text);
  border-color: var(--hairline);
}
.button-secondary:hover { background: var(--surface); }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.button-meta { font-weight: 500; opacity: 0.75; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero:not(:has(.hero-visual)) {
  grid-template-columns: 1fr;
  max-width: 720px;
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  max-width: 14ch;
}
.lede {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.hero-visual img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  display: block;
  border-radius: 24px;
  border: 1px solid var(--hairline);
  background: var(--raised);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--gutter);
}
.section-tinted {
  max-width: none;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.section-tinted > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  max-width: 24ch;
}
.section-lede {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 62ch;
}

/* ---------- Features ---------- */
.feature-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.card {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}
.card h3 { font-size: 17px; }
.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- Steps ---------- */
.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
  max-width: 62ch;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 58px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.steps li strong { color: var(--text); font-weight: 600; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--tint);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Download ---------- */
.download-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.download-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  color: var(--text);
  transition: border-color 180ms ease, transform 180ms ease;
}
.download-card:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.download-card:active { transform: translateY(1px); }
.download-primary {
  border-color: var(--primary);
  background: var(--tint);
}
.download-name { font-size: 17px; font-weight: 700; }
.download-abi { color: var(--muted); font-size: 14px; }
.download-size {
  margin-top: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}
.download-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--hairline);
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    gap: 32px;
  }
  .hero-copy h1 { max-width: 16ch; }
  .feature-grid,
  .download-grid { grid-template-columns: 1fr; }
  .button { width: 100%; justify-content: center; }
  .hero-actions .button { width: 100%; }
}
