/* ==========================================================================
   JB PPC — shared stylesheet (loaded on every page, after the page's own CSS)
   Tokens, fonts, nav, footer and sitewide design rules live here.
   Page-specific layout stays in each page's <style> block.
   ========================================================================== */

/* ── Fonts (self-hosted: faster, and no Google Fonts call before consent) ── */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-latin-wght-italic.woff2') format('woff2');
  font-weight: 200 900; font-style: italic; font-display: swap;
}

/* ── Tokens ── */
:root {
  --navy: #1D2A4D;
  --navy-mid: #243561;
  --navy-light: #2D416E;
  --cream: #f5f0e8;
  --cream-dark: #ebe4d8;
  --white: #ffffff;
  --text-muted: #8a9bb0;
  --border: rgba(255,255,255,0.08);

  /* Accent. --blue is for text/lines and adapts to the background it sits on;
     --blue-fill is for solid buttons/bands (white text on it passes WCAG AA). */
  --blue-on-light: #2F6893;
  --blue-on-light-hover: #2A5C85;
  --blue-on-dark: #8DB8DD;
  --blue-on-dark-hover: #B3D1EA;
  --blue: var(--blue-on-light);
  --blue-light: var(--blue-on-light-hover);
  --blue-fill: #336E9E;
  --blue-fill-hover: #2A5C85;

  --radius: 4px;
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

/* Dark surfaces: accent text switches to the lighter blue */
body.theme-dark,
nav, footer,
.hero, .post-hero, .post-cta, .jb-posts, .services-section, .about-hero,
.approach-section, .cta-section, .booking-hero, .contact-hero,
.tool-hero, .blog-card-image, .jb-cookie-banner, .cookie-banner,
.cta-personal {
  --blue: var(--blue-on-dark);
  --blue-light: var(--blue-on-dark-hover);
}
/* Light surfaces sitting on dark pages: back to the deeper blue */
body.theme-dark .form-card,
body.theme-dark .about-section,
body.theme-dark .testimonials-section,
body.theme-dark .industries-section,
body.theme-dark .story-section,
body.theme-dark .commercials-section,
body.theme-dark .commercial-card,
body.theme-dark .tl-tile,
body.theme-dark .tl-impact-card,
body.theme-dark .shopping-compare,
body.theme-dark .shopping-tile,
body.theme-dark .booking-modal,
.jb-cookie-prefs, .cookie-prefs, .post-hero .stat {
  --blue: var(--blue-on-light);
  --blue-light: var(--blue-on-light-hover);
}

/* ── Base type ── */
html { font-size: 106.25%; } /* Source Sans runs smaller than Poppins; 17px base */
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); }
h1, h2 { letter-spacing: -0.02em !important; }

