@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,500&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ---------- Design tokens: "ledger / passbook" system ---------- */
:root {
  color-scheme: light;

  --paper: #f6efdd;
  --paper-raised: #fffcf5;
  --paper-sunken: #ede2c4;
  --rule: #ddcd9f;
  --rule-strong: #c3ac6c;

  --ink: #241d12;
  --ink-soft: #6b5f47;
  --ink-faint: #9c8f71;

  --navy: #1d2c4c;
  --navy-deep: #131e36;
  --navy-bg: #e7ebf1;

  --vermillion: #a83a28;
  --vermillion-deep: #862d1e;
  --vermillion-bg: #f3e3dd;

  --forest: #2e5233;
  --forest-bg: #e2ebdf;

  --error: #a1291b;
  --error-bg: #f4e2dc;

  --brass: #9c7a34;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(36, 29, 18, 0.06), 0 8px 24px -12px rgba(36, 29, 18, 0.18);
  --shadow-lift: 0 4px 8px rgba(36, 29, 18, 0.08), 0 20px 40px -16px rgba(36, 29, 18, 0.25);

  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, Segoe UI, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
::selection { background: var(--vermillion); color: var(--paper-raised); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  margin: 0;
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
  background-image:
    radial-gradient(ellipse 900px 500px at 8% -10%, rgba(29, 44, 76, 0.05), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(168, 58, 40, 0.05), transparent 55%);
  background-repeat: no-repeat;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 2em; font-weight: 700; margin: 0 0 0.35em; }
h2 { font-size: 1.3em; font-weight: 700; margin: 2em 0 0.6em; }
h3 { font-size: 1.05em; font-weight: 600; margin: 0 0 0.4em; }

a { color: var(--navy); }
a:hover { color: var(--vermillion); }

code, .mono { font-family: var(--font-mono); }

.lede { color: var(--ink-soft); max-width: 62ch; font-size: 1.05em; }

/* ---------- Layout shell ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--rule);
  background: rgba(246, 239, 221, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--vermillion);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 700;
  color: var(--vermillion);
  transform: rotate(-8deg);
  flex-shrink: 0;
}

.topbar nav { display: flex; align-items: center; gap: 22px; }

.topbar nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95em;
}
.topbar nav a:hover { color: var(--navy); }

.worker-name {
  color: var(--ink-faint);
  font-size: 0.88em;
  padding-left: 6px;
  border-left: 1px solid var(--rule);
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 32px 40px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.88em;
}

/* ---------- Buttons ---------- */
button, .btn {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--paper-raised);
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:hover, .btn:hover { background: var(--navy-deep); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule-strong);
}
.btn-ghost:hover { background: var(--paper-raised); border-color: var(--navy); color: var(--navy); box-shadow: none; }

.btn-stamp {
  background: var(--vermillion);
}
.btn-stamp:hover { background: var(--vermillion-deep); }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-card);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 4px;
  background: var(--brass);
  border-radius: 0 3px 3px 0;
  opacity: 0.55;
}

form.card label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--ink-soft);
}

form.card input, form.card select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  font-size: 1em;
  font-family: var(--font-body);
  background: var(--paper-sunken);
  color: var(--ink);
}
form.card input:focus, form.card select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-bg);
}

form.card button { margin-top: 6px; }

/* ---------- Alerts / status text ---------- */
.error { color: var(--error); font-weight: 600; }
.ok { color: var(--forest); font-weight: 600; }

.badge {
  display: inline-block;
  background: var(--vermillion-bg);
  color: var(--vermillion-deep);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Tables ---------- */
table.records {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.94em;
}
table.records th {
  text-align: left;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  border-bottom: 2px solid var(--rule-strong);
}
table.records td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px dashed var(--rule);
}
table.records tbody tr:hover { background: var(--paper-sunken); }
table.records td.amount, table.records th.amount { font-family: var(--font-mono); }

/* ---------- Stat tiles ---------- */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0;
}

.stat {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 160px;
  flex: 1 1 160px;
}

.stat-label { display: block; font-size: 0.8em; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { display: block; font-size: 1.5em; font-weight: 700; font-family: var(--font-mono); color: var(--ink); margin-top: 2px; }
.stat-sub { display: block; font-size: 0.8em; color: var(--ink-faint); margin-top: 2px; }

/* ---------- Misc app bits ---------- */
.raw-text pre {
  white-space: pre-wrap;
  background: var(--paper-sunken);
  border: 1px solid var(--rule);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  font-family: var(--font-mono);
}

.hash code { word-break: break-all; font-size: 0.85em; }

/* Verification stamp */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2.5px dashed var(--forest);
  color: var(--forest);
  background: var(--forest-bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transform: rotate(-2deg);
}
.stamp.stamp-fail { border-color: var(--error); color: var(--error); background: var(--error-bg); }

/* ================================================================
   Home / marketing page
   ================================================================ */
.home-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 64px 32px 48px;
  max-width: 1180px;
  margin: 0 auto;
}

