/* WealthNexus Analytics: shared tokens + components */
:root {
  --ink: #0e0a2b;
  --indigo-900: #100b33;
  --indigo-800: #140f3b;
  --indigo-700: #1f1757;
  --indigo-600: #2c2077;
  --violet-300: #b9aef0;
  --violet-200: #d6cff6;
  --lav-100: #ece6f6;
  --cream: #faf6f1;
  --paper: #ffffff;
  --gold: #f5b942;
  --gold-deep: #d99a1c;
  --mint: #5de0d0;
  --red: #e5484d;
  --green: #2bb673;
  --text: #1a1640;
  --muted: #5d5a7a;
  --line: #ddd7ee;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-script: "Caveat", "Segoe Script", cursive;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.7rem, 1.3rem + 1.8vw, 2.7rem);
  --step-hero: clamp(2.7rem, 1.3rem + 6vw, 5.6rem);

  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(20, 15, 59, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
  color: var(--text); background: var(--cream);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--indigo-600); text-underline-offset: 3px; }
a:hover { color: var(--indigo-700); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; color: inherit; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 0; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem var(--gutter); background: var(--indigo-800); color: #fff;
  position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; fill: var(--violet-300); }
.brand-mark rect:last-child { fill: var(--gold); }
.brand-word { font-weight: 800; letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; }
.brand-word em { font-style: normal; font-weight: 500; color: var(--violet-300); }
.topnav { display: flex; align-items: center; gap: 1.1rem; }
.topnav a:not(.btn) { color: var(--violet-200); text-decoration: none; font-size: .92rem; font-weight: 600; }
.topnav a:not(.btn):hover { color: #fff; }
.inline-form { display: inline; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1; text-decoration: none;
  padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur), color var(--dur);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .55rem 1rem; font-size: .86rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 10px 24px -10px rgba(245, 185, 66, 0.8); }
.btn-gold:hover { background: #ffc85a; color: var(--ink); box-shadow: 0 16px 28px -12px rgba(245, 185, 66, 0.9); }
.btn-outline { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-ghost { border-color: rgba(185, 174, 240, 0.5); color: var(--violet-200); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn-dark { background: var(--indigo-700); color: #fff; }
.btn-dark:hover { background: var(--indigo-600); color: #fff; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-quiet { background: var(--lav-100); color: var(--indigo-700); }
.btn-quiet:hover { background: var(--violet-200); color: var(--indigo-700); }

/* ---------- flashes ---------- */
.flashes { width: min(920px, 100% - 2 * var(--gutter)); margin: 1rem auto 0; display: grid; gap: .5rem; }
.flash { margin: 0; padding: .8rem 1rem; border-radius: 10px; border: 1px solid; font-size: .95rem; overflow-wrap: anywhere; }
.flash-info { background: #eaf7f1; border-color: #bfe6d3; color: #14573a; }
.flash-error { background: #fdeceb; border-color: #f4c3c1; color: #8a1d20; }
.flash-warn { background: #fff6e0; border-color: #f2d790; color: #6b4a00; }

/* ---------- forms ---------- */
.field, .join-form label, .card-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  font: inherit; font-weight: 500; color: var(--text); background: #fff; width: 100%;
  border: 1.5px solid var(--line); border-radius: 10px; padding: .75rem .9rem;
  transition: border-color var(--dur), box-shadow var(--dur);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo-600); box-shadow: 0 0 0 4px rgba(44, 32, 119, 0.15); }
.check { display: flex !important; gap: .7rem; align-items: flex-start; font-weight: 500 !important; line-height: 1.45; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--indigo-600); flex: none; }
.opt { font-weight: 500; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- centered auth / message cards ---------- */
.auth-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 3rem var(--gutter); background:
  radial-gradient(900px 400px at 85% -10%, rgba(44, 32, 119, 0.14), transparent 60%), var(--cream); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow); }
.auth-card h1 { font-size: var(--step-2); }
.auth-card .sub { color: var(--muted); margin-bottom: 1.4rem; }
.card-form { display: grid; gap: 1rem; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; font-size: .92rem; }
.hint { font-size: .85rem; color: var(--muted); font-weight: 500; }

/* ---------- footer ---------- */
.footer { background: var(--indigo-900); color: var(--violet-200); padding: 2.2rem var(--gutter) 2.6rem; margin-top: 0; }
.footer-in { width: min(1160px, 100%); margin-inline: auto; text-align: center; font-size: .86rem; }
.footer a { color: #fff; }
.tagline { display: block; letter-spacing: .32em; text-transform: uppercase; font-weight: 700; font-size: .78rem; margin-bottom: .9rem; color: #fff; }
.tagline i { color: var(--gold); font-style: normal; margin: 0 .3em; }
.footer p { margin: 0 0 .4rem; color: var(--violet-300); }

@media (max-width: 720px) { .hide-sm { display: none; } .brand-word { letter-spacing: .1em; font-size: .7rem; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
