/* ==========================================================================
   Homepage stylesheet (Bootstrap 5.3 overrides + custom). Used by index.php only.
   Palette: ink #07080A · paper #F4F4F1 · acid lime #C8FF2E
   To change the accent colour, edit --acc (and --acc-ink for text on light sections).
   ========================================================================== */

:root {
  --ink: #07080A;
  --ink-2: #0C0D11;
  --paper: #F4F4F1;
  --white: #FFFFFF;
  --acc: #C8FF2E;        /* accent: fills, lines, text on dark */
  --acc-ink: #3A4D00;    /* accent as text on light (paper) sections */
  --on-acc: #07080A;     /* text colour on top of the accent */
  --muted: #B4B9C4;
  --muted-2: #8A8F99;
  --muted-ink: #4A4F5A;
  --line: rgba(255, 255, 255, .12);
  --line-ink: rgba(7, 8, 10, .14);
  --up: #19D38A;
  --down: #FF6B6B;
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 84px;
}

[data-bs-theme="dark"] {
  --bs-body-bg: var(--ink);
  --bs-body-color: var(--white);
  --bs-body-font-family: var(--font);
  --bs-border-color: var(--line);
  --bs-link-color: var(--acc);
  --bs-link-hover-color: var(--white);
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--acc); color: var(--on-acc); }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.bg-paper :focus-visible { outline-color: var(--acc-ink); }

.container-wide {
  width: 100%;
  max-width: 1800px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 96px);
}
@media (min-width: 2200px) { .container-wide { max-width: 2200px; } }
@media (min-width: 3000px) { .container-wide { max-width: 2800px; } html { font-size: 18px; } }

/* ---------- type ---------- */
.mono { font-family: var(--mono); }
.lbl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.h-xl { margin: 0; font-weight: 800; font-size: clamp(52px, 7.4vw, 184px); line-height: .9; letter-spacing: -.055em; }
.h-l  { margin: 0; font-weight: 800; font-size: clamp(42px, 5vw, 124px); line-height: .92; letter-spacing: -.05em; }
.h-m  { margin: 0; font-weight: 800; font-size: clamp(28px, 2.6vw, 56px); line-height: 1.02; letter-spacing: -.04em; }
.h-s  { margin: 0; font-weight: 800; font-size: clamp(22px, 1.8vw, 34px); line-height: 1.1; letter-spacing: -.03em; }
.lead-x { font-size: clamp(17px, 1.25vw, 22px); line-height: 1.55; color: var(--muted); }
.body-x { font-size: 16px; line-height: 1.6; color: var(--muted); }
.fine { font-size: 13px; line-height: 1.6; color: var(--muted-2); }
.big-num { font-weight: 800; font-size: clamp(60px, 6.2vw, 150px); line-height: .9; letter-spacing: -.06em; }

.text-acc { color: var(--acc) !important; }
.text-acc-ink { color: var(--acc-ink) !important; }
.mark-acc { display: inline-block; background: var(--acc); color: var(--on-acc); line-height: 1; padding: .02em .12em .1em; margin-top: .1em; }
.text-muted-2 { color: var(--muted-2) !important; }

/* ---------- surfaces ---------- */
.bg-acc  { background: var(--acc); color: var(--on-acc); }
.bg-paper { background: var(--paper); color: var(--ink); }
.bg-paper .body-x, .bg-paper .lead-x { color: var(--muted-ink); }
.bg-paper .fine { color: #5A5F6A; }
.bg-acc .lead-x, .bg-acc .fine { color: var(--on-acc); }

.section { padding-block: clamp(88px, 8vw, 180px); }
.hero { padding-block: clamp(56px, 6vw, 150px) clamp(48px, 5vw, 110px); border-bottom: 1px solid var(--line); }
.bt { border-top: 1px solid var(--line); }
.bb { border-bottom: 1px solid var(--line); }
.bg-paper .bt { border-top-color: var(--line-ink); }

/* grid boxes with 1px dividers */
.grid-lines {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid-lines > * { background: var(--ink); }
.bg-paper .grid-lines { background: var(--line-ink); border-color: var(--line-ink); }
.bg-paper .grid-lines > * { background: var(--paper); }
.cols-auto-200 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.cols-auto-240 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cols-auto-360 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }

/* ---------- buttons ---------- */
.btn-x {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 58px; padding: 0 28px;
  font-family: var(--font); font-weight: 700; font-size: 15px; letter-spacing: .01em; line-height: 1;
  border: 2px solid transparent; border-radius: 0;
  cursor: pointer; white-space: nowrap;
  transition: background .22s, color .22s, border-color .22s;
}
.btn-x .ar { display: inline-block; transition: transform .22s var(--ease); }
.btn-x:hover .ar { transform: translateX(6px); }
.btn-sm-x { min-height: 48px; padding: 0 22px; font-size: 14px; }
.btn-acc { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.btn-acc:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-line { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-line:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-white:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.bg-acc .btn-line { color: var(--on-acc); border-color: var(--on-acc); }
.bg-acc .btn-line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- header ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(7, 8, 10, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .25s;
}
.site-nav.scrolled { background: rgba(7, 8, 10, .96); }
.site-nav .bar { min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand-img { display: block; height: 56px; width: auto; max-width: 220px; object-fit: contain; }
.site-footer .brand-img { height: 72px; max-width: 260px; }
@media (max-width: 575.98px) { .brand-img { height: 44px; max-width: 160px; } }

.nav-a {
  position: relative; display: inline-block; padding: 10px 0;
  color: #C9CCD3; font-size: 15px; font-weight: 600;
}
.nav-a:hover, .nav-a.active { color: var(--white); }
.nav-a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--acc); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-a:hover::after, .nav-a.active::after { transform: scaleX(1); }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.3); border-radius: 0;
}
.menu-btn:hover { border-color: var(--white); }

.mnav.offcanvas { --bs-offcanvas-width: min(420px, 100vw); background: var(--ink); color: var(--white); border-left: 1px solid var(--line); }
.mnav .offcanvas-header { min-height: var(--nav-h); border-bottom: 1px solid var(--line); }
.mnav-link {
  display: block; padding: 16px 0;
  color: var(--white); font-size: 30px; font-weight: 800; letter-spacing: -.03em;
  border-bottom: 1px solid var(--line);
}
.mnav-link:hover, .mnav-link.active { color: var(--acc); }

/* ---------- motion: hero lines ---------- */
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: block; transform: translateY(108%); animation: lnUp 1s var(--ease) forwards; }
.ln:nth-child(2) > span { animation-delay: .09s; }
.ln:nth-child(3) > span { animation-delay: .18s; }
.ln:nth-child(4) > span { animation-delay: .27s; }
@keyframes lnUp { to { transform: none; } }

