/* ============================================================
   Surge Swap — zero-fee cross-chain swap UI
   ============================================================ */

:root {
  /* base */
  --bg: #05080a;
  --bg-2: #070c0f;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* text */
  --text: #eaf1f0;
  --muted: #8b9aa3;
  --muted-2: #5f6e76;

  /* accent — emerald */
  --acc: #34d399;
  --acc-2: #10b981;
  --acc-3: #22c55e;
  --acc-soft: rgba(52, 211, 153, 0.14);
  --acc-glow: rgba(16, 185, 129, 0.45);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);

  --maxw: 1160px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;

  /* z-scale */
  --z-nav: 40;
  --z-modal: 80;
  --z-toast: 90;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ============ BACKGROUND ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict;
    transform: translateZ(0); background:
    radial-gradient(1200px 600px at 70% -10%, rgba(16, 185, 129, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(20, 120, 90, 0.08), transparent 55%),
    var(--bg);
}
.bg-aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; backface-visibility: hidden; }
.a1 { width: 520px; height: 520px; top: -120px; right: -60px; background: radial-gradient(circle, rgba(52,211,153,.45), transparent 70%); animation: float1 22s ease-in-out infinite; }
.a2 { width: 460px; height: 460px; top: 30%; left: -140px; background: radial-gradient(circle, rgba(16,185,129,.35), transparent 70%); animation: float2 26s ease-in-out infinite; }
.a3 { width: 600px; height: 600px; bottom: -200px; left: 40%; background: radial-gradient(circle, rgba(13,148,136,.28), transparent 70%); animation: float3 30s ease-in-out infinite; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 40%, transparent 75%);
}
.bg-noise { position: absolute; inset: 0; opacity: .025; will-change: auto; transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 50px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px, -30px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, -40px); } }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-2) 60%, var(--acc-3) 100%);
  color: #04130d; box-shadow: 0 8px 26px -8px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover { box-shadow: 0 12px 34px -8px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,.4); transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-outline:hover { background: var(--surface); border-color: var(--acc); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }

/* ============ NAVBAR ============ */
.nav { position: sticky; top: 0; z-index: var(--z-nav); padding: 14px 0; backface-visibility: hidden; }
.nav-inner {
  width: calc(100% - 32px); max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 14px 10px 18px;
  background: rgba(8, 12, 14, 0.6); backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 10px 40px -20px rgba(0,0,0,.8); will-change: transform;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.brand-name { color: #fff; }
.brand-name .bn-1 { color: #f4f7f6; }
.brand-name .bn-2 { background: linear-gradient(120deg, #22c55e, #a3e635); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-svg { display: block; filter: drop-shadow(0 1px 5px rgba(132, 204, 22, .35)); }
.brand-mark { background: radial-gradient(circle at 50% 32%, rgba(34, 197, 94, .14), rgba(255, 255, 255, .03)); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 10px; font-size: 14.5px; color: var(--muted); font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: #04130d; box-shadow: 0 0 0 0 rgba(4,19,13,.5); }
.btn-launch { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile { width: calc(100% - 32px); max-width: var(--maxw); margin: 8px auto 0; display: flex; flex-direction: column;
  background: rgba(8,12,14,.92); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.nav-mobile a { padding: 14px 18px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 500; }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { background: var(--surface); color: var(--text); }

/* ============ HERO ============ */
.hero { padding: 48px 0 30px; }
.hero-grid { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--acc-soft); border: 1px solid rgba(52,211,153,.25); color: #aef0d3; font-size: 13px; font-weight: 500; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-title { font-size: clamp(40px, 6vw, 66px); font-weight: 700; margin: 22px 0 18px; letter-spacing: -.03em; }
.grad-text { background: linear-gradient(120deg, var(--acc) 0%, var(--acc-3) 50%, #6ee7b7 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 520px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hstat { display: flex; flex-direction: column; }
.hstat-num { font-family: var(--display); font-size: 26px; font-weight: 600; color: #fff; }
.hstat-label { font-size: 13px; color: var(--muted-2); }

/* ============ SWAP CARD ============ */
.swap-wrap { position: relative; }
.swap-glow { position: absolute; inset: -2px; border-radius: 30px; z-index: 0;
  background: conic-gradient(from 120deg, transparent, var(--acc-glow), transparent 40%, rgba(110,231,183,.25), transparent 70%);
  filter: blur(22px); opacity: .55; animation: spin 14s linear infinite; will-change: transform; backface-visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

.swap-card { position: relative; z-index: 1; padding: 20px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(16,22,24,.92), rgba(9,13,15,.92));
  border: 1px solid var(--border); backdrop-filter: blur(20px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04); will-change: transform; }
.swap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 2px 4px; }
.swap-head h2 { font-size: 22px; }
.swap-head-actions { display: flex; gap: 6px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); transition: color .2s, background .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }

.token-box { background: rgba(255,255,255,.025); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: border-color .2s, background .2s; }
.token-box:focus-within { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.04); }
.token-box-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tb-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.tb-priv { font-size: 11px; color: var(--acc); background: var(--acc-soft); padding: 2px 8px; border-radius: 999px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.max-btn { font-size: 12px; font-weight: 700; color: var(--acc); padding: 3px 10px; border-radius: 999px; background: var(--acc-soft); transition: background .2s; }
.max-btn:hover { background: rgba(52,211,153,.22); }

.token-box-mid { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.token-select { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); transition: background .2s, border-color .2s, transform .15s; }
.token-select:hover { background: var(--surface-3); border-color: var(--border-strong); }
.token-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none;
  background: var(--surface-3); border: 1px solid var(--border); position: relative; }
.token-ic img { width: 100%; height: 100%; }
.token-ic .fallback { font-family: var(--display); font-weight: 700; font-size: 13px; color: #fff; }
.token-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.token-sym { font-family: var(--display); font-weight: 600; font-size: 17px; }
.token-chain { font-size: 11.5px; color: var(--muted-2); }
.chev { color: var(--muted); margin-left: 2px; }

.token-amt { text-align: right; flex: 1; min-width: 0; }
.amt-input { width: 100%; text-align: right; border: none; background: none; color: var(--text);
  font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -.02em; outline: none; padding: 0; }
.amt-input::placeholder { color: var(--muted-2); }
.amt-input:read-only { color: #fff; }
.amt-usd { display: block; font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.token-box-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
.bal, .rate { font-size: 12.5px; color: var(--muted-2); }
.bal b { color: var(--muted); font-weight: 600; }

.switch-row { display: flex; justify-content: center; height: 0; position: relative; z-index: 2; }
.switch-btn { position: relative; top: -12px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(180deg, #11181b, #0b1113); border: 4px solid var(--bg); color: var(--text);
  transition: transform .3s cubic-bezier(.6,.2,.1,1.4), color .2s; box-shadow: 0 6px 18px -6px rgba(0,0,0,.8); }
.switch-btn:hover { color: var(--acc); transform: rotate(180deg) scale(1.06); }

.route-card { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: rgba(52,211,153,.05); border: 1px solid rgba(52,211,153,.16); }
.route-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.route-tag { font-size: 13px; font-weight: 600; color: var(--acc); }
.route-all { font-size: 13px; color: #8fd9bd; font-weight: 500; transition: color .2s; }
.route-all:hover { color: var(--acc); text-decoration: underline; }
.route-body { display: flex; flex-direction: column; gap: 10px; }
.route-line { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.route-gas, .route-time { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-weight: 500; }
.route-fee { margin-left: auto; font-weight: 700; color: var(--acc); }
.route-path { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.route-ic { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface-3); flex: none; }
.route-ic img { width: 100%; height: 100%; }
.route-via { font-weight: 600; color: var(--text); }
.route-out { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.route-out b { font-weight: 700; }
.route-best { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--acc); background: var(--acc-soft); padding: 2px 9px; border-radius: 999px; }

.routes-extra { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.route-alt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 13px; transition: border-color .2s, background .2s; }
.route-alt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.route-alt .ra-name { font-weight: 600; }
.route-alt .ra-out { margin-left: auto; color: var(--text); font-weight: 600; }
.route-alt .ra-diff { font-size: 11.5px; color: #f87171; min-width: 46px; text-align: right; }

.btn-swap { width: 100%; margin-top: 16px; padding: 16px; font-size: 16px; border-radius: 16px; }
.swap-foot { font-size: 12px; color: var(--muted-2); text-align: center; margin: 14px 4px 2px; line-height: 1.5; }
.swap-foot b { color: var(--acc); }

/* ============ MARQUEE ============ */
.marquee { margin-top: 56px; width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: scroll 38s linear infinite; will-change: transform; backface-visibility: hidden; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: 15px; opacity: .8; }
.marquee-item img { width: 26px; height: 26px; border-radius: 50%; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ TRUST STRIP ============ */
.strip { padding: 20px 0 10px; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.strip-item { text-align: center; }
.strip-item b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; background: linear-gradient(120deg,#fff,#9fb4ad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.strip-item span { font-size: 13px; color: var(--muted); }

/* ============ SECTIONS ============ */
.section { padding: 80px 0; contain: layout style; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 50px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: 14px; }
.sec-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
.sec-sub { color: var(--muted); font-size: 16.5px; margin-top: 16px; }

/* features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-card { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .25s, border-color .25s, background .25s; contain: layout style paint; }
.feat-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at var(--mx,50%) 0%, rgba(52,211,153,.08), transparent 70%); opacity: 0; transition: opacity .3s; }
.feat-card:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.3); background: var(--surface-2); }
.feat-card:hover::before { opacity: 1; }
.feat-card.big { grid-row: span 2; display: flex; flex-direction: column; }
.feat-card.wide { grid-column: span 2; }
.feat-ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--acc-soft); border: 1px solid rgba(52,211,153,.2); color: var(--acc); }
.feat-ic svg { width: 26px; height: 26px; }
.feat-card h3 { font-size: 20px; margin-bottom: 8px; }
.feat-card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.feat-badge { margin-top: auto; align-self: flex-start; margin-top: 18px; font-size: 12px; font-weight: 700; color: var(--acc); background: var(--acc-soft); padding: 5px 12px; border-radius: 999px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .25s, border-color .25s; contain: layout style paint; }
.step:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.3); }
.step-num { position: absolute; top: 22px; right: 24px; font-family: var(--display); font-size: 40px; font-weight: 700; color: rgba(255,255,255,.06); }
.step-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; background: var(--acc-soft); border: 1px solid rgba(52,211,153,.2); color: var(--acc); }
.step-ic svg { width: 26px; height: 26px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.step-link { font-size: 14px; font-weight: 600; color: var(--acc); transition: gap .2s, color .2s; }
.step-link:hover { color: #6ee7b7; }

/* networks */
.net-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.net-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .25s, border-color .25s, background .25s; cursor: pointer; contain: layout style; }
.net-card:hover { transform: translateY(-3px); border-color: rgba(52,211,153,.3); background: var(--surface-2); }
.net-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; background: var(--surface-3); border: 1px solid var(--border); }
.net-ic img { width: 100%; height: 100%; }
.net-info { display: flex; flex-direction: column; line-height: 1.2; }
.net-info b { font-family: var(--display); font-size: 16px; font-weight: 600; }
.net-info span { font-size: 12.5px; color: var(--muted-2); }
.net-count { margin-left: auto; font-size: 12px; color: var(--acc); background: var(--acc-soft); padding: 4px 10px; border-radius: 999px; font-weight: 600; }

/* security split */
.sec-split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.sec-split .sec-title { text-align: left; }
.check-list { list-style: none; padding: 0; margin: 26px 0 28px; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--text); }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--acc); padding: 4px; background: var(--acc-soft); border-radius: 50%; }

.sec-visual { display: grid; place-items: center; }
.orbit { position: relative; width: 340px; height: 340px; display: grid; place-items: center; }
.orbit-core { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(16,22,24,.95), rgba(9,13,15,.95)); border: 1px solid rgba(52,211,153,.3); box-shadow: 0 0 50px -6px var(--acc-glow); z-index: 3; }
.orbit-ring { position: absolute; border: 1px dashed rgba(255,255,255,.1); border-radius: 50%; will-change: transform; }
.orbit-ring.r1 { width: 170px; height: 170px; animation: orbit 18s linear infinite; }
.orbit-ring.r2 { width: 250px; height: 250px; animation: orbit 26s linear infinite reverse; }
.orbit-ring.r3 { width: 330px; height: 330px; animation: orbit 34s linear infinite; }
.orb { position: absolute; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); box-shadow: 0 6px 16px -4px rgba(0,0,0,.6); }
.orb img { width: 100%; height: 100%; }
.orbit-ring.r1 .orb:nth-child(1) { top: -20px; left: 50%; margin-left: -20px; }
.orbit-ring.r1 .orb:nth-child(2) { bottom: -20px; left: 50%; margin-left: -20px; }
.orbit-ring.r2 .orb:nth-child(1) { top: 50%; left: -20px; margin-top: -20px; }
.orbit-ring.r2 .orb:nth-child(2) { top: 12%; right: 0; }
.orbit-ring.r2 .orb:nth-child(3) { bottom: 12%; right: 4%; }
.orbit-ring.r3 .orb:nth-child(1) { top: 30%; left: -20px; }
.orbit-ring.r3 .orb:nth-child(2) { bottom: 18%; right: -10px; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes orbit-counter { to { transform: rotate(-360deg); } }
.orbit-ring .orb { animation: orbit-counter 18s linear infinite; }
.orbit-ring.r2 .orb { animation-duration: 26s; animation-direction: normal; }
.orbit-ring.r3 .orb { animation-duration: 34s; }

/* faq */
.faq-wrap { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color .2s, background .2s; }
.faq-item.open { border-color: rgba(52,211,153,.3); background: var(--surface-2); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; text-align: left; font-family: var(--display); font-weight: 600; font-size: 16.5px; }
.faq-q svg { flex: none; color: var(--acc); transition: transform .3s; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* cta */
.cta { position: relative; text-align: center; padding: 60px 30px; border-radius: 30px; overflow: hidden;
  background: linear-gradient(160deg, rgba(16,185,129,.12), rgba(8,12,14,.6)); border: 1px solid rgba(52,211,153,.25); }
.cta-glow { position: absolute; width: 500px; height: 300px; top: -120px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, var(--acc-glow), transparent 70%); filter: blur(60px); opacity: .5; }
.cta h2 { position: relative; font-size: clamp(28px, 4vw, 42px); }
.cta p { position: relative; color: var(--muted); font-size: 17px; margin: 14px 0 28px; }
.cta-actions { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--border); padding: 56px 0 30px; margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(8,12,14,.5)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 2fr; gap: 50px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 320px; margin: 16px 0 20px; }
.socials { display: flex; gap: 10px; }
.social { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: color .2s, background .2s, border-color .2s, transform .2s; }
.social svg { width: 18px; height: 18px; }
.social:hover { color: var(--acc); background: var(--surface-2); border-color: rgba(52,211,153,.3); transform: translateY(-2px); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); font-family: var(--font); font-weight: 600; margin-bottom: 4px; }
.footer-col a, .foot-link { color: var(--muted); font-size: 14.5px; text-align: left; transition: color .2s; padding: 0; }
.footer-col a:hover, .foot-link:hover { color: var(--acc); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.footer-bottom span { font-size: 13.5px; color: var(--muted-2); }
.footer-legal { display: flex; align-items: center; gap: 18px; }
.status-ok { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: blink 2.4s infinite; }

/* ============ MODALS ============ */
.modal-root { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,5,6,.7); backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal { position: relative; width: 100%; max-width: 440px; max-height: 86vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16,22,24,.98), rgba(10,14,16,.98)); border: 1px solid var(--border-strong); border-radius: 24px;
  box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2,.8,.2,1.1); overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; }
.modal-head h3 { font-size: 19px; }

.token-search { display: flex; align-items: center; gap: 10px; margin: 0 20px 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.token-search:focus-within { border-color: rgba(52,211,153,.4); }
.token-search input { flex: 1; border: none; background: none; outline: none; color: var(--text); font-size: 15px; }
.token-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.quick-chip { display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; transition: border-color .2s, background .2s; }
.quick-chip:hover { border-color: rgba(52,211,153,.35); background: var(--surface-2); }
.quick-chip img, .quick-chip .qf, .quick-chip .fallback { width: 22px; height: 22px; border-radius: 50%; }
.quick-chip .qf { display: grid; place-items: center; font-size: 10px; font-weight: 700; }
/* generic icon fallback badge */
.fallback { border-radius: 50%; font-family: var(--display); font-weight: 700; font-size: 11px; color: #fff; overflow: hidden; }

.token-list { overflow-y: auto; padding: 6px 12px 16px; border-top: 1px solid var(--border); }
.token-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; text-align: left; transition: background .15s; }
.token-row:hover { background: var(--surface-2); }
.token-row .tr-ic { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); flex: none; }
.token-row .tr-ic img { width: 100%; height: 100%; }
.token-row .tr-ic .fallback { font-family: var(--display); font-weight: 700; font-size: 13px; }
.token-row .tr-meta { display: flex; flex-direction: column; line-height: 1.25; }
.token-row .tr-sym { font-weight: 600; font-family: var(--display); font-size: 15.5px; }
.token-row .tr-name { font-size: 12.5px; color: var(--muted-2); }
.token-row .tr-bal { margin-left: auto; text-align: right; }
.token-row .tr-bal b { display: block; font-size: 14px; font-weight: 600; }
.token-row .tr-bal span { font-size: 12px; color: var(--muted-2); }
.token-empty { text-align: center; color: var(--muted-2); padding: 30px; font-size: 14px; }

/* settings */
.settings-modal { max-width: 420px; }
.set-block { padding: 4px 20px 18px; }
.set-label { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.slip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.slip-btn { padding: 9px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--muted); transition: all .2s; }
.slip-btn:hover { border-color: var(--border-strong); color: var(--text); }
.slip-btn.active { background: var(--acc-soft); border-color: rgba(52,211,153,.4); color: var(--acc); }
.slip-custom { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 90px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.slip-custom input { width: 100%; border: none; background: none; outline: none; color: var(--text); font-size: 14px; padding: 9px 0; }
.deadline-row { display: flex; align-items: center; gap: 10px; }
.deadline-row input { width: 80px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 14px; outline: none; }
.deadline-row input:focus { border-color: rgba(52,211,153,.4); }
.deadline-row span { color: var(--muted); font-size: 14px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; cursor: pointer; }
.toggle-row:last-child { border-bottom: none; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { display: block; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); position: relative; transition: background .2s; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .toggle-track { background: var(--acc-2); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }

/* activity */
.activity-empty { text-align: center; padding: 30px 30px 36px; }
.activity-ic { width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.activity-empty p { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.activity-empty > span { display: block; color: var(--muted-2); font-size: 14px; margin-bottom: 22px; }

/* ============ TOASTS ============ */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; align-items: center; width: calc(100% - 40px); max-width: 420px; }
.toast { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px;
  background: rgba(16,22,24,.96); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(12px);
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1.1); }
.toast.out { animation: toastOut .3s forwards; }
.toast-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast-ic.ok { background: var(--acc-soft); color: var(--acc); }
.toast-ic.info { background: rgba(96,165,250,.15); color: #60a5fa; }
.toast-ic.warn { background: rgba(251,191,36,.15); color: #fbbf24; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; font-size: 14.5px; }
.toast-msg { font-size: 13px; color: var(--muted); }
.toast-close { color: var(--muted-2); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(16px); } }

/* ============ CONTENT VISIBILITY (skip rendering offscreen sections) ============ */
#features, #how, #networks, #security, #faq { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.strip { content-visibility: auto; contain-intrinsic-size: auto 120px; }
.footer { content-visibility: auto; contain-intrinsic-size: auto 300px; }
.faq-item { contain: layout style; }
.modal-backdrop { will-change: opacity; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .swap-wrap { max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-card.big { grid-row: span 1; }
  .feat-card.wide { grid-column: span 2; }
  .sec-split { grid-template-columns: 1fr; gap: 36px; }
  .sec-split .sec-title { text-align: center; }
  .sec-split .check-list { max-width: 420px; margin-left: auto; margin-right: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .btn-launch { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile[hidden] { display: none; }
  .connect-label { display: none; }
  #navConnect { padding: 11px; width: 42px; height: 42px; }
  .dot-pulse { width: 8px; height: 8px; }
  .feature-grid, .steps, .net-grid { grid-template-columns: 1fr; }
  .feat-card.wide { grid-column: span 1; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .hero-stats { gap: 22px; }
  .section { padding: 60px 0; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .orbit { transform: scale(.82); }
}

@media (max-width: 420px) {
  .amt-input { font-size: 26px; }
  .hero-cta .btn { flex: 1; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ============ A11Y ============ */
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
