/* ═══════════════════════════════════════════════════════════════════════════
   StarPay Trading — dark marketing theme (CoinX-inspired structure, StarPay logo
   palette). Navy base + orange/gold accents. Self-contained: defines the shared
   component classes every public page uses. (Supersedes the Luminous Ledger
   marketing layer per the owner's redesign; dashboards keep their own system.)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Base — StarPay navy */
  --bg: #070F20;
  --bg-1: #0A1830;
  --bg-2: #0F2145;
  --bg-3: #16326B;
  --line: rgba(141, 182, 255, 0.14);
  --line-2: rgba(141, 182, 255, 0.24);

  /* Accents — from the logo */
  --orange: #FF7A45;
  --orange-deep: #E8420A;
  --gold: #F5A800;
  --gold-light: #FFC24B;
  --blue: #2E7DFF;
  --blue-soft: #8DB6FF;
  --green: #35D07F;

  /* Text on dark */
  --head: #F4F8FF;
  --body-c: #AFBEDC;
  --muted: #7E93BE;

  --accent-grad: linear-gradient(115deg, #FF7A45 10%, #F5A800 90%);
  --accent-grad-soft: linear-gradient(115deg, rgba(255,122,69,.16), rgba(245,168,0,.10));

  --font: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-head: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-mono: "Spline Sans Mono", "SFMono-Regular", monospace;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;
  --r-pill: 999px;
  --wrap: 1220px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);
  --glow-orange: 0 18px 50px -18px rgba(245, 168, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--body-c); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[x-cloak] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--head); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { color: var(--body-c); }
.mono { font-family: var(--font-mono); }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: .96rem;
  padding: 13px 26px; border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-grad); color: #1A0E00; box-shadow: var(--glow-orange); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--head); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-sm { padding: 10px 20px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── Top utility strip ── */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; }
.topbar-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; box-shadow: 0 0 8px var(--green); }
.topbar a { color: var(--gold-light); font-weight: 600; white-space: nowrap; }
.topbar .socials { display: inline-flex; gap: 12px; }
.topbar .socials a { color: var(--muted); }
.topbar .socials a:hover { color: var(--gold-light); }
@media (max-width: 680px) { .topbar-inner .hide-sm { display: none; } .topbar-inner { justify-content: center; } }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 24, 48, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 12px 0; }
.nav-logo { justify-self: start; }
.nav-logo img { height: 48px; }
@media (max-width: 940px) { .nav-logo img { height: 42px; } }
.nav-links { display: flex; gap: 30px; list-style: none; justify-self: center; }
.nav-links a { color: var(--body-c); font-weight: 500; font-size: .96rem; position: relative; padding: 4px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--head); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent-grad); border-radius: 2px; }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.burger { display: none; background: none; border: 0; color: var(--head); cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; gap: 6px; padding: 12px 22px 20px; background: var(--bg-1); border-bottom: 1px solid var(--line); }
.mobile-menu a { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--body-c); }
.mobile-menu .btn { margin-top: 10px; justify-content: center; }
@media (max-width: 940px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: flex; }
  .nav-right .btn { display: none; }
}

/* ── Sections & shared bits ── */
.section { padding: 84px 0; position: relative; }
.section.tight { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 14px; }
.lede { font-size: 1.1rem; color: var(--body-c); max-width: 640px; }
.footnote { font-size: .82rem; color: var(--muted); }
.center { text-align: center; }
.mt-16 { margin-top: 16px; }
.divider { border-top: 1px solid var(--line); }

/* Faint grid/glow backdrop for feature/alt sections. */
.glow-bg { background:
  radial-gradient(680px 380px at 85% -10%, rgba(46,125,255,.14), transparent 60%),
  radial-gradient(560px 340px at 0% 110%, rgba(245,168,0,.08), transparent 55%); }

/* ── Hero ── */
.hero { position: relative; padding: 72px 0 84px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(760px 460px at 78% 4%, rgba(46,125,255,.22), transparent 62%),
  radial-gradient(680px 480px at 8% 108%, rgba(245,168,0,.12), transparent 55%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } }
.hero-badge { display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--accent-grad-soft); color: var(--gold-light); font-size: .82rem; font-weight: 500; margin-bottom: 22px; }
.trust-line { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: .86rem; color: var(--blue-soft); }
.trust-line span { display: inline-flex; align-items: center; gap: 8px; }
.trust-line b { color: var(--head); font-weight: 600; }

