/* ===========================================================================
   Velovance — Stylesheet
   Dark default + light theme via [data-theme]. Responsive. (Demo project)
   =========================================================================== */

:root {
  --bg: #0c0f14;
  --bg-2: #11151c;
  --surface: #151a22;
  --surface-2: #1b212b;
  --border: #232b37;
  --text: #e7ecf3;
  --text-dim: #9aa6b6;
  --muted: #6b7686;
  --brand: #14a06b;
  --brand-2: #0f5132;
  --brand-soft: #7ee0b8;
  --accent: #2f7cf6;
  --danger: #e5484d;
  --warn: #f5a524;
  --ok: #30a46c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --maxw: 1180px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Sora', var(--font);
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #e2e8f1;
  --text: #16202e;
  --text-dim: #51607a;
  --muted: #8693a8;
  --shadow: 0 10px 30px rgba(20,40,80,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
h1,h2,h3,h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-dim); }
.small { font-size: .82rem; }
img { max-width: 100%; display: block; }

/* Demo ribbon */
.demo-ribbon {
  background: repeating-linear-gradient(45deg,#3a2a00,#3a2a00 10px,#473400 10px,#473400 20px);
  color: #ffd479; text-align: center; font-size: .72rem; letter-spacing: .04em;
  padding: 6px 10px; font-weight: 600;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .62rem 1.1rem; font-weight: 600; font-size: .92rem;
  font-family: var(--font); transition: transform .15s ease, background .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(120deg,var(--brand),var(--brand-2)); color: #fff; box-shadow: 0 6px 20px rgba(20,160,107,.3); }
.btn--primary:hover { box-shadow: 0 10px 28px rgba(20,160,107,.45); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: .4rem .7rem; font-size: .82rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.brand__dot { color: var(--brand-soft); }
.brand__mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg,var(--brand),var(--brand-soft)); display: inline-block; box-shadow: 0 0 16px rgba(20,160,107,.6); }
.nav__links { display: flex; align-items: center; gap: 1.3rem; }
.nav__links a:not(.btn) { color: var(--text-dim); font-weight: 500; font-size: .94rem; position: relative; }
.nav__links a:not(.btn):hover, .nav__links a.active { color: var(--text); }
.nav__links a.active::after { content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px; background:var(--brand); border-radius:2px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

.theme-toggle {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%;
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: transform .4s ease, background .2s;
}
.theme-toggle:hover { transform: rotate(20deg); }
.theme-toggle svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(120deg,var(--brand-soft),var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 1.12rem; color: var(--text-dim); max-width: 30em; margin: 1rem 0 1.8rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 2rem; margin-top: 2.4rem; }
.hero__stats b { font-family: var(--display); font-size: 1.5rem; display: block; }
.hero__bg { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.hero__bg::before { content:""; position:absolute; width:480px; height:480px; right:-120px; top:-120px; border-radius:50%; background: radial-gradient(circle, rgba(20,160,107,.4), transparent 65%); filter: blur(20px); animation: float 9s ease-in-out infinite; }
.hero__bg::after { content:""; position:absolute; width:360px; height:360px; left:-100px; bottom:-120px; border-radius:50%; background: radial-gradient(circle, rgba(47,124,246,.3), transparent 65%); filter: blur(20px); animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-26px) } }

/* Floating card mock */
.card-mock { background: linear-gradient(135deg,var(--brand-2),#08231a); border-radius: 18px; padding: 26px; color: #eafff5; box-shadow: var(--shadow); position: relative; aspect-ratio: 1.6; max-width: 380px; margin-left: auto; animation: float 7s ease-in-out infinite; border: 1px solid rgba(255,255,255,.08); }
.card-mock .chip2 { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg,#d8c06a,#a07f2d); margin-bottom: 28px; }
.card-mock .num { font-family: var(--display); letter-spacing: .12em; font-size: 1.1rem; }
.card-mock .row { display: flex; justify-content: space-between; margin-top: 18px; font-size: .8rem; opacity: .85; }
.coin { position: absolute; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1a1400; background: linear-gradient(135deg,#f7d774,#e0a82e); box-shadow: 0 8px 20px rgba(224,168,46,.4); }
.coin--1 { width: 54px; height: 54px; top: -22px; right: 30px; animation: spin 6s linear infinite; }
.coin--2 { width: 38px; height: 38px; bottom: -16px; left: 24px; animation: spin 8s linear infinite reverse; }
@keyframes spin { 0%{ transform: rotateY(0) } 100%{ transform: rotateY(360deg) } }

/* ---- Sections ---- */
.section { padding: 70px 0; }
.section__head { text-align: center; max-width: 40em; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(1.8rem,3.5vw,2.5rem); }
.eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3,1fr); }
.grid--4 { grid-template-columns: repeat(4,1fr); }
.grid--2 { grid-template-columns: repeat(2,1fr); }

.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-4px); border-color: var(--brand); }
.feature .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg,rgba(20,160,107,.18),rgba(20,160,107,.05)); color: var(--brand-soft); font-size: 1.4rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--text-dim); font-size: .94rem; margin: 0; }

