/* Reset + base element styles */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-charcoal);
  background: var(--color-sand);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  color: var(--color-charcoal);
}

h1 {
  font-size: var(--fs-2xl);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

ul,
ol {
  padding-left: 1.25rem;
}

button {
  font-family: inherit;
}

:focus-visible {
  /* --color-secondary (amber) is only ~2:1 against a white page background,
     under the 3:1 WCAG 1.4.11 non-text-contrast minimum for focus
     indicators — use the darker secondary-600 (~3.2:1) instead. */
  outline: 3px solid var(--color-secondary-600);
  outline-offset: 2px;
}

.visually-hidden {
  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 {
  position: absolute;
  left: 0;
  top: -3rem;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--fs-3xl);
  }

  h2 {
    font-size: var(--fs-2xl);
  }

  h3 {
    font-size: var(--fs-lg);
  }
}
