/* ============================================================================
   EDDY design tokens
   Locked from assets/avatar.png (radial fuchsia core -> violet corners) and
   assets/banner.png (flat #FC0F7D banner ground, radial-burst icon technique).
   Palette   : void plum bg, fuchsia #FC0F7D primary, magenta #CD20AA mid,
               violet #7B2FCE secondary, warm-white ink. No generic AI purple/
               blue gradient. Every gradient stop below traces to a sampled
               pixel from the actual art.
   Type      : Space Grotesk (display) / Inter (body) / JetBrains Mono (data,
               CA, all numeric readouts, tabular figures so digits don't jitter).
   Spacing   : 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128 px scale.
   Radius    : 4px controls, 14px panels, 999px pills.
   Motion    : one idiom, cubic-bezier(.16,.84,.44,1), a fast-out premium ease,
               reused for handle drag, auto-recenter snap, and reveal transitions.
   ============================================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0A0510;
  --bg-1: #130A1C;
  --bg-2: #1B0E28;
  --panel: #170B22;
  --panel-line: rgba(255,255,255,.08);

  --fuchsia: #FC0F7D;
  --fuchsia-2: #D9126E;
  --magenta: #CD20AA;
  --violet: #7B2FCE;
  --violet-2: #5A21A6;
  --violet-deep: #34145E;

  --ink: #F7EFFB;
  --ink-muted: #BDA9CD;
  --ink-faint: #806D8F;
  --idle: #8A76A0;

  --white: #FFFFFF;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --ease: cubic-bezier(.16,.84,.44,1);

  --radius-sm: 4px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --strip-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, ol, li, figure { margin: 0; }
ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  background:
    radial-gradient(ellipse 1100px 620px at 82% -8%, rgba(123,47,206,.30), transparent 60%),
    radial-gradient(ellipse 900px 700px at -10% 30%, rgba(252,15,125,.14), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- stat strip (nav + CA + actions) ---------- */

.stat-strip {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--strip-h);
  background: rgba(10,5,16,.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--panel-line);
}
.stat-strip__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
}

.stat-strip__ca {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  min-width: 0;
}
.stat-strip__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.ca-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  min-width: 0;
}
.ca-pill:hover { border-color: rgba(252,15,125,.45); }
.ca-pill__value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}
.ca-pill__icon { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.ca-pill__toast {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--fuchsia);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.ca-pill.is-copied .ca-pill__toast { opacity: 1; transform: translateX(-50%) translateY(0); }

.stat-strip__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.chain-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-muted);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  display: none;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--panel-line);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
  flex-shrink: 0;
}
.icon-btn img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn:hover { transform: translateY(-1px); border-color: rgba(252,15,125,.5); }

.buy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--fuchsia), var(--violet-2));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--radius-pill);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 8px 22px -8px rgba(252,15,125,.55);
}
.buy-btn__icon { width: 22px; height: 22px; border-radius: var(--radius-pill); }
.buy-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -6px rgba(252,15,125,.7); }

/* ---------- layout shell ---------- */

main { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fuchsia);
  margin-bottom: 18px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0 40px;
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 4.6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -.02em;
  color: var(--white);
}
.hero__sub {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 46ch;
}

/* ---------- visualizer ---------- */

.visualizer {
  background: linear-gradient(180deg, var(--panel), var(--bg-1));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 24px 24px 22px;
}

.visualizer__readouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--panel-line);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.readout {
  background: var(--bg-1);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.readout--accent { background: linear-gradient(160deg, rgba(252,15,125,.16), rgba(123,47,206,.10)); }
.readout__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.readout__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 19px);
  font-variant-numeric: tabular-nums;
  color: var(--white);
  transition: color .3s var(--ease);
}
.readout--accent .readout__value { color: var(--fuchsia); }
.readout__value.is-idle { color: var(--idle); }

.chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 420;
  border-radius: var(--radius-sm);
  background: radial-gradient(ellipse 700px 340px at 50% 0%, rgba(123,47,206,.14), transparent 70%), var(--bg);
  border: 1px solid var(--panel-line);
  touch-action: none;
}
#chart { width: 100%; height: 100%; display: block; }
.chart-hint {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: .03em;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.chart-hint.is-hidden { opacity: 0; }

.visualizer__controls {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.ar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.ar-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ar-toggle__track {
  width: 40px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  border: 1px solid var(--panel-line);
  position: relative;
  transition: background .25s var(--ease), border-color .25s var(--ease);
  flex-shrink: 0;
}
.ar-toggle__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.ar-toggle input:checked ~ .ar-toggle__track { background: linear-gradient(135deg, var(--fuchsia), var(--violet-2)); border-color: transparent; }
.ar-toggle input:checked ~ .ar-toggle__track .ar-toggle__thumb { transform: translateX(18px); background: var(--white); }
.ar-toggle input:focus-visible ~ .ar-toggle__track { outline: 2px solid var(--fuchsia); outline-offset: 2px; }
.ar-toggle__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.visualizer__note {
  flex: 1 1 320px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}
#recenter-count { color: var(--ink-muted); }

/* ---------- pools ---------- */

.pools { padding: 72px 0 32px; }
.pools__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pools__head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--white);
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}
.pools__table-wrap {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--panel);
}
.pools__table { width: 100%; border-collapse: collapse; min-width: 640px; }
.pools__table th, .pools__table td {
  text-align: left;
  padding: 14px 18px;
  font-size: 13.5px;
  white-space: nowrap;
}
.pools__table thead th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--panel-line);
  font-weight: 500;
}
.pools__table tbody tr { border-bottom: 1px solid var(--panel-line); }
.pools__table tbody tr:last-child { border-bottom: none; }
.pools__table tbody td { color: var(--ink-muted); font-family: var(--font-mono); }
.pools__table tbody td:first-child { color: var(--white); font-family: var(--font-display); font-weight: 600; }
.pool-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.pool-status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fuchsia);
  box-shadow: 0 0 0 3px rgba(252,15,125,.18);
}
.pool-status.is-idle::before { background: var(--idle); box-shadow: 0 0 0 3px rgba(138,118,160,.18); }

/* ---------- how it works ---------- */

.how { padding: 72px 0 96px; }
.how h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--white);
  margin-bottom: 32px;
}
.how__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how__steps li {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  background: linear-gradient(160deg, rgba(255,255,255,.02), transparent);
}
.how__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fuchsia);
  letter-spacing: .08em;
}
.how__steps h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--white);
  margin: 10px 0 8px;
}
.how__steps p { font-size: 13.5px; line-height: 1.6; color: var(--ink-muted); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--panel-line); padding: 32px 0 40px; }
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__mark { width: 28px; height: 28px; border-radius: 7px; }
.footer__name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--white); }
.footer__ticker { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.footer__links { display: flex; gap: 18px; margin-left: auto; }
.footer__links a { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-muted); transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--fuchsia); }
.footer__status { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* ---------- SVG chart element styles (classes applied by app.js) ---------- */

.eddy-path { fill: none; stroke: var(--ink-muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.eddy-band { fill: rgba(252,15,125,.16); stroke: var(--fuchsia); stroke-width: 1.5; transition: fill .35s var(--ease), stroke .35s var(--ease), stroke-dasharray .35s var(--ease); }
.eddy-band.is-idle { fill: rgba(138,118,160,.08); stroke: var(--idle); stroke-dasharray: 5 5; }
.eddy-handle-line { stroke: var(--white); stroke-width: 1.5; stroke-dasharray: 2 4; opacity: .85; }
.eddy-handle-grip { cursor: ns-resize; }
.eddy-handle-grip rect { fill: var(--panel); stroke: var(--panel-line); stroke-width: 1; }
.eddy-handle-grip:hover rect, .eddy-handle-grip.is-active rect { stroke: var(--fuchsia); }
.eddy-handle-grip text { font-family: var(--font-mono); font-size: 12px; fill: var(--ink); }
.eddy-hit { fill: transparent; cursor: ns-resize; }
.eddy-marker-dot { fill: var(--fuchsia); }
.eddy-marker-dot.is-idle { fill: var(--idle); }
.eddy-marker-glow { fill: var(--fuchsia); opacity: .28; }
.eddy-marker-glow.is-idle { fill: var(--idle); opacity: .16; }
.eddy-guide { stroke: var(--panel-line); stroke-width: 1; stroke-dasharray: 3 4; }

/* ---------- error banner spacing safety ---------- */
#eddy-error-banner { font-family: var(--font-mono); }

/* ---------- responsive ---------- */

@media (min-width: 700px) {
  .chain-badge { display: inline-block; }
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 24px; }
  .visualizer__readouts { grid-template-columns: repeat(2, 1fr); }
  .how__steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stat-strip__inner { padding: 0 14px; gap: 10px; }
  .brand__name { display: none; }
  .stat-strip__label { display: none; }
  .ca-pill__value { max-width: 34vw; }
  main { padding: 0 14px; }
  .footer__inner { padding: 0 14px; }
  .visualizer { padding: 16px 14px 16px; }
  .buy-btn span { display: none; }
  .buy-btn { padding: 8px; }
  .buy-btn__icon { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
}
