/* base.css — reset, body defaults, typography, accessibility */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* clears the 64px fixed navbar + comfortable breathing room */
}

body {
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--t-base), color var(--t-base);
}

/* ── Display headings (Bootstrap .display-*) ─────────────────
   Pull them into Fraunces with optical sizing so service-page
   hero h1s look as refined as the rest of the site.           */
.display-1, .display-2, .display-3,
.display-4, .display-5, .display-6 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.display-1, .display-2 { font-variation-settings: 'opsz' 96; }
.display-3, .display-4 { font-variation-settings: 'opsz' 72; }
.display-5, .display-6 { font-variation-settings: 'opsz' 48; }

/* ── Heading scale ───────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--text-primary);
  font-weight: 400;
}

/* h1: large, airy, optically sized for display */
h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 72;
}

/* h2: section titles — slightly tighter optical size */
h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 36;
}

/* h3: subsection titles — semi-bold for weight on both themes */
h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
  font-variation-settings: 'opsz' 24;
}

/* h4/h5: Instrument Sans for utilitarian labels */
h4, h5 {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}
h4 { font-size: 1.125rem; letter-spacing: -0.005em; }
h5 { font-size: 1rem; }

/* h6: small-caps label style */
h6 {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.4;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
p:last-child { margin-bottom: 0; }

strong { color: var(--text-primary); }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
a:hover { opacity: 0.8; }

img { max-width: 100%; height: auto; display: block; }

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; color: var(--text-secondary); }

/* ── Accessibility ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Noscript fallback banner */
.wa-noscript-banner {
  background: var(--accent-primary);
  color: #fff;
  padding: 1rem;
  text-align: center;
}

/* Smooth theme transitions on key elements */
section,
.wa-card,
.wa-navbar,
.wa-footer,
.wa-cert-list {
  transition: background-color var(--t-base), border-color var(--t-base);
}
