/* ==========================================================================
   Base element styles
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem; /* keeps anchored headings clear of the sticky header */
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  background: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  color: var(--color-primary-darker);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 750;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-snug);
}

h4 {
  font-size: var(--text-md);
  font-weight: 700;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration-thickness: 2px;
}

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

strong {
  font-weight: 700;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-4);
}

::selection {
  background: var(--color-accent);
  color: var(--color-primary-darker);
}

/* --- Utilities --- */

.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;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--color-white);
}

/* Highlights an unresolved client placeholder such as [BUSINESS_EMAIL].
   Every .tbd must be replaced before launch — see README "Placeholders". */
.tbd {
  padding: 0.05em 0.35em;
  border: 1px dashed currentColor;
  border-radius: 0.25rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

.icon--lg {
  width: 1.75rem;
  height: 1.75rem;
}

.icon--xl {
  width: 2.5rem;
  height: 2.5rem;
}

.text-muted {
  color: var(--color-muted);
}

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