/* ===== Tokens ===== */
:root {
  --ink: #0B1F1C;
  --bahari: #0D5C55;
  --karafuu: #D9542D;
  --mint: #5ECFAC;
  --karatasi: #FAF6EF;
  --kivuli: #5A6B68;

  --ink-10: rgba(11, 31, 28, 0.1);
  --ink-06: rgba(11, 31, 28, 0.06);
  --karatasi-12: rgba(250, 246, 239, 0.12);
  --karatasi-24: rgba(250, 246, 239, 0.24);
  --karatasi-50: rgba(250, 246, 239, 0.5);
  --karatasi-60: rgba(250, 246, 239, 0.6);
  --karatasi-72: rgba(250, 246, 239, 0.72);

  --font-display: "Bricolage Grotesque", serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --shell-width: 1120px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
}

/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--karatasi);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.shell {
  max-width: var(--shell-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ===== Type ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--karafuu);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  margin-bottom: var(--space-2);
}

.section-title--inverse { color: var(--karatasi); }

.section-sub {
  color: var(--kivuli);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.section-sub--inverse { color: var(--karatasi-60); }

.subtle-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kivuli);
  margin-bottom: var(--space-2);
}

/* ===== Stats ===== */
.stats { padding-bottom: var(--space-2); }

.stats__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stats__num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}

.stats__num--spark { color: var(--karafuu); }

.stats__label {
  color: var(--kivuli);
  font-size: 0.88rem;
}

@media (min-width: 700px) {
  .stats__row { flex-direction: row; gap: var(--space-6); }
}

/* ===== Who it's for ===== */
.who { padding-block: var(--space-2) var(--space-6); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }

.btn--lg { padding: 0.9rem 1.6rem; font-size: 1rem; }

.btn--bahari { background: var(--bahari); color: var(--karatasi); }

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

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

.btn--outline-inverse { background: transparent; color: var(--karatasi); border-color: var(--karatasi-24); }

/* ===== Nav ===== */
.nav {
  background: var(--karatasi);
  border-bottom: 1px solid var(--ink-10);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav__links {
  display: none;
  gap: var(--space-4);
  font-size: 0.95rem;
  color: var(--kivuli);
}

.nav__links a:hover { color: var(--ink); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__login {
  font-size: 0.95rem;
  color: var(--ink);
  display: inline;
}

@media (min-width: 860px) {
  .nav__links { display: flex; }
}

/* ===== Route-line motif ===== */
.route--horizontal {
  position: relative;
  height: 1px;
  border-top: 1px dashed var(--karafuu);
  margin-block: var(--space-6);
}

.route--horizontal .route__node {
  position: absolute;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--karafuu);
  background: var(--karatasi);
}

.route--horizontal .route__node:first-child { left: 0; }
.route--horizontal .route__node:nth-child(2) { left: 50%; transform: translateX(-50%); }
.route--horizontal .route__node:last-child { right: 0; left: auto; }

.route--vertical {
  position: absolute;
  left: 50%;
  top: 40px;
  bottom: -32px;
  transform: translateX(-50%);
  border-left: 1px dashed var(--karafuu);
}

/* ===== Hero ===== */
.hero { padding-block: var(--space-6) var(--space-5); }

.hero__grid {
  display: grid;
  gap: var(--space-5);
}

.hero__headline {
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  margin-bottom: var(--space-3);
}

.hero__sub {
  color: var(--kivuli);
  font-size: 1.1rem;
  max-width: 52ch;
  margin-bottom: var(--space-4);
}

.hero__benefits {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}

.hero__benefits li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--kivuli);
  font-size: 0.92rem;
}

.hero__benefits svg { flex-shrink: 0; color: var(--bahari); }
.hero__benefits strong { color: var(--ink); font-weight: 600; }

.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.15fr 1fr; align-items: center; }
}

/* ===== Code panels ===== */
.code-panel {
  background: var(--ink);
  border-radius: 12px;
  padding: var(--space-3);
  overflow-x: auto;
}

