/* ==========================================================================
   EXPRESSCREDIT — DESIGN SYSTEM
   01. TOKENS
   --------------------------------------------------------------------------
   Single source of truth for the ExpressCredit visual language.
   Derived from the ExpressCredit Corporate Identity Guidelines v1.0 (Nov 2026).
   Do not hard-code colour, radius, shadow or type values anywhere else.
   ========================================================================== */

:root {

  /* ---------------------------------------------------------------------
     BRAND — as supplied in the CI
     --------------------------------------------------------------------- */
  --nala-navy:            #08234D;   /* Midnight Navy — primary type / backgrounds */
  --nala-teal:            #008CA8;   /* Express Teal — accent / actions / "Credit" */
  --nala-green:           #35B4CB;   /* Light teal — gradients, progress (replaces old green) */
  --nala-periwinkle:      #1FA8C4;   /* Focus ring (teal-400) */
  --nala-grey:            #52647A;   /* Slate — secondary text */
  --nala-mist:            #EAF7FA;   /* Ice Blue — soft backgrounds */

  /* ---------------------------------------------------------------------
     NAVY RAMP — surfaces, ink, headers
     --------------------------------------------------------------------- */
  --navy-50:   #F3F6FB;
  --navy-100:  #DAE3F0;
  --navy-200:  #B3C2D9;
  --navy-300:  #7D93B6;
  --navy-400:  #4A628C;
  --navy-500:  #27416B;
  --navy-600:  #12315E;
  --navy-700:  #08234D;   /* = Midnight Navy */
  --navy-800:  #061A37;   /* = Deep Navy — dark UI surfaces */
  --navy-900:  #041225;

  /* ---------------------------------------------------------------------
     TEAL RAMP — action, focus, progress
     500 is the CI brand teal. 600/700 are the accessible text variants:
     brand teal alone does not reach 4.5:1 on white, so body-size text and
     links use --teal-700. Never use --teal-500 for small text on white.
     --------------------------------------------------------------------- */
  --teal-50:   #E6F6F9;
  --teal-100:  #C2E9F0;
  --teal-200:  #8ED7E4;
  --teal-300:  #55C2D6;
  --teal-400:  #1FA8C4;
  --teal-500:  #008CA8;   /* = Express Teal (3.95:1 on white — UI only, not body text) */
  --teal-600:  #00738A;   /* 5.5:1 — buttons, text */
  --teal-700:  #005C6E;   /* 7.3:1 — links, small text */
  --teal-800:  #004755;
  --teal-900:  #00333D;

  /* ---------------------------------------------------------------------
     GREEN RAMP — growth, progress, positive states
     --------------------------------------------------------------------- */
  --green-50:  #EAF7FA;
  --green-100: #D3EFF5;
  --green-200: #A6DFEA;
  --green-300: #35B4CB;   /* light teal — was brand green */
  --green-400: #1FA8C4;
  --green-500: #008CA8;
  --green-600: #00738A;
  --green-700: #005C6E;

  /* ---------------------------------------------------------------------
     NEUTRAL RAMP
     --------------------------------------------------------------------- */
  --grey-50:   #F6FAFC;
  --grey-100:  #EAF7FA;   /* = Ice Blue */
  --grey-200:  #DDE6EE;
  --grey-300:  #C7D2DE;
  --grey-400:  #9FADBE;
  --grey-500:  #6F8095;   /* 3.7:1 control borders */
  --grey-600:  #52647A;   /* = Slate — secondary text */
  --grey-700:  #3F4F63;
  --grey-800:  #2B3747;
  --grey-900:  #1A2230;
  --white:     #FFFFFF;

  /* ---------------------------------------------------------------------
     SEMANTIC — as supplied in the CI, with accessible text variants
     --------------------------------------------------------------------- */
  --success:         #27AE60;
  --success-ink:     #1B7A43;   /* text on light surfaces */
  --success-surface: #E9F7EF;
  --success-border:  #B7E3CB;

  --warning:         #F59E0B;
  --warning-ink:     #8A5606;   /* text on light surfaces */
  --warning-surface: #FEF5E6;
  --warning-border:  #F7DCA9;

  --error:           #E74C3C;
  --error-ink:       #B32B1D;   /* text on light surfaces */
  --error-surface:   #FDEDEB;
  --error-border:    #F6C3BD;

  --info:            #1FA8C4;
  --info-ink:        #005C6E;   /* text on light surfaces */
  --info-surface:    #E6F6F9;
  --info-border:     #A6DFEA;

  --disabled-bg:     #EAF7FA;
  --disabled-ink:    #9FADBE;

  /* ---------------------------------------------------------------------
     SEMANTIC ALIASES — always reference these in components
     --------------------------------------------------------------------- */
  --bg-page:          var(--grey-50);
  --bg-surface:       var(--white);
  --bg-surface-alt:   var(--grey-100);
  --bg-inverse:       var(--navy-700);
  --bg-brand-soft:    var(--teal-50);

  --ink-primary:      var(--navy-700);
  --ink-secondary:    var(--grey-700);
  --ink-muted:        var(--grey-600);
  --ink-inverse:      var(--white);
  --ink-inverse-soft: rgba(255,255,255,.76);
  --ink-brand:        var(--teal-700);
  --ink-on-brand:     var(--white);

  --border-subtle:    var(--grey-200);   /* decorative separation only     */
  --border-default:   var(--grey-300);   /* card edges, non-essential rules */
  /* Interactive control boundaries. WCAG 2.2 SC 1.4.11 requires 3:1 against
     the adjacent surface for anything that identifies a control. grey-500 is
     3.64:1 on white and 3.43:1 on --grey-50, so every input, select, tile and
     outline button uses this — never --border-default. */
  --border-control:   var(--grey-500);
  --border-strong:    var(--grey-600);
  --border-brand:     var(--teal-500);

  --action-primary:        var(--teal-600);
  --action-primary-hover:  var(--teal-700);
  --action-primary-active: var(--teal-800);
  --action-secondary:      var(--navy-700);

  --focus-ring:       var(--nala-periwinkle);

  /* ---------------------------------------------------------------------
     TYPOGRAPHY
     Inter for everything (CI: single family; medium/semibold headings)
     --------------------------------------------------------------------- */
  --font-display: "Inter", "Segoe UI", Arial, system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", Arial, system-ui, sans-serif;
  --font-mono:    "SFMono-Regular", "Roboto Mono", ui-monospace, monospace;

  /* Type scale — CI scale, extended upward for desktop hero use.
     Sizes are rem-based so browser zoom and user font settings are honoured. */
  --fs-hero:      2.75rem;  /* 44px — desktop hero only  */
  --lh-hero:      3.25rem;  /* 52px */
  --fs-display:   2rem;     /* 32px — CI Display / H1     */
  --lh-display:   2.5rem;   /* 40px */
  --fs-h2:        1.5rem;   /* 24px */
  --lh-h2:        2rem;     /* 32px */
  --fs-h3:        1.25rem;  /* 20px */
  --lh-h3:        1.75rem;  /* 28px */
  --fs-h4:        1.0625rem;/* 17px */
  --lh-h4:        1.5rem;   /* 24px */
  --fs-body-lg:   1rem;     /* 16px */
  --lh-body-lg:   1.5rem;   /* 24px */
  --fs-body:      0.875rem; /* 14px */
  --lh-body:      1.375rem; /* 22px */
  --fs-small:     0.75rem;  /* 12px */
  --lh-small:     1rem;     /* 16px */

  /* Money display — loan amounts must visually dominate */
  --fs-money-xl:  3rem;     /* 48px — calculator amount   */
  --lh-money-xl:  3.25rem;
  --fs-money-lg:  2rem;     /* 32px — offer / balance     */
  --lh-money-lg:  2.375rem;
  --fs-money-md:  1.375rem; /* 22px — instalment rows     */
  --lh-money-md:  1.75rem;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  --tracking-tight: -0.02em;
  --tracking-flat:   0;
  --tracking-wide:   0.06em;

  /* ---------------------------------------------------------------------
     SPACE — 4px base
     --------------------------------------------------------------------- */
  --sp-1:  0.25rem;  --sp-2:  0.5rem;   --sp-3:  0.75rem;  --sp-4: 1rem;
  --sp-5:  1.25rem;  --sp-6:  1.5rem;   --sp-7:  1.75rem;  --sp-8: 2rem;
  --sp-10: 2.5rem;   --sp-12: 3rem;     --sp-16: 4rem;     --sp-20: 5rem;
  --sp-24: 6rem;     --sp-32: 8rem;

  /* ---------------------------------------------------------------------
     RADII
     --------------------------------------------------------------------- */
  --r-xs:      6px;
  --r-sm:     10px;
  --r-btn:    12px;
  --r-input:  12px;
  --r-card-sm:16px;
  --r-card:   20px;
  --r-card-lg:24px;
  --r-hero:   28px;
  --r-pill:  999px;

  /* ---------------------------------------------------------------------
     ELEVATION — tinted with navy, never pure black
     --------------------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(8,35,77,.04);
  --shadow-sm: 0 2px 8px rgba(8,35,77,.05);
  --shadow-md: 0 6px 16px rgba(8,35,77,.06);
  --shadow-lg: 0 10px 30px rgba(8,35,77,.08);
  --shadow-xl: 0 20px 48px rgba(8,35,77,.10);
  --shadow-focus: 0 0 0 3px rgba(31,168,196,.45);

  /* ---------------------------------------------------------------------
     MOTION — state communication only, never decoration
     --------------------------------------------------------------------- */
  --dur-fast:  150ms;
  --dur-base:  200ms;
  --dur-slow:  250ms;
  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-out:  cubic-bezier(0,0,.2,1);

  /* ---------------------------------------------------------------------
     LAYOUT
     --------------------------------------------------------------------- */
  --container:      1200px;
  --container-wide: 1320px;
  --container-text:  720px;
  --gutter:         var(--sp-5);
  --tap-min:        44px;   /* WCAG 2.2 AA target size */
  --control-h:      52px;   /* default input / button height */
  --control-h-lg:   56px;   /* primary mobile CTA */
  --header-h:       72px;

  --z-base: 1; --z-sticky: 100; --z-drawer: 200; --z-modal: 300; --z-toast: 400;
}

@media (min-width: 768px) {
  :root { --gutter: var(--sp-8); }
}
@media (min-width: 1200px) {
  :root { --fs-display: 2.5rem; --lh-display: 3rem; --gutter: var(--sp-10); }
}