/* No opacity-hiding entrance animation on primary content: it's not worth
   the risk of a headless renderer, crawler, or link-preview generator
   capturing the page mid-animation (or never animating it at all) and
   showing a blank hero -- confirmed this actually happens. Content is
   visible immediately; the design carries itself on type/color/layout. */
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78em;
  color: var(--vermillion);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 14px;
}

.home-hero h1 {
  font-size: 3em;
}
.home-hero h1 em {
  font-style: normal;
  color: var(--vermillion);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.home-hero .lede { margin-bottom: 28px; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Passbook mockup */
.passbook {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 26px 24px;
  position: relative;
  transform: rotate(1.5deg);
}
.passbook::before {
  content: '';
  position: absolute;
  left: 22px; top: 0; bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 12px);
}
.passbook-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-left: 20px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 700;
}
.passbook-head small { font-family: var(--font-mono); font-weight: 400; color: var(--ink-faint); font-size: 0.6em; text-transform: uppercase; letter-spacing: 0.08em; }

.passbook-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0 9px 20px;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.92em;
}
.passbook-row .plat { font-weight: 600; }
.passbook-row .amt { font-family: var(--font-mono); font-weight: 600; }
.passbook-row .period { color: var(--ink-faint); font-size: 0.85em; display: block; }

.passbook-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 0 20px;
  margin-top: 6px;
  font-weight: 700;
}
.passbook-total .amt { font-family: var(--font-mono); font-size: 1.15em; }

.passbook-stamp {
  position: absolute;
  right: 18px;
  bottom: -14px;
  border: 2px dashed var(--vermillion);
  color: var(--vermillion);
  border-radius: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-14deg);
  background: rgba(246, 239, 221, 0.9);
}

/* Stat band */
.stat-band {
  background: var(--navy);
  color: var(--paper);
  padding: 56px 32px;
}
.stat-band-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat-band .stat-block {
  padding: 0 32px;
  text-align: left;
  border-left: 1px solid rgba(246, 239, 221, 0.18);
}
.stat-band .stat-block:first-child { border-left: none; padding-left: 0; }
.stat-band .stat-block .num {
  font-family: var(--font-mono);
  font-size: 2.6em;
  font-weight: 700;
  display: block;
  color: #fff;
}
.stat-band .stat-block .cap { color: rgba(246, 239, 221, 0.75); font-size: 0.95em; margin-top: 6px; display: block; }

/* Section shell */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 72px 32px;
}
.section-head { max-width: 620px; margin-bottom: 40px; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 44px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 1.4em;
  font-weight: 700;
  color: var(--rule-strong);
  display: block;
  margin-bottom: 8px;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 12px;
  left: calc(100% - 6px);
  width: calc(100% - 36px);
  border-top: 2px dashed var(--rule-strong);
  display: none;
}
@media (min-width: 900px) {
  .step:not(:last-child)::after { display: block; }
}
.step h3 { margin-top: 0; }
.step p { color: var(--ink-soft); font-size: 0.95em; margin: 0; }

/* Trust cards */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.trust-grid .card { margin: 0; }
.trust-grid .card h3 { font-family: var(--font-body); font-weight: 700; }

/* Platform badges */
.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.platform-chip {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95em;
}

/* Final CTA band */
.cta-band {
  background: var(--vermillion);
  color: #fff;
  text-align: center;
  padding: 72px 32px;
}
.cta-band h2 { color: #fff; margin-top: 0; font-size: 1.9em; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 50ch; margin: 0 auto 28px; }
.cta-band .btn { background: #fff; color: var(--vermillion-deep); }
.cta-band .btn:hover { background: var(--paper-raised); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; padding: 40px 20px; gap: 36px; }
  .home-hero h1 { font-size: 2.1em; }
  .passbook { transform: none; }
  .stat-band-inner { grid-template-columns: 1fr; gap: 28px; }
  .stat-band .stat-block { border-left: none; padding-left: 0; border-top: 1px solid rgba(246,239,221,0.18); padding-top: 20px; }
  .stat-band .stat-block:first-child { border-top: none; padding-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 18px; flex-wrap: wrap; gap: 10px; }
  .topbar nav { gap: 14px; }
  .section { padding: 48px 20px; }
}
