/* ==========================================================================
   FinXure base  (fx-base.css) — reset, typography, focus, form defaults.
   No colours here: everything reads from fx-tokens.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;   /* not "hidden": that stops the sidebar and top bar from staying in place */
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: var(--r-inner); }
a, button { -webkit-tap-highlight-color: transparent; }
input, select, textarea, button { touch-action: manipulation; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--border); }

/* iOS zooms into any focused field under 16px — keep fields at 16px on phones. */
@media (max-width: 767px) { input, select, textarea { font-size: max(16px, 1rem) !important; } }

/* Type scale (base 14, ratio 1.2) */
.fx-display { font-size: clamp(2.4rem, 5.4vw, 4.25rem); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; }
.fx-h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.08; font-weight: 700; letter-spacing: -.028em; }
.fx-h2 { font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.fx-h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.fx-lead { font-size: 1.15rem; line-height: 1.55; color: var(--text-2); }
.fx-small { font-size: .8125rem; color: var(--text-3); }
.fx-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.fx-num { font-variant-numeric: tabular-nums; }
.fx-pos { color: var(--success-text); }
.fx-neg { color: var(--error-text); }
.fx-muted { color: var(--text-3); }

/* Screen-reader only */
.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scroll reveal (used on the public site) */
.fx-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fx-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-reveal { opacity: 1; transform: none; }
}
