/* ==========================================================================
   KunwarTrust — Base stylesheet
   Design tokens, reset, typography and shared primitives.
   Pure CSS. No JavaScript anywhere in this project.
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #0b1f45;
  --navy-800: #0f2a5c;
  --navy-700: #13366f;
  --navy-600: #1a4386;
  --blue-600: #1466cc;
  --blue-500: #2a7ce0;
  --blue-100: #dde9fa;
  --blue-50: #eff5fd;

  /* Neutrals */
  --ink-900: #0d1526;
  --ink-700: #33415c;
  --ink-500: #64748b;
  --ink-400: #8b98ad;
  --line: #e3e8f0;
  --line-soft: #eef1f7;
  --surface: #ffffff;
  --canvas: #f4f7fc;

  /* Status */
  --green-600: #16a34a;
  --green-50: #e8f7ee;
  --amber-600: #ea9a08;
  --amber-50: #fdf3e0;
  --red-600: #dc2626;
  --red-50: #fdeceb;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(13, 21, 38, .06);
  --shadow-sm: 0 2px 8px rgba(13, 21, 38, .06);
  --shadow-md: 0 8px 24px rgba(13, 21, 38, .08);
  --shadow-lg: 0 18px 48px rgba(13, 21, 38, .12);

  /* Rhythm */
  --shell: 1280px;
  --gap: 24px;
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
}

p { margin: 0; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-700); }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid rgba(20, 102, 204, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------- layout -- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap    { flex-wrap: wrap; }
.g-4  { gap: 4px; }
.g-8  { gap: 8px; }
.g-12 { gap: 12px; }
.g-16 { gap: 16px; }
.g-24 { gap: 24px; }
.grow { flex: 1; }

.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------------ type -- */

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.section-title {
  font-size: 26px;
  letter-spacing: .01em;
}

.lede {
  font-size: 17px;
  color: var(--ink-500);
}

.muted { color: var(--ink-500); }
.small { font-size: 13px; }
.tiny  { font-size: 12px; }
.strong { font-weight: 700; color: var(--ink-900); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
    box-shadow .18s ease, transform .18s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(20, 102, 204, .28);
}
.btn-primary:hover { background: var(--navy-600); color: #fff; }

.btn-ghost {
  background: #fff;
  color: var(--navy-800);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }

.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border-color: var(--blue-100);
}
.btn-outline:hover { background: var(--blue-50); color: var(--navy-700); }

.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ chips -- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-green { background: var(--green-50); color: var(--green-600); }
.badge-amber { background: var(--amber-50); color: var(--amber-600); }
.badge-red   { background: var(--red-50);   color: var(--red-600); }
.badge-blue  { background: var(--blue-50);  color: var(--blue-600); }
.badge-grey  { background: #eef1f7;         color: var(--ink-500); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------ cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.card-head h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-900);
}

.card-body { padding: 22px; }

/* ------------------------------------------------------------ brand -- */
/* Shared by the marketing header/footer and the portal sidebar, so these
   live in base rather than in either of the page stylesheets. */

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex: none; }

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--navy-800);
  text-transform: uppercase;
}

.brand-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink-500);
}
.brand-sub.tagline { letter-spacing: .07em; font-size: 9px; text-transform: uppercase; }

/* ------------------------------------------------------------ icons -- */

.ico { width: 20px; height: 20px; flex: none; stroke-width: 1.7; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }

.ico-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--blue-50);
  color: var(--blue-600);
}
.ico-tile-navy { background: rgba(15, 42, 92, .08); color: var(--navy-800); }

/* --------------------------------------------------------- utilities -- */

.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .shell { padding-inline: 18px; }
  .section-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
