/* ============================================
   Modern CSS Reset
   Based on Andy Bell's Modern CSS Reset + Custom Additions
   ============================================ */

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

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Set core root defaults */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 100px;
    overflow-x: hidden;
}

html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Make images easier to work with */
img,
picture,
svg {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Additional Resets
   ============================================ */

/* Remove default anchor styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Remove default list styles */
ul,
ol {
    list-style: none;
}

/* Remove default table styles */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Remove default textarea resize */
textarea {
    resize: vertical;
}

/* Remove default iOS input styling */
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='search'],
input[type='url'],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Remove default focus outline (we'll add our own) */
*:focus {
    outline: none;
}

/* Add visible focus ring for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-primary, #2E5C8A);
    outline-offset: 2px;
}

/* Improve accessibility for screen readers */
.sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* Visually hidden but accessible */
[aria-hidden='true'] {
    pointer-events: none;
}
