/* InfiniPool — ocean / liquidity, mysterious + grainy, white·black·grey + blue */
:root {
  --bg: #04141d;
  --ink: #f4f6f8;
  --ink-dim: #98a1a9;
  --line: rgba(255, 255, 255, 0.09);
  --panel: rgba(255, 255, 255, 0.03);
  --blue: #4aa8ff;
  --blue-hi: #8fd0ff;
  --blue-deep: #1c5fb0;
  --up: #46d7a6;
  --down: #ff7a7a;
  --white: #ffffff;
  --grey: #6b747c;
  --radius: 18px;
  --max: 1140px;
  --font: 'Helvetica Neue', Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ── underwater ambient layers ──────────────────────────── */
/* --depth is 0 at the surface (top) and 1 at the abyss (bottom); set on scroll */
:root { --depth: 0; }
#caustics { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -4; opacity: 0.55; }
/* sunlit shallow water at the top, deepening downward */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -7;
  background:
    radial-gradient(120% 80% at 50% -25%, rgba(96, 206, 224, 0.26), transparent 55%),
    radial-gradient(70% 55% at 82% 6%, rgba(44, 132, 190, 0.20), transparent 55%),
    radial-gradient(80% 60% at 12% 4%, rgba(120, 224, 226, 0.12), transparent 55%),
    linear-gradient(180deg, #072a34 0%, #05202c 22%, #04141d 48%, #020a12 74%, #01050a 100%);
}
/* god rays streaming down from the surface — fade out as you descend */
.rays {
  position: fixed; inset: 0; z-index: -5; pointer-events: none; mix-blend-mode: screen;
  opacity: calc((1 - var(--depth)) * 0.9);
  background:
    linear-gradient(96deg, transparent 40%, rgba(150, 224, 236, 0.06) 47%, transparent 54%),
    linear-gradient(82deg, transparent 24%, rgba(120, 205, 235, 0.05) 30%, transparent 36%),
    linear-gradient(104deg, transparent 60%, rgba(170, 235, 240, 0.05) 66%, transparent 72%),
    linear-gradient(88deg, transparent 6%, rgba(130, 215, 235, 0.04) 12%, transparent 18%);
  -webkit-mask: linear-gradient(180deg, #000 0%, transparent 62%);
  mask: linear-gradient(180deg, #000 0%, transparent 62%);
  animation: sway 16s ease-in-out infinite alternate;
}
@keyframes sway { from { transform: translateX(-2%) skewX(-1deg); } to { transform: translateX(2%) skewX(1deg); } }
/* the descent: a dark abyss that closes in as --depth grows */
.depth {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  opacity: var(--depth);
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(3, 20, 30, 0.35), transparent 60%),
    linear-gradient(180deg, #021017 0%, #00080f 55%, #00030a 100%);
}
.grain {
  position: fixed; inset: -200%; z-index: -1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 5s steps(7) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 10%{transform:translate(-4%,-4%)}
  30%{transform:translate(3%,-2%)} 50%{transform:translate(-2%,3%)}
  70%{transform:translate(4%,2%)} 90%{transform:translate(-3%,-3%)}
}
.vignette {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 52%, rgba(0,0,0,0.6) 100%);
}

/* ── nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 52px);
  backdrop-filter: blur(14px); background: rgba(4, 5, 6, 0.6);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 20px; letter-spacing: 0.01em; }
.brand b { font-weight: 700; }
.mark { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(120,214,224,0.6)); }
.spin-slow { animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.nav nav > a:not(.price-chip):not(.x-link) { color: var(--ink-dim); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav nav > a:not(.price-chip):not(.x-link):hover { color: var(--ink); }
.x-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-dim); transition: color .2s, border-color .2s; }
.x-link svg { width: 15px; height: 15px; fill: currentColor; }
.x-link:hover { color: var(--ink); border-color: var(--blue-hi); }
.price-chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--ink); font-size: 13.5px; background: rgba(255,255,255,0.03);
  font-variant-numeric: tabular-nums;
}
.price-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 10px var(--up); animation: blink 2s ease-in-out infinite; }
.price-chip .chip-k { font-style: normal; font-size: 10px; letter-spacing: 0.1em; color: var(--grey); text-transform: uppercase; }
.price-chip b { font-weight: 600; }
.price-chip i { font-style: normal; font-size: 12px; color: var(--ink-dim); }
.price-chip i.up { color: var(--up); } .price-chip i.down { color: var(--down); }
@keyframes blink { 50% { opacity: .3; } }

/* ── layout ─────────────────────────────────────────────── */
main { max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 32px); }
section { padding: clamp(60px, 9vw, 120px) 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 46px; }
.section-head .orn {
  width: 40px; height: 40px; flex: none; opacity: 1;
  filter: drop-shadow(0 0 12px rgba(120,214,224,0.5));
}
.section-head h2 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 600; letter-spacing: -0.03em; display: flex; align-items: center; gap: 14px; }
.section-head p { color: var(--ink-dim); margin-top: 6px; font-size: 16.5px; }

