/* ==========================================================================
   Mansa-X Exchange — Design System
   Dark, modern crypto-exchange palette: near-black surfaces, violet + teal
   accents. Same structural classes as before (this was converted from the
   fund site's navy/emerald/gold theme) — only the token VALUES changed, so
   every page below still uses .card, .section--ivory, .btn--primary etc.
   unmodified.
   Display: Fraunces | Body: Manrope | Data/Utility: IBM Plex Mono
   ========================================================================== */

/* fonts are loaded once from includes/header.php (no chained @import) */

:root {
  /* Color */
  --navy-950: #05070C;
  --navy-800: #0B0F18;
  --navy-700: #131928;
  --emerald-600: #17E6A1;
  --emerald-700: #0FC98A;
  --emerald-100: rgba(23,230,161,0.14);
  --gold-500: #8B5CF6;
  --gold-300: #C4B0FF;
  --ivory: #0D1220;
  --paper: #0A0F1A;
  --white: #12172A;
  --ink-900: #F3F5FB;
  --ink-700: #C7CEDE;
  --ink-500: #8891A6;
  --line: #232A3D;
  --line-dark: rgba(255,255,255,0.10);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --max-w: 1180px;
  --radius: 8px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.35), 0 12px 32px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-700);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 500; line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--navy { background: var(--navy-950); color: rgba(255,255,255,0.82); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--ivory { background: var(--ivory); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-600);
  display: inline-block;
  margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--gold-300); }
.lede { font-size: 1.15rem; color: var(--ink-500); max-width: 620px; }

/* ---------- Gold Thread (signature motif) ----------
   A slender gold rule with a lozenge marker threads through
   every section break — a ledger-margin motif referencing the
   fund's namesake trade era: mark the transaction, mark the page. */
.gold-thread {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
}
.gold-thread::before,
.gold-thread::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500) 20%, var(--gold-500) 80%, transparent);
  opacity: 0.55;
}
.gold-thread__mark {
  width: 7px; height: 7px;
  background: var(--gold-500);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid var(--line-dark);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10,22,38,0.96);
  backdrop-filter: blur(6px);
}
.site-header__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; color: var(--white); font-weight: 600; }
.brand__mark { width: 9px; height: 9px; background: var(--gold-500); transform: rotate(45deg); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.92rem; color: rgba(255,255,255,0.72); font-weight: 500;
  padding: 6px 2px; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover, .nav a.is-active { color: var(--white); border-color: var(--gold-500); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.6rem; cursor: pointer; }
.header-cta {
  font-family: var(--font-body); font-weight: 700; font-size: 0.88rem;
  background: var(--emerald-600); color: var(--white);
  padding: 10px 20px; border-radius: var(--radius); transition: background .15s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--emerald-700); color: var(--white); }
.nav-login { font-weight: 600 !important; color: rgba(255,255,255,0.88) !important; }

@media (max-width: 900px) {
  .nav { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; background: var(--navy-950);
    flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 4px;
    transform: translateY(-110%); transition: transform .25s ease; overflow-y: auto; }
  .nav.is-open { transform: translateY(0); }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .nav .header-cta { display: inline-block; margin-top: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.94rem;
  padding: 13px 26px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: all .15s ease;
}
.btn--primary { background: var(--emerald-600); color: var(--white); }
.btn--primary:hover { background: var(--emerald-700); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn--ghost:hover { border-color: var(--gold-500); color: var(--gold-300); }
.btn--outline { background: transparent; border-color: var(--line); color: var(--ink-900); }
.btn--outline:hover { border-color: var(--emerald-600); color: var(--emerald-600); }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--navy-950); color: var(--white);
  padding: 110px 0 90px; overflow: hidden;
}
.hero__pattern {
  position: absolute; inset: 0; opacity: 0.10; pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 60px; align-items: center; position: relative; }
.hero__stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.stat__value { font-family: var(--font-mono); font-size: 1.7rem; color: var(--gold-300); font-weight: 600; }
.stat__label { font-size: 0.78rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.hero__actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero__panel {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 30px;
}
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-card);
}
.card--navy { background: var(--navy-800); border-color: var(--line-dark); color: rgba(255,255,255,0.8); }
.card--navy h3 { color: var(--white); }
.card__icon { width: 38px; height: 38px; color: var(--emerald-600); margin-bottom: 16px; }

/* ---------- Steps (real sequence — numbering justified) ---------- */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step__num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold-500); font-weight: 600; padding-top: 4px; width: 34px; flex-shrink: 0; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); font-weight: 600; }
td.num, th.num { font-family: var(--font-mono); text-align: right; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Disclaimer / callouts ---------- */
.callout {
  border-left: 3px solid var(--gold-500); background: var(--ivory);
  padding: 18px 22px; font-size: 0.92rem; color: var(--ink-700); border-radius: 0 var(--radius) var(--radius) 0;
}
.callout--risk { border-left-color: var(--navy-700); }
.disclaimer-band { background: var(--navy-950); color: rgba(255,255,255,0.65); font-size: 0.85rem; padding: 22px 0; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white); color: var(--ink-900);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--emerald-600); outline-offset: 1px; border-color: var(--emerald-600);
}
.form-note { font-size: 0.82rem; color: var(--ink-500); margin-top: -8px; margin-bottom: 18px; }
#form-status { font-size: 0.9rem; margin-top: 10px; display: none; }
#form-status.is-success { color: var(--emerald-700); display: block; }
#form-status.is-error { color: #a3332a; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.6); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-grid a { display: block; font-size: 0.88rem; color: rgba(255,255,255,0.6); padding: 6px 0; }
.footer-grid a:hover { color: var(--gold-300); }
.footer-bottom { border-top: 1px solid var(--line-dark); padding: 22px 0; font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================================
   Homepage — glow accents, live ticker, coin badges, arbitrage diagram card,
   feature icons. All additive; nothing above needed to change.
   ========================================================================= */
.hero { isolation: isolate; }
.hero__glow {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; pointer-events: none; z-index: -1;
}
.hero__glow--1 { width: 420px; height: 420px; background: #8B5CF6; top: -120px; left: -80px; }
.hero__glow--2 { width: 380px; height: 380px; background: #17E6A1; bottom: -160px; right: -60px; }

.hero__ticker { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); margin-bottom: 46px; }
.hero__ticker-track { display: inline-flex; animation: hero-ticker-scroll 30s linear infinite; padding: 10px 0; }
.hero__ticker:hover .hero__ticker-track { animation-play-state: paused; }
@keyframes hero-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero__ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; font-family: var(--font-mono); font-size: 0.82rem; color: #fff; border-right: 1px solid var(--line-dark); }

.coin-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 700; color: #08101a;
  background: color-mix(in srgb, var(--coin-color) 85%, white 15%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--coin-color) 22%, transparent);
}
.coin-badge--lg { width: 42px; height: 42px; font-size: 0.72rem; }
.chg { font-weight: 700; }
.chg.is-up { color: #17E6A1; }
.chg.is-down { color: #FF6B6B; }

.hero__panel--arb { padding: 26px; }
.arb-diagram { display: block; margin: 0 auto; }

.coin-strip {
  display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; align-items: center;
  margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line);
}
.coin-strip__item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--ink-500); }

.feature-card { position: relative; overflow: hidden; }
.feature-card__icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature-card__icon--emerald { background: rgba(23,230,161,0.14); color: #17E6A1; }
.feature-card__icon--violet { background: rgba(139,92,246,0.16); color: #C4B0FF; }
