:root {
  --primary: #1657d6;
  --primary-dark: #0f3f9f;
  --primary-50: #eef3fd;
  --ink: #0c1a36;
  --ink-2: #2c3a55;
  --muted: #6a7896;
  --line: #e5ebf3;
  --bg: #f6f8fc;
  --card: #ffffff;
  --success: #1f9e6f;
  --warning: #b6701c;
  --danger: #c73e3e;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(12, 26, 54, 0.06);
  --shadow: 0 6px 24px rgba(12, 26, 54, 0.08);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Top nav ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.brand-sub { font-size: .72rem; color: var(--muted); display: block; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: .94rem; }
.nav a:hover { background: var(--primary-50); color: var(--primary-dark); text-decoration: none; }
.nav a.active { color: var(--primary-dark); background: var(--primary-50); }
.nav-cta { display: flex; gap: 8px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 8px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-size: .95rem; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--primary-50); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  background: radial-gradient(900px 360px at 12% -20%, #d8e4fb 0%, transparent 60%),
              radial-gradient(700px 320px at 100% 0%, #e9f0ff 0%, transparent 65%),
              #fff;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: var(--primary-50);
  color: var(--primary-dark); font-weight: 600; font-size: .82rem; letter-spacing: .02em;
}
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.trust-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.trust-item { display: flex; gap: 10px; align-items: flex-start; }
.trust-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-top: 7px; flex-shrink: 0; }
.trust-item small { color: var(--muted); display: block; }
.trust-item strong { color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-title { max-width: 720px; margin-bottom: 32px; }
.section-title .eyebrow { margin-bottom: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.icon-square {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary-50);
  display: grid; place-items: center; color: var(--primary-dark); margin-bottom: 14px;
  font-weight: 700;
}

/* ---------- Dashboard preview / dashboard page ---------- */
.preview-wrap {
  background: #fff; border-radius: 14px; border: 1px solid var(--line);
  padding: 18px; box-shadow: var(--shadow);
}
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.preview-head .balance { font-size: 1.6rem; font-weight: 700; }
.preview-head .balance small { color: var(--muted); font-size: .82rem; font-weight: 500; display: block; }

.assets-list { display: flex; flex-direction: column; gap: 8px; }
.asset {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 8px; background: var(--bg);
}
.asset .sym { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .82rem; }
.sym.btc { background: #f2a900; }
.sym.eth { background: #4d68b3; }
.sym.usdt { background: #26a17b; }
.asset .meta b { display: block; font-size: .95rem; }
.asset .meta small { color: var(--muted); }
.asset .val { text-align: right; }
.asset .val b { display: block; }
.asset .val small { color: var(--muted); }

/* ---------- Dashboard layout (full page) ---------- */
.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 32px 0;
}
.dash aside {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; height: max-content; position: sticky; top: 88px;
}
.dash aside .who { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.dash aside .who b { display: block; }
.dash aside .who small { color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { padding: 9px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 500; }
.side-nav a.active { background: var(--primary-50); color: var(--primary-dark); }
.side-nav a:hover { background: var(--bg); text-decoration: none; }

.dash-main { display: flex; flex-direction: column; gap: 22px; }
.balance-block {
  background: linear-gradient(135deg, #1657d6, #0f3f9f);
  color: #fff; border-radius: 14px; padding: 26px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center;
}
.balance-block .label { opacity: .8; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.balance-block .amt { font-size: 2.1rem; font-weight: 700; margin-top: 6px; }
.balance-block .delta { margin-top: 8px; font-size: .9rem; opacity: .9; }
.balance-block .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.balance-block .actions .btn { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
.balance-block .actions .btn:hover { background: rgba(255,255,255,.22); }

/* ---------- Tables ---------- */
.tx-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tx-table th, .tx-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tx-table th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.tx-table tr:last-child td { border-bottom: none; }
.tx-table .pos { color: var(--success); font-weight: 600; }
.tx-table .neg { color: var(--ink); font-weight: 600; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill.green { background: #e6f6ef; color: var(--success); }
.pill.amber { background: #fdf2e3; color: var(--warning); }
.pill.gray  { background: #eef1f6; color: var(--muted); }

/* ---------- Forms ---------- */
.auth-wrap { max-width: 460px; margin: 64px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: .96rem; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,87,214,.12);
}
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.checkbox-row input { margin-top: 3px; }
.note {
  background: var(--primary-50); border: 1px solid #c7d6f6; color: var(--ink);
  padding: 12px 14px; border-radius: 8px; font-size: .88rem;
}
.demo-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }

/* ---------- Lists / specs ---------- */
.spec-grid { display: grid; grid-template-columns: 220px 1fr; gap: 16px 24px; }
.spec-grid dt { font-weight: 600; color: var(--ink); }
.spec-grid dd { margin: 0; color: var(--ink-2); }

.steps { counter-reset: step; display: grid; gap: 14px; }
.steps li {
  list-style: none; padding: 18px 18px 18px 64px; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer { background: #0c1a36; color: #c7d2e3; padding: 48px 0 24px; margin-top: 56px; }
.site-footer h4 { color: #fff; font-size: .92rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #c7d2e3; }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.foot-bottom { border-top: 1px solid #1c2c4f; margin-top: 32px; padding-top: 16px; font-size: .82rem; color: #8a99b8; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.disclaimer { background: #ffffff; border-left: 4px solid var(--warning); padding: 14px 16px; border-radius: 6px; color: var(--ink-2); font-size: .88rem; }

.legal-page { background: #fff; padding: 40px 0; }
.legal-page article { max-width: 820px; margin: 0 auto; }
.legal-page article h1 { margin-bottom: 8px; }
.legal-page article .updated { color: var(--muted); margin-bottom: 28px; }
.legal-page article h2 { margin-top: 28px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash aside { position: static; }
  .balance-block { grid-template-columns: 1fr; }
  .balance-block .actions { justify-content: flex-start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { width: 100%; }
  .nav-cta { margin-top: 6px; }
  .menu-toggle { display: inline-flex; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .spec-grid dd { margin-bottom: 12px; }
  .foot-grid { grid-template-columns: 1fr; }
  .tx-table th:nth-child(4), .tx-table td:nth-child(4) { display: none; }
}