/* ── hero ───────────────────────────────────────────────── */
.hero { text-align: center; padding-top: clamp(30px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 72px); border-bottom: none; }
.hero-stage { position: relative; width: min(360px, 74vw); height: min(240px, 48vw); margin: 0 auto clamp(6px, 2vw, 22px); }
.hero-stage > * { position: absolute; inset: 0; margin: auto; }
/* still, soft underwater glow behind the mark — no motion */
.glow { width: 320px; height: 260px; max-width: 96%; background: radial-gradient(closest-side, rgba(120, 214, 224, 0.22), rgba(74, 150, 210, 0.08) 55%, transparent); filter: blur(18px); }
.hero-mark {
  width: 190px; max-width: 56%; height: auto; opacity: 1; z-index: 2;
  filter: drop-shadow(0 0 24px rgba(120, 214, 224, 0.45)) drop-shadow(0 0 70px rgba(44, 132, 190, 0.4));
}
.eyebrow { font-size: 12.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 20px; }
.hero h1 { font-size: clamp(46px, 9vw, 96px); line-height: 0.95; font-weight: 700; letter-spacing: -0.045em; }
.grad {
  background: linear-gradient(100deg, #ffffff, var(--blue-hi) 40%, var(--blue) 60%, var(--blue-deep));
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.lede { max-width: 600px; margin: 28px auto 0; color: var(--ink-dim); font-size: clamp(16px, 2.2vw, 18px); }
.cta { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.btn { position: relative; overflow: hidden; padding: 14px 30px; border-radius: 100px; text-decoration: none; font-size: 15px; background: var(--white); color: #06070a; border: 1px solid var(--white); transition: transform .15s, box-shadow .3s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 46px rgba(74, 168, 255, 0.35); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); box-shadow: none; }

/* ── logo marquee ───────────────────────────────────────── */
.marquee { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); padding: 20px 0; }
.mq-track { display: flex; align-items: center; gap: 42px; width: max-content; animation: marquee 34s linear infinite; }
.mq-track:hover { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 42px; color: var(--grey); font-size: 15px; letter-spacing: 0.28em; text-transform: uppercase; white-space: nowrap; }
.mq-item img { width: 26px; height: 26px; opacity: 0.9; filter: drop-shadow(0 0 6px rgba(74,168,255,0.5)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── headline stats ─────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  position: relative; padding: 28px 26px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); overflow: hidden; min-height: 140px;
  transition: border-color .3s, transform .3s;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 1px; background: linear-gradient(90deg, transparent, rgba(74,168,255,0.5), transparent); opacity: 0; transition: opacity .3s; }
.stat-card:hover { transform: translateY(-3px); border-color: rgba(74,168,255,0.3); }
.stat-card:hover::before { opacity: 1; }
.stat-card.feature { background: linear-gradient(160deg, rgba(74,168,255,0.14), rgba(28,95,176,0.04)); border-color: rgba(74,168,255,0.3); }
.card-wm { position: absolute; right: -18px; bottom: -22px; width: 130px; opacity: 0.08; pointer-events: none; }
.stat-card label { display: block; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); margin-bottom: 14px; }
.stat-card b { font-size: clamp(25px, 3.4vw, 36px); font-weight: 700; letter-spacing: -0.03em; display: block; font-variant-numeric: tabular-nums; }
.stat-card .sub { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-dim); }
.delta { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 600; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); }

