/* Shared design system (tokens, nav, footer, buttons) — measured on the CircleStock template at 1440px. */
:root {
  --bg: #000;
  --panel: #161616;
  --panel-2: #0d0d0d;
  --panel-3: #121212;
  --tab: #171717;
  --line: #2b2b2b;
  --line-2: #161616;
  --line-3: #191919;
  --text: #fff;
  --text-2: #fafafa;
  --muted: #a1a1a1;
  --muted-2: #9c9c9c;
  --muted-3: #8f8f8f;
  --dim: #787878;
  --dim-2: #777;
  --chip: #a6a9b0;
  --btn: #313135;
  --accent: #14ff00;
  --up: #22c55e;
  --down: #f04b4b;
  --warn: #f5a524;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --inter: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.44, 0, .56, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.4;
  font-feature-settings: "cv01", "cv09", "cv11", "cv05", "ss03";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, video, svg { display: block; max-width: 100%; }
em { font-style: italic; }
::selection { background: rgba(20, 255, 0, .25); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .dim { color: var(--dim); }

/* ---------- Nav: full-width transparent at the top, 900px pill once scrolled (> 50px) ---------- */
.nav-wrap { position: fixed; z-index: 50; top: 16px; left: 0; right: 0; height: 64px; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.nav {
  pointer-events: auto; width: 1200px; max-width: calc(100% - 32px); height: 64px; padding: 0;
  display: flex; align-items: center; gap: 32px; border-radius: 99px; background: rgba(18, 18, 18, 0);
  transition: width .5s var(--ease-out), height .5s var(--ease-out), padding .5s var(--ease-out), background-color .45s var(--ease);
}
.nav.is-pill { width: 900px; height: 56px; padding: 10px 16px; background: rgb(18, 18, 18); }
.nav-left { flex: 1; display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; padding: 10px 0 10px 10px; flex-shrink: 0; }
.brand-mark { width: 24px; height: 24px; transition: transform .5s var(--ease-out); }
.nav.is-pill .brand-mark { transform: rotate(45deg); }
.brand-name { font-size: 18px; line-height: 22.5px; font-weight: 600; letter-spacing: .5px; color: var(--text-2); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a, .nav-right a.link { font-size: 15px; line-height: 30px; font-weight: 500; letter-spacing: -.2px; color: #fff; transition: opacity .2s; white-space: nowrap; }
.nav-links a:hover, .nav-right a.link:hover { opacity: .7; }
.nav-links a[aria-current="page"] { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 24px; padding-right: 16px; flex-shrink: 0; }
.nav.is-pill .nav-right { padding-right: 0; }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 9px 12px; border-radius: 99px;
  background: var(--btn); color: var(--text-2); font-size: 14px; line-height: 17.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 1px 2px -1px rgba(10, 12, 18, .1), 0 1px 3px 0 rgba(10, 12, 18, .1); transition: background-color .2s, opacity .2s;
}
.btn-pill:hover { background: #3d3d42; }
.btn-pill:disabled { opacity: .5; cursor: default; }
.btn-pill.light { background: #fff; color: #000; }
.btn-pill.light:hover { background: #e6e6e6; }
.btn-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav-burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 18px; height: 1.5px; background: #fff; position: relative; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: #fff; transition: transform .3s; }
.nav-burger span::before { top: -6px; } .nav-burger span::after { top: 6px; }
.mobile-menu { position: fixed; z-index: 49; inset: 0; background: rgba(0, 0, 0, .96); display: flex; flex-direction: column; gap: 8px; padding: 110px 24px 24px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-size: 28px; letter-spacing: -1px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }

/* Sub-navigation of the app pages (under the nav) */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.subnav a { font-size: 14px; font-weight: 500; color: #7a7a7a; padding: 7px 12px; border-radius: 99px; transition: color .2s, background-color .2s; }
.subnav a:hover { color: #fff; }
.subnav a[aria-current="page"] { background: var(--tab); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Footer ---------- */
.footer { margin-top: 100px; width: 100%; border-top: 1px solid var(--line-3); padding: 100px 0 48px; display: flex; flex-direction: column; align-items: center; gap: 48px; }
.footer-top { width: 1200px; max-width: calc(100% - 48px); display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-brand .brand { padding: 0; gap: 8px; }
.footer-brand .brand-mark { width: 32px; height: 32px; }
.footer-brand .brand-name { font-size: 32px; line-height: 40px; }
.select-wrap { position: relative; width: 151px; height: 41px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; justify-content: space-between; padding: 10px; font-size: 14px; line-height: 21px; }
.select-wrap select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.select-wrap svg { width: 12px; height: 12px; }
.footer-cols { display: flex; gap: 24px; align-items: flex-start; }
.footer-col { width: 160px; display: flex; flex-direction: column; gap: 16px; }
.footer-col h4 { margin: 0; font-size: 18px; line-height: 18px; font-weight: 400; letter-spacing: -.18px; color: #fff; }
.footer-col a { font-size: 18px; line-height: 18px; letter-spacing: -.18px; color: var(--dim-2); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { width: 1200px; max-width: calc(100% - 48px); border-top: 1px solid var(--line-2); padding-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-bottom p { margin: 0; font-family: var(--inter); font-size: 15px; line-height: 15px; letter-spacing: -.15px; color: var(--dim-2); }
.footer-bottom p a { color: #fff; }
.socials { display: flex; gap: 24px; }
.socials a { width: 24px; height: 24px; color: #636363; transition: color .2s; }
.socials a:hover { color: #fff; }

/* ---------- Motion helpers (driven by js/motion.js) ---------- */
[data-appear] { opacity: .001; transform: translateY(50px); }
[data-appear].in { opacity: 1; transform: none; transition: opacity .75s var(--ease), transform .75s var(--ease); }
[data-reveal] { opacity: 0; transform: translateY(var(--ry, 20px)); }
[data-reveal="x"] { transform: translateX(-24px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--rd, 0s); }
.words .w { display: inline-block; transform: translateY(50px); filter: blur(3px); white-space: pre; }
.words.in .w { transform: none; filter: blur(0); transition: transform .6s var(--ease), filter .6s var(--ease); transition-delay: calc(var(--i) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  [data-appear], [data-reveal], .words .w { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ---------- Token avatar (artwork or two-letter tile) ---------- */
.tok { width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; object-fit: cover; display: inline-grid; place-items: center; background: #262626; color: #ddd; font-size: 11px; font-weight: 600; overflow: hidden; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toast-in .35s var(--ease-out); }
.toast.err { border-color: #5a2323; }
.toast.ok { border-color: #1e4d1a; }
.toast a { text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
  .nav.is-pill { width: calc(100% - 32px); }
}
@media (max-width: 860px) {
  .nav-links, .nav-right a.link { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-right { padding-right: 4px; gap: 8px; }
  .nav.is-pill .nav-right { padding-right: 0; }
  .footer-top { flex-direction: column; }
  .footer-cols { flex-wrap: wrap; }
  .footer-col { width: 140px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom p { line-height: 1.5; }
}
