/* ==========================================================================
   Trade-VEX — compact green/white/black theme (public site, light default + dark switch)
   Loaded AFTER style.css. Body + most sections are WHITE; header, hero, page
   banners (.section--navy) and footer stay BLACK. Candlestick green #0ECB81
   is the accent; red #F6465D is the loss color. Inside the black areas the
   text tokens are re-pointed to light values so nothing goes black-on-black.
   ========================================================================== */
/* fonts are loaded once from includes/header.php (no chained @import) */

:root {
  /* light surfaces (default) */
  --paper: #FFFFFF;
  --ivory: #F4F7F5;
  --white: #FFFFFF;
  /* black areas */
  --navy-950: #0B0E0C;
  --navy-800: #121614;
  --navy-700: #1A1F1C;
  /* accents */
  --gold-500: #0ECB81;           /* legacy name = candle green */
  --gold-300: #2FE59B;
  --emerald-600: #087F4F;        /* green for TEXT on white (readable) */
  --emerald-700: #066A41;
  --emerald-100: rgba(14,203,129,0.12);
  --green: #0ECB81;              /* bright green for fills on black / buttons */
  --red: #F6465D;
  /* text on light */
  --ink-900: #0B0E0C;
  --ink-700: #2B332E;
  --ink-500: #5F6B64;
  --line: #E3E9E5;
  --line-2: #D5DDD8;
  --red-text: #D6293E;
  --line-dark: rgba(255,255,255,0.08);
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --max-w: 1180px;
  --radius: 7px;
  --shadow-card: 0 1px 2px rgba(11,14,12,0.04);
}

/* DARK variant (theme switch) */
html[data-theme="dark"] {
  --paper: #0B0E0C; --ivory: #121614; --white: #121614;
  --ink-900: #FFFFFF; --ink-700: #E9EEEB; --ink-500: #9AA39D;
  --line: #232925; --line-2: #2D352F; --red-text: #F6465D;
  --emerald-600: #0ECB81; --emerald-700: #2FE59B;
  --shadow-card: none; color-scheme: dark;
}
html[data-theme="light"] { color-scheme: light; }


/* Black areas: dark-theme text tokens so inherited colors stay readable */
.site-header, .hero, .section--navy, .card--navy, .disclaimer-band, .site-footer, .nav {
  --ink-900: #FFFFFF; --ink-700: #E9EEEB; --ink-500: #9AA39D;
  --line: #232925; --emerald-600: #0ECB81; --emerald-700: #2FE59B;
}

html { font-size: 15px; }
body { line-height: 1.5; background: var(--paper); color: var(--ink-700); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.4em; color: var(--ink-900); }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.05rem; }
p { margin-bottom: 0.8em; }
.container { padding: 0 20px; }

