/* Colours come from tokens.css only. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 2px; border-radius: 8px; }

/* scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--sky)); }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: var(--tap); }
.brand-tile { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, var(--blue), var(--blue-royal)); display: grid; place-items: center; box-shadow: 0 6px 16px var(--shadow); }
.brand-tile img { width: 26px; height: auto; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: 0.01em; color: var(--ink-strong); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); transition: background var(--t-fast) var(--ease-out), color var(--t-fast); }
.nav a:hover { background: var(--mist-1); color: var(--ink-strong); }
.social { margin-left: auto; display: flex; gap: 8px; }
.soc { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-strong); text-decoration: none; transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), color var(--t-fast); }
a.soc:hover { background: var(--blue); color: var(--white); transform: translateY(-2px); }
.soc.is-inert { opacity: 0.45; cursor: default; }

/* contract address slot */
.ca-wrap { padding-top: 12px; }
.ca { display: flex; flex-direction: column; gap: 2px; padding: 0 0 6px; }
.ca-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.ca-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--tap); text-align: left; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease-out); }
.ca-copy:hover { border-color: var(--blue); }
.ca-copy:active { transform: scale(0.995); }
.ca-addr { font: 700 clamp(17px, 3.4vw, 28px)/1.25 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--ink-strong); overflow-wrap: anywhere; word-break: break-all; }
.ca-addr.is-pending { color: var(--ink-soft); font-weight: 600; letter-spacing: 0.04em; }
.ca-hint { flex: none; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--mist-1); color: var(--ink-strong); transition: background var(--t-fast), color var(--t-fast); }
.ca-copy.is-copied { border-color: var(--blue); background: var(--mist-5); }
.ca-copy.is-copied .ca-hint { background: var(--blue); color: var(--white); }

/* hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; isolation: isolate; }
.mesh { position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.15; will-change: transform; }
.b1 { width: 55%; aspect-ratio: 1; left: 0; top: 5%; background: var(--blue); animation: drift1 22s var(--ease-io) infinite alternate; }
.b2 { width: 48%; aspect-ratio: 1; right: 0; top: 0; background: var(--sky); animation: drift2 26s var(--ease-io) infinite alternate; }
.b3 { width: 42%; aspect-ratio: 1; left: 30%; bottom: -5%; background: var(--azure); animation: drift3 30s var(--ease-io) infinite alternate; }
@keyframes drift1 { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16%, 18%) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-14%, -14%) scale(1.2); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 32px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; color: var(--ink-strong); animation: rise var(--t-slow) var(--ease-out) both; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-soft); position: relative; }
.pill[data-state="live"] .dot { background: var(--azure); }
.pill[data-state="live"] .dot::after, .pill[data-state="idle"] .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 1.8s var(--ease-out) infinite; }
.pill[data-state="error"] .dot { background: var(--navy); }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }
.headline { margin-top: 18px; font-size: clamp(40px, 7vw, 76px); line-height: 1.04; font-weight: 800; letter-spacing: -0.025em; color: var(--ink-strong); }
.headline .w { display: inline-block; margin-right: 0.22em; animation: rise var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i) * var(--stagger)); }
.grad { background: linear-gradient(100deg, var(--blue), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.sub { margin-top: 22px; max-width: 540px; font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); animation: fade var(--t-slow) var(--ease-out) both; animation-delay: calc(5 * var(--stagger) + var(--t-slow)); }
@keyframes fade { from { opacity: 0; } }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; animation: pop var(--t-slow) var(--ease-out) both; animation-delay: calc(5 * var(--stagger) + 2 * var(--t-slow)); }
@keyframes pop { from { opacity: 0; transform: scale(0.95); } }
.btn { min-height: var(--tap); padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), background var(--t-fast); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 10px 24px var(--shadow); }
.btn-primary:hover { background: var(--blue-mid); box-shadow: 0 14px 30px var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--ink-strong); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--mist-1); }

.hero-art { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: center; }
.layer { position: absolute; inset: 0; display: grid; place-items: center; transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0); will-change: transform; }
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); }
.r1 { inset: 4%; } .r2 { inset: 18%; border-style: dashed; }
.float { animation: float 4s var(--ease-io) infinite; }
@keyframes float { 0%, 100% { transform: translateY(-12px) rotate(-1.5deg); } 50% { transform: translateY(12px) rotate(1.5deg); } }
.logo-tile { width: clamp(180px, 34vw, 300px); aspect-ratio: 1; border-radius: 28%; background: linear-gradient(150deg, var(--blue-royal), var(--blue) 60%, var(--blue-mid)); display: grid; place-items: center; box-shadow: 0 30px 60px var(--shadow), inset 0 1px 0 var(--blue-soft); }
.logo-tile img { width: 72%; height: auto; }
.spark { position: absolute; width: 14px; height: 14px; border-radius: 4px; background: var(--sky); transform: rotate(45deg); opacity: 0.7; }
.s1 { left: 12%; top: 22%; } .s2 { right: 10%; top: 38%; width: 10px; height: 10px; background: var(--blue); } .s3 { left: 22%; bottom: 14%; width: 9px; height: 9px; background: var(--azure); }

/* ticker */
.ticker { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; min-height: 52px; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 12px; width: max-content; padding: 8px 6px; animation: marquee 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--mist-6); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tk-sym { font-weight: 800; color: var(--ink-strong); }
.tk-up { color: var(--up); } .tk-down { color: var(--down); }
.tk .tok-img, .tk .tok-tile { width: 24px; height: 24px; font-size: 12px; }
.tk.sk { width: 150px; height: 36px; padding: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 40px; padding-bottom: 8px; }
.tile { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-height: 108px; }
.tile-k { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.tile-v { font-size: clamp(24px, 3vw, 32px); font-weight: 800; color: var(--ink-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* sections */
section.wrap { padding-top: 56px; padding-bottom: 8px; }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; color: var(--ink-strong); }
.sec-head p { margin-top: 6px; color: var(--ink-soft); }

/* panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px color-mix(in srgb, var(--blue) 8%, transparent); overflow: hidden; }
.panel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--mist-3); }
.tab { position: relative; z-index: 1; min-height: var(--tap); min-width: var(--tap); padding: 0 16px; border: 0; background: transparent; border-radius: 999px; font-weight: 700; color: var(--ink-soft); transition: color var(--t-mid) var(--ease-out); }
.tab[aria-selected="true"] { color: var(--white); }
.tab-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--blue); box-shadow: 0 6px 14px var(--shadow); transition: transform var(--t-mid) var(--ease-out), width var(--t-mid) var(--ease-out); }
.feed-note { font-size: 14px; font-weight: 600; color: var(--ink-soft); min-height: 20px; }
.thead, .row { display: grid; grid-template-columns: 44px minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr) var(--tap); align-items: center; column-gap: 12px; padding: 0 16px; }
.thead { min-height: 40px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); background: var(--mist-6); }
.thead .c-price, .thead .c-chg, .thead .c-vol, .thead .c-liq, .row .c-price, .row .c-chg, .row .c-vol, .row .c-liq { text-align: right; }
.row { position: relative; min-height: 68px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; opacity: 1; }
.row:first-child { border-top: 0; }
.row.in { animation: rowin var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--n, 0) * 60ms); }
@keyframes rowin { from { opacity: 0; transform: translateY(10px); } }
.row .c-rank { font-weight: 800; color: var(--ink-soft); }
.tok { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tok-img, .tok-tile { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.tok-img { object-fit: cover; background: var(--mist-3); }
.tok-tile { display: grid; place-items: center; font-weight: 800; color: var(--white); background: linear-gradient(145deg, var(--blue-royal), var(--sky)); }
.tok-meta { min-width: 0; display: flex; flex-direction: column; }
.tok-sym { font-weight: 800; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-name { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-chg.up { color: var(--up); } .c-chg.down { color: var(--down); }
.c-chg { font-weight: 700; }
.num-flash { animation: flash 900ms var(--ease-out); }
@keyframes flash { 0% { background: var(--mist-1); box-shadow: 0 0 0 4px var(--mist-1); border-radius: 6px; } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }
.copy { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.copy:hover { background: var(--blue); color: var(--white); transform: translateY(-1px); }
.copy.is-copied { background: var(--azure); color: var(--white); border-color: var(--azure); }
.copy svg { width: 18px; height: 18px; }
.rows-empty { padding: 28px 16px; text-align: center; font-weight: 600; color: var(--ink-soft); }

/* skeleton */
.sk-b { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--mist-3), var(--mist-6), var(--mist-3)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-c { width: 40px; height: 40px; border-radius: 50%; }

/* spotlight */
.spot { position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--t-mid) var(--ease-out); background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--sky) 22%, transparent), transparent 70%); }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* cards */
.grid3, .grid4 { display: grid; gap: 16px; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid); }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card h3 { font-size: 20px; font-weight: 800; color: var(--ink-strong); }
.card p { margin-top: 8px; color: var(--ink-soft); }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 12px; background: var(--blue); color: var(--white); font-weight: 800; }

