/* JSR Immigration — Design Tokens & Base Styles */

:root {
  /* === COLOR PALETTES === */
  /* Default: Charcoal */
  --brand-50: #f5f6f7;
  --brand-100: #e5e7eb;
  --brand-200: #d1d5db;
  --brand-300: #9ca3af;
  --brand-400: #6b7280;
  --brand-500: #4b5563;
  --brand-600: #374151;
  --brand-700: #1f2937;
  --brand-800: #111827;
  --brand-900: #0a0e16;

  --accent: #b8956a;        /* warm bronze accent */
  --accent-soft: #e8dfd0;

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #fafaf8;
  --bg-muted: #f4f3ef;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* Text */
  --text: #111827;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  /* Type */
  --font-sans: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", "Georgia", serif;
  --font-display: var(--font-sans);
  --font-body: var(--font-sans);

  /* Density */
  --density: 1;
  --space-1: calc(4px * var(--density));
  --space-2: calc(8px * var(--density));
  --space-3: calc(12px * var(--density));
  --space-4: calc(16px * var(--density));
  --space-5: calc(24px * var(--density));
  --space-6: calc(32px * var(--density));
  --space-7: calc(48px * var(--density));
  --space-8: calc(64px * var(--density));
  --space-9: calc(96px * var(--density));
  --space-10: calc(128px * var(--density));

  /* Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.10);

  --container: 1200px;
  --container-narrow: 880px;
}

/* DARK MODE */
[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --bg-muted: #1a2230;
  --surface: #131a26;
  --border: #243042;
  --border-strong: #344256;
  --text: #f3f4f6;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --text-inverse: #0b0f17;
}

/* PALETTES — applied via [data-palette="..."] */
[data-palette="charcoal"] {
  --brand-700: #1f2937; --brand-800: #111827; --brand-900: #0a0e16;
  --accent: #b8956a; --accent-soft: #e8dfd0;
}
[data-palette="navy"] {
  --brand-700: #1e3a5f; --brand-800: #0a2540; --brand-900: #061a30;
  --accent: #c9a961; --accent-soft: #ece2c4;
}
[data-palette="forest"] {
  --brand-700: #1e5a3c; --brand-800: #133d29; --brand-900: #0a2618;
  --accent: #d4a574; --accent-soft: #ecd9b8;
}
[data-palette="maple"] {
  --brand-700: #991b1b; --brand-800: #7f1d1d; --brand-900: #5b1414;
  --accent: #e5a86b; --accent-soft: #f3dcb4;
}
[data-palette="teal"] {
  --brand-700: #115e59; --brand-800: #0e4744; --brand-900: #08302e;
  --accent: #d4a574; --accent-soft: #ecd9b8;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* TYPE */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.25; }
h4 { font-size: 18px; line-height: 1.3; }
p  { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-line::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* CONTAINER */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* SECTIONS */
section {
  padding: var(--space-9) 0;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-800);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--brand-900); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-muted); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 0;
}
.btn-ghost::after {
  content: "→";
  transition: transform 0.18s ease;
}
.btn-ghost:hover::after { transform: translateX(4px); }

/* CTA STYLE VARIANTS */
[data-cta="pill"] .btn { border-radius: var(--radius-pill); }
[data-cta="sharp"] .btn { border-radius: 2px; }
[data-cta="bold"] .btn-primary {
  background: var(--accent);
  color: var(--brand-900);
  font-weight: 600;
}
[data-cta="bold"] .btn-primary:hover { background: var(--accent); filter: brightness(0.95); }
[data-cta="outline"] .btn-primary {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
[data-cta="outline"] .btn-primary:hover { background: var(--text); color: var(--bg); }

/* NAV */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--brand-800);
  color: var(--text-inverse);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
}
.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .phone {
  font-size: 14px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

/* FOOTER */
.site-footer {
  background: var(--brand-900);
  color: #cbd5e1;
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-9);
}
.site-footer h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-6);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #94a3b8; font-size: 14px; }
.site-footer a:hover { color: white; }
.site-footer .legal {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid #1e2a3d;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all 0.2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #10b981;
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

/* UTILITY */
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.tabular { font-variant-numeric: tabular-nums; }
.grid { display: grid; }
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; } .gap-6 { gap: 32px; }

/* RESPONSIVE */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: var(--space-7) 0; }
}

/* MOBILE NAV TOGGLE (simple) */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 18px;
}
@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }
}

/* FORM */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-800);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-800) 12%, transparent);
}

/* HELPERS */
.flag-canada {
  width: 18px; height: 12px;
  background: linear-gradient(to right, #b91c1c 30%, white 30%, white 70%, #b91c1c 70%);
  position: relative;
  border-radius: 1px;
  display: inline-block;
}

/* HERO LAYOUT VARIANTS handled inline in components */
