/* HookOS Infura Bridge — Atlas v3 "Depth & Glow" (pixel-perfect to handoff-v3).
   Base tokens from the HookOS brand (Paper light, acid green, Inter + JetBrains Mono);
   v3 utilities copied verbatim from atlas2.css (ATLAS v3 — BOLD REFRESH). Additive only. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --paper: #f4f5f1; --paper-2: #e9ebe5; --card: #ffffff;
  --line: rgba(16,22,26,0.1); --line-2: rgba(16,22,26,0.18);
  --ink: #10161a; --ink-2: #45505a; --ink-3: #7c868e; --ink-4: #aeb6bc;
  --acid: #38e07b; --acid-ink: #0c8a42; --acid-bg: rgba(56,224,123,0.1); --acid-line: rgba(56,224,123,0.4);
  --gold: #c79212; --crimson: #e0484a; --crimson-ink: #c0282a;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.pos { color: var(--acid-ink); } .neg { color: var(--crimson-ink); }

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 12px 24px; background: rgba(255,255,255,0.72); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand .hex { width: 26px; height: 26px; color: var(--acid-ink); }
.brand .bname { font-weight: 800; letter-spacing: -0.02em; font-size: 16px; }
.brand .btag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; }

/* ---- nav links ---- */
.nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav a { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 7px 11px; border-radius: 8px; transition: background 140ms, color 140ms; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.active { color: var(--acid-ink); background: var(--acid-bg); font-weight: 600; }
.nav a .ext { font-size: 9px; opacity: 0.5; margin-left: 3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ---- socials ---- */
.socials { display: flex; align-items: center; gap: 4px; }
.soc { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); border: 1px solid var(--line); transition: color 140ms, border-color 140ms, background 140ms; }
.soc:hover { color: var(--acid-ink); border-color: var(--acid-line); background: var(--acid-bg); }
.soc svg { width: 15px; height: 15px; }

/* mobile nav */
@media (max-width: 880px) {
  .nav { display: none; }
  .socials { display: none; }
}

/* ---- layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- hero band (signature opener: lane health) ---- */
.hero-v3 { position: relative; overflow: hidden; background: radial-gradient(1100px 520px at 72% -10%, var(--acid-bg), transparent 60%); padding: 44px 0 28px; }
.hero-v3 .hero-v3-h { font-size: clamp(40px, 5.4vw, 66px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; margin: 14px 0 0; }
.hero-v3 .hero-v3-grad { background: linear-gradient(120deg, var(--acid-ink), #2fb866); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--ink-2); font-size: 16px; max-width: 540px; margin-top: 14px; line-height: 1.5; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; background: #fff; border: 1px solid rgba(47,184,102,0.4); box-shadow: 0 4px 14px rgba(13,16,12,0.05); font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; color: var(--acid-ink); }
.live-pill .ld { width: 8px; height: 8px; border-radius: 8px; background: var(--acid); box-shadow: 0 0 8px var(--acid); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ---- lane stat band ---- */
.sband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.stat-v3 { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(13,16,12,0.04), 0 8px 24px rgba(13,16,12,0.06); }
.stat-v3::before { content:""; position:absolute; top:0; left:14px; right:14px; height:1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent); }
.stat-v3.feat { background: linear-gradient(180deg, var(--acid-bg), #fff 60%); border-color: rgba(47,184,102,0.27); }
.stat-v3 .sv3-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.stat-v3 .sv3-v { font-family: var(--mono); font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.stat-v3 .sv3-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.stat-v3 .sv3-s { font-family: var(--mono); font-size: 11.5px; color: var(--acid-ink); }

.divider-v3 { height:1px; border:none; margin: 36px 0; background: linear-gradient(90deg, transparent, rgba(56,224,123,0.34) 50%, transparent); }

/* ---- bridge card ---- */
.bridge-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 880px) { .bridge-grid { grid-template-columns: 1fr; } }
.card-v3 { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(13,16,12,0.04), 0 8px 24px rgba(13,16,12,0.06); transition: transform 180ms cubic-bezier(0.22,1,0.36,1), box-shadow 180ms, border-color 180ms; }
.card-v3::before { content:""; position:absolute; top:0; left:16px; right:16px; height:1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent); border-radius:16px 16px 0 0; pointer-events:none; }
.card-v3.lift:hover { transform: translateY(-2px); border-color: var(--acid-line); box-shadow: 0 2px 4px rgba(13,16,12,0.05), 0 18px 40px -12px rgba(12,138,66,0.18); }
.card-pad { padding: 22px; }
.card-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }

/* chain row + leg box */
.leg { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; }
.leg-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 10px; }
.leg-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chain-sel { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.chain-sel .cdot { width: 9px; height: 9px; border-radius: 50%; }
.amt-in { border: none; background: transparent; font-family: var(--mono); font-size: 26px; font-weight: 700; text-align: right; width: 100%; color: var(--ink); outline: none; letter-spacing: -0.02em; }
.amt-in::placeholder { color: var(--ink-4); }
.leg-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 11.5px; color: var(--ink-3); }
.maxbtn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--acid-ink); border: 1px solid var(--acid-line); background: var(--acid-bg); border-radius: 6px; padding: 3px 8px; cursor: pointer; }

.swap-row { display: flex; justify-content: center; margin: -7px 0; position: relative; z-index: 2; }
.swap-btn { width: 38px; height: 38px; border-radius: 11px; background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(13,16,12,0.08); color: var(--ink-2); transition: transform 160ms, color 160ms, border-color 160ms; }
.swap-btn:hover { transform: rotate(180deg); color: var(--acid-ink); border-color: var(--acid-line); }

/* quote rows */
.qrow { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.qrow .qk { color: var(--ink-3); } .qrow .qv { font-family: var(--mono); color: var(--ink); }

/* buttons */
.btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font); font-weight: 600; font-size: 14px; padding: 13px 18px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; transition: transform 140ms, box-shadow 140ms, background 140ms; width: 100%; }
.btn2:hover { transform: translateY(-1px); }
.btn2.pri { background: var(--acid-ink); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -6px rgba(12,138,66,0.5); }
.btn2.pri:hover { box-shadow: 0 12px 26px -6px rgba(12,138,66,0.6); }
.btn2:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn2.block { margin-top: 16px; }

