/* ============================================================================
   NOVA app theme — shared base layer for the public site.

   Built on the token palette in tokens.css (the same tokens the trading terminal
   uses), so the marketing pages, the account area and the terminal read as one
   product and respond to light / dark together.

   Load order on every public page:
     public-fonts.css  →  tokens.css  →  app-theme.css  →  <page>.css  →  site-shell.css

   Page stylesheets build on the raw tokens directly; this file carries only the
   base/reset, the shared button, and the handful of utilities actually in use.
   Components must reference tokens — never hard-code a colour in a page stylesheet.
   ============================================================================ */

/* ───────────────────────── base / reset ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-ui, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* colours never animate on the frame the theme flips (matches terminal settings.js) */
:root.theme-switching, :root.theme-switching * { transition: none !important; }

/* a calm, uniform colour transition everywhere else so the toggle feels deliberate */
a, button, input, select, textarea, .ui-btn {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

::selection { background: var(--selection, rgba(92,157,255,.28)); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

img, svg, video { max-width: 100%; }
[hidden] { display: none !important; }

/* ───────────────────────── button ───────────────────────── */
.ui-btn {
  --_bg: var(--bg-3); --_fg: var(--text-1); --_bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 580; letter-spacing: .005em;
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
}
.ui-btn:hover { filter: brightness(1.06); }
.ui-btn:active { transform: translateY(1px); }
.ui-btn:disabled, .ui-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.ui-btn svg { width: 18px; height: 18px; }

.ui-btn--primary { --_bg: var(--primary); --_fg: var(--on-primary); --_bd: transparent; font-weight: 620; }
.ui-btn--primary:hover { background: var(--primary-hover); filter: none; }

.ui-btn--accent { --_bg: var(--buy); --_fg: var(--on-buy); --_bd: transparent; font-weight: 620; }
.ui-btn--accent:hover { background: var(--buy-hover); filter: none; }

.ui-btn--ghost { --_bg: transparent; --_fg: var(--text-1); --_bd: var(--border-strong); }
.ui-btn--ghost:hover { background: var(--bg-2); filter: none; }

.ui-btn--quiet { --_bg: transparent; --_fg: var(--text-2); --_bd: transparent; min-height: 40px; padding: 0 12px; }
.ui-btn--quiet:hover { color: var(--text-1); background: var(--bg-2); filter: none; }

.ui-btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.ui-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.ui-btn--block { width: 100%; }

/* ───────────────────────── utilities ───────────────────────── */
/* digits that line up in columns: prices, balances, percentages */
.u-num { font-variant-numeric: tabular-nums; }

/* on any flex/grid child holding long text or numbers, so it wraps instead of
   pushing the page wider than the viewport */
.u-min0 { min-width: 0; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: var(--on-primary); }
.skip:focus { left: 12px; top: 12px; z-index: 1000; padding: 10px 16px; border-radius: 8px; }
