/* Token DB marketing site.
 *
 * The same design language as the portal — docs/DESIGN.md — restated here rather than imported,
 * because this deploys as static files with no build step and no shared bundle. Two copies of a
 * token block is the price of the marketing site having no toolchain at all; keep them in step,
 * and if they drift far enough to matter, that is the moment to give this a build.
 */

:root {
  color-scheme: light dark;

  --bg: #F6F9FC;
  --panel: #FFFFFF;
  --border: #E3E8EE;
  --border-soft: #EEF2F7;
  --text: #0A2540;
  --text-dim: #425466;
  --accent: #635BFF;
  --accent-ink: #FFFFFF;
  --focus: #635BFF;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-sm: .8125rem;
  --text-base: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.75rem;

  --weight-medium: 500;
  --weight-semibold: 600;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --width-page: 68rem;
  --width-prose: 42rem;

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgb(10 37 64 / .06);
  --shadow-md: 0 2px 5px -1px rgb(50 50 93 / .18), 0 1px 3px -1px rgb(10 37 64 / .18);

  --duration-fast: 120ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --touch: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1628;
    --panel: #121D2F;
    --border: #2A3A54;
    --border-soft: #1E2C42;
    --text: #EDF2F7;
    --text-dim: #8FA3BF;
    --accent: #8B85FF;
    --accent-ink: #0A1628;
    --focus: #8B85FF;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-md: 0 2px 5px -1px rgb(0 0 0 / .45), 0 1px 3px -1px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--width-page); margin: 0 auto; padding: 0 var(--space-4); }

a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--space-4); top: var(--space-4); z-index: 20;
  background: var(--panel); color: var(--text); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}

code {
  font-family: var(--font-mono); font-size: .9em;
  background: var(--border-soft); padding: .1em .35em; border-radius: 4px;
}

/* --- masthead ------------------------------------------------------------ */

.masthead { border-bottom: 1px solid var(--border); background: var(--panel); }
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding-top: var(--space-4); padding-bottom: var(--space-4);
}
.brand {
  font-weight: var(--weight-semibold); letter-spacing: .02em;
  text-decoration: none; color: var(--text); font-size: var(--text-md);
}
.masthead nav { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.masthead nav a { color: var(--text-dim); text-decoration: none; font-size: var(--text-base); }
.masthead nav a:hover { color: var(--text); }

/* --- calls to action ------------------------------------------------------ */

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch);
  padding: var(--space-2) var(--space-5);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: var(--radius-md);
  text-decoration: none; font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-sm);
  transition: filter var(--duration-fast) var(--ease);
}
.cta:hover { filter: brightness(1.08); }
.cta--ghost {
  background: none; color: var(--accent); border-color: var(--border); box-shadow: none;
}
.cta--ghost:hover { border-color: var(--accent); }
.cta--small { min-height: auto; padding: var(--space-1) var(--space-3); font-size: var(--text-base); }

.install { margin: var(--space-5) 0 var(--space-2); color: var(--text-dim); font-size: var(--text-base); }
.cmd {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); max-width: var(--width-prose);
  overflow-x: auto; box-shadow: var(--shadow-sm);
}
.cmd code { background: none; padding: 0; font-size: var(--text-base); white-space: pre; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-5) 0 0; }

/* --- hero ----------------------------------------------------------------- */

.hero { padding: var(--space-8) 0 var(--space-7); }
h1 {
  font-size: var(--text-3xl); line-height: 1.15; margin: 0;
  letter-spacing: -.02em; font-weight: var(--weight-semibold);
  max-width: 20ch;
}
.lede {
  font-size: var(--text-lg); color: var(--text-dim);
  max-width: var(--width-prose); margin: var(--space-4) 0 0;
}
.lede--narrow { max-width: 36rem; }
.fineprint { color: var(--text-dim); font-size: var(--text-base); margin: var(--space-4) 0 0; }

/* --- bands ---------------------------------------------------------------- */

.band { padding: var(--space-7) var(--space-4); border-top: 1px solid var(--border); }
h2 {
  font-size: var(--text-2xl); margin: 0 0 var(--space-5);
  letter-spacing: -.015em; font-weight: var(--weight-semibold);
}
h3 { font-size: var(--text-md); margin: 0 0 var(--space-2); font-weight: var(--weight-semibold); }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

/* Numbered because the order is real: read, send, answer. The counter is generated rather than
   typed so the markup stays an ordered list and a screen reader announces the position itself. */
.how { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.how li { counter-increment: step; padding-left: var(--space-7); position: relative; }
.how li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.75rem; height: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
}
.how p { color: var(--text-dim); max-width: var(--width-prose); }

.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
}
.card p { color: var(--text-dim); font-size: var(--text-base); }

/* --- footer --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding-top: var(--space-5); padding-bottom: var(--space-7);
  color: var(--text-dim); font-size: var(--text-base);
}
.footer a { color: var(--text-dim); }

@media (max-width: 640px) {
  .hero { padding: var(--space-6) 0 var(--space-5); }
  h1 { font-size: var(--text-xl); }
  .lede { font-size: var(--text-md); }
  .band { padding: var(--space-6) var(--space-4); }
  h2 { font-size: var(--text-xl); }
  .masthead-inner { flex-wrap: wrap; gap: var(--space-3); }
  .actions .cta { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
