/* SoftLedger — design system (see brand/TOKENS.md) */

:root {
  --sl-ink: #0b1220;
  --sl-ink-2: #1e293b;
  --sl-muted: #64748b;
  --sl-faint: #94a3b8;
  --sl-teal: #0d9488;
  --sl-teal-light: #14b8a6;
  --sl-teal-dark: #0f766e;
  --sl-indigo: #6366f1;
  --sl-indigo-dark: #4f46e5;
  --sl-bg: #ffffff;
  --sl-bg-alt: #f4f7fa;
  --sl-bg-dark: #0b1220;
  --sl-text-on-dark: #e2e8f0;
  --sl-line: #e2e8f0;
  --sl-line-strong: #cbd5e1;
  --sl-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sl-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fs-display: clamp(2.25rem, 1.1rem + 4vw, 3.75rem);
  --fs-h2: clamp(1.625rem, 1rem + 2vw, 2.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-mono: 0.8125rem;
  --sect-y: clamp(4.5rem, 3rem + 5vw, 7rem);
  --radius: 12px;
  --radius-btn: 10px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.06), 0 8px 24px rgba(11, 18, 32, 0.06);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--sl-font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--sl-ink);
  background: var(--sl-bg);
}

a { color: var(--sl-teal); text-decoration: none; }
a:hover { color: var(--sl-teal-dark); text-decoration: underline; }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sl-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--sl-ink);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo-link:hover { text-decoration: none; color: var(--sl-ink); }
.logo-link img { width: 36px; height: 36px; }
.logo-link span em { font-style: normal; color: var(--sl-teal); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: var(--fs-small);
  font-weight: 500;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-family: var(--sl-font);
  font-size: var(--fs-small);
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--sl-teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--sl-teal-dark);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border-color: var(--sl-line-strong);
  color: var(--sl-ink);
}
.btn-outline:hover {
  border-color: var(--sl-teal);
  color: var(--sl-teal);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: var(--sect-y) 0 calc(var(--sect-y) * 0.75);
  background: linear-gradient(180deg, var(--sl-bg-alt) 0%, var(--sl-bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.eyebrow {
  font-family: var(--sl-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sl-teal);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.hero-lead {
  font-size: 1.1875rem;
  color: var(--sl-muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-panel {
  background: var(--sl-bg-dark);
  color: var(--sl-text-on-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  font-family: var(--sl-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  overflow-x: auto;
}

.hero-panel .kw { color: var(--sl-teal-light); }
.hero-panel .str { color: #a5f3fc; }
.hero-panel .cmt { color: var(--sl-faint); }

/* Sections */
section { padding: var(--sect-y) 0; }
section.alt { background: var(--sl-bg-alt); }

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

.section-head p {
  color: var(--sl-muted);
  margin: 0;
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover h3 { color: var(--sl-teal); }

/* Quickstart steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.step {
  padding: 1.25rem 1.5rem;
  background: var(--sl-bg);
  border: 1px solid var(--sl-line);
  border-radius: var(--radius);
}

.step strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sl-ink);
}

.step p {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--sl-muted);
}

.step code {
  font-family: var(--sl-mono);
  font-size: 0.8125rem;
  background: var(--sl-bg-alt);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.hero-note { margin-top: 1.25rem; }

.api-row--dev { border-style: dashed; opacity: 0.92; }

.card h3 code {
  font-family: var(--sl-mono);
  font-size: 0.9em;
  font-weight: 500;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--sl-bg);
  border: 1px solid var(--sl-line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--sl-teal);
  box-shadow: var(--shadow);
}

.card-tag {
  font-family: var(--sl-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sl-indigo);
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.card p {
  font-size: var(--fs-small);
  color: var(--sl-muted);
  margin: 0;
}

/* Color chips strip */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sl-mono);
  font-size: 0.75rem;
  color: var(--sl-muted);
}

.chip-swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* API strip */
.api-strip {
  display: grid;
  gap: 0.75rem;
}

.api-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1rem;
  padding: 0.875rem 1rem;
  background: var(--sl-bg);
  border: 1px solid var(--sl-line);
  border-radius: var(--radius-btn);
  font-family: var(--sl-mono);
  font-size: 0.8125rem;
}

.api-row .method {
  font-weight: 600;
  color: var(--sl-teal);
  min-width: 2.5rem;
}

.api-row .path { color: var(--sl-ink); flex: 1; }
.api-row .desc { color: var(--sl-muted); font-family: var(--sl-font); font-size: var(--fs-small); width: 100%; }

/* Footer */
.site-footer {
  background: var(--sl-bg-dark);
  color: var(--sl-text-on-dark);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

.site-footer a { color: var(--sl-teal-light); }
.site-footer p, .site-footer li { color: var(--sl-faint); font-size: var(--fs-small); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem;
  color: var(--sl-faint);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.15);
  color: var(--sl-teal-light);
  font-family: var(--sl-mono);
  font-size: 0.75rem;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sl-teal-light);
}

@media (max-width: 720px) {
  .nav { display: none; }
}
