/* Colony design system: warm obsidian, honey amber, signal ember. See docs/DESIGN_SYSTEM.md */
:root {
  --bg: #0a0807;
  --bg-2: #100c09;
  --surface: #16110d;
  --surface-2: #1e1712;
  --surface-3: #2a2018;
  --text: #f6efe4;
  --text-2: #cbbfad;
  --text-3: #978b7a;
  --line: rgba(255, 222, 180, 0.08);
  --line-2: rgba(255, 222, 180, 0.15);
  --amber: #ffb23f;
  --amber-2: #ff9a1f;
  --amber-soft: rgba(255, 178, 63, 0.12);
  --ember: #ff5b2e;
  --up: #46d98a;
  --down: #ff5f63;
  --warn: #f2c14e;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 26px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.25);
  --sh-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  --sh-3: 0 4px 10px rgba(0, 0, 0, 0.45), 0 50px 100px -30px rgba(0, 0, 0, 0.8);
  --glow: 0 14px 40px -12px rgba(255, 154, 31, 0.65);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 44px);
  --nav-h: 68px;
  --f-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  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: 400 16px/1.55 var(--f-body);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--amber); color: #1a0f04; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono, .num { font-family: var(--f-mono); font-feature-settings: "tnum" 1, "zero" 1; letter-spacing: -0.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-3); }

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(46px, 8.4vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0;
  font-variation-settings: "opsz" 96;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
}
.h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--text-2); max-width: 56ch; margin: 0; }
.lead b { color: var(--text); font-weight: 600; }
.accent { color: var(--amber); }
.mark {
  background: linear-gradient(transparent 62%, rgba(255, 178, 63, 0.28) 62%) no-repeat;
  background-size: 0% 100%;
  animation: mark 1.2s 0.6s var(--ease) forwards;
}
@keyframes mark { to { background-size: 100% 100%; } }

/* ---------- buttons ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s, color 0.25s;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--amber); color: #1b1005; box-shadow: 0 0 0 0 rgba(255, 154, 31, 0); }
.btn-primary:hover { background: #ffc061; box-shadow: var(--glow); }
.btn-ghost { background: rgba(255, 236, 210, 0.06); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 236, 210, 0.1); }
.btn-lg { --h: 58px; padding: 0 30px; font-size: 16px; }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-u { background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat; transition: background-size 0.4s var(--ease); }
.link-u:hover { background-size: 100% 1px; }

/* ---------- live dot + clock ---------- */
.live { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2s var(--ease) infinite; }
.dot.warn { background: var(--warn); }
.dot.off { background: var(--down); }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.6; } 100% { transform: scale(2.6); opacity: 0; } }
.clock { font-family: var(--f-mono); color: var(--text); font-feature-settings: "tnum" 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(10, 8, 7, 0.72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--text-2); transition: background 0.2s, color 0.2s; }
.nav-links a:hover { background: rgba(255, 236, 210, 0.06); color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 236, 210, 0.07); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--text-2); transition: background 0.2s, color 0.2s; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 236, 210, 0.07); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.mobile-menu { display: none; }
@media (max-width: 760px) {
  .nav-links, .nav-right .btn { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-menu {
    display: block; position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 49;
    background: rgba(12, 9, 7, 0.97); padding: 12px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: 0.35s var(--ease);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-menu a:not(.btn) { display: block; padding: 14px 4px; font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { width: 100%; margin-top: 18px; }
}

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding: clamp(72px, 10vw, 140px) 0; }
.sec-tight { padding: clamp(48px, 7vw, 96px) 0; }
.band { background: var(--bg-2); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.split-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.split-line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.split-line:nth-child(2) > span { animation-delay: 0.12s; }
.split-line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: none; } }

/* ---------- footer ---------- */
.foot { padding: 64px 0 40px; background: var(--bg); box-shadow: inset 0 1px 0 var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot li a { color: var(--text-2); }
.foot li a:hover { color: var(--text); }
.foot-note { margin-top: 48px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* CA block */
.ca {
  display: inline-flex; align-items: center; gap: 12px; max-width: 100%;
  padding: 10px 10px 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
}
.ca code { font-family: var(--f-mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca .btn { flex: none; }
.ca-note { font-size: 13px; color: var(--text-3); margin-top: 10px; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: var(--r-md); background: var(--surface-3); color: var(--text); box-shadow: var(--sh-2); font-size: 14px; animation: toast 0.45s var(--ease); }
.toast.out { opacity: 0; transform: translateY(10px); transition: 0.3s; }
@keyframes toast { from { opacity: 0; transform: translateY(20px); } }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 40%, var(--surface) 80%) 0 0 / 300% 100%; animation: sk 1.4s linear infinite; border-radius: var(--r-sm); color: transparent !important; }
@keyframes sk { to { background-position: -150% 0; } }

/* ---------- state blocks ---------- */
.state { text-align: center; padding: 64px 20px; }
.state .h3 { margin-bottom: 10px; }
.state p { color: var(--text-2); margin: 0 auto 22px; max-width: 46ch; }

/* ---------- token avatar ---------- */
.ava { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--amber); overflow: hidden; }
.ava { position: relative; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- tabs ---------- */
.tabs { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-3); transition: color 0.25s; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: #1b1005; }
.tabs button .count { font-family: var(--f-mono); font-size: 12px; opacity: 0.7; margin-left: 6px; }
.tabs .ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--amber); transition: transform 0.45s var(--ease), width 0.45s var(--ease); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
  .split-line > span { transform: none; }
}
