/* ============================================================
   NAB Internet Banking Design System — Colors & Typography
   ------------------------------------------------------------
   Everything a design consumes: base tokens (colors, radii,
   shadows, spacing) and semantic type styles (h1–h4, body,
   money, mono). Load this once at the top of any page.

   NOTE ON FONTS: The real NAB product ships in proprietary
   "NAB Sans". This system substitutes Rethink Sans (display)
   + Public Sans (body) from Google Fonts as a close humanist
   match. Swap the --font-* vars if you have NAB Sans on hand.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Rethink+Sans:wght@400;500;600;700;800&family=Public+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* ---------- Brand ---------- */
  --nab-red:        #E30A17;
  --nab-red-dark:   #B8000C;
  --nab-red-hover:  #C40915;
  --nab-black:      #000000;

  /* Star gradient (used on the NAB mark) */
  --nab-red-hi:     #F5333F;
  --nab-red-mid:    #E30A17;
  --nab-red-lo:     #B8000C;

  /* ---------- Neutrals (warm off-white shell) ---------- */
  --bg-app:         #F2F2F0;  /* page background */
  --bg-card:        #FFFFFF;  /* card surfaces */
  --bg-muted:       #F8F8F6;  /* row hover, subtle blocks */
  --bg-strip:       #EAEAE7;  /* register-now bar, segmented, search */
  --bg-header:      #FFFFFF;
  --bg-header-dark: #000000;  /* login page header, footer */

  /* ---------- Text ---------- */
  --text-primary:   #1A1A1A;
  --text-secondary: #5C5C5A;
  --text-tertiary:  #8C8C8A;
  --text-inverse:   #FFFFFF;
  --text-link:      #C40915;

  /* ---------- Lines ---------- */
  --border:         #E5E5E3;
  --border-strong:  #C9C9C6;
  --border-input:   #6B6B69;

  /* ---------- Semantic ---------- */
  --positive:       #008A3E;
  --positive-bg:    #E8F5EC;
  --negative:       #C1272D;
  --warning:        #A05A00;
  --warning-bg:     #FFF8E6;
  --warning-border: #EED08A;
  --warning-text:   #6A4C00;
  --pending-bg:     #FFF3D6;
  --pending-text:   #7A5B00;
  --error-bg:       #FDECEE;
  --error-text:     #B8000C;
  --info:           #0055B3;

  /* ---------- Special surfaces ---------- */
  --avatar-teal:    linear-gradient(135deg, #1CADAF 0%, #14898B 100%);
  --avatar-purple:  linear-gradient(135deg, #6B4EBD 0%, #4A2E9E 100%);
  --frozen-overlay: rgba(30,100,180,0.35);

  /* ---------- Radii ---------- */
  --r-input: 4px;   /* text inputs, square buttons */
  --r-card:  12px;  /* cards, popovers */
  --r-card-lg: 16px;/* credit card visual, chat panel */
  --r-pill:  999px; /* buttons, chips, avatars */

  /* ---------- Shadows ---------- */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-pop:  0 8px 24px rgba(0,0,0,0.12);   /* dropdowns, popovers */
  --shadow-fab:  0 6px 16px rgba(227,10,23,0.35);
  --shadow-cc:   0 20px 40px rgba(0,0,0,0.15);  /* credit card visual */
  --shadow-focus: 0 0 0 3px rgba(227,10,23,0.15);

  /* ---------- Spacing (4px grid) ---------- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-7: 28px;  --s-8: 32px;
  --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* ---------- Layout ---------- */
  --header-h:     64px;   /* in-app header */
  --header-h-mkt: 68px;   /* login/marketing header */
  --rail-w:       88px;
  --content-max:  1180px;

  /* ---------- Type Families ---------- */
  --font-display: "Rethink Sans", "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Public Sans", "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* ---------- Type Scale (semantic) ---------- */
  --fs-h1: 44px;      --lh-h1: 1.1;   --fw-h1: 400;  --ls-h1: -0.02em;
  --fs-h2: 28px;      --lh-h2: 1.2;   --fw-h2: 500;
  --fs-h3: 20px;      --lh-h3: 1.3;   --fw-h3: 600;
  --fs-h4: 17px;      --lh-h4: 1.35;  --fw-h4: 600;
  --fs-body: 15px;    --lh-body: 1.5;
  --fs-small: 13px;
  --fs-micro: 12px;
  --fs-tiny: 11px;
  --fs-money-lg: 24px; --fw-money-lg: 700; --ls-money-lg: -0.01em;
  --fs-card-num: 22px; --fw-card-num: 500; --ls-card-num: 0.06em;

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-toggle:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro: 0.12s;
  --dur-hover: 0.15s;
  --dur-enter: 0.35s;
  --dur-fade:  0.30s;
}

/* ============================================================
   Base & semantic type
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-h1); letter-spacing: var(--ls-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: var(--fw-h4); }
p  { margin: 0; }

a  { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Utility classes */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-inverse   { color: var(--text-inverse); }
.text-link      { color: var(--text-link); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.label-strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }
.tiny  { font-size: var(--fs-tiny); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

.money-pos { color: var(--positive); font-weight: 600; }
.money-neg { color: var(--text-primary); font-weight: 600; }
.money-lg  {
  font-size: var(--fs-money-lg);
  font-weight: var(--fw-money-lg);
  letter-spacing: var(--ls-money-lg);
}
.card-num  {
  font-family: var(--font-mono);
  font-size: var(--fs-card-num);
  font-weight: var(--fw-card-num);
  letter-spacing: var(--ls-card-num);
}

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