@font-face { font-family: Archivo; src: url('assets/archivo-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url('assets/archivo-bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/plex-mono.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --cols: 12;
  --bl: 8px;
  --lh: 24px;
  --gutter: 24px;
  --margin: 48px;
  --maxw: 1280px;
  --header: 64px;
  --ink: #0b0b0d;
  --ink-2: #17181b;
  --graphite: #2a2c31;
  --slate: #646870;
  --silver: #b4b8bf;
  --mist: #dfe2e6;
  --paper: #f3f4f6;
  --pearl: #fafbfc;
  --white: #fff;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --body: Archivo, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/var(--lh) var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2 { font-weight: 700; letter-spacing: -.03em; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a, button:not(.symbol-toy), summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
code { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--slate); }

.shell { width: min(calc(100% - var(--margin) * 2), var(--maxw)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0 var(--gutter); }
.band { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: 0 var(--gutter); align-items: start; }
.band > * { min-width: 0; }
@supports not (grid-template-columns: subgrid) { .band { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); } }

.skip-link { position: fixed; left: 16px; top: -80px; padding: 12px 16px; background: var(--ink); color: #fff; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 16px; }

/* Quiet text actions */
.quiet { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 15px; line-height: 24px; color: var(--ink); border-bottom: 1px solid rgba(11,11,13,.28); padding-bottom: 2px; transition: border-color .3s, opacity .3s; }
.quiet:hover { border-color: var(--ink); }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--header); background: rgba(243,244,246,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.header-band { align-items: center; height: var(--header); }
.brand { grid-column: 1 / 5; display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .14em; font-size: 14px; line-height: 24px; }
.site-nav { grid-column: 5 / 13; display: flex; justify-content: flex-end; align-items: center; gap: 28px; font-size: 15px; line-height: 24px; }
.site-nav a, .site-nav button { position: relative; padding: 4px 0; opacity: .78; transition: opacity .3s; }
.site-nav a::after, .site-nav button::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .4s var(--ease); }
.site-nav a:hover, .site-nav button:hover { opacity: 1; }
.site-nav a:hover::after, .site-nav button:hover::after { right: 0; }

/* Hero */
.hero { position: relative; isolation: isolate; min-height: 100dvh; display: flex; flex-direction: column; overflow: visible; touch-action: pan-y pinch-zoom; }
.hero-art { overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; transform: translateY(var(--parallax, 0px)); will-change: transform; }
.currents { position: absolute; inset: 0; width: 100%; height: 100%; }
.ripples { transform-box: fill-box; transform-origin: center; }
.hero-stage { position: relative; z-index: 1; flex: 1; display: grid; grid-template-rows: 1fr auto; align-content: center; padding: calc(var(--header) + 20px) 0 32px; }
.stage-band { align-items: center; align-self: center; }
.stage { grid-column: 4 / 10; display: flex; justify-content: center; align-items: center; overflow: visible; }

/* The toy: the parent engine transforms .symbol-motion; this stylesheet never animates it */
.symbol-toy { position: relative; width: min(100%, 52dvh, 540px); aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto; background: none; border: 0; padding: 0; border-radius: 50%; touch-action: pinch-zoom; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; pointer-events: auto; }
.symbol-toy:active { cursor: grabbing; }
.symbol-toy:focus-visible { outline: 2px solid var(--ink); outline-offset: 14px; border-radius: 50%; }
.symbol-toy[data-pointer-focus] { outline: none; }
.symbol-toy::before { content: ''; position: absolute; left: 50%; bottom: -1%; width: 72%; height: 9%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(11,11,13,.34), rgba(11,11,13,.12) 45%, rgba(11,11,13,0) 72%); filter: blur(8px); transform: translate(calc(-50% + var(--toy-x, 0px) * .35), calc(var(--toy-y, 0px) * -.12)); opacity: calc(.95 - var(--toy-speed, 0) * .35); pointer-events: none; }
.symbol-motion { position: relative; z-index: 1; display: block; width: 100%; will-change: transform; isolation: isolate; }
.symbol-motion::before { content: ''; position: absolute; inset: 3%; border-radius: 50%; box-shadow: 0 26px 40px rgba(11,11,13,.26), 0 4px 10px rgba(11,11,13,.16); z-index: -1; pointer-events: none; }
.liquid { isolation: isolate; }
.balance-symbol { width: 100%; height: auto; display: block; position: relative; pointer-events: none; }