/* ── how it works — the loop ────────────────────────────── */
.loop { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 8px; }
.node {
  position: relative; padding: 34px 26px 28px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); transition: border-color .3s, transform .3s;
}
.node:hover { border-color: rgba(74,168,255,0.4); transform: translateY(-4px); }
.node-mark { position: relative; width: 60px; height: 60px; margin-bottom: 18px; display: grid; place-items: center; border: 1px solid rgba(74,168,255,0.28); border-radius: 50%; background: radial-gradient(closest-side, rgba(74,168,255,0.18), rgba(74,168,255,0.04)); box-shadow: inset 0 0 18px rgba(74,168,255,0.15); }
.node-mark img { width: 34px; height: 34px; opacity: 1; filter: drop-shadow(0 0 6px rgba(143,208,255,0.9)); }
.node-mark span { position: absolute; top: -8px; right: -8px; font-size: 11px; letter-spacing: 0.1em; color: var(--blue); background: var(--bg); border: 1px solid var(--line); border-radius: 100px; padding: 2px 7px; }
.node h3 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.node p { color: var(--ink-dim); font-size: 15px; }
.link { align-self: center; width: 48px; height: 2px; position: relative; background: linear-gradient(90deg, rgba(74,168,255,0.15), rgba(74,168,255,0.5)); }
.link::after { content: ''; position: absolute; right: -2px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-hi); box-shadow: 0 0 10px var(--blue); transform: translateY(-50%); animation: flow 2.4s ease-in-out infinite; }
@keyframes flow { 0%{left:-4px;opacity:0} 25%{opacity:1} 100%{left:100%;opacity:0} }

/* ── the pool ───────────────────────────────────────────── */
.pool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pcell { background: #08090b; padding: 22px; }
.pcell label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 10px; }
.pcell b { font-size: 20px; font-weight: 600; word-break: break-word; font-variant-numeric: tabular-nums; }
.pcell b.mono, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; font-weight: 400; }
.pcell b.up { color: var(--up); } .pcell b.down { color: var(--down); }
.hint { margin-top: 18px; color: var(--ink-dim); font-size: 14px; }
.hint code, code { font-family: ui-monospace, monospace; color: var(--blue); font-size: 0.92em; }

/* ── live feed ──────────────────────────────────────────── */
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 12px var(--up); animation: blink 1.6s ease-in-out infinite; display: inline-block; }
.feed { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feed li { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: #08090b; font-size: 14.5px; transition: background .2s; }
.feed li:hover { background: #0b0d10; }
.feed li:last-child { border-bottom: none; }
.feed .badge { flex: none; padding: 4px 11px; border-radius: 100px; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.badge.claim { background: rgba(255,255,255,0.08); color: var(--ink); }
.badge.compound { background: rgba(74,168,255,0.14); color: var(--blue); }
.badge.err { background: rgba(255, 122, 122, 0.14); color: var(--down); }
.feed .detail { flex: 1; color: var(--ink); }
.feed .detail .sim { color: var(--ink-dim); font-size: 12px; margin-left: 8px; }
.feed .when { flex: none; color: var(--grey); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.feed .tx { color: var(--blue); text-decoration: none; font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; transition: color .15s; }
.feed .tx:hover { color: var(--blue-hi); text-decoration: underline; }
.feed-empty { color: var(--ink-dim); justify-content: center; gap: 12px; }
.feed-empty img { width: 22px; height: 22px; opacity: 0.6; }

/* ── footer ─────────────────────────────────────────────── */
footer { max-width: var(--max); margin: 0 auto; padding: 54px clamp(20px, 5vw, 32px) 80px; text-align: center; }
.foot-mark { width: 54px; height: 54px; opacity: 0.9; filter: drop-shadow(0 0 16px rgba(74,168,255,0.4)); animation: float 8s ease-in-out infinite; }
.foot-word { margin-top: 16px; font-size: 20px; letter-spacing: 0.02em; }
.foot-word b { font-weight: 700; }
.foot-sub { margin-top: 8px; color: var(--grey); font-size: 13px; }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 940px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pool-grid { grid-template-columns: repeat(2, 1fr); }
  .loop { grid-template-columns: 1fr; }
  .link { display: none; }
}
@media (max-width: 720px) {
  .nav nav > a:not(.price-chip):not(.x-link) { display: none; }
  .section-head .orn { width: 34px; height: 34px; }
  .feed li { flex-wrap: wrap; gap: 8px; }
  .feed .when { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .spin-slow, .orbit, .section-head .orn, .grad, .mq-track, .link::after, .float, .hero-mark, .foot-mark { animation: none !important; }
}
