/* jbp brand system — single source of truth for the site.
   Page-specific chrome stays inline per page. */

/* ── Fonts ── */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Regular.woff2') format('woff2-variations'),
       url('/assets/fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Italic.woff2') format('woff2-variations'),
       url('/assets/fonts/Montserrat-Italic.woff2') format('woff2');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'), local('Helvetica'), local('sans-serif');
  font-weight: 100 900; font-style: normal;
  size-adjust: 107.08%; ascent-override: 90.4%; descent-override: 23.44%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial Italic'), local('Helvetica-Oblique'), local('sans-serif');
  font-weight: 100 900; font-style: italic;
  size-adjust: 107.08%; ascent-override: 90.4%; descent-override: 23.44%; line-gap-override: 0%;
}

/* ── Tokens ── */
:root {
  /* Brand */
  --jbp-purple: #5A21B5;

  /* Purple scale */
  --purple-50:  #F4EFFB;
  --purple-100: #E7DDF7;
  --purple-200: #CDB8EE;
  --purple-300: #B090E2;
  --purple-400: #8E62D2;
  --purple-500: #7338C4;
  --purple-600: #5A21B5;
  --purple-700: #4A1B99;
  --purple-800: #3A1579;
  --purple-900: #260E52;

  /* Neutrals (warm) */
  --gray-50:  #FAFAF9;
  --gray-100: #F4F4F2;
  --gray-200: #E8E7E3;
  --gray-300: #D4D2CC;
  --gray-400: #A8A59D;
  --gray-500: #77746B;
  --gray-600: #55534C;
  --gray-700: #3A3934;
  --gray-800: #22221F;
  --gray-900: #111110;

  /* Semantic: surfaces */
  --bg:             var(--gray-50);
  --surface:        #FFFFFF;
  --surface-alt:    var(--gray-100);
  --surface-invert: var(--gray-900);

  /* Semantic: text */
  --fg-1: var(--gray-900);
  --fg-2: var(--gray-700);
  --fg-3: var(--gray-500);
  --fg-4: var(--gray-400);
  --fg-on-purple: #FFFFFF;
  --fg-on-invert: #FFFFFF;

  /* Semantic: borders */
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --border-focus:  var(--purple-500);

  /* Semantic: actions */
  --action-primary-bg:         var(--purple-600);
  --action-primary-bg-hover:   var(--purple-700);
  --action-primary-bg-pressed: var(--purple-800);
  --action-primary-fg:         #FFFFFF;

  --link:         var(--purple-600);
  --link-hover:   var(--purple-700);
  --link-visited: var(--purple-800);

  /* Semantic: status (muted) */
  --success-bg: #E8F3EC;   --success-fg: #1F5A36;   --success-border: #BCDAC5;
  --warning-bg: #FBF2DD;   --warning-fg: #6B4A0A;   --warning-border: #EBD8A3;
  --danger-bg:  #FBE9E7;   --danger-fg:  #7A2018;   --danger-border:  #EBC0BB;
  --info-bg:    #EEF1FB;   --info-fg:    #22346E;   --info-border:    #C8D2EC;

  /* Type families */
  --font-display: 'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;
  --font-body:    'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;
  --font-mono:    'Montserrat', 'Montserrat Fallback', ui-monospace, Menlo, monospace;

  /* Type scale */
  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-5xl:  64px;
  --text-6xl:  80px;

  /* Weights */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;
  --weight-black:   800;

  /* Line heights */
  --lh-tight:   1.05;
  --lh-display: 1.1;
  --lh-snug:    1.3;
  --lh-body:    1.55;
  --lh-loose:   1.7;

  /* Letter spacing */
  --tracking-tight:  -0.02em;
  --tracking-snug:   -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.08em;

  /* Spacing (4px grid) */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(17, 17, 16, 0.04);
  --shadow-sm: 0 1px 2px rgba(17, 17, 16, 0.04), 0 2px 8px rgba(17, 17, 16, 0.05);
  --shadow-md: 0 4px 12px rgba(17, 17, 16, 0.06), 0 2px 4px rgba(17, 17, 16, 0.04);
  --shadow-lg: 0 12px 32px rgba(17, 17, 16, 0.10), 0 4px 8px rgba(17, 17, 16, 0.05);
  --shadow-purple: 0 6px 20px rgba(90, 33, 181, 0.20);

  /* Focus ring */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--purple-500);

  /* Motion */
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-micro:   150ms;
  --dur-std:     250ms;
  --dur-page:    400ms;

  /* Layout */
  --container-max: 1200px;
  --gutter:        24px;
  --nav-height:    64px;
}

