/* ============================================================
   bfunds : design system
   BNB-chain native: gold/amber on deep charcoal, light + dark
   ============================================================ */

:root {
  /* Brand */
  --gold: #F0B90B;
  --gold-soft: #F8D33A;
  --gold-deep: #B88908;
  --teal: #2EBAC6;
  --violet: #7C6CF0;
  --green: #16C784;
  --red: #EA3943;

  /* Dark theme (default) */
  --bg: #0B0E11;
  --bg-2: #0F141A;
  --surface: #151A21;
  --surface-2: #1B222C;
  --line: #232B36;
  --line-soft: #1B222C;
  --text: #EAECEF;
  --text-muted: #8A94A6;
  --text-dim: #5E6673;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.7);
  --glass: rgba(21,26,33,.72);
  --glow: 0 0 0 1px rgba(240,185,11,.18), 0 8px 40px -8px rgba(240,185,11,.25);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #F6F7F9;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F2F4F7;
  --line: #E4E8EE;
  --line-soft: #EDF0F4;
  --text: #10141A;
  --text-muted: #5B6577;
  --text-dim: #909AAB;
  --shadow: 0 20px 50px -24px rgba(16,20,26,.22);
  --glass: rgba(255,255,255,.75);
  --glow: 0 0 0 1px rgba(240,185,11,.35), 0 10px 40px -10px rgba(240,185,11,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 78% -5%, rgba(240,185,11,.14), transparent 60%),
    radial-gradient(50% 40% at 8% 8%, rgba(124,108,240,.10), transparent 60%);
  pointer-events: none;
}