/* ── Sections ─────────────────────────────────── */
.section { padding: 48px 0; }
.section--tight { padding: 32px 0; }
.section--ivory { background: var(--ivory); }
.section--navy { background: #0B0E0C; }
.eyebrow { font-size: 0.7rem; letter-spacing: 0.12em; margin-bottom: 8px; color: var(--emerald-600); }
.section--navy .eyebrow, .hero .eyebrow { color: #0ECB81; }
.lede { font-size: 0.98rem; max-width: 600px; }

/* ── Header (black) ───────────────────────────── */
.site-header { border-bottom: 1px solid #232925; }
.site-header::before { background: rgba(11,14,12,0.97); }
.site-header__inner { height: 56px; padding: 0 20px; }
.brand { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.4px; gap: 9px; color: #fff; }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; transform: none; background: #0ECB81; }
.nav { gap: 22px; }
.nav a { font-size: 0.8rem; font-weight: 600; color: #9AA39D; }
.nav a:hover, .nav a.is-active { color: #fff; border-color: #0ECB81; }
.nav-login { color: #E9EEEB !important; }
.header-cta { font-size: 0.76rem; font-weight: 800; padding: 7px 14px; background: #0ECB81; color: #04120B; }
.header-cta:hover { background: #2FE59B; color: #04120B; }
.nav a.header-cta, .nav a.header-cta:hover, .nav a.header-cta.is-active { color: #04120B; border-color: transparent; }
@media (max-width: 900px) {
  .nav { top: 56px; padding: 18px 20px; gap: 2px; background: #0B0E0C; }
  .nav a { padding: 11px 0; font-size: 0.88rem; border-color: #232925; }
  .nav .header-cta { margin-top: 10px; }
}

/* ── Buttons ──────────────────────────────────── */
.btn { padding: 9px 18px; font-size: 0.8rem; font-weight: 800; border-radius: 7px; }
.btn--primary { background: #0ECB81; color: #04120B; }
.btn--primary:hover { background: #2FE59B; color: #04120B; transform: translateY(-1px); }
.btn--ghost { border-color: rgba(255,255,255,0.3); color: #fff; }
.btn--ghost:hover { border-color: #0ECB81; color: #0ECB81; }
.btn--outline { border-color: var(--ink-900); color: var(--ink-900); }
.btn--outline:hover { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); }
/* white button (on black areas) */
.btn--white { background: #fff; color: #0B0E0C; }
.btn--white:hover { background: #E3E9E5; color: #0B0E0C; }

/* ── Hero (black) ─────────────────────────────── */
.hero { padding: 56px 0 44px; background: #0B0E0C; }
.hero__pattern { opacity: 0.05; }
.hero__grid { gap: 28px; }
.hero__glow { opacity: 0.14; filter: blur(80px); }
.hero__glow--1 { background: #0ECB81; width: 320px; height: 320px; }
.hero__glow--2 { background: #0ECB81; width: 260px; height: 260px; opacity: 0.08; }
.hero h1 { color: #fff; }
.hero__stats { gap: 22px; margin-top: 22px; }
.stat__value { font-size: 1.3rem; color: #0ECB81; }
.stat__label { font-size: 0.7rem; letter-spacing: 0.08em; }
.hero__actions { gap: 8px; margin-top: 22px; }
.hero__panel { padding: 16px; background: #121614; border: 1px solid #232925; border-radius: 10px; }
.hero__panel--arb { padding: 14px; }
.hero__ticker { margin-bottom: 28px; background: #121614; border-color: #232925; }
.hero__ticker-track { padding: 7px 0; }
.hero__ticker-item { font-size: 0.7rem; padding: 0 18px; border-color: #232925; }
/* up = green, down = red (bright on black, deeper on white) */
.chg.is-up { color: var(--emerald-600); }
.chg.is-down { color: var(--red-text); }
.hero .chg.is-up, .section--navy .chg.is-up, .site-footer .chg.is-up { color: #0ECB81; }
.hero .chg.is-down, .section--navy .chg.is-down, .site-footer .chg.is-down { color: #F6465D; }

/* ── Cards + grids ────────────────────────────── */
.grid { gap: 14px; }
.card { padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-card); transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: #0ECB81; box-shadow: 0 4px 16px rgba(14,203,129,0.10); }
.section--ivory .card { background: var(--white); }
html[data-theme="dark"] .section--ivory .card { background: #1A1F1C; }
.card--navy, .section--navy .card, .hero .card { background: #121614; border-color: #232925; color: #E9EEEB; box-shadow: none; }
.card--navy h3, .section--navy .card h3 { color: #fff; }
.card__icon { width: 30px; height: 30px; margin-bottom: 10px; color: var(--emerald-600); }
.card h3 { font-size: 0.95rem; }
.card p { font-size: 0.82rem; color: var(--ink-500); margin-bottom: 0; }
.feature-card__icon { width: 34px; height: 34px; border-radius: 8px; margin-bottom: 10px; }
.feature-card__icon--emerald { background: rgba(14,203,129,0.14); color: var(--emerald-600); }
.feature-card__icon--violet { background: #0B0E0C; color: #0ECB81; }
.coin-badge { width: 22px; height: 22px; font-size: 0.54rem; box-shadow: none; }
.coin-badge--lg { width: 34px; height: 34px; font-size: 0.64rem; }
.coin-strip { gap: 16px; margin-top: 24px; padding-top: 20px; }
.coin-strip__item { font-size: 0.7rem; gap: 5px; }

/* ── Steps ────────────────────────────────────── */
.step { gap: 14px; padding: 14px 0; border-color: var(--line); }
.step__num { font-size: 0.78rem; color: var(--emerald-600); width: 28px; }
.step h3 { margin-bottom: 2px; }

/* ── Tables ───────────────────────────────────── */
table { font-size: 0.82rem; }
th, td { padding: 9px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 0.7rem; letter-spacing: 0.1em; background: var(--ivory); }
tbody tr:hover td { background: rgba(14,203,129,0.05); }
.table-wrap { background: var(--white); border-color: var(--line); border-radius: 10px; }

/* ── Callouts ─────────────────────────────────── */
.callout { padding: 12px 16px; font-size: 0.8rem; background: var(--ivory); border-left-color: #0ECB81; }
.callout--risk { border-left-color: #F6465D; }
.disclaimer-band { padding: 14px 0; font-size: 0.72rem; background: #0B0E0C; border-top: 1px solid #232925; }

/* ── Forms ────────────────────────────────────── */
.form-field { margin-bottom: 12px; }
.form-field label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); margin-bottom: 4px; }
.form-field input, .form-field select, .form-field textarea {
  padding: 9px 12px; font-size: 0.85rem; background: var(--white); border: 1px solid var(--line-2); border-radius: 7px; color: var(--ink-900);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: #0ECB81; box-shadow: 0 0 0 3px rgba(14,203,129,0.15); }
.form-note { font-size: 0.7rem; margin-bottom: 12px; }
#form-status.is-success { color: var(--emerald-600); }
#form-status.is-error { color: var(--red-text); }

/* ── Footer (black) ───────────────────────────── */
.site-footer { padding: 36px 0 0; background: #0B0E0C; border-top: 1px solid #232925; }
.footer-grid { gap: 24px; padding-bottom: 28px; }
.footer-grid h4 { font-size: 0.7rem; letter-spacing: 0.1em; margin-bottom: 8px; color: #0ECB81; }
.footer-grid a { font-size: 0.78rem; padding: 3px 0; }
.footer-grid a:hover { color: #0ECB81; }
.footer-bottom { padding: 14px 0; font-size: 0.7rem; border-color: #232925; }

@media (max-width: 860px) {
  .section { padding: 34px 0; }
  .hero { padding: 36px 0 30px; }
  .grid { gap: 10px; }
}

/* Logo keeps the display face */
.brand, .portal-brand, .topbar__brand-mobile { font-family: 'Syne', 'DM Sans', sans-serif; }

/* ── Theme switch button (sits in the black header) ───────────────────── */
.theme-toggle {
  width: 32px; height: 32px; border-radius: 7px; border: 1px solid #2D352F; background: transparent; color: #9AA39D;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-left: 14px;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: #0ECB81; color: #0ECB81; }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (max-width: 900px) { .theme-toggle { margin-left: auto; margin-right: 8px; } }

/* ── Logo mark (replaces the plain square) ── */
.brand__mark { width: 24px; height: 24px; border-radius: 0; transform: none; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 512 512%22 %3E%3Crect width=%22512%22 height=%22512%22 rx=%22112%22 fill=%22%230ECB81%22/%3E%3Cg transform=%22%22%3E%3Cpath d=%22M100 150 H186 L256 296 L330 112 H414 L296 402 H216 Z%22 fill=%22%230B0E0C%22/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }

/* ══════════════════════════════════════════════════════════════════════
   Live ribbon (homepage)
   ══════════════════════════════════════════════════════════════════════ */
.hero__ticker { position: relative; }
.hero__ticker-badge {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 0 34px 0 16px; background: linear-gradient(90deg, #0B0E0C 72%, rgba(11,14,12,0)); color: #fff;
  font: 700 0.64rem var(--font-mono); letter-spacing: 0.1em;
}
.hero__ticker-badge i { width: 7px; height: 7px; border-radius: 50%; background: #0ECB81; box-shadow: 0 0 0 0 rgba(14,203,129,.6); animation: tv-live 1.8s infinite; }
.hero__ticker-badge small { font: 400 0.62rem var(--font-mono); letter-spacing: 0; color: #8A948E; }
.hero__ticker-badge.is-stale i { background: #8A948E; animation: none; }
@keyframes tv-live { 0% { box-shadow: 0 0 0 0 rgba(14,203,129,.55); } 70% { box-shadow: 0 0 0 7px rgba(14,203,129,0); } 100% { box-shadow: 0 0 0 0 rgba(14,203,129,0); } }
.hero__ticker-item strong { transition: color .2s; }
.is-flash-up { animation: tv-flash-up 1s ease-out; }
.is-flash-down { animation: tv-flash-down 1s ease-out; }
@keyframes tv-flash-up { 0% { color: #0ECB81; } 100% { color: #fff; } }
@keyframes tv-flash-down { 0% { color: #F6465D; } 100% { color: #fff; } }
@media (prefers-reduced-motion: reduce) {
  .hero__ticker-track { animation: none; }
  .hero__ticker { overflow-x: auto; }
}
@media (max-width: 600px) { .hero__ticker-badge small { display: none; } .hero__ticker-badge { padding-right: 22px; } }

/* ══════════════════════════════════════════════════════════════════════
   Dashboard showcase slider
   ══════════════════════════════════════════════════════════════════════ */
.showcase { position: relative; max-width: 960px; margin: 34px auto 0; outline: none; }
.showcase__viewport { overflow: hidden; border-radius: 16px; background: #0B0E0C; border: 1px solid #232925; box-shadow: 0 18px 50px rgba(11,14,12,0.22); }
html[data-theme="dark"] .showcase__viewport { box-shadow: 0 0 0 1px #232925, 0 18px 50px rgba(0,0,0,0.5); }
.showcase__track { display: flex; transition: transform .65s cubic-bezier(.22,.7,.2,1); will-change: transform; }
.showcase__slide { flex: 0 0 100%; min-width: 0; margin: 0; }
.showcase__svg { display: block; width: 100%; height: auto; }
.showcase__caption { padding: 12px 18px 16px; background: #121614; border-top: 1px solid #232925; text-align: left; }
.showcase__caption h3 { color: #fff; font-size: 0.98rem; margin: 0 0 2px; }
.showcase__caption p { color: #9AA39D; font-size: 0.82rem; margin: 0; }
.showcase__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.showcase__arrow {
  width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 1px solid var(--line-2); background: transparent; color: var(--ink-700);
  font-size: 1.3rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, color .15s;
}
.showcase__arrow:hover { border-color: #0ECB81; color: var(--emerald-600); }
.showcase__dots { display: flex; justify-content: center; gap: 8px; }
.showcase__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: var(--line-2); cursor: pointer; transition: width .25s, background .25s; }
.showcase__dot.is-active { width: 24px; background: #0ECB81; }
.showcase__note { text-align: center; font-size: 0.72rem; color: var(--ink-500); margin: 12px 0 0; }
@media (max-width: 600px) { .showcase__caption { padding: 10px 14px 12px; } }

/* ══════════════════════════════════════════════════════════════════════
   Crypto funding flow (3 steps)
   ══════════════════════════════════════════════════════════════════════ */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.flow__step { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.flow__step h3 { font-size: 0.95rem; margin: 8px 0 2px; }
.flow__step p { font-size: 0.8rem; color: var(--ink-500); margin: 0; }
.flow__num { width: 26px; height: 26px; border-radius: 50%; background: #0ECB81; color: #04120B; font: 800 0.78rem var(--font-body); display: inline-flex; align-items: center; justify-content: center; }
.flow__arrow { align-self: center; color: var(--emerald-600); font-size: 1.3rem; font-weight: 700; }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } .flow__arrow { transform: rotate(90deg); justify-self: center; } }

/* "Default" tag next to the crypto funding method */
.badge-default { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font: 700 0.62rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(14,203,129,0.14); color: var(--emerald-600); }

/* ══════════════════════════════════════════════════════════════════════
   Products dropdown (nav)
   ══════════════════════════════════════════════════════════════════════ */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-group__btn { background: none; border: 0; padding: 0; cursor: pointer; font: 600 0.8rem var(--font-body); color: #9AA39D; display: inline-flex; align-items: center; gap: 5px; border-bottom: 2px solid transparent; padding-bottom: 4px; }
.nav-group__btn:hover, .nav-group.is-current .nav-group__btn, .nav-group.is-open .nav-group__btn { color: #fff; border-color: #0ECB81; }
.nav-sub {
  position: absolute; top: calc(100% + 10px); left: -14px; min-width: 200px; padding: 6px; border-radius: 10px;
  background: #121614; border: 1px solid #232925; box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: none; flex-direction: column; z-index: 60;
}
.nav-sub::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; } /* hover bridge */
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub, .nav-group.is-open .nav-sub { display: flex; }
.nav-sub a { padding: 8px 12px !important; border-radius: 6px; border: 0 !important; font-size: 0.82rem; color: #E9EEEB !important; }
.nav-sub a:hover, .nav-sub a.is-active { background: rgba(14,203,129,0.1); color: #0ECB81 !important; }
@media (max-width: 900px) {
  .nav-group { flex-direction: column; align-items: stretch; width: 100%; border-bottom: 1px solid #232925; padding: 10px 0 4px; }
  .nav-group__btn { border: 0; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8A948E; pointer-events: none; }
  .nav-group__btn span { display: none; }
  .nav-sub { position: static; display: flex; background: none; border: 0; box-shadow: none; padding: 0 0 0 10px; min-width: 0; }
  .nav-sub::before { display: none; }
  .nav-sub a { padding: 11px 0 !important; font-size: 0.9rem; }
}

/* ══════════════════════════════════════════════════════════════════════
   "Ways to invest" cards (homepage) + product page blocks
   ══════════════════════════════════════════════════════════════════════ */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.way { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.way:hover { border-color: #0ECB81; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(14,203,129,0.12); }
.way__icon { width: 40px; height: 40px; border-radius: 10px; background: #0B0E0C; color: #0ECB81; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.way__icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.way h3 { font-size: 1rem; margin: 0 0 4px; }
.way p { font-size: 0.82rem; color: var(--ink-500); margin: 0 0 12px; flex: 1; }
.way__more { font-size: 0.76rem; font-weight: 700; color: var(--emerald-600); }
@media (max-width: 1000px) { .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ways { grid-template-columns: 1fr; } }
.product-visual { max-width: 960px; margin: 28px auto 0; border-radius: 16px; overflow: hidden; border: 1px solid #232925; box-shadow: 0 18px 50px rgba(11,14,12,0.2); background: #0B0E0C; }
.product-visual svg { display: block; width: 100%; height: auto; }
.product-visual__note { text-align: center; font-size: 0.72rem; color: var(--ink-500); margin-top: 10px; }
