/* ----------------------------------------------------------------
   Subtle link: used for nav, footer links, partner marks. CSS hover
   instead of inline JS handlers so we don't burn re-renders on every
   pointer move.
   ---------------------------------------------------------------- */
.subtle-link {
  color: var(--text-secondary);
  transition: color 0.2s ease;
  cursor: pointer;
}
.subtle-link:hover { color: var(--text); }

.partner-mark { opacity: 0.7; transition: opacity 0.2s ease; }
.partner-mark:hover { opacity: 1; }

/* Frosted-glass pad: used to keep text legible over busy backgrounds (e.g. AI Voice shader) */
.glass-pad {
  background: rgba(8, 7, 13, 0.45);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ----------------------------------------------------------------
   Focus styles: accessible keyboard navigation. Visible only on
   keyboard focus (:focus-visible), never on mouse click: so the
   purple ring doesn't fight the hover treatments on buttons.
   ---------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
  transition: outline-color 0.15s ease;
}
.btn:focus-visible,
button:focus-visible {
  outline-offset: 4px;
}
a:focus-visible {
  outline-offset: 2px;
}

/* ----------------------------------------------------------------
   App shell: opacity handshake. Starts hidden, transitions to
   visible only after the heavy first-paint work (globe init,
   ScrollTrigger setup) has completed. The wrapper fade and the
   child stagger animations run in parallel so the page blends in
   rather than snapping.
   ---------------------------------------------------------------- */
.app-shell {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity;
}
.app-shell[data-ready="true"] {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .app-shell {
    transition: none;
    opacity: 1;
  }
}

/* ----------------------------------------------------------------
   FOUC prevention: pre-hide animation targets in CSS so the first
   paint is already in the "ready to animate in" state. The
   .js-ready class is added by an inline <script> in <head> before
   any rendering, so this only applies when JS will actually run.
   ---------------------------------------------------------------- */
html.js-ready [data-reveal],
html.js-ready [data-animate="fade-up"] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}
html.js-ready [data-animate="stagger"] > *,
html.js-ready [data-animate="stagger-pop"] > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}
html.js-ready [data-animate="stagger-pop"] > * {
  transform: translate3d(0, 36px, 0) scale(0.94);
}
html.js-ready [data-animate="marquee"],
html.js-ready [data-animate="marquee-y"] {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html.js-ready [data-reveal],
  html.js-ready [data-animate="fade-up"],
  html.js-ready [data-animate="stagger"] > *,
  html.js-ready [data-animate="stagger-pop"] > *,
  html.js-ready [data-animate="marquee"],
  html.js-ready [data-animate="marquee-y"] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Nuvex Capital: Design Tokens & Globals */
:root {
  /* Core neutrals */
  --bg: #08070D;
  --surface: #14111F;
  --surface-elev: #1F1A2E;
  --surface-premium: #241D38;
  --border: #2A2440;
  --border-soft: rgba(124, 58, 237, 0.18);
  --border-active: rgba(124, 58, 237, 0.55);
  --border-accent: rgba(124, 58, 237, 0.30); /* brief §5: 30% accent border */

  /* Text */
  --text: #FFFFFF;
  --text-secondary: #B8B3D1;
  --text-muted: #6E6789;
  --text-disabled: #3F3A52;

  /* Accent: purple */
  --accent: #7C3AED;
  --accent-hover: #A78BFA;
  --accent-deep: #5B21B6;
  --accent-soft: #C4B5FD;

  /* Functional */
  --mint: #34D399;
  --amber: #FBBF24;

  /* Type */
  --font-display: 'Geist', 'General Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;

  /* Spacing */
  --pad-section: 128px;
  --max-content: 1280px;
  --max-breakout: 1440px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection { background: var(--accent); color: white; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }
.display { font-family: var(--font-display); letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-hover);
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
}
.container-wide {
  max-width: var(--max-breakout);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: var(--pad-section) 0; position: relative; }
section.compact { padding: 96px 0; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.05; font-weight: 600; }
h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 4.8vw, 64px); }
h3 { font-size: 24px; }
p { margin: 0; }

/* Section divider: single light-ray motif */
.divider-ray {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.4;
  margin: 0 auto;
  max-width: 600px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: -0.005em;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
  color: white;
  box-shadow: 0 8px 32px -8px rgba(124, 58, 237, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 40px -8px rgba(124, 58, 237, 0.7); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent-hover); background: rgba(124, 58, 237, 0.06); }

