/* ================================================================
   base.css — modern reset + a11y fundamenty
   ================================================================ */

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

* { margin: 0; }

html {
  font-family: var(--font-body);
  font-size: 100%;
  font-optical-sizing: auto;
  line-height: var(--leading-body);
  color: var(--color-text-primary);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  font-size: var(--text-body-lg);
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-normal);
}

h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-body);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }
h6 { font-size: var(--text-h6); }

p { max-width: 70ch; }

/* ============ FOCUS ============ */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-sm);
  inset-block-start: var(--space-sm);
  z-index: var(--z-skip-link);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary-700);
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--weight-bold);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--motion-default);
}

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

/* ============ FORCED COLORS ============ */
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText; }
}