/* ── Reset + base ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Links (base) ── */
a { color: var(--purple-600); text-decoration: none; transition: color var(--dur-micro) var(--ease-out); }
a:hover { color: var(--purple-700); text-decoration: underline; text-underline-offset: 3px; }

/* ── Site nav (pill style) — shared across every page ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 68px;
  display: flex; align-items: center;
  padding: 0 32px;
  background: rgba(250, 250, 249, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 231, 227, 0.8);
  transition: background var(--dur-std) var(--ease-out);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--fg-1);
}
.nav-brand:hover { color: var(--fg-1); text-decoration: none; }
.nav-brand .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--purple-600);
  box-shadow: 0 0 0 3px rgba(90, 33, 181, 0.15);
}
.nav-links {
  display: flex; gap: 4px; align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
}
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--fg-2);
  padding: 8px 16px;
  border-radius: 999px;
  transition: all var(--dur-micro) var(--ease-out);
}
.nav-links a:hover { color: var(--fg-1); text-decoration: none; }
.nav-links a.active {
  background: var(--surface);
  color: var(--purple-700);
  box-shadow: var(--shadow-xs);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  padding: 10px 18px;
  background: var(--purple-600);
  color: #fff;
  border: none; border-radius: 999px;
  cursor: pointer;
  transition: all var(--dur-micro) var(--ease-out);
  text-decoration: none;
}
.nav-cta:hover { background: var(--purple-700); box-shadow: var(--shadow-purple); color: #fff; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Mobile nav menu (disclosure, replaces .nav-links below 960px) ── */
.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-1);
  cursor: pointer;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary svg { width: 18px; height: 18px; }
.nav-menu .nav-menu-close { display: none; }
.nav-menu[open] .nav-menu-open { display: none; }
.nav-menu[open] .nav-menu-close { display: block; }
.nav-menu-panel {
  position: absolute; right: 0; top: 48px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex; flex-direction: column;
}
.nav-menu-panel a {
  font-size: 15px; font-weight: 500; color: var(--fg-1);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav-menu-panel a:hover { background: var(--surface-alt); color: var(--fg-1); text-decoration: none; }

/* ── Site footer (dark, 4-column) — shared across every page ── */
.foot {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 56px 32px 24px;
}
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.foot-brand { display: flex; flex-direction: column; gap: 16px; max-width: 320px; }
.foot-brand .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; color: #fff;
}
.foot-brand .brand .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--purple-400);
}
.foot-brand p { font-size: 13.5px; line-height: 1.6; color: var(--gray-400); }
.foot-col h5 {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 14px; color: var(--gray-200);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color var(--dur-micro) var(--ease-out);
}
.foot-col a:hover { color: #fff; text-decoration: none; }
.foot-legal {
  max-width: 1200px; margin: 20px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--gray-500);
  flex-wrap: wrap; gap: 12px;
}
.foot-legal a { color: inherit; }
.foot-legal a:hover { color: #fff; text-decoration: underline; }
.foot-linklike {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}
.foot-linklike:hover { color: #fff; }
.foot-socials { display: flex; gap: 10px; }
.foot-socials a {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300);
  transition: all var(--dur-micro) var(--ease-out);
}
.foot-socials a:hover { background: var(--purple-600); color: #fff; text-decoration: none; }
.foot-socials svg { width: 15px; height: 15px; }

/* Pages that use the shared nav/footer reserve room under the fixed nav.
   Homepage and FAQ manage their own top offset via hero padding. */
body.has-site-nav { padding-top: 68px; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ── Cookie consent banner (loaded on every public page) ── */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-banner-text {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 0;
  flex: 1 1 320px;
  min-width: 0;
}
.cookie-banner-text a { color: var(--purple-700); }
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg-2);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.cookie-btn:hover {
  border-color: var(--fg-3);
  color: var(--fg-1);
}
.cookie-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.cookie-btn-accept {
  background: var(--action-primary-bg);
  border-color: var(--action-primary-bg);
  color: var(--action-primary-fg);
}
.cookie-btn-accept:hover {
  background: var(--action-primary-bg-hover);
  border-color: var(--action-primary-bg-hover);
  color: var(--action-primary-fg);
}
@media (max-width: 520px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; }
}
