/* =========================================================
   Base CSS
   Purpose: Normalize behavior, establish typography,
   define spacing scale, and enforce accessibility defaults
   ========================================================= */

/* -------------------------
   Box model normalization
   ------------------------- */

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

/* -------------------------
   Root defaults
   ------------------------- */

html {
    line-height: 1.5;
    font-size: 100%;
    text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

/* -------------------------
   Body defaults
   ------------------------- */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Halvetica, Arial, Helvetica, sans-serif;
    color: #111;
    background-color: #fff;
}

/* -------------------------
   Typography defaults
   ------------------------- */

ul,
ol {
    padding-inline-start: 1.25rem;
}

/* -------------------------
   Layout primitives
   ------------------------- */

.container {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* -------------------------
   Accessibility defaults
   ------------------------- */

:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 0;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #fff;
    z-index: 100;
}

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

/* -------------------------
   Links
   ------------------------- */

a {
    color: #005fcc;
    text-decoration: none;
}

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

/* -------------------------
   Media elements
   ------------------------- */

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

/* -------------------------
   Spacing scale (rem-based)
   ------------------------- */

:root {
    --space-0: 0;
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.5rem;   /* 24px */
    --space-6: 2rem;     /* 32px */
    --space-7: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
}
