/* STEPWELL base.css: tokens, self-hosted fonts, paper grain, typography, buttons, nav, footer, CA chip,
   countdown, toast, dialog, form fields. Shared by every page, including the landing.

   Stable class/token API (do not rename; the landing imports this file):
   tokens   --paper --paper-2 --stone --stone-d --ink --ink-2 --water --water-d --buy --sell
            --rule (thin line colour) --f-display --f-body --nav-h --gutter --wrap
   type     .display (Archivo ExtraBold Expanded)  .label (small caps section label)  .num (tabular)
            .lead  .muted  .small
   layout   .wrap (max width + gutters)  .rule (1px hairline)  .sr-only
   buttons  .btn  .btn-primary (teal)  .btn-ink (ink fill)  .btn-ghost  .btn-sm  .btn-lg  .icon-btn
   chips    .chip  .badge  .badge-water  .badge-ink
   chrome   .sw-nav (from site.js mountNav)  .sw-drawer  .sw-foot (mountFooter)  .sw-ca  .sw-countdown
            .sw-toast  .sw-dialog
   forms    .field  .input  .seg (segmented control)
   Grain is a fixed body::after overlay; set <body class="no-grain"> to turn it off. */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('/assets/fonts/archivo-latin-wdth.woff2') format('woff2-variations'),
       url('/assets/fonts/archivo-latin-wdth.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-tight-latin-wght.woff2') format('woff2-variations'),
       url('/assets/fonts/inter-tight-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #EFE6D6;
  --paper-2: #E4D7C1;
  --paper-3: #F6F0E4;
  --stone: #C8A97E;
  --stone-d: #8C6F4C;
  --ink: #16130F;
  --ink-2: #4A4239;
  --ink-3: #685D51; /* AA (4.5:1) on paper and paper-2 */
  --water: #0F8A86;
  --water-d: #0A5F5C;
  --water-t: rgba(15, 138, 134, .14);
  --buy: var(--water);
  --sell: var(--ink);
  --rule: rgba(22, 19, 15, .18);
  --rule-2: rgba(22, 19, 15, .09);
  --f-display: 'Archivo Variable', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Inter Tight Variable', 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 64px;
  --gutter: 28px;
  --wrap: 1280px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (max-width: 640px) { :root { --gutter: 16px; --nav-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
/* paper grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .07 0 0 0 0 .05 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.no-grain::after { display: none; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--water-d); }
button { font: inherit; color: inherit; }
::selection { background: var(--water); color: var(--paper); }
:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
hr, .rule { border: 0; height: 1px; background: var(--rule); margin: 0; }

/* type */
h1, h2, h3, h4, .display {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -.012em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 6vw, 72px); }
h2 { font-size: clamp(26px, 3.6vw, 42px); }
h3 { font-size: clamp(18px, 2vw, 22px); line-height: 1.15; }
h4 { font-size: 15px; line-height: 1.2; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.num, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'ss01'; }
.label {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1 var(--f-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.label::before { content: ''; width: 14px; height: 1px; background: currentColor; }
.label.plain::before { display: none; }
.water { color: var(--water-d); }
code, kbd {
  font-family: var(--f-body);
  font-variant-numeric: tabular-nums;
  font-size: .92em;
  background: var(--paper-2);
  padding: .08em .36em;
  border-radius: var(--radius);
  word-break: break-all;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
/* skip link: hidden until focused from the keyboard */
.sw-skiplink { position: fixed !important; z-index: 10001; left: 12px; top: 10px; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; overflow: visible;
  background: var(--ink); color: var(--paper); font: 600 14px/1 var(--f-body); text-decoration: none; transform: translateY(-160%); transition: transform .15s; }
main[tabindex='-1']:focus { outline: none; }
.sw-skiplink:focus, .sw-skiplink:focus-visible { transform: none; color: var(--paper); outline-offset: 2px; }

/* buttons */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid var(--b);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 600 14px/1 var(--f-body);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: #0B7471; border-color: #0B7471; color: var(--paper); } /* a shade under --water: paper text at 4.5:1 */
.btn-primary:hover { background: var(--water-d); border-color: var(--water-d); color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: 500 12px/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip:hover { border-color: var(--ink); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: 600 10px/1.1 var(--f-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.badge-water { border-color: var(--water); color: var(--water-d); background: var(--water-t); }
.badge-ink { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* forms */
.field { display: grid; gap: 6px; }
.field > span { font: 600 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-bottom: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-3);
  color: var(--ink);
  font: 500 15px/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  outline: none;
}
.input:focus { border-color: var(--water); border-bottom-color: var(--water); box-shadow: 0 1px 0 var(--water); }
.input[disabled] { background: transparent; color: var(--ink-3); border-bottom-color: var(--rule); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.seg > button {
  min-height: 36px; padding: 0 14px;
  border: 0; border-left: 1px solid var(--rule);
  background: transparent;
  font: 600 13px/1 var(--f-body);
  cursor: pointer;
}
.seg > button:first-child { border-left: 0; }
.seg > button[aria-pressed='true'], .seg > button[aria-selected='true'] { background: var(--ink); color: var(--paper); }
input[type='range'] { accent-color: var(--water); width: 100%; }

/* ── nav (site.js mountNav) ───────────────────────────── */
.sw-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.sw-nav.is-overlay { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sw-nav > .wrap { height: 100%; display: flex; align-items: center; gap: 20px; max-width: none; }
.sw-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.sw-logo svg { width: 30px; height: 30px; }
.sw-logo span { font: 800 15px/1 var(--f-display); font-stretch: 125%; font-variation-settings: 'wdth' 125; letter-spacing: .04em; text-transform: uppercase; }
.sw-links { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.sw-links a { padding: 8px 10px; font: 500 14px/1 var(--f-body); text-decoration: none; color: var(--ink-2); border-bottom: 1.5px solid transparent; }
.sw-links a:hover { color: var(--ink); }
.sw-links a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--water); }
.sw-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sw-nav-right .icon-btn { width: 34px; height: 34px; border-color: transparent; }
.sw-nav-right .icon-btn:hover { border-color: var(--rule); }
.sw-burger { display: none !important; }
.sw-connect { min-width: 132px; }
.sw-connect .dot { color: var(--water); }
.sw-drawer {
  position: fixed; z-index: 49; top: var(--nav-h); left: 0; right: 0;
  display: none;
  padding: 8px var(--gutter) 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 18px 40px rgba(22, 19, 15, .12);
}
.sw-drawer.open { display: grid; gap: 2px; }
.sw-drawer a.sw-dl { padding: 13px 0; border-bottom: 1px solid var(--rule-2); font: 800 20px/1 var(--f-display); font-stretch: 125%; font-variation-settings: 'wdth' 125; text-decoration: none; }
.sw-drawer .sw-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; align-items: center; }
@media (max-width: 1120px) {
  .sw-links { display: none; }
  .sw-burger { display: inline-grid !important; }
}
@media (max-width: 760px) {
  .sw-nav-right .sw-hide-sm { display: none !important; }
}
@media (max-width: 420px) {
  .sw-logo span { display: none; }
  .sw-connect { min-width: 0; }
}

/* CA chip in the nav */
.sw-ca-chip .sw-ca-k { color: var(--ink-3); font-weight: 600; letter-spacing: .08em; }

/* ── CA strip ([data-ca]) ─────────────────────────────── */
.sw-ca { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.sw-ca-tag { font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.sw-ca-addr {
  min-width: 0; max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-3);
  font: 500 13px/1.2 var(--f-body);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sw-ca-addr.pending { color: var(--ink-2); }

/* ── countdown ([data-countdown]) ─────────────────────── */
.sw-countdown { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid var(--ink); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.sw-countdown .c { display: grid; place-items: center; min-width: 58px; padding: 8px 10px; border-left: 1px solid var(--rule); }
.sw-countdown .c:first-child { border-left: 0; }
.sw-countdown b { font: 800 20px/1 var(--f-display); font-stretch: 112%; }
.sw-countdown small { margin-top: 4px; font: 600 9px/1 var(--f-body); letter-spacing: .14em; color: var(--ink-2); }
.sw-countdown .soon { padding: 10px 14px; font: 700 13px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.sw-countdown .live { padding: 10px 14px; background: var(--water); color: var(--paper); font: 800 14px/1 var(--f-display); font-stretch: 125%; letter-spacing: .08em; }

/* ── footer (site.js mountFooter) ─────────────────────── */
.sw-foot { margin-top: 96px; border-top: 1.5px solid var(--ink); padding: 44px 0 36px; background: var(--paper); }
.sw-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.sw-foot .sw-foot-h { font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.sw-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sw-foot ul a { text-decoration: none; font-size: 14px; }
.sw-foot ul a:hover { text-decoration: underline; }
.sw-foot-word { margin: 44px 0 20px; font: 800 clamp(36px, 12.6vw, 172px)/.8 var(--f-display); font-size: min(190px, calc(100cqw / 7.06)); font-stretch: 125%; font-variation-settings: 'wdth' 125; letter-spacing: -.02em; color: var(--ink); overflow: hidden; white-space: nowrap; }
.sw-foot > .wrap { container-type: inline-size; } /* the wordmark spans exactly the column */
.sw-foot-legal { font-size: 12px; line-height: 1.6; color: var(--ink-2); max-width: 110ch; margin: 0; }
.sw-foot-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 32px; }
@media (max-width: 860px) { .sw-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .sw-foot-grid { grid-template-columns: 1fr; } }

/* ── toast ────────────────────────────────────────────── */
.sw-toast {
  position: fixed; z-index: 10000; left: 50%; bottom: 24px;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  font: 500 14px/1.4 var(--f-body);
  box-shadow: 0 10px 30px rgba(22, 19, 15, .25);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
}
.sw-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sw-toast.err { background: #2B201A; border-left: 3px solid var(--stone); }
.sw-toast.ok { border-left: 3px solid var(--water); }
.sw-toast a { color: var(--paper); }

/* ── dialog ───────────────────────────────────────────── */
.sw-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 rgba(22, 19, 15, .12);
}
.sw-dialog::backdrop { background: rgba(22, 19, 15, .38); }
.sw-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.sw-dialog header h3 { font-size: 18px; }
.sw-dialog .body { padding: 18px; }
.sw-dialog .actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
.sw-wallets { display: grid; gap: 8px; }
.sw-wallets button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-3); cursor: pointer; text-align: left; font-weight: 600; }
.sw-wallets button:hover { border-color: var(--ink); }
.sw-wallets img { width: 28px; height: 28px; }

/* misc */
.skeleton { background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2)); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ── touch: every control at least 40 px tall/wide (WCAG 2.5.8 + comfortable thumbs) ── */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; }
  .icon-btn, .sw-nav-right .icon-btn { width: 40px; height: 40px; }
  .sw-logo { min-height: 40px; min-width: 40px; }
  .chip { min-height: 40px; padding: 0 12px; }
  .seg > button { min-height: 40px; }
  .sw-foot ul { gap: 0; }
  .sw-foot ul a { display: inline-block; padding: 10px 0; }
  details > summary { padding-top: 8px; padding-bottom: 8px; }
  input[type='range'] { height: 40px; }
}