.btn-lg { padding: 18px 28px; font-size: 15px; border-radius: 12px; }

/* Pill badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-hover);
  border: 1px solid var(--border-soft);
}
.pill-new {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
}
.pill-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}
.card:hover {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.5), 0 12px 48px -12px rgba(124, 58, 237, 0.35);
}

.hairline { border: 1px solid var(--border); }
.hairline-b { border-bottom: 1px solid var(--border); }

/* Star (Trustpilot-style green, generic) */
.star {
  display: inline-block;
  width: 16px; height: 16px;
  background: #00B67A;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 15,9 22,9 17,14 19,21 12,17 5,21 7,14 2,9 9,9'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 15,9 22,9 17,14 19,21 12,17 5,21 7,14 2,9 9,9'/></svg>") center/contain no-repeat;
}
.star-row { display: inline-flex; gap: 2px; }
.star-bg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: #00B67A;
}
.star-bg::before {
  content: '';
  width: 12px; height: 12px;
  background: white;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 15,9 22,9 17,14 19,21 12,17 5,21 7,14 2,9 9,9'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 15,9 22,9 17,14 19,21 12,17 5,21 7,14 2,9 9,9'/></svg>") center/contain no-repeat;
}

/* Hero animated background (CSS-only swappable placeholder) */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(124, 58, 237, 0.55), transparent 60%),
    radial-gradient(ellipse 50% 60% at 30% 70%, rgba(168, 85, 247, 0.35), transparent 60%),
    radial-gradient(circle at 85% 80%, rgba(196, 181, 253, 0.18), transparent 50%),
    var(--bg);
  animation: heroDrift 24s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 0%, var(--bg) 80%);
  pointer-events: none;
}
@keyframes heroDrift {
  0% { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); }
  100% { transform: scale(1.1) translate(-3%, -2%); filter: hue-rotate(-12deg); }
}

/* Hero prism placeholder: a stand-in for the "swappable asset" */
.hero-prism {
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  filter: blur(0px);
  pointer-events: none;
}
@media (max-width: 1440px) {
  .hero-prism { width: 520px; height: 520px; }
}
@media (max-width: 1280px) {
  .hero-prism { width: 460px; height: 460px; right: 5%; }
}
@media (max-width: 1100px) {
  .hero-prism { width: 380px; height: 380px; right: 3%; opacity: 0.85; }
}
.hero-prism .orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 180deg at 50% 50%, #7C3AED, #C4B5FD, #A78BFA, #F472B6, #7C3AED);
  filter: blur(40px) saturate(1.2);
  opacity: 0.85;
  animation: orbSpin 22s linear infinite;
}
.hero-prism .orb-2 {
  position: absolute;
  inset: 20% 20%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #C4B5FD 30%, transparent 70%);
  filter: blur(20px);
  opacity: 0.6;
  animation: orbPulse 6s ease-in-out infinite;
}
.hero-prism .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.25);
  inset: -8%;
  animation: ringSpin 30s linear infinite;
}
.hero-prism .ring-2 { inset: 8%; animation-duration: 18s; animation-direction: reverse; border-color: rgba(255, 255, 255, 0.08); }
.hero-prism .hero-video {
  position: absolute;
  inset: 13%;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.2);
  pointer-events: auto;
  z-index: 2;
  background: rgba(10, 8, 20, 0.6);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.32, 0.72, 0, 1);
}
.hero-prism .hero-video[data-active="true"] {
  opacity: 1;
  z-index: 3;
  box-shadow:
    0 0 0 1px rgba(196, 181, 253, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 80px -16px rgba(124, 58, 237, 0.45);
}
.hero-prism .hero-globe {
  position: absolute;
  inset: 2%;
  width: 96%;
  height: 96%;
  border-radius: 50%;
  z-index: 3;
  pointer-events: auto;
  box-shadow:
    0 0 0 1px rgba(196, 181, 253, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 120px -10px rgba(124, 58, 237, 0.55);
}
@keyframes pulse-expand {
  0%   { transform: scaleX(0.3) scaleY(0.3); opacity: 0.8; }
  100% { transform: scaleX(1.5) scaleY(1.5); opacity: 0; }
}
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.85; }
}
@keyframes ringSpin { to { transform: rotate(-360deg); } }