.fee { display: flex; flex-direction: column; gap: 0; min-height: 44px; padding: 12px 18px; margin: -12px -18px; border-radius: 22px; cursor: pointer; color: var(--ink); transition: background-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease), color .35s; }
.fee:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 22px; }
.fee[data-pointer-focus]:focus-visible { outline: none; }
.fee-sell[data-active="true"], .fee-sell[aria-pressed="true"] { color: #f4f6f8; background: radial-gradient(circle at 30% 18%, #33353b, #15161a 58%, #08090b); box-shadow: 0 18px 36px rgba(11,11,13,.28), 0 2px 6px rgba(11,11,13,.2), inset 0 1px 0 rgba(255,255,255,.14); transform: translateY(-2px); }
.fee-buy[data-active="true"], .fee-buy[aria-pressed="true"] { color: var(--ink); background: radial-gradient(circle at 30% 18%, #ffffff, #f1f3f6 56%, #dde1e6); box-shadow: 0 18px 36px rgba(11,11,13,.14), 0 2px 6px rgba(11,11,13,.08), inset 0 1px 0 #fff; transform: translateY(-2px); }
.fee-sell[data-active="true"] .fee-value, .fee-sell[aria-pressed="true"] .fee-value, .fee-sell[data-active="true"] .fee-name, .fee-sell[aria-pressed="true"] .fee-name { color: #f4f6f8; }
.fee-sell[data-active="true"] .fee-value span, .fee-sell[aria-pressed="true"] .fee-value span { color: var(--silver); }
.fee-sell[data-active="true"] .fee-name::before, .fee-sell[aria-pressed="true"] .fee-name::before { border-color: #f4f6f8; }
@media (hover: hover) {
  .fee-sell:hover { color: #f4f6f8; background: radial-gradient(circle at 30% 18%, #33353b, #15161a 58%, #08090b); box-shadow: 0 18px 36px rgba(11,11,13,.28), 0 2px 6px rgba(11,11,13,.2), inset 0 1px 0 rgba(255,255,255,.14); transform: translateY(-2px); }
  .fee-sell:hover .fee-value, .fee-sell:hover .fee-name { color: #f4f6f8; }
  .fee-sell:hover .fee-value span { color: var(--silver); }
  .fee-sell:hover .fee-name::before { border-color: #f4f6f8; }
  .fee-buy:hover { background: radial-gradient(circle at 30% 18%, #ffffff, #f1f3f6 56%, #dde1e6); box-shadow: 0 18px 36px rgba(11,11,13,.14), 0 2px 6px rgba(11,11,13,.08), inset 0 1px 0 #fff; transform: translateY(-2px); }
}
.fee-sell { grid-column: 1 / 4; justify-self: end; align-items: flex-end; text-align: right; }
.fee-buy { grid-column: 10 / 13; justify-self: start; align-items: flex-start; text-align: left; }
.fee-value { font: 400 64px/68px var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--ink); }
.fee-value span { font-size: 30px; letter-spacing: 0; margin-left: 2px; color: var(--slate); }
.fee-name { font-size: 18px; line-height: 28px; color: var(--graphite); }
.fee-sell .fee-name::before, .fee-buy .fee-name::after { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink); vertical-align: -1px; }
.fee-sell .fee-name::before { background: var(--ink); margin-right: 10px; }
.fee-buy .fee-name::after { background: #fff; margin-left: 10px; }

.hero-foot { padding-top: 24px; row-gap: 20px; }
.hero-copy { grid-column: 3 / 11; text-align: center; }
.hero-copy h1 { font-size: 46px; line-height: 52px; }
.status { margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 8px; font: 13px/24px var(--mono); color: var(--slate); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink); background: #fff; }
.status[data-status="live"] .status-dot { background: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,13,.08); }
.status[data-status="unavailable"] .status-dot { border-style: dashed; }
.hero-actions { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.scroll-down { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: #fff; border: 1px solid rgba(11,11,13,.12); box-shadow: 0 12px 28px rgba(11,11,13,.12); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.scroll-down:hover { transform: translateY(3px); box-shadow: 0 16px 32px rgba(11,11,13,.18); }

/* Trade */
.trade { padding: 96px 0 104px; scroll-margin-top: var(--header); }
.trade-band > * { grid-column: 2 / 12; }
.trade h2 { font-size: 54px; line-height: 60px; text-align: center; }
.sides { position: relative; margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 36px; overflow: hidden; box-shadow: 0 40px 80px rgba(11,11,13,.14), 0 4px 12px rgba(11,11,13,.06); }
.seam { position: absolute; top: 0; bottom: 0; left: calc(50% - 60px); width: 120px; height: 100%; pointer-events: none; z-index: 3; }
.seam-pearl { fill: var(--pearl); }
.seam-ink { fill: var(--ink); }
.side { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; min-height: 360px; transition: background-color .4s; }
.side-yin { color: var(--pearl); background: var(--ink); padding: 52px 96px 52px 56px; }
.side-yang { color: var(--ink); background: var(--pearl); padding: 52px 56px 52px 104px; }
.side-yin:hover { background: var(--ink-2); }
.side-yang:hover { background: #fff; }
.route { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.coin { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border: 1px solid rgba(11,11,13,.12); box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.coin img[src$="mark.svg"] { width: 40px; height: 40px; }
.side-title { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; }
.side-fee { font: 18px/28px var(--mono); opacity: .85; }
.side-fee span { font-variant-numeric: tabular-nums; }
.side-cta { margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; line-height: 24px; }
.side-cta svg { transition: transform .3s var(--ease); }
.side:hover .side-cta svg { transform: translate(2px, -2px); }
.side[role="button"] .side-cta { opacity: .55; }
.pool-row { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 36px; }
.address code { white-space: nowrap; }
.copy-state { font-size: 13px; color: var(--slate); }
.copy-state:empty { display: none; }

/* Story */
.story { position: relative; padding: 96px 0 104px; overflow: hidden; scroll-margin-top: var(--header); }
.story-current { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.story .shell { position: relative; }
.story-copy { grid-column: 1 / 7; display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 28px; }
.story-copy h2 { font-size: 54px; line-height: 60px; margin-bottom: 6px; }
.story-copy p { color: var(--graphite); max-width: 520px; }
.story-copy .quiet { align-self: flex-start; margin-top: 8px; }
.fee-details { grid-column: 8 / 13; margin-top: 84px; border-radius: 28px; padding: 8px 28px 20px; background: #fff; border: 1px solid rgba(11,11,13,.08); box-shadow: 0 30px 60px rgba(11,11,13,.1); }
.fee-details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 18px; line-height: 24px; }
.fee-details summary::-webkit-details-marker { display: none; }
.fee-details summary svg { transition: transform .4s var(--ease); }
.fee-details[open] summary svg { transform: rotate(45deg); }
.fee-details dl > div { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(11,11,13,.08); font-size: 15px; line-height: 24px; }
.fee-details dd { color: var(--slate); }

/* History */
.history { padding: 96px 0 120px; scroll-margin-top: var(--header); }
.history-head { align-items: end; }
.history-head h2 { grid-column: 1 / 7; font-size: 54px; line-height: 60px; }
.ranges { grid-column: 7 / 13; justify-self: end; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid rgba(11,11,13,.08); }
.ranges button { font: 13px/24px var(--mono); padding: 6px 14px; border-radius: 999px; color: var(--slate); transition: background .3s, color .3s; }
.ranges button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.history-body { margin-top: 32px; }
.history-body > * { grid-column: 1 / -1; }
.surface { border-radius: 36px; padding: 28px 32px 24px; background: #fff; border: 1px solid rgba(11,11,13,.06); box-shadow: 0 34px 70px rgba(11,11,13,.1); }
.legend { display: flex; gap: 24px; font-size: 14px; line-height: 24px; color: var(--slate); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; border-top: 2px solid var(--ink); }
.legend .line-buy { border-top-style: dashed; }
.chart { margin-top: 12px; }
#history-chart { width: 100%; height: 300px; }
#history-chart text { font: 12px var(--mono); fill: var(--slate); }
#history-chart .axis { stroke: rgba(11,11,13,.12); }
#history-chart .series-sell { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
#history-chart .series-buy { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 6 6; stroke-linejoin: round; }
#history-chart .hairline { stroke: var(--ink); stroke-width: 1; opacity: .5; }
#history-chart .empty { font-size: 30px; fill: var(--silver); }
#chart-caption { margin-top: 12px; font: 13px/24px var(--mono); color: var(--slate); min-height: 24px; }

/* Footer */
.site-footer { padding: 56px 0 48px; background: var(--ink); color: var(--pearl); border-radius: 48px 48px 0 0; }
.footer-band { align-items: center; }
.footer-band .brand { grid-column: 1 / 5; font-size: 13px; }
.footer-band p { grid-column: 5 / 13; text-align: right; font-size: 15px; color: var(--silver); }

/* Dialog */
dialog { padding: 40px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid rgba(11,11,13,.08); border-radius: 32px; background: #fff; color: var(--ink); box-shadow: 0 40px 90px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(11,11,13,.5); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(11,11,13,.06); }
dialog h2 { font-size: 36px; line-height: 44px; }
.contract-list { margin-top: 24px; }
.contract-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(11,11,13,.1); font-size: 15px; line-height: 24px; }
.contract-list dd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contract-list code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer { display: inline-flex; flex-shrink: 0; }
dialog > .muted { margin-top: 24px; font-size: 15px; }

/* Responsive */
@media (max-width: 1100px) {
  :root { --margin: 32px; --gutter: 16px; }
  .fee-value { font-size: 50px; line-height: 56px; }
  .fee-value span { font-size: 24px; }
  .symbol-toy { width: min(100%, 48dvh, 480px); }
  .trade-band > * { grid-column: 1 / -1; }
  .side-yin { padding: 44px 80px 44px 40px; }
  .side-yang { padding: 44px 40px 44px 88px; }
  .story-copy { grid-column: 1 / 8; }
  .fee-details { grid-column: 8 / 13; margin-top: 72px; padding-inline: 20px; }
}

@media (max-width: 800px) {
  :root { --cols: 6; --margin: 24px; }
  .brand { grid-column: 1 / 3; font-size: 12px; letter-spacing: .12em; }
  .site-nav { grid-column: 3 / 7; gap: 18px; font-size: 14px; }
  .hero-stage { padding: calc(var(--header) + 12px) 0 20px; }
  .stage { grid-column: 1 / -1; order: -1; }
  .symbol-toy { width: min(100%, 40dvh, 360px); }
  .fee { margin-top: 8px; padding: 10px 14px; margin-inline: -14px; margin-bottom: -10px; }
  .fee-sell { grid-column: 1 / 4; justify-self: start; align-items: flex-start; text-align: left; }
  .fee-buy { grid-column: 4 / 7; justify-self: end; align-items: flex-end; text-align: right; }
  .fee-value { font-size: 40px; line-height: 44px; }
  .fee-value span { font-size: 20px; }
  .fee-name { font-size: 15px; line-height: 24px; }
  .hero-foot { padding-top: 20px; row-gap: 14px; }
  .hero-copy { grid-column: 1 / -1; }
  .hero-copy h1 { font-size: 32px; line-height: 38px; }
  .status { margin-top: 6px; }
  .hero-actions { gap: 10px; }
  .scroll-down { width: 48px; height: 48px; }
  .trade { padding: 72px 0; }
  .trade h2, .story-copy h2, .history-head h2 { font-size: 38px; line-height: 44px; }
  .sides { margin-top: 32px; grid-template-columns: 1fr; border-radius: 28px; }
  .seam { display: none; }
  .side { min-height: 0; }
  .side-yin, .side-yang { padding: 32px 28px; }
  .story { padding: 72px 0; }
  .story-copy { grid-column: 1 / -1; font-size: 17px; line-height: 26px; }
  .fee-details { grid-column: 1 / -1; margin-top: 32px; }
  .history { padding: 72px 0 96px; }
  .history-head h2 { grid-column: 1 / -1; }
  .ranges { grid-column: 1 / -1; justify-self: start; margin-top: 16px; }
  .surface { padding: 20px 18px 16px; border-radius: 28px; }
  #history-chart { height: 240px; }
  .site-footer { border-radius: 32px 32px 0 0; }
  .footer-band .brand { grid-column: 1 / 4; }
  .footer-band p { grid-column: 1 / -1; text-align: left; margin-top: 16px; }
  dialog { padding: 32px 24px; border-radius: 24px; }
  dialog h2 { font-size: 30px; line-height: 36px; }
  .contract-list > div { grid-template-columns: 80px 1fr; }
}

@media (max-width: 520px) {
  :root { --margin: 18px; --gutter: 12px; }
  .brand span { display: none; }
  .site-nav { gap: 14px; font-size: 13px; }
  .symbol-toy { width: min(100%, 38dvh, 320px); }
  .fee-value { font-size: 34px; line-height: 38px; }
  .fee-value span { font-size: 17px; }
  .hero-copy h1 { font-size: 28px; line-height: 34px; }
  .pool-row { gap: 10px 24px; }
  .fee-details dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Ambient motion: surround only, never the toy transform or the symbol geometry */
@media (prefers-reduced-motion: no-preference) {
  .ripples { animation: ripple 12s ease-in-out infinite; }
  @keyframes ripple { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
  .current-a { animation: drift-a 26s ease-in-out infinite alternate; }
  .current-b { animation: drift-b 30s ease-in-out infinite alternate; }
  @keyframes drift-a { from { transform: translate(0, 0); } to { transform: translate(24px, 14px); } }
  @keyframes drift-b { from { transform: translate(0, 0); } to { transform: translate(-22px, -16px); } }
  .scroll-down { animation: bob 2.8s ease-in-out infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
  .scroll-down:hover { animation: none; }
  .hero-stage { animation: appear 1s var(--ease) both; }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
  [data-reveal] { transform: translateY(24px); transition: transform 1s var(--ease); }
  [data-reveal].is-visible { transform: none; }
}
[data-scene-visible="false"] .ripples, [data-scene-visible="false"] .current-a, [data-scene-visible="false"] .current-b, [data-scene-visible="false"] .scroll-down { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *:not(.symbol-motion), *::before, *::after { animation: none !important; transition: none !important; }
  .hero-art { transform: none !important; }
}
