/* Inkk, typed. Black and white only: white for what matters, greys for the rest, no accent colour.
   One monospace face for everything; boxes are typed frames (frames.css, generated by scripts/gen-frames.mjs);
   titles are FIGlet (fonts/); art is ASCII (js/ascii/). See DESIGN.md. */
:root {
  color-scheme: dark;
  --night: #060606;        /* hero ground, behind the cloth */
  --ground: #0a0a0a;       /* page ground */
  --panel: #0d0d0d;        /* inside a typed frame */
  --white: #ededed;        /* headings, the main action, eyes */
  --ink: #bdbdbd;          /* body text */
  --muted: #8a8a8a;        /* secondary text (5.9:1 on ground) */
  --soft: #5c5c5c;         /* brackets, rules, frame lines */
  --faint: #2a2a2a;
  --line: rgba(237, 237, 237, .12);
  --line-2: rgba(237, 237, 237, .22);

  /* the old names, still used by the app and docs styles */
  --paper: var(--panel);
  --page: var(--ground);
  --line-strong: var(--line-2);
  --dim-ink: var(--muted);
  --on-night: var(--white);
  --night-muted: var(--muted);
  --night-soft: var(--ink);
  --night-line: var(--line);

  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: var(--mono);
  --text: var(--mono);
  --lh: 1.538;

  --gutter: 32px;
  --radius: 0;
  --radius-sm: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/var(--lh) var(--mono);
  font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0;   /* typed text: no -> arrows bending the art */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
b, strong { color: var(--white); font-weight: 700; }
pre { margin: 0; font: inherit; }
:focus-visible { outline: 1px dashed var(--white); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: var(--white); color: var(--night); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--white); color: var(--night); padding: 6px 12px; }
.skip:focus { top: 16px; }
.wrap { width: min(1200px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.i { width: 14px; height: 14px; flex: none; }
.center { text-align: center; }

/* Type */
.display { font-family: var(--mono); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: var(--white); }
.h2 { font-size: clamp(28px, 3.8vw, 46px); }
.h3 { font-size: 22px; line-height: 1.2; }
.dim { color: var(--muted); }
.dim-ink { color: var(--muted); }
.kicker { font: 500 12px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kicker::before { content: "// "; color: var(--soft); }
.fine { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.chip { display: inline-block; margin-left: 6px; color: var(--white); text-transform: none; letter-spacing: 0; }
.chip::before { content: "["; color: var(--soft); }
.chip::after { content: "]"; color: var(--soft); }
.pill { display: inline-block; color: var(--white); font-size: 11.5px; }
.pill::before { content: "["; color: var(--soft); }
.pill::after { content: "]"; color: var(--soft); }

/* Typed art */
.micro { font: 700 9.5px/1.08 var(--mono); color: var(--white); white-space: pre; }
.micro .shine { font-weight: 800; }
.micro .ink { font-style: normal; color: inherit; }
.drop-art { font: 400 clamp(12px, 1.5vw, 21px)/1.16 var(--mono); color: var(--ink); white-space: pre; }
.drop-art .ink { font-style: normal; color: var(--soft); }
.drop-art .shine { color: var(--white); font-weight: 800; }
.fig { font: 400 clamp(5.6px, 1.12vw, 12.5px)/1.12 var(--mono); color: var(--soft); white-space: pre; }
.fig b { color: var(--white); font-weight: 800; }

/* Marks kept for older markup */
.tile { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; background: var(--white); color: var(--night); }
.tile svg { width: 74%; height: 74%; }
.tile-ink { background: var(--panel); color: var(--white); }
.tile-sm { width: 32px; height: 32px; }
.tile-lg { width: 64px; height: 64px; }
.wordmark { height: 22px; width: calc(22px * 661 / 216); color: currentColor; }
.coin { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; background: var(--white); color: var(--night); }
.coin svg { width: 60%; height: 60%; }
.coin-light { background: var(--white); color: var(--night); }
.coin-sm { width: 26px; height: 26px; }
.coin-lg { width: 56px; height: 56px; }

/* Buttons: [ like this ]. The main action is a white block. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  min-height: 2.2em; padding: 0 .6em; border: 0; background: none; cursor: pointer;
  font: 700 14px/1 var(--mono); color: var(--white); white-space: nowrap;
}
.btn::before { content: "[\00a0"; color: var(--soft); font-weight: 400; }
.btn::after { content: "\00a0]"; color: var(--soft); font-weight: 400; }
.btn .i { display: none; }
.btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn:hover::before, .btn:hover::after { color: var(--white); }
.btn-lg { font-size: 15px; min-height: 2.6em; }
.btn-light, .btn-ink { background: var(--white); color: var(--night); }
.btn-light::before, .btn-light::after, .btn-ink::before, .btn-ink::after { color: var(--night); }
.btn-light:hover, .btn-ink:hover { background: #fff; text-decoration: none; }
.btn-light:hover::before, .btn-light:hover::after, .btn-ink:hover::before, .btn-ink:hover::after { color: var(--night); }
.btn-ghost-dark, .btn-outline { background: none; color: var(--white); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: default; text-decoration: none; }
.btn-block { display: flex; width: 100%; }
.icon-btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; color: var(--white); }
.icon-btn:hover { text-decoration: underline; }
.icon-btn[hidden] { display: none; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--ink); }
.nav-link:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; color: var(--white); }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .i { display: none; }

/* Contract address: [ CA soon ] */
.ca {
  display: inline-flex; align-items: center; gap: .6em;
  height: 2.2em; padding: 0 .2em; border: 0; background: none; color: var(--white);
  font: 500 13px/1 var(--mono); cursor: pointer;
}
.ca::before { content: "["; color: var(--soft); }
.ca::after { content: "]"; color: var(--soft); }
.ca .ca-label { color: var(--muted); }
.ca .i { display: none; }
.ca:disabled { cursor: default; }
.ca.is-live:hover .ca-value { text-decoration: underline; text-underline-offset: 4px; }
.show-sm { display: none; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.brand-word { font: 800 19px/1 var(--mono); letter-spacing: -.02em; }
.nav-actions { display: flex; align-items: center; gap: 18px; }

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  padding-bottom: 24px;
  background: var(--night); color: var(--white);
}
.hero-waves, .band-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 22% 30% at 79% 44%, rgba(6, 6, 6, .96), rgba(6, 6, 6, .75) 60%, rgba(6, 6, 6, 0) 100%),
    radial-gradient(ellipse 50% 62% at 28% 46%, rgba(6, 6, 6, .97), rgba(6, 6, 6, .85) 55%, rgba(6, 6, 6, .35) 100%),
    linear-gradient(to bottom, rgba(6, 6, 6, .85), rgba(6, 6, 6, 0) 16%, rgba(6, 6, 6, 0) 78%, rgba(6, 6, 6, .92));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: center; margin-top: auto; padding-top: 24px; }
.hero-copy { display: grid; justify-items: start; }
.hero-copy .fig { margin-top: 18px; font-size: clamp(8px, 2.4vw, 21px); }
.hero h1 { margin-top: 22px; font-size: clamp(30px, 4.2vw, 54px); }
.lede { margin-top: 18px; max-width: 560px; font-size: 15.5px; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin-top: 30px; }
.hero .actions, .actions-left { justify-content: flex-start; }
.hero-grid .drop-art { justify-self: center; }

.route { margin-top: clamp(32px, 6vh, 64px); }
.route-card { max-width: 820px; margin: 0 auto; padding: 4px 8px; background-color: rgba(6, 6, 6, .88); background-clip: padding-box; }
.route-flow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 0 10px; }
.route-end { display: grid; gap: 4px; }
.route-end.end { text-align: right; }
.route-end b { font-size: 15px; }
.route-end small { font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.route-mid { font: 700 10px/1.08 var(--mono); color: var(--white); white-space: pre; }
.track { overflow: hidden; color: var(--soft); white-space: nowrap; }
.track i { display: block; font-style: normal; }
.route-link { display: flex; width: max-content; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--white); }
.route-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.scroll-cue { margin: auto auto 0; padding-top: 32px; font-size: 12.5px; color: var(--muted); }
.scroll-cue:hover { color: var(--white); }

/* Chains */
.chains { padding: 64px 0 56px; border-bottom: 1px dashed var(--line-2); }
.chain-list { list-style: none; margin: 22px 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; font-size: 15px; }
.chain-list b { margin-right: 4px; }

/* Sections */
.section { padding-top: 112px; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head .h2 { margin-top: 14px; }
.lede-ink { margin-top: 18px; font-size: 15.5px; color: var(--muted); }

/* Cards are typed frames: .---. | | '---' */
.card {
  border-style: solid; border-color: transparent; border-image-repeat: round;
  border-width: 1.538em .6em;
  border-image-slice: 153.8 60 fill; border-image-source: var(--fr-soft);
  background: var(--panel); background-clip: padding-box;
  padding: 10px 18px;
}
.card p { color: var(--muted); }
.card .h3 + p { margin-top: 10px; max-width: 420px; }
.card-night, .card-soft { background: var(--panel); background-clip: padding-box; }

/* Features */
.features { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.feature-main { grid-row: span 2; display: flex; flex-direction: column; min-height: 520px; }
.xflow { margin: 36px 0 18px; font-size: 13px; line-height: 1.4; color: var(--ink); white-space: pre; overflow: hidden; }
.feature-copy { margin-top: auto; padding-top: 40px; }
.feature-main .h3 { font-size: clamp(26px, 2.8vw, 38px); }
.feature-copy .btn { margin-top: 22px; margin-left: -.6em; }
.quote { margin: 18px 0 22px; font-size: 12.5px; line-height: 1.6; color: var(--ink); white-space: pre; overflow: hidden; }
.keys { display: flex; align-items: center; gap: 24px; margin-top: 16px; }
.keys-lock { flex: none; font-size: 13px; line-height: 1.15; color: var(--ink); white-space: pre; }

/* Zero knowledge */
.zk { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.proof-head { display: flex; justify-content: space-between; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.proof-art { margin: 22px 0 6px; font-size: 12px; line-height: 1.35; color: var(--ink); white-space: pre; overflow-x: auto; }
.proof-foot { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 12.5px; color: var(--ink) !important; }
.zk-copy .h2 { margin-top: 14px; }
.zk-copy p { margin-top: 18px; max-width: 480px; color: var(--muted); }
.zk-copy .actions { margin-top: 26px; }
.zk-copy .actions .btn { margin-left: -.6em; }
.zk-copy .text-link { margin-top: 16px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { padding-top: 18px; border-top: 1px dashed var(--line-2); }
.steps .num { font: 700 13px/1 var(--mono); color: var(--white); }
.steps h3 { margin: 22px 0 8px; font: 800 19px/1.25 var(--mono); color: var(--white); }
.steps p { color: var(--muted); font-size: 14px; max-width: 330px; }

/* Economy */
.economy { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 64px; align-items: center; }
.eco-copy .h2 { margin-top: 14px; }
.eco-copy p { margin-top: 18px; max-width: 480px; color: var(--muted); }
.eco-copy .eco-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; }
.flows { padding: 0; }
.flows-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px dashed var(--line-2); }
.flows-head b { font-size: 14px; }
.flow { padding: 18px; }
.flow + .flow { border-top: 1px dashed var(--line-2); }
.flow-big { margin: 8px 0 6px; font: 800 36px/1.05 var(--mono); letter-spacing: -.03em; color: var(--white) !important; }
.flow-big span { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.flow p:not(.kicker):not(.flow-big) { font-size: 13.5px; }
.flow-track { margin-top: 12px; font-size: 12.5px; color: var(--ink) !important; white-space: pre; overflow: hidden; }
.eco-fine { grid-column: 1 / -1; padding-top: 18px; border-top: 1px dashed var(--line-2); }

/* FAQ: [+] / [-] */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.35fr; gap: 64px; align-items: start; }
.faq-wrap .h2 { margin-top: 14px; }
.faq details { border-bottom: 1px dashed var(--line-2); }
.faq details:first-child { border-top: 1px dashed var(--line-2); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; color: var(--white); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "[+]"; flex: none; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "[-]"; color: var(--white); }
.faq summary .i { display: none; }
.faq details p { padding: 0 40px 20px 0; color: var(--muted); }
.faq details a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Closing band */
.band-wrap { padding-top: 112px; }
.band { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 440px; background: var(--night); background-clip: padding-box; text-align: center; }
.band-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 46% 64% at 50% 50%, rgba(6, 6, 6, .94), rgba(6, 6, 6, .5) 70%, rgba(6, 6, 6, .15)); }
.band-copy { display: grid; justify-items: center; gap: 24px; padding: 48px 24px; }
.drop-sm { font-size: clamp(10px, 1.1vw, 14px); }

/* Inner pages (app, docs): a band of typed cloth at the top that fades into night */
.top-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.top-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 70% at 50% 45%, rgba(6, 6, 6, .92), rgba(6, 6, 6, .5) 70%, rgba(6, 6, 6, .2)),
    linear-gradient(to bottom, rgba(6, 6, 6, .6), rgba(6, 6, 6, 0) 30%, rgba(6, 6, 6, .3) 60%, var(--ground));
}

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 72px; padding: 32px 0 44px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.foot-brand .brand-word { font-size: 16px; }
.foot-tag { color: var(--soft); }
.foot a:not(.foot-brand):hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.foot .i { display: none; }
.foot-copy { margin-left: auto; }

/* Narrower screens */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .drop-art { display: none; }
  .features { grid-template-columns: 1fr; }
  .feature-main { grid-row: auto; min-height: 0; }
  .zk, .economy, .faq-wrap { grid-template-columns: 1fr; gap: 40px; }
  .zk-copy { order: -1; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 18px 0 24px; }
  .steps h3 { margin-top: 12px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .hide-sm { display: none; }
  .nav .ca { display: none; }
  .nav-actions { gap: 14px; }
  .show-sm { display: inline-flex; }
  .hero-copy .ca { margin-bottom: 14px; margin-left: -.2em; }
  .lede { font-size: 14.5px; }
  .route-card { padding: 2px 4px; }
  .route-flow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .route-flow .track-2, .route-flow .route-mid { display: none; }
  .section { padding-top: 80px; }
  .section-head { margin-bottom: 36px; }
  .card { padding: 8px 10px; }
  .xflow, .quote, .proof-art { font-size: 10.5px; }
  .keys { flex-direction: column; align-items: flex-start; }
  .flow-big { font-size: 30px; }
  .band-wrap { padding-top: 80px; }
  .band { min-height: 380px; }
  .foot-copy { margin-left: 0; width: 100%; }
}