/* status chips */
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-strong); }
.chip-k { font-weight: 700; color: var(--ink-strong); }
.chip-v { font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--blue); color: var(--white); font-size: 14px; }
.chip.is-inert { border-style: dashed; }
.chip.is-inert .chip-v { background: var(--mist-3); color: var(--ink-soft); }

/* footer */
.foot { margin-top: 72px; padding: 32px 0 40px; border-top: 1px solid var(--line); background: var(--mist-6); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.foot p { max-width: 560px; font-size: 14px; color: var(--ink-soft); }

/* reveal (non-hero). JS springs these in; without JS they stay visible. */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].shown { opacity: 1; }

/* responsive */
@media (max-width: 1023px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 240px; order: -1; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .thead { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto var(--tap); grid-template-areas: "tok price act" "chg vol liq"; row-gap: 8px; padding: 12px 16px; }
  .row .c-rank { display: none; }
  .row .c-tok { grid-area: tok; } .row .c-price { grid-area: price; } .row .c-act { grid-area: act; }
  .row .c-chg { grid-area: chg; text-align: left; } .row .c-vol { grid-area: vol; text-align: center; } .row .c-liq { grid-area: liq; text-align: right; }
  .row .c-chg, .row .c-vol, .row .c-liq { font-size: 13px; }
  .row .c-vol::before { content: "Vol "; color: var(--ink-soft); font-weight: 600; }
  .row .c-liq::before { content: "Depth "; color: var(--ink-soft); font-weight: 600; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .stats { gap: 12px; }
  .tile { padding: 16px; }
  .grid4 { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 18px; }
  .top-row { gap: 8px; }
  .cta .btn { flex: 1 1 100%; }
}

/* reduced motion: everything lands in its final state at once */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .ticker { overflow-x: auto; }
  .ticker-track { width: auto; }
  .layer { transform: none !important; }
}