.code-panel__dots { display: flex; gap: 6px; margin-bottom: var(--space-3); }

.code-panel__dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--karatasi-24);
}

.code-panel__dots span:last-child { background: var(--mint); }

.code-panel__body {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--karatasi);
  white-space: pre;
}

.code-panel__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--karatasi-24);
  margin-bottom: var(--space-2);
}

.tok-path-plain { color: var(--mint); }

.tok-method { color: var(--karafuu); font-weight: 700; }
.tok-path { color: var(--karatasi); }
.tok-key { color: var(--mint); }
.tok-str { color: var(--karatasi-24); }
.tok-num { color: var(--mint); }
.tok-muted { color: var(--karatasi-24); }
.tok-status { color: var(--karafuu); }
.tok-status-ok { color: var(--mint); }

/* ===== Shared inline list row (used by the "Built for" strip) ===== */
.methods__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
  font-weight: 500;
  color: var(--kivuli);
  font-size: 1rem;
}

.methods__row li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

@media (min-width: 900px) {
  .methods__row { justify-content: space-between; flex-wrap: nowrap; }
}

/* Mobile money provider logos: used on the methods strip, the hero mock
   and the payment-link checkout channel picker. */
.money-logo {
  height: 28px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--ink-10);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.money-logo img {
  height: 100%;
  width: auto;
  max-width: 76px;
  object-fit: contain;
  display: block;
}

/* Placeholder for channels without official logo art yet (Card, Bank Transfer). */
.money-logo--text {
  padding-inline: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--kivuli);
  white-space: nowrap;
}

/* ===== Hero brand panel ===== */
.brand-panel {
  background: #fff;
  border: 1px solid var(--ink-10);
  border-radius: 16px;
  padding: var(--space-4);
  box-shadow: 0 24px 48px -24px rgba(11, 31, 28, 0.22);
}

.phone-mock__label {
  font-size: 0.8rem;
  color: var(--kivuli);
  margin-bottom: var(--space-3);
}

.brand-hero-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== How it works ===== */
.how { padding-block: var(--space-6); }

.how__steps { max-width: 640px; }

.how__step { display: flex; gap: var(--space-3); }

.how__marker { position: relative; flex-shrink: 0; }

.how__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--karatasi);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.how__body { padding-bottom: var(--space-5); }

.how__body h3 { font-size: 1.15rem; margin-bottom: 6px; }

.how__body p { color: var(--kivuli); max-width: 44ch; }

.how__step:last-child .how__body { padding-bottom: 0; }

/* ===== Developers ===== */
.devs { padding-block: var(--space-6); }

.devs__panel { max-width: 780px; }

.tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.tabs__btn {
  padding: 0.5rem 1rem;
  border-radius: 8px 8px 0 0;
  font-size: 0.9rem;
  color: var(--kivuli);
  border: 1px solid transparent;
}

.tabs__btn.is-active {
  background: var(--ink);
  color: var(--karatasi);
}

.code-panel--devs { margin-bottom: var(--space-3); }

.code-panel--webhook { border: 1px solid var(--ink-10); background: var(--ink); }

/* ===== Dashboard preview ===== */
.dash { padding-block: var(--space-6); }

.dash__frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ink-10);
}

.dash__card { background: var(--karatasi); padding: var(--space-4); }

.dash__cardhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--ink-10);
}

.dash__cardtitle { font-weight: 500; }

.dash__date { font-family: var(--font-mono); color: var(--kivuli); font-size: 0.9rem; }

.dash__tablewrap { overflow-x: auto; }

.dash__table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9rem; }

.dash__table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kivuli);
  padding: var(--space-1) var(--space-2) var(--space-1) 0;
  border-bottom: 1px solid var(--ink-10);
  white-space: nowrap;
}

