/* =========================================================
   SORP GROUP — KYC / KYS Portal
   Deep Violet · Electric Violet · Coral Red · Manrope
   ========================================================= */

/* Manrope is loaded from Google Fonts via index.html — no local @font-face fallback. */

:root {
  /* =========================================================
     CORE BRAND COLORS — direct from SORP spec
     ========================================================= */
  --sorp-violet:           #332AB7;    /* Deep Violet — primary */
  --sorp-violet-electric:  #4C44D9;    /* Electric Violet — hover, secondary, active */
  --sorp-coral:            #E3454E;    /* Coral Red — CTA, alerts, active step */
  --sorp-coral-hover:      #D93A43;
  --sorp-coral-active:     #C9343D;
  --sorp-lavender-soft:    #EAE9EB;    /* Light Lavender — secondary cards, dividers */
  --sorp-lavender:         #9D99E4;    /* Soft Purple — decorative, secondary text on dark */
  --sorp-lavender-line:    rgba(157, 153, 228, 0.22);
  --sorp-violet-tint:      #ECEBFA;    /* tint for info cards / hover backgrounds */
  --sorp-violet-tint-strong: #F3F2FF;  /* selected option background */

  /* Page / surface */
  --sorp-bg:           #F7F7FA;        /* main canvas */
  --sorp-card:         #FFFFFF;
  --sorp-card-input:   #F1F0F6;        /* disabled / muted input */

  /* Text */
  --sorp-text:           #141220;
  --sorp-text-secondary: #4F4B65;
  --sorp-text-muted:     #8A86A5;
  --sorp-text-line:      #DCD9EE;      /* default input border */

  /* =========================================================
     LEGACY VAR MAPPING — existing components use --burg-*,
     --gold-*, --paper-*, --ink-* throughout. We remap each
     legacy var to the closest SORP-spec value so the entire
     component library inherits the new palette without
     touching every selector.
     ========================================================= */

  /* "Burg" slot → Deep Violet system (primary / brand) */
  --burg-50:  #F3F2FF;
  --burg-100: #E2DFFA;
  --burg-200: #C8C3F0;
  --burg-300: #9D99E4;
  --burg-400: #6F69D0;
  --burg-500: #4C44D9;   /* Electric Violet */
  --burg-600: #332AB7;   /* PRIMARY Deep Violet */
  --burg-700: #271FA0;
  --burg-800: #1A1480;
  --burg-900: #0F0C5C;

  /* "Gold" slot → Coral Red accent system */
  --gold-50:  #FDECEE;
  --gold-100: #FBD0D4;
  --gold-200: #F39FA5;
  --gold-300: #ED7079;
  --gold-400: #E3454E;   /* PRIMARY accent — Coral Red */
  --gold-500: #C9343D;
  --gold-600: #A52630;
  --gold-700: #7A1A23;

  /* Parchment / neutrals */
  --paper-bg:       #F7F7FA;
  --paper-card:     #FFFFFF;
  --paper-deep:     #EAE9EB;
  --ink-1:          #141220;
  --ink-2:          #2A2438;
  --ink-3:          #4F4B65;
  --ink-4:          #8A86A5;

  /* Gray fallbacks */
  --gray-50:  #F7F7FA;
  --gray-100: #EAE9EB;
  --gray-200: #DCD9EE;
  --gray-300: #C8C3F0;
  --gray-400: #8A86A5;
  --gray-500: #4F4B65;
  --gray-600: #2A2438;
  --gray-700: #141220;
  --gray-800: #0A0814;
  --gray-900: #050308;

  /* Risk accents — keep semantically distinct from coral */
  --green-500: #2D8659;
  --green-100: #DCEEE2;
  --green-700: #1F5E3F;

  --amber-500: #D97706;
  --amber-100: #FEF1D6;
  --amber-700: #92400E;

  --red-500:  #E3454E;     /* matches coral CTA */
  --red-100:  #FDECEE;
  --red-700:  #C9343D;

  /* Foreground roles */
  --fg-1: var(--ink-1);
  --fg-2: var(--ink-3);
  --fg-3: var(--ink-4);
  --fg-4: var(--sorp-text-muted);
  --fg-brand:    var(--sorp-violet);
  --fg-gold:     var(--sorp-coral);     /* "gold" → coral accent */
  --fg-on-brand: #FFFFFF;

  /* Backgrounds */
  --bg-page:       var(--sorp-bg);
  --bg-subtle:     var(--sorp-violet-tint);
  --bg-card:       var(--sorp-card);
  --bg-brand:      var(--sorp-violet);
  --bg-brand-soft: var(--sorp-violet-tint);

  /* Brand gradients */
  --brand-gradient: linear-gradient(135deg, #4C44D9 0%, #332AB7 60%, #271FA0 100%);
  --gold-gradient:  linear-gradient(135deg, #ED7079 0%, #E3454E 50%, #C9343D 100%);
  --paper-gradient: radial-gradient(120% 80% at 0% 0%, #F3F2FF 0%, #F7F7FA 35%, #EAE9EB 100%);

  /* Borders */
  --border-subtle:  var(--sorp-lavender-line);
  --border-default: var(--sorp-text-line);
  --border-strong:  var(--sorp-violet);
  --border-brand:   var(--sorp-violet);
  --border-gold:    var(--sorp-coral);

  /* Radii — match SORP spec */
  --radius-xs:   8px;
  --radius-sm:  12px;
  --radius-md:  14px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-xs:    0 1px 2px rgba(20, 18, 32, 0.04);
  --shadow-sm:    0 2px 8px rgba(20, 18, 32, 0.05);
  --shadow-md:    0 8px 20px rgba(20, 18, 32, 0.06);
  --shadow-lg:    0 16px 40px rgba(20, 18, 32, 0.08);   /* SORP main card */
  --shadow-xl:    0 24px 56px rgba(20, 18, 32, 0.12);
  --shadow-brand: 0 14px 40px rgba(51, 42, 183, 0.32);
  --shadow-gold:  0 10px 28px rgba(227, 69, 78, 0.35);  /* coral glow on CTA */
  --shadow-focus: 0 0 0 4px rgba(76, 68, 217, 0.12);
  --shadow-focus-error: 0 0 0 4px rgba(227, 69, 78, 0.10);

  /* Spacing scale */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px;

  /* Type — Manrope throughout */
  --font-sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extrabold: 800;

  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  28px;
  --text-4xl:  36px;
  --text-5xl:  44px;
  --text-6xl:  56px;

  --lh-tight:    1.05;
  --lh-snug:     1.18;
  --lh-base:     1.50;
  --lh-relaxed:  1.65;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.14em;
}

/* =========================================================
   GLOBAL RESETS / BASE
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-family: var(--font-sans); color: var(--fg-1); }
body {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--fg-2);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
::selection { background: var(--sorp-violet); color: #FFFFFF; }
