/* CounselPress — Base element styles & helpers
   Progressive-enhancement friendly: readable with no JS, semantic defaults. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings — editorial serif */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif-display);
  color: var(--text-heading);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-sans); font-weight: var(--fw-semibold); letter-spacing: var(--ls-normal); }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--slate-300);
  transition: color var(--dur) var(--ease-standard), text-decoration-color var(--dur) var(--ease-standard);
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

strong, b { font-weight: var(--fw-semibold); color: var(--text-heading); }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-6) 0; }

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

small { font-size: var(--fs-sm); }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }

/* Accessible focus — visible for keyboard users */
:where(a, button, input, select, textarea, [tabindex], summary):focus-visible {
  outline: none;
  box-shadow: var(--focus-shadow);
  border-radius: var(--radius-sm);
}

/* ---- Reusable layout / text helpers ---- */
.cp-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.cp-container--wide   { max-width: var(--container-wide); }
.cp-container--narrow { max-width: var(--container-narrow); }

.cp-section { padding-block: var(--section-y); }
.cp-section--sm { padding-block: var(--section-y-sm); }
.cp-section--ivory { background: var(--color-surface-ivory); }
.cp-section--navy  { background: var(--color-surface-navy); color: var(--text-on-navy); }
.cp-section--navy h1, .cp-section--navy h2, .cp-section--navy h3 { color: var(--text-on-navy); }

.cp-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.cp-section--navy .cp-eyebrow { color: var(--accent-on-navy); }

.cp-lead { font-size: var(--fs-lead); line-height: var(--lh-snug); color: var(--text-body); }

.cp-display { font-family: var(--font-serif-display); font-size: var(--fs-display-1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); color: var(--text-heading); }

.cp-measure { max-width: var(--measure); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-3); top: -3rem;
  background: var(--navy-700); color: var(--white);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius);
  z-index: 1000; transition: top var(--dur) var(--ease-standard);
}
.skip-link:focus { top: var(--space-3); }
