/* ============================================================
   Global Typography System — Universal Implementation
   Strict 2-Font Hierarchy:
   - Plus Jakarta Sans: Semantic Headings (H1–H6) ONLY
   - Inter: Everything else across the entire website
   ============================================================ */

:root {
  /* Brand Primary Colors */
  --primary: #383875;
  --primary-hover: #2b2b5c;
  --color-primary: #383875;
  --jp-primary: #383875;

  /* Typography References */
  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
  --font-plus-jakarta: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: var(--font-plus-jakarta);
  --font-body: var(--font-inter);

  /* Approved Spacing Scale: 8, 12, 16, 20, 24, 32 */
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Standard Radius Tokens */
  --radius-btn: 10px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Container Foundation */
  --container-max-width: 100%;
  --container-padding: 16px; /* 320–430px */
}

/* Responsive Container Horizontal Padding Scale */
@media (min-width: 431px) {
  :root {
    --container-padding: 20px; /* 431–768px */
  }
}
@media (min-width: 769px) {
  :root {
    --container-padding: 24px; /* 769–1024px */
  }
}
@media (min-width: 1025px) {
  :root {
    --container-padding: 32px; /* 1025–1440px */
  }
}
@media (min-width: 1441px) {
  :root {
    --container-padding: 40px; /* >1440px */
  }
}