/* Cards / panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h3 { font-size: 1.1rem; }

/* Stat cards */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat .k { color: var(--text-dim); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-family: var(--display); font-size: 1.7rem; font-weight: 700; margin-top: 6px; }

/* Balance hero card */
.balance-card { background: linear-gradient(135deg,var(--brand-2),#08231a); color: #eafff5; border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; }
.balance-card::after { content:""; position:absolute; right:-40px; top:-40px; width:200px; height:200px; border-radius:50%; background: radial-gradient(circle,rgba(126,224,184,.3),transparent 70%); }
.balance-card .label { opacity: .8; font-size: .85rem; }
.balance-card .amount { font-family: var(--display); font-size: 2.4rem; font-weight: 800; margin: 6px 0; }
.balance-card .acct { font-family: var(--display); letter-spacing: .08em; opacity: .9; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
table.data th { color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.badge--ok { background: rgba(48,164,108,.16); color: #4cd09a; }
.badge--pending { background: rgba(245,165,36,.16); color: var(--warn); }
.badge--fail { background: rgba(229,72,77,.16); color: #ff6b70; }
.credit { color: #4cd09a; } .debit { color: #ff8a8d; }

/* Forms */
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: .85rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: .7rem .85rem; font-family: var(--font); font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,160,107,.15); }
textarea { resize: vertical; min-height: 110px; }
.help { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* Flash */
.flash { max-width: var(--maxw); margin: 16px auto 0; padding: 12px 16px; border-radius: var(--radius-sm); position: relative; font-size: .92rem; }
.flash--success { background: rgba(48,164,108,.15); border: 1px solid rgba(48,164,108,.4); color: #69d3a3; }
.flash--error { background: rgba(229,72,77,.15); border: 1px solid rgba(229,72,77,.4); color: #ff8589; }
.flash--info { background: rgba(47,124,246,.15); border: 1px solid rgba(47,124,246,.4); color: #82b1ff; }
.flash__close { position: absolute; right: 10px; top: 8px; background: none; border: none; color: inherit; cursor: pointer; font-size: 1.1rem; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 18px; background: radial-gradient(circle at 30% 20%, rgba(20,160,107,.12), transparent 50%), var(--bg); }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 680px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--text-dim); font-size: .9rem; }

/* Chips & pills */
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; }

/* App shell */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 28px); }
.app-sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; height: 100vh; }
.brand--side { margin-bottom: 18px; font-size: 1.15rem; }
.brand--side small { font-size: .6rem; color: var(--brand-soft); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { padding: .65rem .8rem; border-radius: var(--radius-sm); color: var(--text-dim); font-size: .92rem; font-weight: 500; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: linear-gradient(120deg,rgba(20,160,107,.2),rgba(20,160,107,.05)); color: var(--text); }
.side-logout { margin-top: auto; padding: .65rem .8rem; border-radius: var(--radius-sm); color: var(--text-dim); }
.side-logout:hover { color: #ff8589; }
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.app-topbar__title { font-family: var(--display); font-weight: 600; }
.app-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-content { padding: 26px 22px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 50px 0 26px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer__grid h4 { font-size: .9rem; color: var(--text); margin-bottom: 12px; }
.footer__grid a { display: block; color: var(--text-dim); font-size: .9rem; padding: 4px 0; }
.footer__grid a:hover { color: var(--brand-soft); }
.brand--footer { font-size: 1.2rem; margin-bottom: 10px; }
.footer__bottom { display: flex; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 30px; padding-top: 20px; }

/* Logos / trust placeholders */
.trust { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; align-items: center; opacity: .8; }
.trust .ph { border: 1px dashed var(--border); border-radius: 10px; padding: 12px 18px; color: var(--muted); font-size: .8rem; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Wallet / deposit */
.wallet-addr { font-family: var(--display); background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: .7rem .9rem; word-break: break-all; font-size: .9rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero__grid, .grid--3, .grid--4, .grid--2, .form-grid, .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 50px 0; }
  .nav__toggle { display: flex; }
  .nav__links { position: fixed; inset: 98px 0 auto 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 20px 22px; gap: 14px; transform: translateY(-130%); transition: transform .3s ease; align-items: stretch; }
  .nav__links.open { transform: none; }
  .nav__links a.active::after { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-105%); transition: transform .3s ease; z-index: 60; }
  .app-sidebar.open { transform: none; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .hero__stats { flex-wrap: wrap; gap: 1.2rem; }
}