h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); }
.gold { color: var(--gold); }
.muted { color: var(--text-muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 60px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.eyebrow::before { content:""; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.lead { font-size: 1.15rem; max-width: 620px; }
.center { text-align: center; }
.center .lead, .center .eyebrow { margin-left: auto; margin-right: auto; }
.center .eyebrow { display: inline-flex; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: .95rem; font-weight: 650; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1A1400; box-shadow: 0 10px 30px -10px rgba(240,185,11,.6);
}
.btn-primary:hover { box-shadow: 0 14px 40px -8px rgba(240,185,11,.75); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  background: var(--glass);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand svg { display: block; }
.brand .b-tag { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 14px; border-radius: 999px; font-size: .92rem; font-weight: 550; color: var(--text-muted);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
    transform: translateY(-120%); transition: transform .3s ease; z-index: 40;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 1rem; }
  .nav-toggle { display: grid; }
  .nav-desktop-cta { display: none; }
}

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card-glow { box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 60px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin-bottom: 20px; }
.hero h1 .stroke { color: var(--gold); }
.hero-sub { font-size: 1.2rem; max-width: 520px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-trust .t { }
.hero-trust .t b { display: block; font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.hero-trust .t span { font-size: .82rem; color: var(--text-dim); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .82rem; color: var(--text-muted);
  margin-bottom: 26px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,199,132,.18); }

/* ---------- wallet visual (hero) ---------- */
.wallet-card {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.wallet-card::after {
  content:""; position:absolute; inset: -40% -20% auto auto; width: 60%; height: 120%;
  background: radial-gradient(circle, rgba(240,185,11,.18), transparent 65%);
}
.wc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.wc-label { font-size: .8rem; color: var(--text-dim); }
.wc-bal { font-size: 2.1rem; font-weight: 750; letter-spacing: -.02em; }
.wc-bal small { font-size: .95rem; color: var(--text-muted); font-weight: 500; }
.stream-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line);
}
.stream-row:first-of-type { border-top: none; }
.token-badge {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .82rem; color: #0B0E11; flex-shrink: 0;
}
.stream-row .meta { flex: 1; min-width: 0; }
.stream-row .meta b { font-size: .92rem; }
.stream-row .meta span { font-size: .78rem; color: var(--text-dim); display: block; }
.stream-row .amt { text-align: right; }
.stream-row .amt b { font-size: .95rem; }
.stream-row .amt span { font-size: .78rem; color: var(--green); }

/* ---------- steps / flow ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
@media (max-width: 900px){ .steps { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 560px){ .steps { grid-template-columns: 1fr;} }
.step { position: relative; }
.step .n {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); color: var(--gold);
  margin-bottom: 16px; font-size: 1.05rem;
}
.step h3 { font-size: 1.08rem; }
.step p { font-size: .92rem; margin: 0; }

/* flywheel */
.flywheel { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px){ .flywheel { grid-template-columns: 1fr; } }
.flow-list { list-style: none; padding: 0; margin: 0; }
.flow-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.flow-list li:last-child { border: none; }
.flow-list .ico { width: 34px; height: 34px; border-radius: 9px; display:grid; place-items:center; background: var(--surface-2); border: 1px solid var(--line); color: var(--gold); flex-shrink: 0; }
.flow-list b { display: block; }
.flow-list span { font-size: .9rem; color: var(--text-muted); }

/* ---------- feature list ---------- */
.feature { }
.feature .fico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(240,185,11,.18), rgba(240,185,11,.04));
  border: 1px solid rgba(240,185,11,.25); color: var(--gold); margin-bottom: 16px;
}
.feature h3 { font-size: 1.12rem; }
.feature p { font-size: .93rem; margin: 0; }

/* ---------- stats band ---------- */
.band { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stat-tile { text-align: center; padding: 8px; }
.stat-tile b { display: block; font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 780; letter-spacing: -.03em; }
.stat-tile span { font-size: .85rem; color: var(--text-dim); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 15px 18px; font-size: .92rem; }
thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); font-weight: 650; border-bottom: 1px solid var(--line); }
tbody tr { border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child { border: none; }
tbody tr:hover { background: var(--surface-2); }
td.right, th.right { text-align: right; }
.tag { display: inline-flex; align-items:center; gap:6px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.tag-up { background: rgba(22,199,132,.14); color: var(--green); }
.tag-down { background: rgba(234,57,67,.14); color: var(--red); }
.stock-cell { display: flex; align-items: center; gap: 11px; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font: inherit; font-weight: 600; font-size: 1rem; padding: 18px 20px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-q .chev { transition: transform .25s; color: var(--gold); flex-shrink: 0; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a .inner { padding: 0 20px 18px; color: var(--text-muted); font-size: .94rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); padding: 56px 0 30px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px){ .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
.foot-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--text-muted); font-size: .92rem; padding: 5px 0; }
.foot-col a:hover { color: var(--gold); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: .82rem; color: var(--text-dim); }
.disclaimer { font-size: .8rem; color: var(--text-dim); max-width: 720px; margin-top: 14px; line-height: 1.6; }

/* ---------- app dashboard ---------- */
.app-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 5px; border-radius: 999px; width: max-content; margin-bottom: 28px; max-width:100%; overflow:auto; }
.app-tabs button { font: inherit; font-weight: 600; font-size: .9rem; color: var(--text-muted); background: none; border: none; padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.app-tabs button.active { background: var(--gold); color: #1A1400; }
.dash-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
@media (max-width: 900px){ .dash-row { grid-template-columns: 1fr; } }

.tabpane { display: none; }
.tabpane.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity:1; transform:none; } }

.kpi { }
.kpi .k-label { font-size: .82rem; color: var(--text-dim); margin-bottom: 8px; display:flex; align-items:center; gap:7px; }
.kpi .k-val { font-size: 2rem; font-weight: 760; letter-spacing: -.02em; }
.kpi .k-sub { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }

.connect-empty { text-align: center; padding: 70px 20px; }
.connect-empty .big-ico { width: 72px; height: 72px; border-radius: 20px; display:grid; place-items:center; margin: 0 auto 22px; background: var(--surface-2); border:1px solid var(--line); color: var(--gold); }

.countdown { display: flex; gap: 10px; }
.cd-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; min-width: 58px; }
.cd-cell b { font-size: 1.5rem; font-weight: 750; display: block; }
.cd-cell span { font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

.legend { display: flex; flex-direction: column; gap: 10px; }
.legend .li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.legend .li .pct { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.dist-event { display:flex; gap:16px; padding: 18px; border:1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom:14px; align-items:flex-start; }
.dist-event .de-date { text-align:center; flex-shrink:0; width: 56px; }
.dist-event .de-date b { display:block; font-size:1.4rem; font-weight:750; }
.dist-event .de-date span { font-size:.72rem; color: var(--text-dim); text-transform:uppercase; }
.dist-event .de-body { flex:1; min-width:0; }
.chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.chip { display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px; background: var(--surface-2); border:1px solid var(--line); font-size:.8rem; }

/* swap widget */
.swap { max-width: 440px; margin: 0 auto; }
.swap-field { background: var(--surface-2); border:1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 8px; }
.swap-field .sf-top { display:flex; justify-content:space-between; font-size:.8rem; color: var(--text-dim); margin-bottom:8px; }
.swap-field .sf-row { display:flex; align-items:center; gap:12px; }
.swap-field input { flex:1; min-width:0; background:none; border:none; color: var(--text); font: inherit; font-size: 1.7rem; font-weight: 700; outline:none; font-variant-numeric: tabular-nums; }
.swap-field input::placeholder { color: var(--text-dim); }
.asset-chip { display:flex; align-items:center; gap:8px; background: var(--surface); border:1px solid var(--line); border-radius:999px; padding:7px 12px; font-weight:650; font-size:.9rem; }
.swap-mid { text-align:center; margin: -14px 0; position: relative; z-index: 2; }
.swap-mid .swap-ico { width:36px;height:36px;border-radius:10px;background:var(--surface);border:1px solid var(--line); display:grid;place-items:center; margin:0 auto; color: var(--gold); }
.swap-info { margin-top:16px; font-size:.84rem; }
.swap-info .r { display:flex; justify-content:space-between; padding:5px 0; color: var(--text-muted); }
.swap-info .r b { color: var(--text); font-weight:600; }

/* progress bars (tokenomics) */
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow:hidden; margin-top:8px; }
.bar > span { display:block; height:100%; border-radius:999px; }
.alloc-row { margin-bottom: 20px; }
.alloc-row .top { display:flex; justify-content:space-between; font-size:.92rem; margin-bottom:2px; }
.alloc-row .top b { font-weight:600; }
.alloc-row .top span { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* misc */
.divider { height:1px; background: var(--line-soft); margin: 40px 0; border: none; }
.badge-soft { display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px; background: var(--surface); border:1px solid var(--line); font-size:.8rem; color: var(--text-muted); }
.addr { font-family: var(--mono); font-size: .85rem; color: var(--text-muted); word-break: break-all; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--surface); border:1px solid var(--gold); color: var(--text); padding: 14px 22px; border-radius: 12px; box-shadow: var(--shadow); z-index: 100; transition: transform .35s ease; font-size:.9rem; font-weight:550; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* brand logo image */
.brand-logo { display:block; border-radius: 9px; object-fit: contain; }

/* skeleton placeholder (dash-free pending indicator) */
.skeleton {
  display:inline-block; height:.72em; width:2.4em; border-radius:6px; vertical-align:middle;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: sk 1.5s ease-in-out infinite; opacity:.75;
}
.skeleton.sk-wide { width: 4.2em; }
.stat-tile .skeleton, .k-val .skeleton, .kpi .skeleton { height:.6em; width:2.2em; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* pending / empty states (pre-launch) */
.pending { color: var(--text-dim) !important; }
.note-chip { display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px; background: var(--surface-2); border:1px dashed var(--line); font-size:.76rem; color: var(--text-dim); }
.empty-state { text-align:center; padding: 48px 22px; border:1px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-muted); }
.empty-state .es-ico { width:52px;height:52px;border-radius:14px;display:grid;place-items:center;margin:0 auto 16px;background:var(--surface-2);border:1px solid var(--line);color:var(--gold); }
.empty-state h3 { color: var(--text); font-size:1.1rem; margin-bottom:6px; }
.empty-state p { font-size:.9rem; margin:0 auto; max-width:420px; }
.illus-tag { display:inline-flex;align-items:center;gap:6px;font-size:.72rem;color:var(--text-dim);border:1px dashed var(--line);border-radius:999px;padding:3px 10px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
