/* =============================================================
   BNS · Base — reset + typography + globals
   ============================================================= */

/* Minimal reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

/* Page */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-feature-settings: "tnum" 0, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Container helpers */
.bns-container { max-width: var(--container); margin: 0 auto; padding-inline: var(--s-5); }
@media (min-width: 768px) {
  .bns-container { padding-inline: var(--s-6); }
}

.bns-prose { max-width: var(--prose); margin-inline: auto; }

/* ============================================================
   Headings — inherit from theme.json, but tighten for non-FSE
   areas (Woo emails, plain widgets, archive titles)
   ============================================================ */
h1, .h1, h2, .h2, h3, .h3 {
  font-family: var(--font-serif);
  color: var(--color-text-strong);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-4);
}
h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--font-sans);
  color: var(--slate-900);
  font-weight: 700;
  line-height: var(--lh-snug);
  margin: 0 0 var(--s-3);
}
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); color: var(--bns-teal-dark); }
h4, .h4 { font-size: var(--fs-h4); }

/* ============================================================
   Body text and links
   ============================================================ */
p {
  margin: 0 0 var(--s-4);
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover, a:focus { color: var(--color-link-hover); }

/* Inline code in body */
:not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  color: var(--slate-900);
}

pre {
  font-family: var(--font-mono);
  background: var(--slate-50);
  border-left: 2px solid var(--bns-teal);
  padding: var(--s-4);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

/* ============================================================
   Skip link + focus
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--bns-teal-deep);
  color: white;
  z-index: 1000;
  border-radius: 0 0 var(--radius-md) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   Eyebrow label — small, uppercase, tracked
   ============================================================ */
.bns-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--tracking-x-wide);
  color: var(--bns-teal-dark);
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.bns-eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--bns-green);
}
.bns-eyebrow--on-dark { color: var(--bns-green); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   GeneratePress overrides — keep these grouped here so they're
   easy to find when the parent updates.
   ============================================================ */
body .site,
body.generate-columns-activated .inside-article {
  background: var(--color-bg);
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.main-navigation .main-nav ul li a {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--bns-teal-dark);
}
