/* ==========================================================================
   Base -- Resets & Default Typography
   Keep this file free of component-specific rules (buttons, cards, etc.)
   Those belong in components.css.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--mg-font-secondary);
  font-size: var(--mg-font-size-base);
  font-weight: var(--mg-font-weight-regular);
  line-height: var(--mg-line-height-base);
  color: var(--mg-color-body-text);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mg-font-primary);
  font-weight: var(--mg-font-weight-bold);
  color: var(--mg-color-heading);
  line-height: var(--mg-line-height-tight);
  margin: 0 0 var(--mg-space-md);
}

h1 { font-size: var(--mg-font-size-3xl); }
h2 { font-size: var(--mg-font-size-2xl); }
h3 { font-size: var(--mg-font-size-xl); }
h4 { font-size: var(--mg-font-size-lg); }
h5,
h6 { font-size: var(--mg-font-size-base); }

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

a {
  color: var(--mg-color-primary);
  text-decoration: none;
  transition: color var(--mg-transition-fast);
}

a:hover,
a:focus {
  color: var(--mg-color-secondary);
}

ul, ol {
  margin: 0 0 var(--mg-space-md);
  padding-left: var(--mg-space-lg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Reasonable default focus state for accessibility -- keep even if
   individual components add their own focus styles. */
:focus-visible {
  outline: 2px solid var(--mg-color-primary);
  outline-offset: 2px;
}