.dash__table td {
  padding: 0.6rem var(--space-2) 0.6rem 0;
  border-bottom: 1px solid var(--ink-06);
  white-space: nowrap;
}

.dash__table tbody tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.pill--settled { background: var(--mint); color: var(--ink); }
.pill--pending { background: rgba(217, 84, 45, 0.14); color: var(--karafuu); }

.dash__chartlabel {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kivuli);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.dash__chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
  height: 90px;
}

.dash__chart span {
  flex: 1;
  height: var(--h);
  background: var(--mint);
  border-radius: 4px 4px 0 0;
}

/* ===== Full-bleed ink band ===== */
.band-ink { background: var(--ink); color: var(--karatasi); }

/* ===== Pricing ===== */
.pricing { padding-block: var(--space-6); }

.pricing__grid {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 780px) {
  .pricing__grid { grid-template-columns: repeat(3, 1fr); }
}

.price-card {
  border: 1px solid var(--karatasi-12);
  border-radius: 8px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.price-card h3 { color: var(--karatasi); font-size: 1.2rem; }

.price-card__desc { color: var(--karatasi-60); font-size: 0.9rem; min-height: 2.6em; }

.price-card__fee {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mint);
  margin-block: var(--space-1);
}

.price-card__fee span { font-size: 0.95rem; color: var(--karatasi-60); font-weight: 400; }

.price-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--karatasi-72);
  margin-bottom: var(--space-2);
  flex-grow: 1;
}

.price-card__list li { padding-left: 1rem; position: relative; }

.price-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.price-card .btn { align-self: flex-start; }

/* ===== Trust ===== */
.trust { padding-block: var(--space-6); }

.trust__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .trust__grid { grid-template-columns: repeat(3, 1fr); }
}

.trust__item { border-top: 1px solid var(--ink-10); padding-top: var(--space-2); }

.trust__item h3 { font-size: 1rem; margin-bottom: 6px; }

.trust__item p { color: var(--kivuli); font-size: 0.92rem; }

/* ===== Final CTA ===== */
.cta { padding-block: var(--space-6); }

.cta__inner { text-align: left; }

.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ===== Footer ===== */
.footer { padding-top: var(--space-6); }

.footer__grid {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}

@media (min-width: 700px) {
  .footer__grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

.footer__addr { color: var(--karatasi-50); font-size: 0.88rem; line-height: 1.6; }

.footer__col h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--karatasi-24);
  margin-bottom: var(--space-2);
}

.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer__col a { color: var(--karatasi); font-size: 0.9rem; }

.footer__col a:hover { color: var(--mint); }

.footer__bottom {
  border-top: 1px solid var(--karatasi-12);
  padding-block: var(--space-3);
  font-size: 0.82rem;
  color: var(--karatasi-24);
}

/* ===== Auth (signup / checkout forms) ===== */
.auth {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-6);
}

.auth__card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--ink-10);
  border-radius: 16px;
  padding: var(--space-4);
}

.auth__card h1 { font-size: 1.5rem; margin-bottom: var(--space-1); }

.auth__sub { color: var(--kivuli); font-size: 0.95rem; margin-bottom: var(--space-4); }

.field { margin-bottom: var(--space-2); }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ink-10);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--karatasi);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--bahari);
}

.auth__error {
  background: rgba(217, 84, 45, 0.1);
  color: var(--karafuu);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  margin-bottom: var(--space-3);
}

.auth__submit { width: 100%; justify-content: center; }

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.channel-tile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--ink-10);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--karatasi);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.channel-tile:hover { background: #fff; }

.channel-tile.is-selected {
  background: #fff;
  border-color: var(--bahari);
  box-shadow: 0 0 0 1px var(--bahari);
}

.channel-tile__name { font-size: 0.9rem; font-weight: 500; }

.auth__footer {
  text-align: center;
  margin-top: var(--space-3);
  font-size: 0.9rem;
  color: var(--kivuli);
}

.auth__footer a { color: var(--bahari); font-weight: 500; }
