/**
 * Judge Haulage - CSS Reset & Accessibility Defaults
 */

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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements */
ul[class],
ol[class] {
    list-style: none;
    padding: 0;
}

/* Set core root defaults */
html {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-family: var(--font-primary);
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

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

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

/* Focus Indicator Styles (Accessibility compliance) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

/* Skip link style */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 10px 20px;
    z-index: 9999;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: bold;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 20px;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