/* Spinning orbital rings behind the hero widget (CoinX cue — @keyframes rotate). */
.orbit { position: relative; }
.orbit::before, .orbit::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; z-index: 0; }
.orbit::before { width: 122%; height: 122%; border: 1px dashed var(--line); animation: orbit-spin 60s linear infinite; }
.orbit::after { width: 152%; height: 152%; border: 1px solid transparent; border-top-color: rgba(245, 168, 0, .55); border-right-color: rgba(46, 125, 255, .28); animation: orbit-spin 34s linear infinite reverse; }
.orbit > * { position: relative; z-index: 1; }
@keyframes orbit-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Coin badges riding the orbital rings (CoinX cue). Each coin sits on an
   invisible track sized/animated exactly like its ring, so it stays glued to
   the ring as it spins; the coin counter-rotates to keep its label upright. */
.orbit-track { position: absolute; left: 50%; top: 50%; width: 122%; height: 122%; transform: translate(-50%, -50%); pointer-events: none; z-index: 2; animation: orbit-spin 60s linear infinite; }
.orbit-track.t2 { animation: orbit-spin 34s linear infinite reverse; }
.orbit-coin { position: absolute; top: -23px; left: calc(50% - 23px); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: .78rem; color: #1A0E00; background: var(--accent-grad); box-shadow: var(--glow-orange); animation: coin-unspin 60s linear infinite; }
.orbit-coin.c2 { top: auto; bottom: -23px; background: linear-gradient(135deg, var(--blue), var(--blue-soft)); color: #06122B; box-shadow: 0 12px 30px -12px rgba(46,125,255,.6); animation: coin-unspin 34s linear infinite reverse; }
@keyframes coin-unspin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
/* Real USDT/USDC brand marks on the orbit — drop the gradient badge so the coin
   logo shows, keep the brand-tinted glow. */
.orbit-coin.coin-brand, .orbit-coin.c2.coin-brand { background: none; padding: 0; overflow: hidden; }
.orbit-coin.coin-brand { box-shadow: 0 12px 30px -12px rgba(38, 161, 123, .65); }
.orbit-coin.c2.coin-brand { box-shadow: 0 12px 30px -12px rgba(39, 117, 202, .65); }
.orbit-coin.coin-brand svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
@media (max-width: 620px) { .orbit-track { display: none; } }

/* ── Buy widget (from CoinX buycrypto) ── */
.buy-widget { background: linear-gradient(165deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); position: relative; z-index: 1; }
.buy-widget h3 { font-size: 1.35rem; }
.buy-tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; margin: 6px 0 18px; }
.buy-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 20px; border-radius: var(--r-pill); cursor: pointer; }
.buy-tabs button.on { background: var(--accent-grad); color: #1A0E00; }
.field-label { font-size: .78rem; color: var(--muted); margin: 14px 0 7px; font-weight: 600; }
.field { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.field:focus-within { border-color: var(--gold); }
.field input { flex: 1; background: none; border: 0; color: var(--head); font: inherit; font-size: 1.15rem; outline: none; min-width: 0; }
.field .sym { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--head); white-space: nowrap; }
.field select { background: var(--bg-2); color: var(--head); border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-weight: 600; padding: 7px 8px; }
.buy-rate { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .84rem; color: var(--body-c); margin: 14px 0; }
.buy-rate b { color: var(--head); }
.buy-note { font-size: .76rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* ── Cards / grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
/* Let wide children (code blocks, tables) scroll inside their cell instead of
   forcing the column — grid/flex items default to min-width:auto. */
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split > *, .hero-grid > * { min-width: 0; }
.card { position: relative; overflow: hidden; z-index: 0; background: linear-gradient(165deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
/* CoinX card-hover: a tiny gradient circle in the corner expands to FILL the card
   (circle → rectangle over .5s), and the content inverts to dark on the bright fill. */
.card::before { content: ""; position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-grad); opacity: 0; z-index: -1; transition: .5s ease; pointer-events: none; }
.card:hover::before { top: 0; opacity: 1; width: 100%; height: 100%; border-radius: 0; }
.card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: 0 26px 54px -26px rgba(245, 168, 0, .5); }
.card:hover h3, .card:hover p, .card:hover .plink, .card:hover .eyebrow,
.card:hover span, .card:hover a, .card:hover li { color: #1A0E00; }
.card:hover .ci { background: rgba(10, 15, 30, .14); color: #1A0E00; }
.card:hover .n { -webkit-text-fill-color: #1A0E00; color: #1A0E00; background: none; }
.card:hover li { border-color: rgba(10, 15, 30, .18) !important; }
.card h3 { margin-bottom: 6px; }
.card p { font-size: .95rem; }
.card .ci { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad-soft); color: var(--gold-light); margin-bottom: 16px; }
.card .ci svg { width: 22px; height: 22px; }
.card .plink { display: inline-block; margin-top: 14px; color: var(--gold-light); font-weight: 600; font-size: .92rem; }
.card.feature { border-top: 2px solid transparent; }
.card.product { background: linear-gradient(165deg, var(--bg-3), var(--bg-1)); }

/* Step cards (how to get started). */
.step { position: relative; }
.step .n { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: transparent; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; }

/* ── Markets / rates table ── */
.market { background: linear-gradient(165deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.market-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.market-head .live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.market-head .live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2.2s infinite; }
.rtable { width: 100%; border-collapse: collapse; }
.rtable th { text-align: left; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 22px; }
.rtable th.num, .rtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rtable td { padding: 16px 22px; border-top: 1px solid var(--line); font-size: 1rem; color: var(--head); }
.rtable td.asset { font-weight: 700; }
.rtable td.buy { color: var(--green); } .rtable td.sell { color: var(--gold-light); }
.rtable .empty { text-align: center; color: var(--muted); padding: 26px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ── Ticker ── */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: var(--bg); }
.ticker-track { display: flex; width: max-content; animation: tick 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 26px; border-right: 1px solid var(--line); white-space: nowrap; font-family: var(--font-mono); font-size: .86rem; color: var(--body-c); }
.ticker-item b { color: var(--head); }
.ticker-item .up { color: var(--green); } .ticker-item .dn { color: var(--gold-light); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── Chips ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg-1); color: var(--head); font-weight: 600; font-size: .9rem; }
.chip .mono { font-family: var(--font-mono); font-size: .76rem; color: var(--gold-light); }
.chip .rail-ic { width: 20px; height: 20px; flex-shrink: 0; display: block; }

/* ── Facts ── */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr 1fr; } }
.fact { text-align: center; padding: 22px; }
.fact .big { font-size: 2.2rem; font-weight: 800; color: var(--head); line-height: 1; }
.fact .big.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact .lbl { margin-top: 10px; font-size: .86rem; color: var(--muted); }

/* ── Table (tier limits) ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table.sp { width: 100%; border-collapse: collapse; min-width: 520px; }
table.sp th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 18px; background: var(--bg); }
table.sp td { padding: 15px 18px; border-top: 1px solid var(--line); color: var(--head); }
table.sp td.mono { font-family: var(--font-mono); color: var(--gold-light); }

/* ── Split ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 30px; } }

/* ── Code strip ── */
.code-strip { background: #050B18; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 18px 20px; overflow-x: auto; }
.code-strip pre { margin: 0; font-family: var(--font-mono); font-size: .8rem; line-height: 1.7; color: #C7D6F5; white-space: pre; }
.code-strip .c { color: #5E77A8; } .code-strip .k { color: var(--gold-light); }

/* ── FAQ ── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; background: var(--bg-1); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: none; border: 0; color: var(--head); font: inherit; font-weight: 600; font-size: 1rem; padding: 18px 20px; cursor: pointer; text-align: left; }
.faq-q span:last-child { color: var(--gold-light); font-size: 1.3rem; }
.faq-a { padding: 0 20px 18px; color: var(--body-c); font-size: .95rem; }
.faq-a a { color: var(--gold-light); }

/* ── CTA band ── */
.cta-band { background: linear-gradient(150deg, var(--bg-3), var(--bg-1)); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 54px 34px; text-align: center; }

/* ── Footer ── */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 60px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
.footer-brand img { height: 46px; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 320px; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-light); margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: var(--body-c); font-size: .92rem; }
.footer ul a:hover { color: var(--head); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-legal .disclaimer { font-size: .78rem; color: var(--muted); max-width: 900px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: .82rem; color: var(--muted); }

/* ── Reveal on scroll (progressive enhancement) ──
   Default is fully visible so content NEVER depends on JS to appear. Only when
   theme.js adds `.js` to <html> do elements start hidden and animate in; a
   safety-net timer in theme.js reveals everything even if the observer can't. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .market-head .live .dot { animation: none; }
  .orbit::before, .orbit::after, .orbit-track, .orbit-coin { animation: none; }
}