/* Grid lines accent */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

/* Floating particles */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent-soft);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-hover);
  animation: particleFloat 12s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
  10%, 90% { opacity: 0.8; }
  50% { transform: translateY(-40px) translateX(10px); }
}

/* Tweaks panel hide-on-default */
.tweaks-hidden { display: none !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

/* Image placeholder (broker logos, dashboard screenshot) */
.placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0 2px, transparent 2px 16px),
    var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Avatar / portrait placeholder (subtle violet tonal blocks) */
.portrait-ph {
  background: linear-gradient(160deg, #3F3A52, #241D38, #14111F);
  position: relative;
  overflow: hidden;
}
.portrait-ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(196, 181, 253, 0.25), transparent 60%);
}

/* ============================================================
   Built-To-Reward bento section
   ============================================================ */
.reward-bento {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.reward-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  padding: 26px;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(130% 90% at 0% 0%, rgba(124, 58, 237, 0.12), transparent 58%),
    linear-gradient(180deg, var(--surface-premium) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  transition: box-shadow 0.45s ease, border-color 0.45s ease;
}
.reward-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 32px 90px -30px rgba(124, 58, 237, 0.6);
}
.reward-card--a { grid-column: 1 / 4; }
.reward-card--b { grid-column: 4 / 6; }
.reward-card--c { grid-column: 1 / 3; }
.reward-card--d { grid-column: 3 / 6; }
.reward-card__title { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.reward-card__sub   { font-size: 14px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }

/* Drifting ambient glow inside a card */
@keyframes rewardGlowDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(26px, -16px); }
}
.reward-glow { animation: rewardGlowDrift 9s ease-in-out infinite; }

/* Funding equity curve: self-draws on scroll-in */
.equity-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.is-visible .equity-line { stroke-dashoffset: 0; }
.equity-area { opacity: 0; transition: opacity 1.1s ease 0.5s; }
.is-visible .equity-area { opacity: 1; }
.equity-dot  { opacity: 0; transition: opacity 0.4s ease 1.7s; }
.is-visible .equity-dot { opacity: 1; }
@keyframes equityDotPulse {
  0%, 100% { r: 4; opacity: 1; }
  50%      { r: 5.5; opacity: 0.6; }
}

/* (Profit-split ring is now JS-driven in RewardSplitCard so the arc and the
   number share one timer and replay on each scroll-in.) */

/* Trading calendar: win-days pop in sequence */
.cal-cell {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.is-visible .cal-cell { opacity: 1; transform: none; }
.cal-cell--win:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px -10px rgba(52, 211, 153, 0.5);
  border-color: rgba(52, 211, 153, 0.5);
}

/* Rewards emblem: concentric pulse rings + floating payout chips */
@keyframes rewardPulse {
  0%   { transform: scale(0.65); opacity: 0.6; }
  100% { transform: scale(2.0); opacity: 0; }
}
.reward-ring { animation: rewardPulse 3.4s ease-out infinite; }
.reward-ring--2 { animation-delay: 1.13s; }
.reward-ring--3 { animation-delay: 2.26s; }
@keyframes rewardChipFloat {
  0%   { transform: translateY(14px); opacity: 0; }
  18%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}
.payout-chip { animation: rewardChipFloat 4.4s ease-in-out infinite; }

@media (max-width: 920px) {
  .reward-bento { grid-template-columns: 1fr; }
  .reward-card--a, .reward-card--b, .reward-card--c, .reward-card--d { grid-column: auto; }
  .reward-card { min-height: 300px; }
}

/* FAQ "view all" page: two-column groups collapse on small screens */
@media (max-width: 860px) {
  .faq-twocol { grid-template-columns: 1fr !important; gap: 0 !important; }
}

/* Challenge variant toggle: quick fade-in when the table/price swap */
.variant-swap { animation: variantFade 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes variantFade {
  from { opacity: 0; transform: translateY(10px) scale(0.992); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Average-payout box: glossy shimmer sweep */
.payout-shimmer {
  left: -45%;
  animation: payoutSweep 4.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes payoutSweep {
  0%   { transform: translateX(0); }
  /* hold offscreen, then a quick glint, then hold again */
  55%  { transform: translateX(0); }
  80%  { transform: translateX(380%); }
  100% { transform: translateX(380%); }
}
