/**
 * Reset & Normalization
 * Modern CSS reset with accessibility considerations
 */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    min-height: 100vh;
    line-height: var(--leading-normal);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
}

/* Remove list styles */
ul, ol {
    list-style: none;
}

/* Prevent img overflow */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Form elements inherit font */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Button reset */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Link reset */
a {
    color: inherit;
    text-decoration: none;
}

/* Heading reset */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

/* Table reset */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for accessibility */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: var(--color-accent-primary);
    color: var(--color-text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-bg-elevated) var(--color-bg-secondary);
}