/* lane diagram card */
.lane { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; }
.lane-node { text-align: center; flex: 1; }
.lane-node .ln-name { font-weight: 700; font-size: 15px; }
.lane-node .ln-blk { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.lane-node .ln-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px var(--acid); margin: 0 auto 8px; }
.lane-arrow { flex-shrink: 0; color: var(--acid-ink); font-family: var(--mono); font-size: 18px; }

.chip2 { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); text-transform: uppercase; }
.chip2.acid { color: var(--acid-ink); border-color: var(--acid-line); background: var(--acid-bg); }

/* status / footer */
.statusbox { margin-top: 14px; font-family: var(--mono); font-size: 12px; padding: 12px 14px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); display: none; }
.statusbox.show { display: block; }
.statusbox.err { color: var(--crimson-ink); border-color: rgba(224,72,74,0.4); background: rgba(224,72,74,0.07); }
.statusbox.ok { color: var(--acid-ink); border-color: var(--acid-line); background: var(--acid-bg); }
/* ---- scroll reveal + count-up (fail-open: visible by default) ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms cubic-bezier(.22,1,.36,1), transform 600ms cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- section heading ---- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 16px; }
.sec-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.sec-head .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* ---- charts grid ---- */
.charts { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; }
@media (max-width: 980px) { .charts { grid-template-columns: 1fr; } }

/* donut (fee split) */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 124px; height: 124px; flex-shrink: 0; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; transition: stroke-dashoffset 1.1s cubic-bezier(.22,1,.36,1); }
.donut-mid { position: relative; }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-row .lg-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.legend-row .lg-k { color: var(--ink-2); }
.legend-row .lg-v { margin-left: auto; font-family: var(--mono); font-weight: 600; color: var(--ink); }

/* sparkline */
.spark { width: 100%; height: 66px; display: block; }
.spark path.line { fill: none; stroke: var(--acid-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark path.area { fill: url(#sparkfill); opacity: 0.5; }
.spark .draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawline 1.4s ease forwards; }
@keyframes drawline { to { stroke-dashoffset: 0; } }

/* bars subgraph */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 90px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--acid), #2fb866); height: 0; transition: height 1s cubic-bezier(.22,1,.36,1); min-height: 3px; }
.bar.alt { background: linear-gradient(180deg, #7cc4ff, #2a7bb5); }
.bar-lbl { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.06em; }

/* quick-amount buttons */
.quick { display: flex; gap: 7px; margin: 10px 0 2px; }
.qbtn { flex: 1; font-family: var(--mono); font-size: 11px; padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: all 140ms; }
.qbtn:hover, .qbtn.on { color: var(--acid-ink); border-color: var(--acid-line); background: var(--acid-bg); }

.foot { text-align: center; padding: 40px 0 24px; color: var(--ink-4); font-size: 11px; letter-spacing: 0.06em; }
.foot b { color: var(--ink-3); font-weight: 600; }
.banner { margin: 18px 0 0; padding: 11px 15px; border-radius: 11px; background: rgba(199,146,18,0.1); border: 1px solid rgba(199,146,18,0.35); color: #8a6608; font-size: 12.5px; font-family: var(--mono); display: flex; gap: 9px; align-items: center; }
