/* ==========================================================
   Mutual Ledger — global styles
   Mobile-first. Wrapper class: .tally
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #131415;
  --surface: #1a1b1d;
  --raised: #212325;
  --border: #2d2f31;
  --text: #eeeeea;
  --muted: #8e9093;
  --accent: #F1D922;
  --on-accent: #131415;
  --radius: 6px;
  --top-h: 64px;
}

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

html, body {
  margin: 0;
  background: #131415;
  color: var(--text);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }

/* ---------- Wrapper ---------- */
.tally {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(241, 217, 34, .18); }
.btn svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.btn-sm { padding: 9px 16px; font-size: 13px; gap: 7px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 20, 21, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-in {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-h);
}
.logo img { height: 32px; width: auto; }

.nav {
  display: none;
  position: absolute;
  top: var(--top-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
}
.nav.open { display: block; }
.nav-in { display: flex; flex-direction: column; }
.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 20px;
}
.nav a:hover, .nav a.on { color: var(--text); text-decoration: none; }

.top-right { display: flex; align-items: center; gap: 10px; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Homepage: hero (typographic opener) ---------- */
.opener { padding-top: 64px; padding-bottom: 56px; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.opener h1 {
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  font-weight: 700;
  max-width: 14ch;
}
.opener h1 em { font-style: normal; color: var(--accent); }

.opener .lede {
  margin-top: 22px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
}
.opener .cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}
.opener .cta-note { font-size: 13px; color: var(--muted); }

/* Ledger strip — CSS mock of balances */
.ledger {
  margin-top: 52px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .who { font-weight: 600; }
.ledger-row .who span { color: var(--muted); font-weight: 400; }
.ledger-row .amt { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.ledger-row .amt.owe { color: var(--accent); }
.ledger-row .amt.even { color: var(--muted); font-weight: 500; }
.ledger-row .memo { grid-column: 1 / -1; order: 2; font-size: 13px; color: var(--muted); }

/* ---------- Section scaffolding ---------- */
.sect { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--border); }
.sect-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.sect h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; max-width: 22ch; }
.sect-intro { margin-top: 14px; color: var(--muted); max-width: 560px; }

/* ---------- Features: definition list ---------- */
.defs { margin: 40px 0 0; padding: 0; }
.def {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.def:last-child { border-bottom: 1px solid var(--border); }
.def dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
}
.def dd { margin: 0; }
.def dd strong { display: block; font-size: 18px; margin-bottom: 4px; }
.def dd p { color: var(--muted); }

/* ---------- Illustration band ---------- */
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-in {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.band-art {
  max-width: 320px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.band h2 { font-size: clamp(1.6rem, 3.8vw, 2.3rem); font-weight: 700; }
.band-steps { list-style: none; margin: 26px 0 0; padding: 0; counter-reset: stp; }
.band-steps li {
  counter-increment: stp;
  position: relative;
  padding: 0 0 18px 44px;
  color: var(--muted);
}
.band-steps li::before {
  content: counter(stp, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.band-steps li strong { color: var(--text); font-weight: 600; }

/* ---------- Trust: check list ---------- */
.checks { list-style: none; margin: 32px 0 0; padding: 0; max-width: 640px; }
.checks li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.checks li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
}
.checks li span { color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }

/* ---------- Closing CTA ---------- */
.closer { text-align: center; }
.closer h2 { margin: 0 auto; }
.closer .sect-intro { margin-left: auto; margin-right: auto; }
.closer .btn { margin-top: 30px; }

/* ---------- Inner pages ---------- */
.inner-head { padding-top: 56px; padding-bottom: 32px; }
.inner-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
.inner-head p { margin-top: 12px; color: var(--muted); max-width: 600px; }
.inner-head .stamp { margin-top: 10px; font-size: 13px; color: var(--muted); }

.cards { display: grid; grid-template-columns: 1fr; gap: 14px; padding-bottom: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 22px;
}
.card h2, .card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.card p, .card li { color: var(--muted); }
.card p + p { margin-top: 10px; }
.card ul { margin: 8px 0 0; padding-left: 18px; }
.card .num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.card.accent { border-color: var(--accent); background: var(--raised); }
.card .big { font-size: 20px; font-weight: 700; color: var(--text); word-break: break-word; }

.pair { display: grid; grid-template-columns: 1fr; gap: 14px; padding-bottom: 72px; }
.legal-note { padding-bottom: 72px; font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); padding-top: 32px; padding-bottom: 40px; }
.foot-in { display: flex; flex-direction: column; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--text); text-decoration: none; }
.foot small { color: var(--muted); font-size: 13px; }

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .logo img { height: 24px; }
  .btn-sm { padding: 8px 12px; }
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 760px) {
  .tally { padding-left: 32px; padding-right: 32px; }

  .nav { display: block; position: static; border: none; background: transparent; padding: 0; }
  .nav-in { flex-direction: row; gap: 6px; }
  .nav a { padding: 8px 12px; font-size: 14px; }
  .burger { display: none; }

  .opener { padding-top: 104px; padding-bottom: 80px; }

  .ledger-row { grid-template-columns: 1.2fr 2fr auto; align-items: center; }
  .ledger-row .memo { grid-column: auto; order: 0; }

  .def { grid-template-columns: 220px 1fr; gap: 32px; padding: 28px 0; }
  .def dt { padding-top: 4px; }

  .band-in { grid-template-columns: 340px 1fr; gap: 64px; padding-top: 88px; padding-bottom: 88px; }
  .band-art { margin: 0; }

  .cards.two { grid-template-columns: 1fr 1fr; }
  .pair { grid-template-columns: 1fr 1fr; }

  .foot-in { flex-direction: row; justify-content: space-between; align-items: center; }
}