/* 1. Global Body & Baseline */
html,
body {
  font-family: var(--font-inter) !important;
  font-size: var(--font-size-md, 15px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text, var(--jp-body-color, #334155));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: clip;
}

p, span, div, a, li, dd, dt, blockquote, figcaption {
  font-family: inherit;
  overflow-wrap: break-word;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.jp-site-nav-wrap p,
#mobile-avatar-dropdown p,
#jp-desktop-avatar-dropdown p,
.jp-avatar-dropdown-scroll p,
#mobile-bottom-bar p,
#mobile-app-drawer p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 2. Semantic Headings ONLY: Plus Jakarta Sans */
h1, h2, h3, h4, h5, h6, 
.h1, .h2, .h3, .h4, .h5, .h6,
.jp-font-heading, .font-heading,
.pjp-page-title, .hero-title, .section-title {
  font-family: var(--font-plus-jakarta) !important;
  color: var(--color-heading, var(--jp-heading-color, #0F2053));
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

/* Ensure inline elements, spans, avatar badges, and buttons using font-heading NEVER inherit heading bottom margin */
span.font-heading,
span.jp-font-heading,
div.jp-avatar-initial,
.jp-company-avatar,
.jp-company-monogram,
.pjp-company-avatar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin: 0 !important;
}

/* Ensure all headings inside dark containers and hero overlays stay pure white */
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.text-white .font-heading,
.text-white .jp-font-heading,
[class*="bg-slate-900"] h1, [class*="bg-slate-900"] h2, [class*="bg-slate-900"] h3,
[class*="bg-slate-900"] h4, [class*="bg-slate-900"] h5, [class*="bg-slate-900"] h6,
[class*="bg-blue-950"] h1, [class*="bg-blue-950"] h2, [class*="bg-blue-950"] h3,
[class*="bg-blue-950"] h4, [class*="bg-blue-950"] h5, [class*="bg-blue-950"] h6,
[class*="bg-blue-900"] h1, [class*="bg-blue-900"] h2, [class*="bg-blue-900"] h3,
[class*="from-slate-900"] h1, [class*="from-slate-900"] h2, [class*="from-slate-900"] h3,
[class*="from-[#0757A8]"] h1, [class*="from-[#0757A8]"] h2, [class*="from-[#0757A8]"] h3,
[data-purpose="cta-banner"] h1, [data-purpose="cta-banner"] h2, [data-purpose="cta-banner"] h3,
[data-purpose="cta-banner"] h4, [data-purpose="cta-banner"] h5, [data-purpose="cta-banner"] h6,
.pjp-hero-panel h1, .pjp-hero-panel h2,
.bg-dark h1, .bg-dark h2,
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white,
h1.\!text-white, h2.\!text-white, h3.\!text-white, h4.\!text-white, h5.\!text-white, h6.\!text-white {
  color: #ffffff !important;
}

/* H1 */
h1, .h1 {
  font-size: var(--font-size-3xl, 36px);
  font-weight: 800;
  line-height: 1.2;
}

/* H2 */
h2, .h2 {
  font-size: var(--font-size-2xl, 28px);
  font-weight: 700;
  line-height: 1.25;
}

/* H3 */
h3, .h3 {
  font-size: var(--font-size-xl, 22px);
  font-weight: 600;
  line-height: 1.3;
}

/* H4 */
h4, .h4 {
  font-size: var(--font-size-lg, 18px);
  font-weight: 600;
  line-height: 1.35;
}

/* H5 */
h5, .h5 {
  font-size: var(--font-size-md, 16px);
  font-weight: 600;
  line-height: 1.4;
}

/* H6 */
h6, .h6 {
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  line-height: 1.45;
}

/* 3. Text Sizes / Utilities */
.text-lg, .text-large {
  font-size: 18px !important;
  font-weight: 400;
  line-height: 1.5;
}
.text-lg strong, .text-large strong, .text-lg b, .text-large b { font-weight: 600; }

.text-md, .text-medium {
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.5;
}
.text-md strong, .text-medium strong, .text-md b, .text-medium b { font-weight: 600; }

.text-sm, .text-small, small {
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.5;
}
.text-sm strong, .text-small strong, .text-sm b, .text-small b, small strong, small b { font-weight: 600; }

.text-xs, .text-extra-small, .helper-text, .meta-text {
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.4;
}

/* 4. Menu & Navigation: Strictly Inter */
nav,
.nav,
.menu,
.jp-site-header,
.jp-site-nav-wrap,
.jp-nav-capsule,
.jp-nav-capsule-link,
.jp-nav-link,
.jp-dropdown-link,
.jp-dropdown-menu,
.jp-mobile-menu,
.jp-mobile-sub-link,
.jp-overlay-nav-row,
.jp-profile-name,
.jp-btn-signin-link,
.jp-btn-post-job-cta,
.jp-user-pill-trigger,
.jp-user-pill-trigger *,
#jp-mobile-bottom-nav,
#jp-mobile-bottom-nav *,
.jp-app-bottom-nav,
.jp-app-bottom-nav *,
#mobile-bottom-bar,
#mobile-bottom-bar *,
.jp-app-drawer,
.jp-app-drawer *,
#mobile-app-drawer,
#mobile-app-drawer *,
.pjp-shell-nav-link,
.pjp-shell-sidebar,
.pjp-shell-header,
.jp-menu-group-header,
.jp-avatar-user-name,
.jp-avatar-user-badge,
.jp-avatar-group-title {
  font-family: var(--font-inter) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#mobile-app-drawer h1,
#mobile-app-drawer h2,
#mobile-app-drawer h3,
#mobile-app-drawer h4,
#mobile-app-drawer h5,
#mobile-app-drawer h6,
#mobile-app-drawer .font-heading {
  font-family: var(--font-plus-jakarta) !important;
}

.jp-nav-capsule-link {
  font-weight: 700 !important;
}

.jp-nav-capsule-link.is-active,
.jp-nav-link.is-active,
.jp-dropdown-link.is-active,
.pjp-shell-nav-link.is-active,
.pjp-shell-nav-link.is-current {
  font-weight: 700 !important;
}

/* 5. Buttons: Strictly Inter & 10px Radius */
button,
.btn,
.button,
input[type='submit'],
input[type='button'],
input[type='reset'],
.jp-btn,
.pjp-btn,
.jp-btn-post-job,
.jp-btn-login,
.jp-btn-register,
.btn-action,
[role="button"] {
  font-family: var(--font-inter) !important;
  border-radius: 10px !important;
}

/* 6. Forms, Inputs, Placeholders, Labels: Strictly Inter */
label,
.form-label,
.pjp-label,
.jp-filter-label {
  font-family: var(--font-inter) !important;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='search'],
input[type='tel'],
input[type='url'],
select,
textarea,
.pjp-input,
.form-control,
.jp-unified-search-input {
  font-family: var(--font-inter) !important;
}

::placeholder {
  font-family: var(--font-inter) !important;
  color: #94a3b8 !important;
}
::-webkit-input-placeholder {
  font-family: var(--font-inter) !important;
}
:-ms-input-placeholder {
  font-family: var(--font-inter) !important;
}

.help-text,
.error-text,
.pjp-help-text,
.form-text {
  font-family: var(--font-inter) !important;
  font-size: 12px;
  font-weight: 400;
  margin-top: 6px;
}
.error-text {
  font-weight: 500 !important;
  color: #ef4444 !important;
}

/* 7. Search & Filters: Strictly Inter */
.pjp-universal-search-wrapper,
.pjp-universal-search-wrapper *,
.pjp-universal-search-input,
.pjp-ud-wrapper,
.pjp-ud-wrapper *,
.jp-filter-sidebar,
.jp-filter-sidebar label,
.jp-filter-sidebar span,
.jp-filter-sidebar div,
.filter-container,
.filter-group,
.filter-plain-btn {
  font-family: var(--font-inter) !important;
}

/* 8. Tables, Badges, Tags, Breadcrumbs, Pagination, Alerts, Tooltips, Empty States: Strictly Inter */
table,
th,
td,
.pjp-cmp-table th,
.pjp-cmp-table td,
.pjp-admin-table th,
.pjp-admin-table td,
.badge,
.tag,
.chip,
.pjp-admin-chip,
.badge-title,
.salary-title,
.breadcrumb,
.breadcrumb *,
.pagination,
.pjp-cmp-page,
.toast,
.tooltip,
.jp-toast-pill,
#pjp-live-toast,
.jp-empty-state,
.jp-empty-title,
.jp-empty-desc {
  font-family: var(--font-inter) !important;
}

/* 9. Script Callout / Decorative Fallback (Removed Caveat -> Inter Italic) */
.font-caveat,
.pjp-font-caveat,
.jp-script-callout-brand,
.jp-wa-annot-text,
.jp-script-callout-bottom,
.pjp-script-top-text,
.pjp-script-bottom-text {
  font-family: var(--font-inter) !important;
  font-style: italic !important;
}

/* ============================================================
   Responsive Typography Adjustments
   Consistent scales scaling down on smaller devices
   ============================================================ */

/* Tablet (768px to 1024px) */
@media screen and (max-width: 1024px) {
  h1, .h1 { font-size: 30px; line-height: 1.25; }
  h2, .h2 { font-size: 24px; line-height: 1.3; }
  h3, .h3 { font-size: 20px; line-height: 1.35; }
  h4, .h4 { font-size: 17px; line-height: 1.4; }
  h5, .h5 { font-size: 15px; line-height: 1.4; }
  h6, .h6 { font-size: 13.5px; line-height: 1.45; }
}

/* Mobile (<768px) */
@media screen and (max-width: 767px) {
  h1, .h1 { font-size: 25px; line-height: 1.25; }
  h2, .h2 { font-size: 21px; line-height: 1.3; }
  h3, .h3 { font-size: 18px; line-height: 1.35; }
  h4, .h4 { font-size: 16px; line-height: 1.4; }
  h5, .h5 { font-size: 14px; line-height: 1.4; }
  h6, .h6 { font-size: 13px; line-height: 1.45; }
}

/* ============================================================
   Design System Components (UI/UX Premium)
   ============================================================ */

.jp-card,
.jp-settings-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}

.pjp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0757A8 0%, #1677D2 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px !important;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 119, 210, 0.28);
  transition: all 0.2s ease;
}
.pjp-btn-primary:hover {
  background: linear-gradient(135deg, #054587 0%, #0757A8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(7, 87, 168, 0.35);
}

.pjp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pjp-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}
