/* ==========================================================================
   base.css — element defaults, typography, accessibility helpers
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--color-text);
}

a:hover {
  color: var(--color-link-dark);
}

/* Visible keyboard focus on every interactive element */
:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

/* Lock page scroll while a drawer / modal is open */
.is-scroll-locked {
  overflow: hidden;
}

/* Visually hidden but available to assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — first focusable element on every page */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  background-color: var(--color-brand);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-2);
  color: var(--color-white);
}
