/* ============================================
   Base Styles — Typography, Body, Links
   ============================================ */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-family: var(--font-heading); font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-family: var(--font-heading); font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: var(--fw-semi); }
h4 { font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: var(--fw-semi); }

a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-text-light);
}

p + p {
  margin-top: var(--space-md);
}

strong, b {
  font-weight: var(--fw-semi);
}

img {
  height: auto;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Keyboard focus ring — high-contrast, scoped to interactive elements */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Keep scroll-jump-to-anchor focus from drawing a ring on decorative wrappers */
:focus:not(:focus-visible) {
  outline: none;
}

/* Skip-to-content link — shown only when focused via keyboard */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 10050;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--fw-semi);
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--color-bg);
  outline-offset: 2px;
}

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