/* ── Buttons & labels: sentence case, no tracking ── */
.btn-primary, .btn-secondary, .form-submit, .form-submit-btn, .post-cta a,
.blog-card-readmore, .footer-cta a, .footer-cta button, .post-form button,
.service-trigger-name, .form-group label, .contact-item-label, .hero-cta-row a,
.cta-btn, button[type="submit"] {
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.btn-primary, .form-submit, .form-submit-btn, .footer-cta a, .footer-cta button, .post-cta a {
  font-size: 1rem !important;
  font-weight: 650 !important;
}
.service-trigger-name { font-size: 1.05rem !important; font-weight: 600 !important; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1d294e;
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 112px;
  font-family: var(--font-body);
}
.nav-logo img { display: block; height: 64px; width: auto; }
.nav-partner { margin-left: 1rem; margin-right: auto; display: flex; align-items: center; flex-shrink: 0; }
.nav-partner img { display: block; height: 64px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a, .nav-dropdown-trigger {
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active,
.nav-dropdown-trigger.active { color: var(--blue); }
@media (max-width: 900px) {
  nav { padding: 0 1.25rem; height: 84px; }
  .nav-logo img, .nav-partner img { height: 52px; }
  .nav-links { gap: 1rem; }
}

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  font-size: 0.92rem;
  font-family: var(--font-body);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: center;
}
.footer-brand { color: var(--cream); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.footer-brand strong { color: var(--white); font-weight: 650; }
.footer-linkedin { color: var(--blue); display: inline-flex; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-legal {
  grid-column: 1 / -1;
  display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem;
}
footer a, footer button {
  color: var(--cream);
  text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit;
}
footer a:hover, footer button:hover { color: var(--blue); text-decoration: underline; }
.footer-legal a, .footer-legal button { color: var(--text-muted); }
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ── Testimonials: all visible, one featured ── */
.t-inner { max-width: 1200px; margin: 0 auto; text-align: left; }
.t-h2 { text-align: left; margin-bottom: 2rem; }
.t-grid { display: grid; gap: 1.25rem; }
.t-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.t-card { margin: 0; background: var(--white); border-radius: var(--radius); padding: 1.5rem 1.6rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.1rem; border-left: 3px solid var(--blue-fill); }
.t-card blockquote { margin: 0; color: #33425a; font-size: 1rem; line-height: 1.6; }
.t-feature { background: var(--navy-mid); border-left: 0; padding: 2.5rem 3rem 2.25rem; }
.t-feature blockquote { max-width: 900px; }
.t-feature blockquote { font-family: var(--font-display); font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.35; letter-spacing: -0.01em; color: var(--white); font-weight: 500; }
.t-card figcaption { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; color: #5a6a7a; line-height: 1.35; }
.t-card figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.t-card figcaption strong { display: block; color: var(--navy); font-weight: 650; }
.t-feature figcaption { color: var(--text-muted); }
.t-feature figcaption strong { color: var(--white); }


/* ── Closing CTA (personal) ── */
.cta-personal { background: var(--navy-mid); padding: 4.5rem 2rem; border-top: 1px solid var(--border); }
.cta-personal-inner { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: center; }
.cta-personal-photo { width: 220px; height: 220px; object-fit: cover; border-radius: var(--radius); display: block; }
.cta-personal h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--white); line-height: 1.1; margin-bottom: 0.9rem; }
.cta-personal p { color: var(--cream); opacity: 0.85; font-size: 1.05rem; line-height: 1.6; max-width: 560px; margin-bottom: 1.6rem; }

@media (max-width: 900px) {
  .t-feature { padding: 1.75rem 1.5rem; }
  .cta-personal-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .cta-personal-photo { width: 120px; height: 120px; border-radius: 50%; }
}
.cta-personal .hero-cta-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.cta-personal .btn-primary {
  display: inline-block; background: var(--blue-fill); color: var(--white);
  padding: 0.8rem 1.75rem; border-radius: var(--radius); border: 0; cursor: pointer;
  font-family: var(--font-display); text-decoration: none; transition: background 0.2s;
}
.cta-personal .btn-primary:hover { background: var(--blue-fill-hover); }
.cta-personal .hero-meta { font-size: 0.88rem; color: var(--text-muted); }
.cta-personal .hero-meta span { color: var(--cream-dark); }
.testimonials-section .t-h2 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  color: inherit; margin-bottom: 2rem; text-align: left;
}
.faq-body-inner a, .faq-answer a { color: var(--blue); }

/* ── Section-tone variants (keep dark/light alternating down every page) ── */
.jb-posts.is-light { background: var(--cream) !important; color: var(--navy) !important; --blue: var(--blue-on-light); --blue-light: var(--blue-on-light-hover); }
.jb-posts.is-light h2, .jb-posts.is-light .jb-post h3 { color: var(--navy) !important; }
.jb-posts.is-light .jb-post { background: var(--white) !important; border-color: rgba(29,42,77,0.08) !important; color: var(--navy) !important; }
.jb-posts.is-light .jb-post p { color: #4a5a72 !important; }
.jb-posts.is-light .jb-post-date { color: #5a6a7a !important; }
.jb-posts .featured-articles { padding: 2.5rem 0 0 !important; margin: 0 !important; text-align: left !important; max-width: none; }

.cta-personal.is-light { background: var(--cream); border-top: 0; --blue: var(--blue-on-light); --blue-light: var(--blue-on-light-hover); }
.cta-personal.is-light h2 { color: var(--navy); }
.cta-personal.is-light p { color: #33425a; opacity: 1; }
.cta-personal.is-light .hero-meta { color: #5a6a7a; }
.cta-personal.is-light .hero-meta span { color: var(--navy); }

body.footer-light footer { background: var(--cream-dark); color: #4a5a72; border-top: 0; --blue: var(--blue-on-light); --blue-light: var(--blue-on-light-hover); }
body.footer-light .footer-brand { color: #33425a; }
body.footer-light .footer-brand strong { color: var(--navy); }
body.footer-light footer a, body.footer-light footer button { color: var(--navy); }
body.footer-light .footer-legal { border-top-color: rgba(29,42,77,0.12); }
body.footer-light .footer-legal a, body.footer-light .footer-legal button, body.footer-light .footer-legal span { color: #5a6a7a; }