.rv { opacity: 0; transform: translateY(28px); animation: rv .9s var(--ease) forwards; }
.rv1 { animation-delay: .25s; } .rv2 { animation-delay: .4s; } .rv3 { animation-delay: .55s; } .rv4 { animation-delay: .7s; }
@keyframes rv { to { opacity: 1; transform: none; } }

/* scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; } .js .reveal-d2 { transition-delay: .16s; } .js .reveal-d3 { transition-delay: .24s; }

.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 1.5s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(25,211,138,.65); } 100% { box-shadow: 0 0 0 12px rgba(25,211,138,0); } }
.cursor { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.marq { display: flex; width: max-content; animation: mq 48s linear infinite; }
.marq:hover { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }

.js .grow { transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js .grow.in { transform: scaleX(1); }
.js .grow.d2 { transition-delay: .5s; } .js .grow.d3 { transition-delay: 1s; }

/* ---------- check list ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: 15px; font-weight: 600; color: #E3E5EA; }
.checks li { display: flex; gap: 10px; align-items: center; }
.ico-check { width: 16px; height: 16px; flex: none; stroke: var(--acc); }

/* ---------- terminal ---------- */
.terminal { border: 1px solid rgba(255,255,255,.14); background: var(--ink-2); }
.terminal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.inst-btn {
  min-height: 34px; padding: 0 10px; border-radius: 0;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: transparent; color: #C9CCD3; border: 1px solid rgba(255,255,255,.16);
  transition: background .2s, color .2s, border-color .2s;
}
.inst-btn:hover { border-color: var(--acc); }
.inst-btn.active { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.term-price { font-family: var(--mono); font-size: clamp(36px, 3.4vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.term-chart { position: relative; height: clamp(200px, 15vw, 290px); overflow: hidden; }
.term-chart .gridbg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 100% 25%, 10% 100%;
}
.term-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.term-line { fill: none; stroke: #C8FF2E; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.65,0,.35,1) .3s forwards; }
.term-area { fill: rgba(200,255,46,.16); opacity: 0; animation: rv 1.2s ease 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.scanx { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(200,255,46,.7); box-shadow: 0 0 18px 2px rgba(200,255,46,.5); animation: scanx 7s linear infinite; pointer-events: none; }
@keyframes scanx { from { left: 0; } to { left: 100%; } }
.term-tag { position: absolute; right: 0; transform: translateY(-50%); background: var(--acc); color: var(--on-acc); font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 7px; transition: top .5s var(--ease); }
.book { padding: 12px 18px; }
.book-row { position: relative; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; padding: 4px 0; }
.book-row .fillbar { position: absolute; top: 2px; bottom: 2px; transition: width .6s var(--ease); }
.book-row span { position: relative; }
.book.bid .fillbar { right: 0; background: rgba(25,211,138,.12); }
.book.ask .fillbar { left: 0; background: rgba(255,77,77,.12); }
.book.bid .p { color: var(--up); }
.book.ask .p { color: var(--down); }
.trade-btn { min-height: 70px; border: 0; border-radius: 0; padding: 10px 18px; color: var(--white); width: 100%; transition: filter .15s; }
.trade-btn:hover { filter: brightness(1.2); }
.trade-btn.sell { background: var(--ink-2); text-align: left; }
.trade-btn.buy { background: var(--acc); color: var(--on-acc); text-align: right; }
.trade-btn .mono { display: block; font-size: 22px; font-weight: 600; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

/* ---------- ticker ---------- */
.ticker { background: var(--acc); overflow: hidden; padding: 18px 0; }
.ticker .marq { gap: 48px; padding-left: 48px; font-family: var(--mono); font-size: clamp(15px, 1.05vw, 19px); white-space: nowrap; color: var(--on-acc); }
.ticker .it { display: inline-flex; gap: 12px; }
.ticker .it b { font-weight: 600; }
.ticker .it .c { opacity: .85; }
.ticker .it .s { opacity: .4; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.stats > div { padding: clamp(40px, 4vw, 80px) clamp(8px, 1.5vw, 32px); border-right: 1px solid var(--line-ink); }
.stats > div:first-child { padding-left: 0; }
.stats > div:last-child { border-right: 0; }

/* ---------- markets tabs ---------- */
.mk-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.14); }
.mk-tab {
  min-height: 64px; padding: 0 clamp(18px, 2vw, 40px); margin-bottom: -1px;
  font-family: var(--font); font-size: clamp(17px, 1.3vw, 24px); font-weight: 700; letter-spacing: -.02em;
  background: transparent; color: var(--muted-2);
  border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  transition: color .2s, border-color .2s;
}
.mk-tab:hover { color: var(--white); }
.mk-tab.active { color: var(--white); border-bottom-color: var(--acc); }
.mk-panel { border: 1px solid rgba(255,255,255,.14); border-top: 0; }
.mk-left { padding: clamp(28px, 3.4vw, 72px); border-right: 1px solid var(--line); }
.mk-right { padding: clamp(20px, 2.6vw, 56px); }
.mk-count { font-weight: 800; font-size: clamp(88px, 8.6vw, 210px); letter-spacing: -.07em; line-height: .82; }
.mk-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 72px; padding: 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--mono); font-size: clamp(16px, 1.2vw, 21px);
  transition: background .2s;
}
.mk-row:hover { background: rgba(200,255,46,.08); }
.mk-row b { font-weight: 600; }
@media (max-width: 991.98px) { .mk-left { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- cards ---------- */
.card-x { position: relative; padding: clamp(28px, 2.6vw, 52px); transition: background .28s, color .28s; }
.card-x .muted, .card-x .ico, .card-x .num { transition: color .28s, stroke .28s, opacity .28s; }
.card-x .ico { width: 36px; height: 36px; stroke: var(--acc-ink); fill: none; stroke-width: 1.8; }
.card-x.dark .ico { stroke: var(--acc); }
.card-x .num { font-family: var(--mono); font-size: 14px; opacity: .5; }
.card-x .muted { color: var(--muted-ink); }
.card-x.dark .muted { color: var(--muted-2); }
.card-x:hover { background: var(--acc) !important; color: var(--on-acc) !important; }
.card-x:hover .muted { color: rgba(7,8,10,.78) !important; }
.card-x:hover .num { color: var(--on-acc) !important; opacity: 1; }
.card-x:hover .ico { stroke: var(--on-acc); }
a.card-x { display: block; color: inherit; }
.tag { display: inline-block; padding: 4px 8px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; background: var(--acc); color: var(--on-acc); }

/* ---------- steps ---------- */
.step-bar { height: 4px; background: rgba(7,8,10,.12); }
.step-bar > div { height: 4px; background: var(--ink); }
.step-bar > div.blue { background: var(--acc-ink); }

/* ---------- CTA marquee ---------- */
.cta { position: relative; overflow: hidden; }
.cta .bgword { position: absolute; left: 0; right: 0; bottom: -.12em; overflow: hidden; opacity: .14; pointer-events: none; }
.cta .bgword .marq { gap: 80px; font-size: clamp(120px, 14vw, 320px); font-weight: 800; letter-spacing: -.06em; white-space: nowrap; line-height: 1; }
.cta-inner { position: relative; padding-top: clamp(88px, 9vw, 200px); padding-bottom: clamp(140px, 14vw, 320px); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--white); overflow: hidden; border-top: 1px solid var(--line); }
.site-footer .fl { color: #A3A8B3; transition: color .2s; }
.site-footer .fl:hover { color: var(--white); }
.site-footer ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.risk-box { margin-top: 56px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.14); font-size: 14px; line-height: 1.6; color: #C9CCD3; }
.risk-box p { margin: 0 0 10px; }
.risk-box p:last-child { margin-bottom: 0; }
.footer-word {
  font-size: clamp(80px, 17vw, 380px); font-weight: 800; letter-spacing: -.07em; line-height: .78;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.14);
  white-space: nowrap; text-align: center; margin-bottom: -.06em;
  user-select: none;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ln > span, .rv { transform: none !important; opacity: 1 !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .js .grow { transform: none !important; }
  .term-line { stroke-dashoffset: 0 !important; }
  .term-area { opacity: 1 !important; }
}
