/* Base Styles - Reset, Variables, Typography */

/* Self-hosted Red Hat Display */
@font-face {
    font-family: 'Red Hat Display';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../assets/fonts/red-hat-display-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Red Hat Display';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../assets/fonts/red-hat-display-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* CSS Variables */
:root {
    /* Brand Colors */
    --dark-charcoal: #333337;
    --dynamic-orange: #f9a800;
    --white: #ffffff;
    --light-gray: #f4f5f5;
    --accent-gray: #545454;

    /* Spacing Scale - 8px base grid system */
    --space-xs: 0.5rem; /* 8px */
    --space-sm: 0.75rem; /* 12px */
    --space-md: 1rem; /* 16px */
    --space-lg: 1.5rem; /* 24px */
    --space-xl: 2rem; /* 32px */
    --space-2xl: 3rem; /* 48px */
    --space-3xl: 4rem; /* 64px */
    --space-4xl: 6rem; /* 96px */

    /* Typography Scale - Modular scale (1.250 - Major Third) */
    --font-size-xs: 0.8rem; /* 12.8px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-base: 1rem; /* 16px */
    --font-size-md: 1.125rem; /* 18px */
    --font-size-lg: 1.25rem; /* 20px */
    --font-size-xl: 1.5rem; /* 24px */
    --font-size-2xl: 2rem; /* 32px */
    --font-size-3xl: 2.5rem; /* 40px */

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Base Typography */
body {
    font-family:
        "Red Hat Display",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--dark-charcoal);
    background-color: var(--white);
}

/* Typography */
h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-tight);
}

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

/* Long-form article typography */
article > .container h2 {
    margin-top: 2.5rem;
}

article > .container h3 {
    margin-top: 1.75rem;
}

article > .container p {
    line-height: var(--line-height-relaxed);
    margin-bottom: 0.75rem;
}

article > .container ul,
article > .container ol {
    margin-bottom: 1.25rem;
}

article > .container li {
    margin-bottom: 0.35rem;
    line-height: var(--line-height-relaxed);
}

article > .container code {
    background-color: var(--light-gray);
    padding: 0.15rem 0.4rem;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    border-radius: 3px;
}

article > .container a {
    color: var(--dark-charcoal);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--dynamic-orange);
    text-decoration-thickness: 2px;
}

article > .container a:hover {
    color: var(--dynamic-orange);
}

article > .container hr {
    border: none;
    border-top: 2px solid var(--light-gray);
    margin: 3rem 0;
}

/* Accessibility - Reduced Motion Support */
/* Respect user preference to reduce motion/animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
